A fast Go implementation of the Jekyll blogging engine
A fast Go implementation of the Jekyll blogging engine
[![go badge][go-svg]][go-url] [![Golangci-lint badge][golangci-lint-svg]][golangci-lint-url] [![Coveralls badge][coveralls-svg]][coveralls-url] [![Go Report Card badge][go-report-card-svg]][go-report-card-url] [![MIT License][license-svg]][license-url]
Gojekyll is a partially-compatible clone of the Jekyll
static site generator, written in the Go programming
language. It provides build and serve commands, with directory watch and
live reload.
| Gojekyll | Jekyll | Hugo | |
|---|---|---|---|
| Stable | ✓ | ✓ | |
| Fast | ✓ | ||
| (~3×Jekyll) | ✓ | ||
| Template language | Liquid | Liquid | Go, Ace and Amber templates |
| SASS | ✓ | ✓ | ✓ |
| Jekyll compatibility | partial | ✓ | |
| Plugins | some | yes | shortcodes, theme components |
| Windows support | ✓ | ✓ | ✓ |
| Implementation language | Go | Ruby | Go |
gojekyll build # builds the site in the current directory into _site
gojekyll serve # serve the app at http://localhost:4000; reload on changes
gojekyll help
gojekyll help buildYou can use gojekyll with the official danog/gojekyll image, for example to build the site in the current directory into _site:
docker run --user $UID:$GID -v $PWD:/app --pull always --rm -it danog/gojekyll build -s /appAnother example, serve the website in the current directory on http://localhost:4040, automatically reloading on changes:
docker run --user $UID:$GID -v $PWD:/app --pull always --network host --rm -it danog/gojekyll serve -s /appGemfile that lists the theme., and
run bundle install. The Jekyll theme
instructions provide more detail, and
should work for Gojekyll too.Pre-requisites:
brew install go; or (2)
download.Then run:
go install github.com/osteele/gojekyll@latestAdd this to your .bashrc or .zshrc:
# Bash:
eval "$(gojekyll --completion-script-bash)"
# Zsh:
eval "$(gojekyll --completion-script-zsh)"This project works on the GitHub Pages sites that I and other contributors care about. It looks credible on a spot-check of other Jekyll sites.
gojekyll supports mathematical expressions using MathJax or KaTeX, compatible with Jekyll/kramdown syntax:
$$...$$ delimiters for both inline and display mathExample usage:
Inline math: The equation $$E=mc^2$$ is famous.
Display math:
$$
\int_0^\infty e^{-x} dx = 1
$$Setup: Add MathJax or KaTeX scripts to your layout templates. See example/_layouts/math.html and example/math-example.md for complete examples.
Missing features:
Also see the detailed status below.
These will probably not change:
By design:
_config.yml file – for example, a list where a string is
expected, or vice versa – is generally an error.serve --watch (the default) reloads the _config.yml and data files too.serve generates pages on the fly; it doesn't write to the file system./tmp/gojekyll-${USER}, not ./.sass-cacheUpstream:
This is bold renders as bold. This behavior matches the Markdown
spec, but differs
from Jekyll's default Kramdown processor.## Title (ref)) is #title-ref,
not #title-https-example-path-to-details-ref.## Either/or is #either-or not
#eitheror; the id of ## I'm Lucky is #i-m-lucky not #im-lucky.Muzukashii:
scssifybuild--source, --destination, --drafts, --future, --unpublished--incremental, --watch, --force_polling, JEKYLL_ENV=production--baseurl, --config, --lsi--limit-postscleanhelpserve--open-uri, --host, --port--incremental, –watch, --force_polling--baseurl, --config--detach, --ssl-* – not planneddoctor, import, new, new-theme – not plannedIf the error is "403 API rate limit exceeded", you are probably building a
repository that uses the jekyll-github-metadata gem. Try setting the
JEKYLL_GITHUB_TOKEN, JEKYLL_GITHUB_TOKEN, or OCTOKIT_ACCESS_TOKEN
environment variable to the value of a GitHub personal access
token and trying again.
Thanks goes to these wonderful people (emoji key):
Oliver Steele ⚠️
Daniil Gentili
Brian Smith
Chimbori
Maurits van der Schee
Mike Congdon
Bjørn Erik Pedersen
Max Bernstein
Adrian Sampson
愚千一
Cameron Elliott
Manas Tungare
Nathan Grennan
Abhijeet Bodas
train860
This project follows the all-contributors specification. Contributions of any kind welcome!
Gojekyll uses these libraries:
| Package | Author(s) | Usage | License |
|---|---|---|---|
| github.com/jaschaephraim/lrserver | Jascha Ephraim | Live Reload | MIT License |
| github.com/kyokomi/emoji | kyokomi | jemoji plugin emulation |
MIT License |
| github.com/osteele/liquid | yours truly | Liquid processor | MIT License |
| github.com/pkg/browser | pkg | serve --open-url option |
BSD 2-clause "Simplified" License |
| github.com/radovskyb/watcher | Benjamin Radovsky | Polling file watch (--force_polling) |
BSD 3-clause "New" or "Revised" License |
| github.com/danog/blackfriday | Russ Ross, Daniil Gentili | Markdown processing | Simplified BSD License |
| github.com/sass/dart-sass | Listed here | The reference implementation of Sass, written in Dart. | MIT License |
| github.com/tdewolff/minify | Taco de Wolff | CSS minimization | MIT License |
| github.com/bep/godartsass | Drew Wells | Go API backed by the native Dart Sass Embedded executable. | MIT License |
| github.com/alecthomas/kingpin/v2 | Alec Thomas | command-line arguments | MIT License |
| github.com/alecthomas/chroma | Alec Thomas |
No open issues yet, or sync has not completed.