Source code of pamasol.github.io website, based on Hugo, which is a static site generator.
-
Create following folders on your machine:
C:\Hugo\bin C:\Hugo\Sites
-
Download the latest zipped Hugo executable (
*.exe
) from Hugo Releases. -
Extract all contents to your
C:\Hugo\bin
folder. -
In CMD, add the
hugo.exe
executable to yourPATH
with the following command (you need administrator privileges):set PATH=%PATH%;C:\Hugo\bin
-
Reboot your PC.
-
Go to
C:\Hugo\Sites
and run (Git must be installed on your machine):git clone https://github.com/pamasol/pamasol.github.io.git
-
Cd into the project folder as follows:
cd pamasol.github.io
-
This template is based on the Hugo Relearn Theme from @McShelby. Many thanks to him for this great piece of code. The submodule can be downloaded as follows:
git submodule init git submodule update --remote
-
Now you can run hugo comands. Following commands are helpful:
hugo help
gives you a command overviewhugo server -D
runs a local server with drafts enabled.hugo -D
builds static pages and puts into folderdocs
. Not needed in this repo since build and deployment realized with GitHub actions.git status
calls for the status of your local file, for example to check on untracked filesgit add --all
Adds everything up for the commit, such as untracked files etc.git commit -m "text"
Commits everything, the text can be changed to a commentary of the changesgit push
Pushes everything up to the server
When pushing to master
branch following pipeline gets triggered that builds the static pages in a first step. The static pages are placed in th gh-pages
branch and will be moved from there to https://pamasol.github.io in a second step:
-
create-static-page
is defined in.github/workflows/gh-pages.yml
. It creates the static content and places it in thegh-pages
branch. -
pages-build-deployment
takes the static pages and pushes them on GitHub Pages. There is no*.yml
file for this procedure, it is defined in settings > pages.