From 0be4165ec838169998c015ca7ce29e43561261a4 Mon Sep 17 00:00:00 2001 From: tomjohnson1492 Date: Mon, 5 Dec 2016 22:40:51 -0800 Subject: [PATCH] fixing issue with highlighter -- it was throwing an error for some reason --- .DS_Store | Bin 16388 -> 16388 bytes Gemfile | 4 +- Gemfile.lock | 79 +++++++++++++---------- _config.yml | 1 + pages/mydoc/mydoc_help_api.md | 10 ++- pages/mydoc/mydoc_syntax_highlighting.md | 79 ++++++++--------------- 6 files changed, 79 insertions(+), 94 deletions(-) diff --git a/.DS_Store b/.DS_Store index ad1e3b4a4838b262c5d89d53fd0d43197baf7374..177b1e5e533a844dd1c21206d8ae68ec7497ee9e 100644 GIT binary patch delta 1068 zcmd6lTS!z<6o&Ud=Cn7Sn&V_%s?#`)=_F%0HfeVh%`_D)t)|p$#yR52aYmi7&}q_0 zqQdBMx(6BEL5V``@=!$i5Eg|cLGhfAip$bRF;?4dbgE0{IyO;6Jw0BDn2d{ zNV6@n#9J4n1ugLb>-_X|OMHecEf}OUX0~-%{^t6Y*1-1Qj#Fgx0BR+=u{vH(A5Ji{ zY^U4nBt-K}wkAaLLP23sG*@hws=c04sa2Huq#C&=e2SbEHPv9sOjTQ1_v9Euf;lBE zV`*0Iu#S(^b5UHhJYk75IMqdP@kVI*DNY8E(m0Oj$WWmCC2QBj{JE~vI z<}p~L4dZV)}nd_5njTWJ)84Iw?t`A&Y25fCuw5CflBrS`k1HJFp9#*pCA^h-2u&S)9XpbfYf^{kVnOxQ|D8j3;=CH+YXv z_>3?3ik}*-MyKIb6E)+pC>hVgn68%x60N$t{8c(G=dVFvzk?tjNjjtpd25`-aXbkb z&SaapYEn*;f#X5hA7K88Wr(~YZxtvX6)YnNgB}K$6%;lsN3H^*0EH;RI@nQ;3RI#- zL9%5ONi(*gWfV&Xc4H6rVjpB2#c`a#Nd?OVT*75s(c?OL6*xC=6ZaH64=~VMJf}z7 Q8F(ENNPy~XgC_dtIp$m<=Fp(J9iW@hWs0$Y^9NI2SG*J`p;@*@0zbEJaat8V_ z(2r@IRc#fo6q+ItrzANnC6Y7hutdsAS34|{Bt@g*7{_JgORlE2zUbh^OQV;^#wVVt zMMj(Y)@tQjx_Sa#L`zh4!Ir+1RoB#}*9odCty*o(EmMcnvhgxXqUZVr70l$cKQ@qyv^}(C)3Q>jzy`LeWK6wg}wnufe0f~ zkpVmMkPjzHQH}~!q6YP7KqH#aigt9sgHHIc8zF?T2m5gtgE)etIE_(^VH^{2DO|&KOyeHz;{hJdc=D%oL;d26zIcj@{bn`) NE9T#%H2*0k{{wC0;pqSX diff --git a/Gemfile b/Gemfile index 03df461..6f4c4c1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ +# frozen_string_literal: true source "https://rubygems.org" +# gem "rails"source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins -gem 'jekyll' - diff --git a/Gemfile.lock b/Gemfile.lock index ae5fa2d..ffa364c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,8 +7,7 @@ GEM i18n (~> 0.7) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.0) - public_suffix (~> 2.0, >= 2.0.2) + addressable (2.4.0) blankslate (2.1.2.4) classifier-reborn (2.0.4) fast-stemmer (~> 1.0) @@ -18,28 +17,37 @@ GEM coffee-script-source (1.11.1) colorator (0.1) concurrent-ruby (1.0.2) + ethon (0.10.1) + ffi (>= 1.3.0) execjs (2.7.0) faraday (0.10.0) multipart-post (>= 1.2, < 3) fast-stemmer (1.0.2) ffi (1.9.14) - forwardable-extended (2.6.0) gemoji (2.1.0) - github-pages (28) + github-pages (39) RedCloth (= 4.2.9) + github-pages-health-check (~> 0.2) jekyll (= 2.4.0) - jekyll-coffeescript (= 1.0.0) - jekyll-mentions (= 0.1.3) - jekyll-redirect-from (= 0.6.2) - jekyll-sass-converter (= 1.2.0) - jekyll-sitemap (= 0.6.0) - jemoji (= 0.3.0) - kramdown (= 1.3.1) - liquid (= 2.6.1) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.3.1) + jekyll-mentions (= 0.2.1) + jekyll-redirect-from (= 0.8.0) + jekyll-sass-converter (= 1.3.0) + jekyll-sitemap (= 0.8.1) + jemoji (= 0.5.0) + kramdown (= 1.5.0) + liquid (= 2.6.2) maruku (= 0.7.0) - pygments.rb (= 0.6.0) + mercenary (~> 0.3) + pygments.rb (= 0.6.3) rdiscount (= 2.1.7) - redcarpet (= 3.1.2) + redcarpet (= 3.3.2) + terminal-table (~> 1.4) + github-pages-health-check (0.3.2) + net-dns (~> 0.6) + public_suffix (~> 1.4) + typhoeus (~> 0.7) html-pipeline (1.9.0) activesupport (>= 2) nokogiri (~> 1.4) @@ -59,72 +67,75 @@ GEM redcarpet (~> 3.1) safe_yaml (~> 1.0) toml (~> 0.1.0) - jekyll-coffeescript (1.0.0) + jekyll-coffeescript (1.0.1) coffee-script (~> 2.2) + jekyll-feed (0.3.1) jekyll-gist (1.4.0) octokit (~> 4.2) - jekyll-mentions (0.1.3) + jekyll-mentions (0.2.1) html-pipeline (~> 1.9.0) jekyll (~> 2.0) jekyll-paginate (1.1.0) - jekyll-redirect-from (0.6.2) - jekyll (~> 2.0) - jekyll-sass-converter (1.2.0) + jekyll-redirect-from (0.8.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) sass (~> 3.2) - jekyll-sitemap (0.6.0) + jekyll-sitemap (0.8.1) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) - jemoji (0.3.0) + jemoji (0.5.0) gemoji (~> 2.0) html-pipeline (~> 1.9) - jekyll (~> 2.0) - kramdown (1.3.1) - liquid (2.6.1) + jekyll (>= 2.0) + kramdown (1.5.0) + liquid (2.6.2) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) maruku (0.7.0) mercenary (0.3.6) mini_portile2 (2.1.0) - minitest (5.9.1) + minitest (5.10.1) multipart-post (2.0.0) + net-dns (0.8.0) nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) octokit (4.6.2) sawyer (~> 0.8.0, >= 0.5.3) parslet (1.5.0) blankslate (~> 2.0) - pathutil (0.14.0) - forwardable-extended (~> 2.6) posix-spawn (0.3.12) - public_suffix (2.0.4) - pygments.rb (0.6.0) + public_suffix (1.5.3) + pygments.rb (0.6.3) posix-spawn (~> 0.3.6) - yajl-ruby (~> 1.1.0) + yajl-ruby (~> 1.2.0) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) rdiscount (2.1.7) - redcarpet (3.1.2) - rouge (1.11.1) + redcarpet (3.3.2) safe_yaml (1.0.4) sass (3.4.22) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) thread_safe (0.3.5) toml (0.1.2) parslet (~> 1.5.0) + typhoeus (0.8.0) + ethon (>= 0.8.0) tzinfo (1.2.2) thread_safe (~> 0.1) - yajl-ruby (1.1.0) + unicode-display_width (1.1.1) + yajl-ruby (1.2.1) PLATFORMS ruby DEPENDENCIES github-pages - jekyll BUNDLED WITH 1.13.6 diff --git a/_config.yml b/_config.yml index 83956b9..f0c4729 100644 --- a/_config.yml +++ b/_config.yml @@ -51,6 +51,7 @@ kramdown: auto_ids: true hard_wrap: false syntax_highlighter: rouge + # filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways collections: diff --git a/pages/mydoc/mydoc_help_api.md b/pages/mydoc/mydoc_help_api.md index 4c81726..f1a62f3 100644 --- a/pages/mydoc/mydoc_help_api.md +++ b/pages/mydoc/mydoc_help_api.md @@ -39,7 +39,7 @@ A collection is another content type that extends Jekyll beyond the use of pages Add the following information to your configuration file to declare your collection: -```liquid +``` collections: tooltips: output: false @@ -65,8 +65,8 @@ Create pages inside your new tooltips collection (that is, inside the \_tooltips Here's an example: -{% highlight yaml %} -{% raw %}```liquid +```yaml +{% raw %} --- id: basketball product: mydoc @@ -74,8 +74,6 @@ product: mydoc {{site.data.definitions.basketball}}{% endraw %} ``` -{% endhighlight %} - You need to create a separate page for each tooltip you want to deliver. @@ -113,7 +111,7 @@ Change "mydoc" to the product name you used in each of the tooltip files. The te This code will loop through all pages in the tooltips collection and insert the `id` and `body` into key-value pairs for the JSON code. Here's an example of what that looks like after it's processed by Jekyll in the site build: -``` +```json { "entries": [ { diff --git a/pages/mydoc/mydoc_syntax_highlighting.md b/pages/mydoc/mydoc_syntax_highlighting.md index 1dc5c5d..f5b6110 100644 --- a/pages/mydoc/mydoc_syntax_highlighting.md +++ b/pages/mydoc/mydoc_syntax_highlighting.md @@ -13,66 +13,41 @@ folder: mydoc For syntax highlighting, use fenced code blocks optionally followed by the language syntax you want:
-```ruby
-    def foo
-      puts 'foo'
-    end
+```java
+import java.util.Scanner;
+
+public class ScannerAndKeyboard
+{
+
+	public static void main(String[] args)
+	{	Scanner s = new Scanner(System.in);
+		System.out.print( "Enter your name: "  );
+		String name = s.nextLine();
+		System.out.println( "Hello " + name + "!" );
+	}
+}
 ```
 
This looks as follows: -```ruby - def foo - puts 'foo' - end +```java +import java.util.Scanner; + +public class ScannerAndKeyboard +{ + + public static void main(String[] args) + { Scanner s = new Scanner(System.in); + System.out.print( "Enter your name: " ); + String name = s.nextLine(); + System.out.println( "Hello " + name + "!" ); + } +} ``` Fenced code blocks require a blank line before and after. -If you're using an HTML file, you can also use the `highlight` command with Liquid markup: - -{% raw %} -
-{% highlight ruby %}
-    def foo
-      puts 'foo'
-    end
-{% endhighlight %}
-
-{% endraw %} - -It renders the same: - -{% highlight ruby %} - def foo - puts 'foo' - end -{% endhighlight %} - - -The theme has syntax highlighting specified in the configuration file as follows: - -``` -highlighter: rouge -``` - -The syntax highlighting is done via the css/syntax.css file. - -## Available lexers - -The keywords you must add to specify the highlighting (in the previous example, `ruby`) are called "lexers." You can search for "lexers." Here are some common ones I use: - -* js -* html -* yaml -* css -* json -* php -* java -* cpp -* dotnet -* xml -* http +If you're using an HTML file, you can also use the `highlight` command with Liquid markup. {% include links.html %}