~nora/hugo-sandbox

Hugo sandbox
publish posts
Fix readme and language
Add home page content

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~nora/hugo-sandbox
read/write
git@git.sr.ht:~nora/hugo-sandbox

You can also use your local clone with git send-email.

#Hugo Sandbox

This is a sandbox to play with Hugo framework.

#Creating a new project

See Hugo documentation and Congo theme documentation.

Install the following tools.

  • git: version control system
  • hugo: static site generator
  • hut: deployment tool for sourcehut

Create a new project.

hugo new site hugo-sandbox
cd hugo-sandbox
git init

Add a theme (Congo theme).

git submodule add -b stable https://github.com/jpanther/congo.git themes/congo
echo "theme = 'congo'" >> hugo.toml

Update theme.

git submodule update --remote --merge

#Adding content

Add content.

hugo new content posts/page.md

Commit and push changes with git.

#Testing

Run server (-D option include draft content).

hugo server
hugo server -D

You can find the website locally at http://localhost:1313.

#Publishing

Publish on sourcehut pages.

hugo
hut pages publish -d nora.srht.site public

You can find the website at https://nora.srht.site.