fixing issue with highlighter -- it was throwing an error for some reason
This commit is contained in:
4
Gemfile
4
Gemfile
@ -1,5 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
# gem "rails"source 'https://rubygems.org'
|
||||||
gem 'github-pages', group: :jekyll_plugins
|
gem 'github-pages', group: :jekyll_plugins
|
||||||
gem 'jekyll'
|
|
||||||
|
|
||||||
|
79
Gemfile.lock
79
Gemfile.lock
@ -7,8 +7,7 @@ GEM
|
|||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.0)
|
addressable (2.4.0)
|
||||||
public_suffix (~> 2.0, >= 2.0.2)
|
|
||||||
blankslate (2.1.2.4)
|
blankslate (2.1.2.4)
|
||||||
classifier-reborn (2.0.4)
|
classifier-reborn (2.0.4)
|
||||||
fast-stemmer (~> 1.0)
|
fast-stemmer (~> 1.0)
|
||||||
@ -18,28 +17,37 @@ GEM
|
|||||||
coffee-script-source (1.11.1)
|
coffee-script-source (1.11.1)
|
||||||
colorator (0.1)
|
colorator (0.1)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.2)
|
||||||
|
ethon (0.10.1)
|
||||||
|
ffi (>= 1.3.0)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
faraday (0.10.0)
|
faraday (0.10.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
fast-stemmer (1.0.2)
|
fast-stemmer (1.0.2)
|
||||||
ffi (1.9.14)
|
ffi (1.9.14)
|
||||||
forwardable-extended (2.6.0)
|
|
||||||
gemoji (2.1.0)
|
gemoji (2.1.0)
|
||||||
github-pages (28)
|
github-pages (39)
|
||||||
RedCloth (= 4.2.9)
|
RedCloth (= 4.2.9)
|
||||||
|
github-pages-health-check (~> 0.2)
|
||||||
jekyll (= 2.4.0)
|
jekyll (= 2.4.0)
|
||||||
jekyll-coffeescript (= 1.0.0)
|
jekyll-coffeescript (= 1.0.1)
|
||||||
jekyll-mentions (= 0.1.3)
|
jekyll-feed (= 0.3.1)
|
||||||
jekyll-redirect-from (= 0.6.2)
|
jekyll-mentions (= 0.2.1)
|
||||||
jekyll-sass-converter (= 1.2.0)
|
jekyll-redirect-from (= 0.8.0)
|
||||||
jekyll-sitemap (= 0.6.0)
|
jekyll-sass-converter (= 1.3.0)
|
||||||
jemoji (= 0.3.0)
|
jekyll-sitemap (= 0.8.1)
|
||||||
kramdown (= 1.3.1)
|
jemoji (= 0.5.0)
|
||||||
liquid (= 2.6.1)
|
kramdown (= 1.5.0)
|
||||||
|
liquid (= 2.6.2)
|
||||||
maruku (= 0.7.0)
|
maruku (= 0.7.0)
|
||||||
pygments.rb (= 0.6.0)
|
mercenary (~> 0.3)
|
||||||
|
pygments.rb (= 0.6.3)
|
||||||
rdiscount (= 2.1.7)
|
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)
|
html-pipeline (1.9.0)
|
||||||
activesupport (>= 2)
|
activesupport (>= 2)
|
||||||
nokogiri (~> 1.4)
|
nokogiri (~> 1.4)
|
||||||
@ -59,72 +67,75 @@ GEM
|
|||||||
redcarpet (~> 3.1)
|
redcarpet (~> 3.1)
|
||||||
safe_yaml (~> 1.0)
|
safe_yaml (~> 1.0)
|
||||||
toml (~> 0.1.0)
|
toml (~> 0.1.0)
|
||||||
jekyll-coffeescript (1.0.0)
|
jekyll-coffeescript (1.0.1)
|
||||||
coffee-script (~> 2.2)
|
coffee-script (~> 2.2)
|
||||||
|
jekyll-feed (0.3.1)
|
||||||
jekyll-gist (1.4.0)
|
jekyll-gist (1.4.0)
|
||||||
octokit (~> 4.2)
|
octokit (~> 4.2)
|
||||||
jekyll-mentions (0.1.3)
|
jekyll-mentions (0.2.1)
|
||||||
html-pipeline (~> 1.9.0)
|
html-pipeline (~> 1.9.0)
|
||||||
jekyll (~> 2.0)
|
jekyll (~> 2.0)
|
||||||
jekyll-paginate (1.1.0)
|
jekyll-paginate (1.1.0)
|
||||||
jekyll-redirect-from (0.6.2)
|
jekyll-redirect-from (0.8.0)
|
||||||
jekyll (~> 2.0)
|
jekyll (>= 2.0)
|
||||||
jekyll-sass-converter (1.2.0)
|
jekyll-sass-converter (1.3.0)
|
||||||
sass (~> 3.2)
|
sass (~> 3.2)
|
||||||
jekyll-sitemap (0.6.0)
|
jekyll-sitemap (0.8.1)
|
||||||
jekyll-watch (1.5.0)
|
jekyll-watch (1.5.0)
|
||||||
listen (~> 3.0, < 3.1)
|
listen (~> 3.0, < 3.1)
|
||||||
jemoji (0.3.0)
|
jemoji (0.5.0)
|
||||||
gemoji (~> 2.0)
|
gemoji (~> 2.0)
|
||||||
html-pipeline (~> 1.9)
|
html-pipeline (~> 1.9)
|
||||||
jekyll (~> 2.0)
|
jekyll (>= 2.0)
|
||||||
kramdown (1.3.1)
|
kramdown (1.5.0)
|
||||||
liquid (2.6.1)
|
liquid (2.6.2)
|
||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
maruku (0.7.0)
|
maruku (0.7.0)
|
||||||
mercenary (0.3.6)
|
mercenary (0.3.6)
|
||||||
mini_portile2 (2.1.0)
|
mini_portile2 (2.1.0)
|
||||||
minitest (5.9.1)
|
minitest (5.10.1)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
|
net-dns (0.8.0)
|
||||||
nokogiri (1.6.8.1)
|
nokogiri (1.6.8.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
octokit (4.6.2)
|
octokit (4.6.2)
|
||||||
sawyer (~> 0.8.0, >= 0.5.3)
|
sawyer (~> 0.8.0, >= 0.5.3)
|
||||||
parslet (1.5.0)
|
parslet (1.5.0)
|
||||||
blankslate (~> 2.0)
|
blankslate (~> 2.0)
|
||||||
pathutil (0.14.0)
|
|
||||||
forwardable-extended (~> 2.6)
|
|
||||||
posix-spawn (0.3.12)
|
posix-spawn (0.3.12)
|
||||||
public_suffix (2.0.4)
|
public_suffix (1.5.3)
|
||||||
pygments.rb (0.6.0)
|
pygments.rb (0.6.3)
|
||||||
posix-spawn (~> 0.3.6)
|
posix-spawn (~> 0.3.6)
|
||||||
yajl-ruby (~> 1.1.0)
|
yajl-ruby (~> 1.2.0)
|
||||||
rb-fsevent (0.9.8)
|
rb-fsevent (0.9.8)
|
||||||
rb-inotify (0.9.7)
|
rb-inotify (0.9.7)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
rdiscount (2.1.7)
|
rdiscount (2.1.7)
|
||||||
redcarpet (3.1.2)
|
redcarpet (3.3.2)
|
||||||
rouge (1.11.1)
|
|
||||||
safe_yaml (1.0.4)
|
safe_yaml (1.0.4)
|
||||||
sass (3.4.22)
|
sass (3.4.22)
|
||||||
sawyer (0.8.1)
|
sawyer (0.8.1)
|
||||||
addressable (>= 2.3.5, < 2.6)
|
addressable (>= 2.3.5, < 2.6)
|
||||||
faraday (~> 0.8, < 1.0)
|
faraday (~> 0.8, < 1.0)
|
||||||
|
terminal-table (1.7.3)
|
||||||
|
unicode-display_width (~> 1.1.1)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.5)
|
||||||
toml (0.1.2)
|
toml (0.1.2)
|
||||||
parslet (~> 1.5.0)
|
parslet (~> 1.5.0)
|
||||||
|
typhoeus (0.8.0)
|
||||||
|
ethon (>= 0.8.0)
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
yajl-ruby (1.1.0)
|
unicode-display_width (1.1.1)
|
||||||
|
yajl-ruby (1.2.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
github-pages
|
github-pages
|
||||||
jekyll
|
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.13.6
|
1.13.6
|
||||||
|
@ -51,6 +51,7 @@ kramdown:
|
|||||||
auto_ids: true
|
auto_ids: true
|
||||||
hard_wrap: false
|
hard_wrap: false
|
||||||
syntax_highlighter: rouge
|
syntax_highlighter: rouge
|
||||||
|
|
||||||
# filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways
|
# filter used to process markdown. note that kramdown differs from github-flavored markdown in some subtle ways
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
|
@ -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:
|
Add the following information to your configuration file to declare your collection:
|
||||||
|
|
||||||
```liquid
|
```
|
||||||
collections:
|
collections:
|
||||||
tooltips:
|
tooltips:
|
||||||
output: false
|
output: false
|
||||||
@ -65,8 +65,8 @@ Create pages inside your new tooltips collection (that is, inside the \_tooltips
|
|||||||
|
|
||||||
Here's an example:
|
Here's an example:
|
||||||
|
|
||||||
{% highlight yaml %}
|
```yaml
|
||||||
{% raw %}```liquid
|
{% raw %}
|
||||||
---
|
---
|
||||||
id: basketball
|
id: basketball
|
||||||
product: mydoc
|
product: mydoc
|
||||||
@ -74,8 +74,6 @@ product: mydoc
|
|||||||
|
|
||||||
{{site.data.definitions.basketball}}{% endraw %}
|
{{site.data.definitions.basketball}}{% endraw %}
|
||||||
```
|
```
|
||||||
{% endhighlight %}
|
|
||||||
|
|
||||||
|
|
||||||
You need to create a separate page for each tooltip you want to deliver.
|
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:
|
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": [
|
"entries": [
|
||||||
{
|
{
|
||||||
|
@ -13,66 +13,41 @@ folder: mydoc
|
|||||||
For syntax highlighting, use fenced code blocks optionally followed by the language syntax you want:
|
For syntax highlighting, use fenced code blocks optionally followed by the language syntax you want:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
```ruby
|
```java
|
||||||
def foo
|
import java.util.Scanner;
|
||||||
puts 'foo'
|
|
||||||
end
|
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 + "!" );
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
This looks as follows:
|
This looks as follows:
|
||||||
|
|
||||||
```ruby
|
```java
|
||||||
def foo
|
import java.util.Scanner;
|
||||||
puts 'foo'
|
|
||||||
end
|
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.
|
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:
|
If you're using an HTML file, you can also use the `highlight` command with Liquid markup.
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
<pre>
|
|
||||||
{% highlight ruby %}
|
|
||||||
def foo
|
|
||||||
puts 'foo'
|
|
||||||
end
|
|
||||||
{% endhighlight %}
|
|
||||||
</pre>
|
|
||||||
{% 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
|
|
||||||
|
|
||||||
{% include links.html %}
|
{% include links.html %}
|
||||||
|
Reference in New Issue
Block a user