Learn how to set up a blog server using Hugo + GitLab Pages. It's free.
Goal
Below is a configuration diagram (example) of a blogging environment with Hugo + GitLab Pages. The goal here is to create a Hugo content repository (including themes and CI/CD container definitions) and a directory to be published as a website in GitLab, manually launch the container, and build/publish the sample website.
Assumption
I will assume that you have a Free GitLab account with GitLab SaaS available.
Procedure
Create a directory in GitLab that will be published as a Hugo content repository and website
log in to GitLab with a browser.
Press
New projectbutton.Press
Create from templatebutton.Press
Use templateinPages/Hugorecord.Enter
Project name, selectVisibility Level, and pressCreate projectbutton to create a project containing a Hugo content repository and a directory to be published as a website.
Build and publish a sample site with Hugo's CI/CD container
Open
CI/CD-Pipelinesscreen of the project.Press
Run pipelinebutton.Press
Run pipelinebutton again, and the build will be completed in about 30s to 60s.Open
Settings-Pagesof the project.Open the URL indicated by
Your pages are served under:to see a sample site that has been built.
Caution
: As of January 2025, some errors occur in step 3 and the build fails. Please apply a another theme.
Top comments (0)