This repository provides a simple starter template for creating a website using Hugo and hosting it on GitHub Pages. Follow the instructions below to set up the project.
- Open your terminal.
- You may need to install the XCode Command Line Tools:
xcode-select --install
- Clone the repository:
git clone https://github.com/{**your-username**}/hugo-example-starter-github-pages.git - Change directory to the cloned repo:
cd hugo-example-starter-github-pages - Run the setup script:
./setup.sh
It could be that after installing Homebrew, brew is not found in the $PATH variable. The script will stop, since it won't find the brew command. Add brew to the $PATH variable and restart the ./setup.sh. Usually the post-installation process of Homebrew will tell you the exact commands, you need to use in the part called Next Steps.
- In the
contentfolder, you'll find the_index.mdfile. Edit this file to customize the main content of your site.
- The
layoutsfolder contains HTML files that structure the entire website. Only edit these if you are familiar with Hugo templating.
- In the
staticfolder:assets: Contains the CSS files, primarilysplit.cssfor styling. Edit this file if you want to customize the styles.imagesandvideos: Save the images and videos you want to use on the website.favicon.ico: This is the favicon for your site. Replace it with another icon if needed. A favicon is a small icon associated with a website, typically displayed in the browser's address bar or tabs, serving as a visual identifier for the site.
- The
publicfolder contains the generated build files. Developers typically don't need to touch this folder as it's automatically generated.
- Edit the
config.tomlfile. Pay attention to lines under "[params]". Lines starting with # are comments. Customize these settings according to your preferences.
- Edit the content in
_index.md. - Add images and videos to
static/imagesandstatic/videos. - Replace the
favicon.icowith your desired icon. - Edit configuration settings in
config.toml, especially those under "[params]". - Customize styles in
static/assets/split.cssif needed. - Customize structure in
layoutsif needed.
Now, your Hugo website is ready for customization and can be deployed on GitHub Pages! To preview your site, run hugo server -D in the terminal and visit the provided local address.
Refer to following page for more information: https://gohugo.io/hosting-and-deployment/hosting-on-github/
Note: A github workflow was already added to the repository. Update .github/workflows/hugo.yaml, if necessary.
The original template is released under the Creative Commons Attribution 3.0 License. Please keep the original attribution link when using for your own project. If you'd like to use the template without the attribution, you can check out the license option via the template author's website.
- Original Split Template by One Page Love
- Hugo Port of Split template by Felix Börner