Free hosting for Hugo on frama.io


You’ve tried Hugo and you’re ready to push it online?

You can get free hosting at https://you.frama.io thanks to the french non-profit Framasoft

Here is a short Howto

Create an account on Framagit

First, create an account on Framagit.org

Click on the link received by email and customize the interface of Framagit answering the following question:

Framagit, intro

Autorize the Gitlab Pages to build from your account:

Framagit, autorize

Project initialization

Create a new project:

  • project slug must be <your-username>.frama.io
  • Visibility Level must be set to ‘Public’ (otherwise only registered members of your project will see the website)
  • do not tickInitialize repository with a README’ to avoid conflicts in Git

Take a moment to register a SSH key in order to push without filling a password every time

Open the page ‘Project overview’, and copy the reference of your repository:

Framagit repository reference

Use this reference in Git to add your repository as remote:

git remote add origin git@framagit.org:<your-nickname>/<your-nickname>.frama.io.git

Setup continuous integration

Last step, create a file called .gitlab-ci.yml at the root of your project and paste these lines inside:

image: monachus/hugo

variables:
  GIT_SUBMODULE_STRATEGY: recursive

pages:
  script:
  - hugo --enableGitInfo
  artifacts:
    paths:
    - public
  only:
  - master

You’re done!

Once you’ve pushed your files, wait a few seconds and your brand new website will stand at https://<your-nickname>.frama.io.

Framasoft is a non-profit which can only keep running thanks to our donations.

If you have the possibility, please consider making a donation


Troubleshooting

It’s not working?

You can:

  • get some informations about the building process here: Framagit → CI/CD → Pipelines
  • get some insight on the forums of Framasoft

Known issues

While using Framasoft services, you’re not in control of the version of Hugo in use, and an update on Framagit can break things in an unexpected way. You’ll get an automatic email if the build does not work anymore.

Moreover, if this version differs from the one you use locally and something gets buggy only on the online version, have a look to the release notes of Hugo and check if something critical changed between the version on Framagit and the one you use locally.


References


Related articles: