It is so easy that my 9-year-old son did it. He now manages a web site for his fictional country called Arenztopia. Check out the back story.
gh-pages
from the dropdown for the web site to build.config.toml
file, and edit it. Change its title
attribute to something else, and click on the “Commit changes” button at the bottom. We need this step to trigger the workflow at the new repository.config.toml
file and the files in the content
folder. Go to the “Add your own content” section at the end of this article to see how. You can check out the instructions for the Ananke theme here.my-theme
. The following are commands in a Linux terminal. You could use the Terminal app on Mac or PowerShell on Windows.exampleSite
to the project’s top-level directory.config.toml
in the project root directory my-site/
to point to the right theme.my-site
, and push the my-site
directory onto its master
branch. Here are the steps for uploading files from GitHub’s web UI. Now we are ready to publish the theme example site.gh-pages
branch.Settings, GitHub Pagesmaster
branch, and push the generated HTML files to the gh-pages
branch for publication. From the project’s Actions tab, click on the “set up a workflow yourself” button.Set up a workflow yourselfmaster
branch as .github/workflows/main.yml
file. The content of the file is as follows.master
branch. Whenever new content is pushed to the master
branch, the automated GitHub Actions workflow will set up the Hugo software, run the hugo
command, and turn those files into HTML files for a static web site.gh-pages
branch of the same repository. They will be published on the specified web address by GitHub Pages as configured.cname
attribute in the last line. That is the custom domain name we set up with GitHub Pages. If you do not have a custom domain name, just remove this line, and you can access your web site at the domain provided by GitHub Pages.master
branch. Please refer to the documentation of your selected theme. In general, Hugo templates work like this:md
files are in the content
folder.md
file has a header section with properties such as the page’s menu placement, priority, timestamp, excerpt, etc.data
folder.static
folder.