Skip to content

testing-farm/packit.dev

 
 

Repository files navigation

packit.dev

packit.dev website content

Hugo

Installation

This repository uses git submodules, so you have to git clone --recurse-submodules it.

Fedora

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:

  1. dnf install hugo
  2. hugo help

MacOS

$ brew install hugo

Add new post

hugo new posts/packit-xyz.md

Content

All content is organized in content directory tree.

Start Hugo server

  1. make server or hugo server -D (-D means 'show also content marked as draft')
  2. Web Server

Rebuild content & Github Pages

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

About page

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.

Themes

Currently, we use Grav Learn theme. For complete list of themes for Hugo, see this. If you want to use a theme:

  1. git submodule init themes/<theme_name>
  2. git submodule update
  3. set theme = "theme_name" in config.toml

Site Configuration

Configuration is stored in config.toml.

Releases

No releases published

Packages

No packages published

Languages

  • HTML 98.9%
  • Makefile 1.1%