gh-pagesfrom the dropdown for the web site to build.
config.tomlfile, and edit it. Change its
titleattribute 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.tomlfile and the files in the
contentfolder. 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.
exampleSiteto the project’s top-level directory.
config.tomlin the project root directory
my-site/to point to the right theme.
my-site, and push the
my-sitedirectory onto its
masterbranch. Here are the steps for uploading files from GitHub’s web UI. Now we are ready to publish the theme example site.
gh-pagesbranch.Settings, GitHub Pages
masterbranch, and push the generated HTML files to the
gh-pagesbranch for publication. From the project’s Actions tab, click on the “set up a workflow yourself” button.Set up a workflow yourself
.github/workflows/main.ymlfile. The content of the file is as follows.
masterbranch. Whenever new content is pushed to the
masterbranch, the automated GitHub Actions workflow will set up the Hugo software, run the
hugocommand, and turn those files into HTML files for a static web site.
cnameattribute 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.
masterbranch. Please refer to the documentation of your selected theme. In general, Hugo templates work like this:
mdfiles are in the
mdfile has a header section with properties such as the page’s menu placement, priority, timestamp, excerpt, etc.