packit.dev website content
This repository uses git submodules, so you have to git clone --recurse-submodules
it.
The current build of hugo in Fedora does not work with our setup, please use this copr repo instead:
$ dnf copr enable daftaupe/hugo
And then:
dnf install hugo
hugo help
$ brew install hugo
hugo new posts/packit-xyz.md
All content is organized in content directory tree.
make server
orhugo server -D
(-D
means 'show also content marked as draft')- Web Server
tl;dr:
Run make generate
.
Long story:
We host the content on GitHub Pages from docs/ folder.
See GitHub Pages
section in this repo's Settings.
To regenerate the content in docs/
folder, you have to run hugo
.
However, running hugo
does not remove generated files before building.
This means that you should delete the docs/ directory before running the hugo
command.
If you do not remove these files, you run the risk of the wrong files (e.g., drafts or future posts) being left in the generated site.
If you keep forgetting to run make generate
before you push your changes, you can utilize git pre-commit hook.
$ echo "make generate && git add docs/*" > .git/hooks/pre-commit
$ chmod +x .git/hooks/pre-commit
We want the About page
to be visible on the top of the website, so we have to keep the date:
in the about.md
newer then in the other content files.
If you find a better way, let us know.
Currently, we use Grav Learn theme. For complete list of themes for Hugo, see this. If you want to use a theme:
git submodule init themes/<theme_name>
git submodule update
- set
theme = "theme_name"
in config.toml
Configuration is stored in config.toml.