Introduction
Hugo is an open-source static website generator written in GO, I’m using it as a website generator for this particular website.
This is a guide on how to deploy a static website with hugo and gitlab
Purpose of this guide
This documentation serves as a guide for me to look back on when I need to deploy websites using Gitlab’s CI/CD or Hugo and alternatives.
You will be able to use this guide as reference for deploying your own websites!
Cloning the repository
This will clone the repository of the website with the theme
|
|
Hugo
This command will run a server on localhost:1313
|
|
Running hugo alone will Build the website and output the statistics and build time with any errors that might come up during the build
For more detailed hugo commands please read their documentation
Theme
This is the theme I’m using currently
Here are more themes to checkout
Configuration
This Documentation contains the configuration file structure and the different configuration files
Shortcodes
[Here] are the documentation for shortcodes, those listed below are just some I’ll use more frequently
Code Shortcode
|
|
|
|
Image
Tabs
Windows section
|
|
MacOS section
Hello world!
Ubuntu section
Great!
Gitlab CI/CD with Hugo
This is the gitlab’s CI/CD .yml file, available through the side pane > CI/CD > Editor
|
|