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
highlighter: pygments
highlighter: rouge
permalink: /news/:year/:month/:day/:title/
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
{% highlight bash %}
{% highlight shell %}
#!/usr/bin/env bash
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:
{% highlight bash %}
{% highlight shell %}
$ bundle exec htmlproofer ./_site --disable-external
{% 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:
{% highlight bash %}
{% highlight shell %}
laptop$ ssh deployer@example.com
server$ mkdir 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
installed on the server:
{% highlight bash %}
{% highlight shell %}
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/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
deploy using this hook:
{% highlight bash %}
{% highlight shell %}
laptops$ git remote add deploy deployer@example.com:~/myrepo.git
{% endhighlight %}
Deploying is now as easy as telling nginx or Apache to look at
`/var/www/myrepo` and running the following:
{% highlight bash %}
{% highlight shell %}
laptops$ git push deploy master
{% endhighlight %}
@ -129,7 +129,7 @@ is to put the restriction to certificate-based authorization in
`~/.ssh/authorized_keys`. Then, launch `rrsync` and supply
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>
{% 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:
{% highlight bash %}
{% highlight shell %}
#!/bin/sh
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:
{% highlight bash %}
{% highlight shell %}
rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org:
{% 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,
simply run the following command to install Jekyll:
{% highlight bash %}
{% highlight shell %}
$ gem install jekyll
{% 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
installed properly and run:
{% highlight bash %}
{% highlight shell %}
gem install jekyll --pre
{% endhighlight %}
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:
{% highlight bash %}
{% highlight shell %}
gem install jekyll -v '2.0.0.alpha.1'
{% 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,
but may be unstable.
{% highlight bash %}
{% highlight shell %}
$ git clone git://github.com/jekyll/jekyll.git
$ cd jekyll
$ 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
and associated URLs might look like:
{% highlight bash %}
{% highlight shell %}
.
|-- _config.yml
|-- _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
might look like:
{% highlight bash %}
{% highlight shell %}
.
├── _config.yml
├── _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
post files to be named according to the following format:
{% highlight bash %}
{% highlight shell %}
YEAR-MONTH-DAY-title.MARKUP
{% 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
file. For example, the following are examples of valid post filenames:
{% highlight bash %}
{% highlight shell %}
2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.textile
{% 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.
{% highlight bash %}
{% highlight shell %}
~ $ gem install jekyll
~ $ jekyll new myblog
~ $ cd myblog

View File

@ -14,7 +14,7 @@ product.
A basic Jekyll site usually looks something like this:
{% highlight bash %}
{% highlight shell %}
.
├── _config.yml
├── _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
your site, you can use the `include` tag.
{% highlight ruby %}
{% highlight liquid %}
{% raw %}{% include footer.html %}{% endraw %}
{% 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:
{% highlight ruby %}
{% highlight liquid %}
{% raw %}{% include footer.html param="value" variable-param=page.variable %}{% endraw %}
{% endhighlight %}
These parameters are available via Liquid in the include:
{% highlight ruby %}
{% highlight liquid %}
{% raw %}{{ include.param }}{% endraw %}
{% 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:
{% highlight ruby %}
{% highlight liquid %}
{% raw %}{% include_relative somedir/footer.html %}{% endraw %}
{% endhighlight %}
@ -404,7 +404,7 @@ languages](http://pygments.org/languages/)
To render a code block with syntax highlighting, surround your code as follows:
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% highlight ruby %}
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
to each line:
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% highlight ruby linenos %}
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
will generate the correct permalink URL for the post you specify.
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% post_url 2010-07-21-name-of-post %}
{% 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
path to the post:
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% post_url /subdir/2010-07-21-name-of-post %}
{% 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:
{% highlight text %}
{% highlight liquid %}
{% raw %}
[Name of Link]({% post_url 2010-07-21-name-of-post %})
{% 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
with public or secret gists:
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% gist parkr/931c1c8d465a04042403 %}
{% endraw %}
@ -490,7 +490,7 @@ with public or secret gists:
You may also optionally specify the filename in the gist to display:
{% highlight text %}
{% highlight liquid %}
{% raw %}
{% gist parkr/931c1c8d465a04042403 jekyll-private-gist.markdown %}
{% 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
can be done on Ubuntu or Debian by running:
{% highlight bash %}
{% highlight shell %}
sudo apt-get install ruby2.0.0-dev
{% endhighlight %}
On Red Hat, CentOS, and Fedora systems you can do this by running:
{% highlight bash %}
{% highlight shell %}
sudo yum install ruby-devel
{% 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:
{% highlight bash %}
{% highlight shell %}
sudo dnf install redhat-rpm-config
{% endhighlight %}
@ -40,7 +40,7 @@ sudo dnf install redhat-rpm-config
On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the
following commands before installing Jekyll:
{% highlight bash %}
{% highlight shell %}
export GEM_HOME=/home/private/gems
export GEM_PATH=/home/private/gems:/usr/local/lib/ruby/gems/1.8/
export PATH=$PATH:/home/private/gems/bin
@ -49,7 +49,7 @@ export RB_USER_INSTALL='true'
To install RubyGems on Gentoo:
{% highlight bash %}
{% highlight shell %}
sudo emerge -av dev-ruby/rubygems
{% 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):
{% highlight bash %}
{% highlight shell %}
sudo gem update --system
{% endhighlight %}
If you still have issues, you can download and install new Command Line
Tools (such as `gcc`) using the command
{% highlight bash %}
{% highlight shell %}
xcode-select --install
{% endhighlight %}
which may allow you to install native gems using this command (again using
`sudo` only if necessary):
{% highlight bash %}
{% highlight shell %}
sudo gem install jekyll
{% 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
installed (again using `sudo` only if necessary):
{% highlight bash %}
{% highlight shell %}
sudo gem install -n /usr/local/bin jekyll
{% endhighlight %}
Alternatively, Homebrew can be installed and used to set up Ruby. This can be
done as follows:
{% highlight bash %}
{% highlight shell %}
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
{% endhighlight %}
Once Homebrew is installed, the second step is easy:
{% highlight bash %}
{% highlight shell %}
brew install ruby
{% 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
necessary to modify your `$PATH` variable using the following command:
{% highlight bash %}
{% highlight shell %}
export PATH=/usr/local/bin:$PATH
{% endhighlight %}
GUI apps can modify the `$PATH` as follows:
{% highlight bash %}
{% highlight shell %}
launchctl setenv PATH "/usr/local/bin:$PATH"
{% 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:
{% highlight bash %}
{% highlight shell %}
jekyll serve --baseurl '/blog'
{% endhighlight %}
… then make sure that you access the site at:
{% highlight bash %}
{% highlight shell %}
http://localhost:4000/blog/index.html
{% endhighlight %}
It wont work to just access:
{% highlight bash %}
{% highlight shell %}
http://localhost:4000/blog
{% 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
following error:
{% highlight bash %}
{% highlight shell %}
'{{ "{{" }}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)
{% 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:
{% highlight bash %}
{% highlight shell %}
$ gem update jekyll
{% 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:
{% highlight bash %}
{% highlight shell %}
$ gem update jekyll
{% endhighlight %}

View File

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

View File

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