I tried building a site using Hugo, GitLab and Netlify
Building the site
Prerequisites
- A GitLab account is already registered
- A Netlify account is already registered
- hugo is already installed locally
Steps
Create a repository on GitLab
git clone it locally
Create a new site with hugo
Copy the directories and files created in 3. into the directory from 2.
Create .gitignore
.DS_Store publicInstall the theme
$ git submodule add https://github.com/halogenica/beautifulhugo.git beautifulhugoThe theme has been decided in advance, so copy it under the root
$ cp -r themes/beautifulhugo/exampleSite/* ./
$ cp -r themes/beautifulhugo/layouts ./
$ cp -r themes/beautifulhugo/static ./- Check the site build locallyThis alone is enough to build the site, so open http://localhost:1313 in a browser and confirm that it is displayed Once you have confirmed it, stop hugo server with ctrl+c
$ hugo server .... Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) - Update the repository
$ git add . $ git commit . $ git push -u origin master
After this, I write articles, edit the settings and the layout, and keep updating the repository