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 project
button.Press
Create from template
button.Press
Use template
inPages/Hugo
record.Enter
Project name
, selectVisibility Level
, and pressCreate project
button 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
-Pipelines
screen of the project.Press
Run pipeline
button.Press
Run pipeline
button again, and the build will be completed in about 30s to 60s.Open
Settings
-Pages
of the project.Open the URL indicated by
Your pages are served under:
to see a sample site that has been built.
Note
: The sample site will be displayed with a broken layout at this stage, but it will be displayed correctly after applying the theme of your choice and making the necessary settings.
See "Theme" for theme selection/application and "GitLab Pages development client setup with Visual studio Code" for development client setup required for theme application/configuration.
Top comments (0)