site: use rouge instead of pygments

This commit is contained in:
Parker Moore 2016-04-28 18:26:29 -07:00
parent d74f8d6dd9
commit 19b566e6ea
No known key found for this signature in database
GPG Key ID: 193CDEBA72063C58
15 changed files with 56 additions and 56 deletions

View File

@ -1,5 +1,5 @@
markdown: kramdown markdown: kramdown
highlighter: pygments highlighter: rouge
permalink: /news/:year/:month/:day/:title/ permalink: /news/:year/:month/:day/:title/
excerpt_separator: "" excerpt_separator: ""

View File

@ -38,7 +38,7 @@ Save the commands you want to run and succeed in a file: `./script/cibuild`
### The HTML Proofer Executable ### The HTML Proofer Executable
{% highlight bash %} {% highlight shell %}
#!/usr/bin/env bash #!/usr/bin/env bash
set -e # halt script on error set -e # halt script on error
@ -52,7 +52,7 @@ Some options can be specified via command-line switches. Check out the
For example to avoid testing external sites, use this command: For example to avoid testing external sites, use this command:
{% highlight bash %} {% highlight shell %}
$ bundle exec htmlproofer ./_site --disable-external $ bundle exec htmlproofer ./_site --disable-external
{% endhighlight %} {% endhighlight %}

View File

@ -35,7 +35,7 @@ this](http://web.archive.org/web/20091223025644/http://www.taknado.com/en/2009/0
To have a remote server handle the deploy for you every time you push changes using Git, you can create a user account which has all the public keys that are authorized to deploy in its `authorized_keys` file. With that in place, setting up the post-receive hook is done as follows: To have a remote server handle the deploy for you every time you push changes using Git, you can create a user account which has all the public keys that are authorized to deploy in its `authorized_keys` file. With that in place, setting up the post-receive hook is done as follows:
{% highlight bash %} {% highlight shell %}
laptop$ ssh deployer@example.com laptop$ ssh deployer@example.com
server$ mkdir myrepo.git server$ mkdir myrepo.git
server$ cd myrepo.git server$ cd myrepo.git
@ -47,7 +47,7 @@ server$ mkdir /var/www/myrepo
Next, add the following lines to hooks/post-receive and be sure Jekyll is Next, add the following lines to hooks/post-receive and be sure Jekyll is
installed on the server: installed on the server:
{% highlight bash %} {% highlight shell %}
GIT_REPO=$HOME/myrepo.git GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo TMP_GIT_CLONE=$HOME/tmp/myrepo
PUBLIC_WWW=/var/www/myrepo PUBLIC_WWW=/var/www/myrepo
@ -61,14 +61,14 @@ exit
Finally, run the following command on any users laptop that needs to be able to Finally, run the following command on any users laptop that needs to be able to
deploy using this hook: deploy using this hook:
{% highlight bash %} {% highlight shell %}
laptops$ git remote add deploy deployer@example.com:~/myrepo.git laptops$ git remote add deploy deployer@example.com:~/myrepo.git
{% endhighlight %} {% endhighlight %}
Deploying is now as easy as telling nginx or Apache to look at Deploying is now as easy as telling nginx or Apache to look at
`/var/www/myrepo` and running the following: `/var/www/myrepo` and running the following:
{% highlight bash %} {% highlight shell %}
laptops$ git push deploy master laptops$ git push deploy master
{% endhighlight %} {% endhighlight %}
@ -129,7 +129,7 @@ is to put the restriction to certificate-based authorization in
`~/.ssh/authorized_keys`. Then, launch `rrsync` and supply `~/.ssh/authorized_keys`. Then, launch `rrsync` and supply
it with the folder it shall have read-write access to: it with the folder it shall have read-write access to:
{% highlight bash %} {% highlight shell %}
command="$HOME/bin/rrsync <folder>",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa <cert> command="$HOME/bin/rrsync <folder>",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa <cert>
{% endhighlight %} {% endhighlight %}
@ -139,7 +139,7 @@ command="$HOME/bin/rrsync <folder>",no-agent-forwarding,no-port-forwarding,no-pt
Add the `deploy` script to the site source folder: Add the `deploy` script to the site source folder:
{% highlight bash %} {% highlight shell %}
#!/bin/sh #!/bin/sh
rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded <folder> <user>@<site>: rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded <folder> <user>@<site>:
@ -155,7 +155,7 @@ your host uses a different port than the default (e.g, HostGator)
Using this setup, you might run the following command: Using this setup, you might run the following command:
{% highlight bash %} {% highlight shell %}
rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org: rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org:
{% endhighlight %} {% endhighlight %}

View File

@ -37,7 +37,7 @@ The best way to install Jekyll is via
[RubyGems](http://rubygems.org/pages/download). At the terminal prompt, [RubyGems](http://rubygems.org/pages/download). At the terminal prompt,
simply run the following command to install Jekyll: simply run the following command to install Jekyll:
{% highlight bash %} {% highlight shell %}
$ gem install jekyll $ gem install jekyll
{% endhighlight %} {% endhighlight %}
@ -62,14 +62,14 @@ community can improve the experience for everyone.
In order to install a pre-release, make sure you have all the requirements In order to install a pre-release, make sure you have all the requirements
installed properly and run: installed properly and run:
{% highlight bash %} {% highlight shell %}
gem install jekyll --pre gem install jekyll --pre
{% endhighlight %} {% endhighlight %}
This will install the latest pre-release. If you want a particular pre-release, This will install the latest pre-release. If you want a particular pre-release,
use the `-v` switch to indicate the version you'd like to install: use the `-v` switch to indicate the version you'd like to install:
{% highlight bash %} {% highlight shell %}
gem install jekyll -v '2.0.0.alpha.1' gem install jekyll -v '2.0.0.alpha.1'
{% endhighlight %} {% endhighlight %}
@ -77,7 +77,7 @@ If you'd like to install a development version of Jekyll, the process is a bit
more involved. This gives you the advantage of having the latest and greatest, more involved. This gives you the advantage of having the latest and greatest,
but may be unstable. but may be unstable.
{% highlight bash %} {% highlight shell %}
$ git clone git://github.com/jekyll/jekyll.git $ git clone git://github.com/jekyll/jekyll.git
$ cd jekyll $ cd jekyll
$ script/bootstrap $ script/bootstrap

View File

@ -46,7 +46,7 @@ directory with a suitable name for the page you want to create. For a site with
a homepage, an about page, and a contact page, heres what the root directory a homepage, an about page, and a contact page, heres what the root directory
and associated URLs might look like: and associated URLs might look like:
{% highlight bash %} {% highlight shell %}
. .
|-- _config.yml |-- _config.yml
|-- _includes/ |-- _includes/
@ -69,7 +69,7 @@ the page URL ends up being the folder name, and the web server will serve up
the respective `index.html` file. Here's an example of what this structure the respective `index.html` file. Here's an example of what this structure
might look like: might look like:
{% highlight bash %} {% highlight shell %}
. .
├── _config.yml ├── _config.yml
├── _includes/ ├── _includes/

View File

@ -27,7 +27,7 @@ To create a new post, all you need to do is create a file in the `_posts`
directory. How you name files in this folder is important. Jekyll requires blog directory. How you name files in this folder is important. Jekyll requires blog
post files to be named according to the following format: post files to be named according to the following format:
{% highlight bash %} {% highlight shell %}
YEAR-MONTH-DAY-title.MARKUP YEAR-MONTH-DAY-title.MARKUP
{% endhighlight %} {% endhighlight %}
@ -35,7 +35,7 @@ Where `YEAR` is a four-digit number, `MONTH` and `DAY` are both two-digit
numbers, and `MARKUP` is the file extension representing the format used in the numbers, and `MARKUP` is the file extension representing the format used in the
file. For example, the following are examples of valid post filenames: file. For example, the following are examples of valid post filenames:
{% highlight bash %} {% highlight shell %}
2011-12-31-new-years-eve-is-awesome.md 2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.textile 2012-09-12-how-to-write-a-blog.textile
{% endhighlight %} {% endhighlight %}

View File

@ -6,7 +6,7 @@ permalink: /docs/quickstart/
For the impatient, here's how to get a boilerplate Jekyll site up and running. For the impatient, here's how to get a boilerplate Jekyll site up and running.
{% highlight bash %} {% highlight shell %}
~ $ gem install jekyll ~ $ gem install jekyll
~ $ jekyll new myblog ~ $ jekyll new myblog
~ $ cd myblog ~ $ cd myblog

View File

@ -14,7 +14,7 @@ product.
A basic Jekyll site usually looks something like this: A basic Jekyll site usually looks something like this:
{% highlight bash %} {% highlight shell %}
. .
├── _config.yml ├── _config.yml
├── _drafts ├── _drafts

View File

@ -341,7 +341,7 @@ The default is `default`. They are as follows (with what they filter):
If you have small page fragments that you wish to include in multiple places on If you have small page fragments that you wish to include in multiple places on
your site, you can use the `include` tag. your site, you can use the `include` tag.
{% highlight ruby %} {% highlight liquid %}
{% raw %}{% include footer.html %}{% endraw %} {% raw %}{% include footer.html %}{% endraw %}
{% endhighlight %} {% endhighlight %}
@ -362,13 +362,13 @@ root of your source directory. This will embed the contents of
You can also pass parameters to an include. Omit the quotation marks to send a variable's value. Liquid curly brackets should not be used here: You can also pass parameters to an include. Omit the quotation marks to send a variable's value. Liquid curly brackets should not be used here:
{% highlight ruby %} {% highlight liquid %}
{% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %} {% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %}
{% endhighlight %} {% endhighlight %}
These parameters are available via Liquid in the include: These parameters are available via Liquid in the include:
{% highlight ruby %} {% highlight liquid %}
{% raw %}{{ include.param }}{% endraw %} {% raw %}{{ include.param }}{% endraw %}
{% endhighlight %} {% endhighlight %}
@ -376,7 +376,7 @@ These parameters are available via Liquid in the include:
You can also choose to include file fragments relative to the current file: You can also choose to include file fragments relative to the current file:
{% highlight ruby %} {% highlight liquid %}
{% raw %}{% include_relative somedir/footer.html %}{% endraw %} {% raw %}{% include_relative somedir/footer.html %}{% endraw %}
{% endhighlight %} {% endhighlight %}
@ -404,7 +404,7 @@ languages](http://pygments.org/languages/)
To render a code block with syntax highlighting, surround your code as follows: To render a code block with syntax highlighting, surround your code as follows:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% highlight ruby %} {% highlight ruby %}
def foo def foo
@ -427,7 +427,7 @@ Including the `linenos` argument will force the highlighted code to include line
numbers. For instance, the following code block would include line numbers next numbers. For instance, the following code block would include line numbers next
to each line: to each line:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% highlight ruby linenos %} {% highlight ruby linenos %}
def foo def foo
@ -452,7 +452,7 @@ numbers from the highlighted code.
If you would like to include a link to a post on your site, the `post_url` tag If you would like to include a link to a post on your site, the `post_url` tag
will generate the correct permalink URL for the post you specify. will generate the correct permalink URL for the post you specify.
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% post_url 2010-07-21-name-of-post %} {% post_url 2010-07-21-name-of-post %}
{% endraw %} {% endraw %}
@ -461,7 +461,7 @@ will generate the correct permalink URL for the post you specify.
If you organize your posts in subdirectories, you need to include subdirectory If you organize your posts in subdirectories, you need to include subdirectory
path to the post: path to the post:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% post_url /subdir/2010-07-21-name-of-post %} {% post_url /subdir/2010-07-21-name-of-post %}
{% endraw %} {% endraw %}
@ -471,7 +471,7 @@ There is no need to include the file extension when using the `post_url` tag.
You can also use this tag to create a link to a post in Markdown as follows: You can also use this tag to create a link to a post in Markdown as follows:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
[Name of Link]({% post_url 2010-07-21-name-of-post %}) [Name of Link]({% post_url 2010-07-21-name-of-post %})
{% endraw %} {% endraw %}
@ -482,7 +482,7 @@ You can also use this tag to create a link to a post in Markdown as follows:
Use the `gist` tag to easily embed a GitHub Gist onto your site. This works Use the `gist` tag to easily embed a GitHub Gist onto your site. This works
with public or secret gists: with public or secret gists:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% gist parkr/931c1c8d465a04042403 %} {% gist parkr/931c1c8d465a04042403 %}
{% endraw %} {% endraw %}
@ -490,7 +490,7 @@ with public or secret gists:
You may also optionally specify the filename in the gist to display: You may also optionally specify the filename in the gist to display:
{% highlight text %} {% highlight liquid %}
{% raw %} {% raw %}
{% gist parkr/931c1c8d465a04042403 jekyll-private-gist.markdown %} {% gist parkr/931c1c8d465a04042403 jekyll-private-gist.markdown %}
{% endraw %} {% endraw %}

View File

@ -20,19 +20,19 @@ If you encounter errors during gem installation, you may need to install
the header files for compiling extension modules for Ruby 2.0.0. This the header files for compiling extension modules for Ruby 2.0.0. This
can be done on Ubuntu or Debian by running: can be done on Ubuntu or Debian by running:
{% highlight bash %} {% highlight shell %}
sudo apt-get install ruby2.0.0-dev sudo apt-get install ruby2.0.0-dev
{% endhighlight %} {% endhighlight %}
On Red Hat, CentOS, and Fedora systems you can do this by running: On Red Hat, CentOS, and Fedora systems you can do this by running:
{% highlight bash %} {% highlight shell %}
sudo yum install ruby-devel sudo yum install ruby-devel
{% endhighlight %} {% endhighlight %}
If you installed the above - specifically on Fedora 23 - but the extensions would still not compile, you are probably running a Fedora image that misses the `redhat-rpm-config` package. To solve this, simply run: If you installed the above - specifically on Fedora 23 - but the extensions would still not compile, you are probably running a Fedora image that misses the `redhat-rpm-config` package. To solve this, simply run:
{% highlight bash %} {% highlight shell %}
sudo dnf install redhat-rpm-config sudo dnf install redhat-rpm-config
{% endhighlight %} {% endhighlight %}
@ -40,7 +40,7 @@ sudo dnf install redhat-rpm-config
On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the
following commands before installing Jekyll: following commands before installing Jekyll:
{% highlight bash %} {% highlight shell %}
export GEM_HOME=/home/private/gems export GEM_HOME=/home/private/gems
export GEM_PATH=/home/private/gems:/usr/local/lib/ruby/gems/1.8/ export GEM_PATH=/home/private/gems:/usr/local/lib/ruby/gems/1.8/
export PATH=$PATH:/home/private/gems/bin export PATH=$PATH:/home/private/gems/bin
@ -49,7 +49,7 @@ export RB_USER_INSTALL='true'
To install RubyGems on Gentoo: To install RubyGems on Gentoo:
{% highlight bash %} {% highlight shell %}
sudo emerge -av dev-ruby/rubygems sudo emerge -av dev-ruby/rubygems
{% endhighlight %} {% endhighlight %}
@ -58,21 +58,21 @@ DevKit](https://wiki.github.com/oneclick/rubyinstaller/development-kit).
On Mac OS X, you may need to update RubyGems (using `sudo` only if necessary): On Mac OS X, you may need to update RubyGems (using `sudo` only if necessary):
{% highlight bash %} {% highlight shell %}
sudo gem update --system sudo gem update --system
{% endhighlight %} {% endhighlight %}
If you still have issues, you can download and install new Command Line If you still have issues, you can download and install new Command Line
Tools (such as `gcc`) using the command Tools (such as `gcc`) using the command
{% highlight bash %} {% highlight shell %}
xcode-select --install xcode-select --install
{% endhighlight %} {% endhighlight %}
which may allow you to install native gems using this command (again using which may allow you to install native gems using this command (again using
`sudo` only if necessary): `sudo` only if necessary):
{% highlight bash %} {% highlight shell %}
sudo gem install jekyll sudo gem install jekyll
{% endhighlight %} {% endhighlight %}
@ -90,20 +90,20 @@ longer available. Given these changes, there are a couple of simple ways to get
up and running. One option is to change the location where the gem will be up and running. One option is to change the location where the gem will be
installed (again using `sudo` only if necessary): installed (again using `sudo` only if necessary):
{% highlight bash %} {% highlight shell %}
sudo gem install -n /usr/local/bin jekyll sudo gem install -n /usr/local/bin jekyll
{% endhighlight %} {% endhighlight %}
Alternatively, Homebrew can be installed and used to set up Ruby. This can be Alternatively, Homebrew can be installed and used to set up Ruby. This can be
done as follows: done as follows:
{% highlight bash %} {% highlight shell %}
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
{% endhighlight %} {% endhighlight %}
Once Homebrew is installed, the second step is easy: Once Homebrew is installed, the second step is easy:
{% highlight bash %} {% highlight shell %}
brew install ruby brew install ruby
{% endhighlight %} {% endhighlight %}
@ -119,13 +119,13 @@ which to install Jekyll.
If you elect to use one of the above methods to install Ruby, it might be If you elect to use one of the above methods to install Ruby, it might be
necessary to modify your `$PATH` variable using the following command: necessary to modify your `$PATH` variable using the following command:
{% highlight bash %} {% highlight shell %}
export PATH=/usr/local/bin:$PATH export PATH=/usr/local/bin:$PATH
{% endhighlight %} {% endhighlight %}
GUI apps can modify the `$PATH` as follows: GUI apps can modify the `$PATH` as follows:
{% highlight bash %} {% highlight shell %}
launchctl setenv PATH "/usr/local/bin:$PATH" launchctl setenv PATH "/usr/local/bin:$PATH"
{% endhighlight %} {% endhighlight %}
@ -151,19 +151,19 @@ in order to have the `jekyll` executable be available in your Terminal.
If you are using base-url option like: If you are using base-url option like:
{% highlight bash %} {% highlight shell %}
jekyll serve --baseurl '/blog' jekyll serve --baseurl '/blog'
{% endhighlight %} {% endhighlight %}
… then make sure that you access the site at: … then make sure that you access the site at:
{% highlight bash %} {% highlight shell %}
http://localhost:4000/blog/index.html http://localhost:4000/blog/index.html
{% endhighlight %} {% endhighlight %}
It wont work to just access: It wont work to just access:
{% highlight bash %} {% highlight shell %}
http://localhost:4000/blog http://localhost:4000/blog
{% endhighlight %} {% endhighlight %}
@ -192,7 +192,7 @@ The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in
templates. Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the templates. Unlike previous versions, using `{{ "{{" }}` in 2.0 triggers the
following error: following error:
{% highlight bash %} {% highlight shell %}
'{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError) '{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
{% endhighlight %} {% endhighlight %}

View File

@ -9,7 +9,7 @@ and 2.0 that you'll want to know about.
Before we dive in, go ahead and fetch the latest version of Jekyll: Before we dive in, go ahead and fetch the latest version of Jekyll:
{% highlight bash %} {% highlight shell %}
$ gem update jekyll $ gem update jekyll
{% endhighlight %} {% endhighlight %}

View File

@ -9,7 +9,7 @@ that you'll want to know about.
Before we dive in, go ahead and fetch the latest version of Jekyll: Before we dive in, go ahead and fetch the latest version of Jekyll:
{% highlight bash %} {% highlight shell %}
$ gem update jekyll $ gem update jekyll
{% endhighlight %} {% endhighlight %}

View File

@ -7,7 +7,7 @@ permalink: /docs/usage/
The Jekyll gem makes a `jekyll` executable available to you in your Terminal The Jekyll gem makes a `jekyll` executable available to you in your Terminal
window. You can use this command in a number of ways: window. You can use this command in a number of ways:
{% highlight bash %} {% highlight shell %}
$ jekyll build $ jekyll build
# => The current folder will be generated into ./_site # => The current folder will be generated into ./_site
@ -52,7 +52,7 @@ $ jekyll build --watch
Jekyll also comes with a built-in development server that will allow you to Jekyll also comes with a built-in development server that will allow you to
preview what the generated site will look like in your browser locally. preview what the generated site will look like in your browser locally.
{% highlight bash %} {% highlight shell %}
$ jekyll serve $ jekyll serve
# => A development server will run at http://localhost:4000/ # => A development server will run at http://localhost:4000/
# Auto-regeneration: enabled. Use `--no-watch` to disable. # Auto-regeneration: enabled. Use `--no-watch` to disable.
@ -70,7 +70,7 @@ $ jekyll serve --detach
</p> </p>
</div> </div>
{% highlight bash %} {% highlight shell %}
$ jekyll serve --no-watch $ jekyll serve --no-watch
# => Same as `jekyll serve` but will not watch for changes. # => Same as `jekyll serve` but will not watch for changes.
{% endhighlight %} {% endhighlight %}
@ -89,7 +89,7 @@ destination: _deploy
Then the following two commands will be equivalent: Then the following two commands will be equivalent:
{% highlight bash %} {% highlight shell %}
$ jekyll build $ jekyll build
$ jekyll build --source _source --destination _deploy $ jekyll build --source _source --destination _deploy
{% endhighlight %} {% endhighlight %}

View File

@ -27,7 +27,7 @@ Additionally, you might need to change the code page of the console window to UT
in case you get a "Liquid Exception: Incompatible character encoding" error during in case you get a "Liquid Exception: Incompatible character encoding" error during
the site generation process. It can be done with the following command: the site generation process. It can be done with the following command:
{% highlight bash %} {% highlight shell %}
$ chcp 65001 $ chcp 65001
{% endhighlight %} {% endhighlight %}

View File

@ -20,7 +20,7 @@ to get a feel for what changes are afoot. Key features:
To install just run: To install just run:
{% highlight bash %} {% highlight shell %}
$ gem install jekyll --pre $ gem install jekyll --pre
{% endhighlight %} {% endhighlight %}