# 30x faster fork of Gojekyll
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
[![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](https://jekyllrb.com)
static site generator, written in the [Go](https://golang.org) programming
language. It provides `build` and `serve` commands, with directory watch and
live reload.
This fork also features native Chroma integration for a 30x performance improvement and support for additional Liquid tags.
| | Gojekyll | Jekyll | Hugo |
|-------------------------|-------------------------------------------|--------|--------------|
| Stable | | ✓ | ✓ |
| Fast | ✓
([~20×Jekyll](./docs/benchmarks.md)) | | ✓ |
| Template language | Liquid | Liquid | Go, Ace and Amber templates |
| SASS | ✓ | ✓ | ✓ |
| Jekyll compatibility | [partial](#current-limitations) | ✓ | |
| Plugins | [some](./docs/plugins.md) | yes | shortcodes, theme components |
| Windows support | | ✓ | ✓ |
| Implementation language | Go | Ruby | Go |
- [Gojekyll](#gojekyll)
- [Usage](#usage)
- [Installation](#installation)
- [Binary Downloads](#binary-downloads)
- [From Source](#from-source)
- [[Optional] Install command-line autocompletion](#optional-install-command-line-autocompletion)
- [Status](#status)
- [Current Limitations](#current-limitations)
- [Other Differences](#other-differences)
- [Feature Checklist](#feature-checklist)
- [Contributors](#contributors)
- [Attribution](#attribution)
- [Related](#related)
- [License](#license)
## Usage
```bash
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 build
```
## Installation
### Binary Downloads
1. Linux, Windows and macOS binaries are available from the [releases
page](https://github.com/danog/gojekyll/releases).
2. [Optional] **Themes**. To use a theme, you need to install Ruby and
[bundler](http://bundler.io/). Create a `Gemfile` that lists the theme., and
run `bundle install`. The [Jekyll theme
instructions](https://jekyllrb.com/docs/themes/) provide more detail, and
should work for Gojekyll too.
### From Source
Pre-requisites:
1. **Install go** (1) via [Homebrew](https://brew.sh): `brew install go`; or (2)
[download](https://golang.org/doc/install#tarball).
2. See items (2-3) under **Binary Downloads**, above, for optional installations.
First-time install:
```bash
go get github.com/danog/gojekyll
```
Update to the latest version:
```bash
go get -u github.com/danog/liquid github.com/danog/gojekyll
```
## [Optional] Install command-line autocompletion
Add this to your `.bashrc` or `.zshrc`:
```bash
# Bash:
eval "$(gojekyll --completion-script-bash)"
# Zsh:
eval "$(gojekyll --completion-script-zsh)"
```
## Status
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.
### Current Limitations
Missing features:
- Pagination
- Windows compatibility
- Math
- Plugin system. ([Some individual plugins](./docs/plugins.md) are emulated.)
- Liquid filter `sassify` is not implemented
- Liquid is run in strict mode: undefined filters and variables are errors.
- Missing markdown features:
- [attribute lists](https://kramdown.gettalong.org/syntax.html#attribute-list-definitions)
- [`markdown="span"`, `markdown="block"`](https://kramdown.gettalong.org/syntax.html#html-blocks)
- Markdown configuration options
Also see the [detailed status](#feature-status) below.
### Other Differences
These will probably not change:
By design:
- Plugins must be listed in the config file, not a Gemfile.
- The wrong type in a `_config.yml` file – for example, a list where a string is
expected, or vice versa – is generally an error.
- Server live reload is always on.
- `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.
- Files are cached in `/tmp/gojekyll-${USER}`, not `./.sass-cache`
Upstream:
- Markdown:
- `<` and `>` inside markdown is interpreted as HTML. For example, `This is
bold` renders as bold. This behavior matches the [Markdown
spec](https://daringfireball.net/projects/markdown/syntax#html), but differs
from Jekyll's default Kramdown processor.
- The autogenerated id of a header that includes HTML is computed from the
text of the title, ignoring its attributes. For example, the id of `## Title
(ref))` is `#title-ref`,
not `#title-https-example-path-to-details-ref`.
- Autogenerated header ids replace punctuation by the hyphens, rather than the
empty string. For example, the id of `## Either/or` is `#either-or` not
`#eitheror`; the id of `## I'm Lucky` is `#i-m-lucky` not `#im-lucky`.
Muzukashii:
- An extensible plugin mechanism – support for plugins that aren't compiled into
the executable.
### Feature Checklist
- [ ] Content
- [x] Front Matter
- [x] Posts
- [x] Static Files
- [x] Variables
- [x] Collections
- [x] Data Files
- [ ] Assets
- [ ] Coffeescript
- [x] Sass/SCSS
- [ ] Customization
- [x] Templates
- [ ] Jekyll filters
- [ ] `scssify`
- [x] everything else
- [x] Jekyll tags
- [x] Includes
- [x] Permalinks
- [ ] Pagination
- [ ] Plugins – partial; see [here](./docs/plugins.md)
- [x] Themes
- [x] Layouts
- [x] Server
- [x] Directory watch
- [ ] Commands
- [x] `build`
- [x] `--source`, `--destination`, `--drafts`, `--future`, `--unpublished`
- [x] `--incremental`, `--watch`, `--force_polling`, `JEKYLL_ENV=production`
- [ ] `--baseurl`, `--config`, `--lsi`
- [ ] `--limit-posts`
- [x] `clean`
- [x] `help`
- [x] `serve`
- [x] `--open-uri`, `--host`, `--port`
- [x] `--incremental`, `–watch`, `--force_polling`
- [ ] `--baseurl`, `--config`
- [ ] `--detach`, `--ssl`-* – not planned
- [ ] `doctor`, `import`, `new`, `new-theme` – not planned
- [ ] Windows
## Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Oliver Steele 💻 🎨 📖 🤔 🚇 🚧 📆 👀 ⚠️ |
Bjørn Erik Pedersen 📖 |
Maurits van der Schee 💻 |