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"
|
||||
|
||||
# gem "rails"source 'https://rubygems.org'
|
||||
gem 'github-pages', group: :jekyll_plugins
|
||||
gem 'jekyll'
|
||||
|
||||
|
79
Gemfile.lock
79
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
|
||||
|
@ -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:
|
||||
|
@ -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": [
|
||||
{
|
||||
|
@ -13,66 +13,41 @@ folder: mydoc
|
||||
For syntax highlighting, use fenced code blocks optionally followed by the language syntax you want:
|
||||
|
||||
<pre>
|
||||
```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 + "!" );
|
||||
}
|
||||
}
|
||||
```
|
||||
</pre>
|
||||
|
||||
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 %}
|
||||
<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
|
||||
If you're using an HTML file, you can also use the `highlight` command with Liquid markup.
|
||||
|
||||
{% include links.html %}
|
||||
|
Reference in New Issue
Block a user