Based on https://sighingnow.github.io/jekyll-gitbook
docker run --rm -v $(pwd):/srv/jekyll -p 4000:4000 -it jekyll/jekyll:builder jekyll serve
Compared to org jekyll-gitbook
Some text with a [link](https://example.com/some/link){: .alert-link} that should be displayed as alert info
{: .alert .alert-info}
Some text with a [link](https://example.com/some/link){: .alert-link} that should be displayed as alert success message
{: .alert .alert-success}
Some text with a [link](https://example.com/some/link){: .alert-link} that should be displayed as alert warning
{: .alert .alert-warning}
Some text with a [link](https://example.com/some/link){: .alert-link} that should be displayed as alert danger message
{: .alert .alert-danger}
The template includes a little JavaScript to add link icons in front of all h1, h2, h3
if they have a non empty id attribute.
The icon becomes visible when hovering over a headline and on click a deep link to that headline is put into the clipboard.
The script is located in /assets/js/paragraph-link.js
Live demo on Github Pages: https://sighingnow.github.io/jekyll-gitbook
GitBook is an amazing frontend style to present and organize contents (such as book chapters
and blogs) on Web. The typical to deploy GitBook at Github Pages
is building HTML files locally and then push to Github repository, usually to the gh-pages
branch. It's quite annoying to repeat such workload and make it hard for people do version
control via git for when there are generated HTML files to be staged in and out.
This theme takes style definition out of generated GitBook site and provided the template for Jekyll to rendering markdown documents to HTML, thus the whole site can be deployed to Github Pages without generating and uploading HTML bundle every time when there are changes to the original repo.
This theme can be used just as other Jekyll themes.
Fork this repository and add your markdown posts to the _posts
folder.
This theme can be ran locally using Ruby and Gemfiles.
Testing your GitHub Pages site locally with Jekyll - GitHub
The search functionality in jekyll-gitbook theme is powered by the gitbook-plugin-search-pro plugin and is enabled by default.
https://sighingnow.github.io/jekyll-gitbook/?q=generated
The code highlight style is configurable the following entry in _config.yaml
:
syntax_highlighter_style: colorful
The default code highlight style is colorful
, the full supported styles can be found from the rouge repository. Customized
style can be added to ./gitbook/rouge/.
The jekyll-gitbook theme leverages jekyll-toc to generate the Contents for the page.
The TOC feature is not enabled by default. To use the TOC feature, modify the TOC
configuration in _config.yml
:
toc:
enabled: true
This work is open sourced under the Apache License, Version 2.0, using the same license as the original GitBook repository and https://sighingnow.github.io/jekyll-gitbook.
Copyright 2022 Alexander Miertsch