Skip to content

jn64/gollum

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This is a guide to using Gollum (Git-powered wiki with browser frontend) to run a local wiki with certain requirements:

  • Use latest stable version of Gollum (6.1.0 as of this writing)
    • in a container
    • with rootless Podman
    • on a SELinux-enabled distro (Fedora 41)
    • via a systemd user service
  • Use a CommonMark-compliant parser (commonmarker 0.23.11) instead of the default kramdown
  • Store Gollum config in the same place as wiki contents

Instructions

We will use this branch as the basis of a new wiki, with some example config included.

  1. Clone this branch to ~/wiki. This will be your wiki.

    git clone -b example --depth 1 https://github.com/jn64/gollum.git ~/wiki
  2. Reset the git history (you don't need your wiki to be linked to this repo):

    cd ~/wiki
    rm -rf ~/wiki/.git
    git init -b main
    git add .
    git commit -m init
  3. Build custom Gollum image that includes commonmarker instead of kramdown:

    podman build -t gollum:v6.1.0-commonmark https://github.com/jn64/gollum.git#v6.1.0-commonmark

    The resulting image is localhost/gollum:v6.1.0-commonmark (see podman image list).

  4. Create a temporary container with this custom image:

    podman run --name gollum --rm --init -v ~/wiki:/wiki:z -v ~/wiki/.gollum:/etc/gollum:z -p 4567:4567 --userns=keep-id:uid=1000,gid=1000 gollum:v6.1.0-commonmark -- --config /etc/gollum/config.rb

    Test it by visiting http://localhost:4567 in your browser. Make sure it works (edit, create new page, etc).

  5. Stop the container with Ctrl-C, or in another terminal:

    podman container stop gollum
  6. Generate quadlet from previous podman-run command:

    mkdir -p ~/.config/containers/systemd
    podlet -i podman run --name gollum --rm --init -v ~/wiki:/wiki:z -v ~/wiki/.gollum:/etc/gollum:z -p 4567:4567 --userns=keep-id:uid=1000,gid=1000 gollum:v6.1.0-commonmark -- --config /etc/gollum/config.rb > ~/.config/containers/systemd/gollum.container
  7. Start the service:

    systemctl --user daemon-reload
    systemctl --user start gollum

Done! The service will start automatically at your user login.

For convenience, pin or bookmark http://localhost:4567 in your browser.

Configuration

See .gollum/config.rb

References

About

Guide to using Gollum wiki in a container with Podman

Resources

Stars

Watchers

Forks

Contributors

Languages

  • Ruby 100.0%