README.md

    Jekyll GitBook

    Make Jelly site have a GitBook look!

    Demo

    Live demo on Github Pages: https://sighingnow.github.io/jekyll-gitbook

    Jekyll Themes

    Why Jekyll with 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.

    How to Get Started

    This theme can be used just as other Jekyll themes.

    Fork this repository and add your markdown posts to the _posts folder.

    Deploy Locally with Jekyll Serve

    This theme can be ran locally using Ruby and Gemfiles.

    Testing your GitHub Pages site locally with Jekyll - GitHub

    Full-text search

    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

    Code highlight

    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/.

    How to generate TOC

    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
        h_min: 1
        h_max: 3

    Google Analytics, etc.

    The jekyll-gitboook theme supports embedding the Google Analytics, CNZZ and Application Insights website analytical tools with the following minimal configuration in _config.yaml:

    tracker:
      google_analytics: "<YOUR GOOGLE ANALYTICS KEY, e.g, UA-xxxxxx-x>"

    Similarly, CNZZ can be added with the following configuration in _config.yaml

    tracker:
      cnzz: "<YOUR CNZZ ANALYTICS KEY, e.g., xxxxxxxx>"

    Application Insights can be added with the following configuration in _config.yaml

    tracker:
      application_insights: "<YOUR APPLICATION INSIGHTS CONNECTION STRING>"

    Extra StyleSheet or Javascript elements

    You can add extra CSS or JavaScript references using configuration collections:

    • extra_css: for additional style sheets. If the url does not start by http, the path must be relative to the root of the site, without a starting /.
    • extra_header_js: for additional scripts to be included in the <head> tag, after the extra_css has been added. If the url does not start by http, the path must be relative to the root of the site, without a starting /.
    • extra_footer_js: for additional scripts to be included at the end of the HTML document, just before the site tracking script. If the url does not start by http, the path must be relative to the root of the site, without a starting /.

    License

    This work is open sourced under the Apache License, Version 2.0.

    Copyright 2019 Tao He.

    项目简介

    Build Jekyll site with GitBook style!

    🚀 Github 镜像仓库 🚀

    源项目地址

    https://github.com/sighingnow/jekyll-gitbook

    发行版本

    当前项目没有发行版本

    贡献者 5

    O Olivier Delmotte @Olivier Delmotte
    O Olivier Delmotte (Avanade) @Olivier Delmotte (Avanade)
    L Lingren Kong @Lingren Kong
    C Chandler McCowan @Chandler McCowan

    开发语言

    • CSS 41.9 %
    • HTML 27.6 %
    • JavaScript 27.0 %
    • Smarty 3.3 %
    • Ruby 0.2 %