From 28146a3d08ab29d393d9b5790178098de9365ac1 Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Mon, 30 Nov 2015 14:38:16 -0800 Subject: [PATCH] fixing pygments rouge dependencies --- Gemfile | 2 +- _config.yml | 29 +++++++++++++++-------------- mydoc/mydoc_getting_started.md | 14 +++++--------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/Gemfile b/Gemfile index 053c27d..3a1ebf3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,2 @@ source 'https://rubygems.org' -gem 'github-pages' +gem 'github-pages' \ No newline at end of file diff --git a/_config.yml b/_config.yml index c300651..6833384 100644 --- a/_config.yml +++ b/_config.yml @@ -1,21 +1,26 @@ +# This is duplicated here from configs/mydoc/config_designers.yml so that Github Pages can read it. Github Pages requires this file for the build process. It can't read a configuration file stored in another location. + # project definitions project: mydoc_designers audience: designers product: doc platform: all version: all +output: web destination: ../doc_outputs/mydoc/designers -topnav_title: Doc theme — designers +topnav_title: Jekyll Documentation Theme homepage_title: Jekyll doc theme for designers site_title: Jekyll theme for designers -project_folder: doc - +project_folder: mydoc +company_name: Your company +footer_image_location: ../common_images/company_logo.png +github_editme_path: tomjohnson1492/documentation-theme-jekyll/edit/reviews # variables sidebar_tagline: Designers sidebar_version: Version 4.0 theme_file: theme-blue.css -project_file_name: doc +pdf_file_name: mydoc_designers_pdf.pdf port: 4009 @@ -28,20 +33,17 @@ exclude: # same for all host: 127.0.0.1 feedback_email: tomjohnson1492@gmail.com -sidebar_accordion: true -markdown: redcarpet -print: false -suffix: index.html +markdown: redcarpet redcarpet: extensions: ["no_intra_emphasis", "fenced_code_blocks", "tables", "with_toc_data"] -highlighter: rouge +highlighter: pygments collections: tooltips: - output: true + output: false defaults: - @@ -55,11 +57,10 @@ defaults: - scope: path: "" - type: "posts" + type: "tooltips" values: - layout: "post" + layout: "page" comments: true search: true + tooltip: true -sass: - sass_dir: _sass diff --git a/mydoc/mydoc_getting_started.md b/mydoc/mydoc_getting_started.md index 59fc263..b333627 100644 --- a/mydoc/mydoc_getting_started.md +++ b/mydoc/mydoc_getting_started.md @@ -50,25 +50,21 @@ Before you start customizing the theme, make sure you can build the theme with t Bundler looks at the gems (Ruby plugins) in a project's gemfile and then gets all of the gems that depend on those gems. This way you don't end up with incompatible gems. - However, I'm publishing this project on Github Pages, and currently Github Pages only supports Jekyll 2.5.3, not Jekyll 3.0.1. Therefore you have to switch up something in the Gemfile to run the latest Jekyll. - -4. In terminal, browse to the jekyll-documentation-theme folder and type `open Gemfile`. Replace the contents of the Gemfile with the following: + Since I'm publishing this project on Github Pages, there are some specific gem dependencies. The 2.5.3 github-pages gem has dependencies on jekyll 2.4.0, pygments.rb 0.6.3, and redcarpet 3.3.2 (you can see this after running `bundle install`). If you're not publishing on Github Pages and you want to run Jekyll 3.0.1 (the latest), browse to the jekyll-documentation-theme folder and type `open Gemfile`. Replace the contents of the Gemfile with the following: ``` source 'https://rubygems.org' - gem 'jekyll', '~> 3.0', '>= 3.0.1' - gem 'redcarpet' + gem 'jekyll', '~> 3.0' + gem 'redcarpet', '~> 3.3', '>= 3.3.3' + gem 'pygments.rb', '~> 0.6.3' ``` - -5. Open the config files in the configs/mydoc folder and change the `highlighter` value from `pygments` to `rouge`. - - I anticipate that Github Pages will soon start supporting rouge as well, but for now I keep getting error messages when trying to use the rouge highlighter with Jekyll 2.5.3, which is the latest version that Github Pages supports. If you're planning to publish on Github Pages, you can keep the highlighter set to `pygments`. The differences are hardly noticeable. 5. In a terminal, browse to the documentation-theme-jekyll directory and type the following: ``` bundle install ``` + 6. Build the writer's output: ```