This page was made with Hugo and Blowfish, and is deployed on GitHub Pages.
Building Static Websites with Blowfish and Hugo#
Setup Process#
While Hugo is the core framework that powers this site, Blowfish provides a convenient CLI tool called blowfish-tools
that simplifies the setup process.
Install prerequisites:
- First, install Node.js on your local machine
- Install Hugo as it’s required by Blowfish
Install Blowfish Tools:
npm install -g blowfish-tools
Create a new site:
blowfish new site your-site-name cd your-site-name
This command automatically initializes Git, installs the Blowfish theme, and sets up the recommended configuration.
Create content:
blowfish new post "My First Post"
This command creates a new post with the proper front matter already configured.
Preview your site locally:
blowfish serve
This starts the development server with live reload enabled.
For more detailed instructions and additional features, see the Blowfish documentation. The Blowfish CLI tool makes it much easier to get started while still leveraging the full power of Hugo under the hood.
Publishing on GitHub Pages#
This site is deployed using GitHub Pages with a GitHub Actions workflow. The source code is available at 3sztof/3sztof.github.io.
How It Works#
Repository Structure:
main
branch: Contains the source code (Hugo content, configuration, etc.)gh-pages
branch: Contains the generated static site that GitHub serves
GitHub Actions Workflow:
- When changes are pushed to the
main
branch, a GitHub Actions workflow automatically:- Checks out the code
- Sets up Hugo
- Builds the site
- Deploys the generated static files to the
gh-pages
branch
- When changes are pushed to the
Setting Up Your Own:
- Create a repository named
username.github.io
- Push your Hugo site to the
main
branch - Create a GitHub Actions workflow file at
.github/workflows/hugo.yml
- Configure GitHub Pages to serve from the
gh-pages
branch
- Create a repository named
For a complete example, check out the workflow configuration in this site’s repository.
This setup provides a smooth workflow where you only need to focus on creating content in the main
branch, and the deployment happens automatically whenever you push changes.