Skip to content

JackMcKew/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

  1. dnf install hugo
  2. hugo help

There's also a copr repo, but the newer versions not always work as expected, you have to experiment a bit:

$ dnf copr enable daftaupe/hugo

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

If you didn't clone using git clone --recurse-submodules please follow instruction in themes section.

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.

About

packit.dev website content

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 98.8%
  • Makefile 1.2%