Use this repo to set up a personal Gist dashboard hosted on Github Pages. Check out this example gistbook.
Getting started is easy, you can finish everything in a few minutes from your browser:
- Fork this repository
- User settings -> Developer settings -> Personal access tokens -> Generate new token -> Allow Gists permission -> Generate token -> Copy
- Repository settings -> Secrets -> Actions -> New repository secret -> Name it
GIST_TOKEN
+ paste the generated token - Repository settings -> Pages -> Source -> Github Actions
- Actions -> Enable workflows
- Trigger the workflow for the first time by pushing a commit, e.g.:
- Edit
_config.yml
-> url: https://(your_username).github.io -> Commit
- Edit
- Wait for the action to finish -> Check https://(your_username).github.io/gistbook
The website will be rebuilt automatically every day, you can trigger a manual rebuild from the Actions tab.
Tags are parsed from the Gist description, the following formats are supported:
- "A nice title #tag1 #tag2"
- "[Another nice title] #tag1 #tag2"
- "#tag1 #tag2"
In case there is no suitable title found in the description, name of the first file will be used.
- Edit
.github/workflows/jekyll.yml
to include secret Gists in your dashboard:python bootstrap.py ${{ secrets.GIST_TOKEN }} --include_private
- Edit
_data/menu.yml
to modify homepage layout (docs). - Edit
README.md
to include workflow badges for your Gistbook:- replace
krupkat
with your Github username
- replace
- Edit
_config.yml
title
,author
,description
,url
- for details on
theme_config
options check the config from the original theme
- Jekyll build environment, see docs for setup instructions. (on Windows I recommend running on WSL)
- Python 3 +
Jinja2
,PyGithub
andsanitize-filename
pip packages - The requirements specified in
Gemfile
work on Ubuntu 22.04, you can modify the versions needed to suit your distribution
One time:
git clone
cd repo
bundle install
This will generate the files in the _site
directory:
./bootstrap.py GIST_TOKEN
bundle exec jekyll serve
Inspiration: https://jpmens.net/2019/04/03/backup-all-my-gists/
Theme: https://github.com/riggraz/no-style-please