replace {% %} with bacticks for nested code-block

uses Kramdown with the markdown="1" attribute, as suggested by
@mmistakes. This allows rendering of code blocks which are nested
inside HTML tags.
This commit is contained in:
alexmalik 2016-10-04 12:11:52 +01:00 committed by Pat Hawks
parent c47ae465ad
commit a41b46ff35
1 changed files with 30 additions and 32 deletions

View File

@ -42,9 +42,9 @@ There are two basic types available: user/organization pages and project pages.
The way to deploy these two types of sites are nearly identical, except for a The way to deploy these two types of sites are nearly identical, except for a
few minor details. few minor details.
<div class="note protip"> <div class="note protip" markdown="1">
<h5>Use the <code>github-pages</code> gem</h5> ##### Use the `github-pages` gem
<p>
Our friends at GitHub have provided the Our friends at GitHub have provided the
<a href="https://github.com/github/pages-gem">github-pages</a> <a href="https://github.com/github/pages-gem">github-pages</a>
gem which is used to manage Jekyll and its dependencies on gem which is used to manage Jekyll and its dependencies on
@ -52,10 +52,10 @@ few minor details.
your site to GitHub Pages, you will not be caught by unexpected your site to GitHub Pages, you will not be caught by unexpected
differences between various versions of the gems. To use the differences between various versions of the gems. To use the
currently-deployed version of the gem in your project, add the currently-deployed version of the gem in your project, add the
following to your <code>Gemfile</code>: following to your `Gemfile`:
</p>
{% highlight ruby %} <div class="code-block" markdown="1">
```ruby
source 'https://rubygems.org' source 'https://rubygems.org'
require 'json' require 'json'
@ -63,27 +63,25 @@ few minor details.
versions = JSON.parse(open('https://pages.github.com/versions.json').read) versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'github-pages', versions['github-pages'] gem 'github-pages', versions['github-pages']
{% endhighlight %} ```
</div>
<p> This will ensure that when you run `bundle install`, you
This will ensure that when you run <code>bundle install</code>, you have the correct version of the `github-pages` gem.
have the correct version of the <code>github-pages</code> gem.
If that fails, simplify it: If that fails, simplify it:
</p>
<div class="code-block" markdown="1">
{% highlight ruby %} ```ruby
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'github-pages' gem 'github-pages'
{% endhighlight %} ```
</div>
<p> And be sure to run `bundle update` often.
And be sure to run <code>bundle update</code> often.
If you like to install <code>pages-gem</code> on Windows you can find instructions by Jens Willmer on <a href="http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins">how to install github-pages gem on Windows (x64)</a>. If you like to install `pages-gem` on Windows you can find instructions by Jens Willmer on <a href="http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins">how to install github-pages gem on Windows (x64)</a>.
</p>
</div> </div>
<div class="note info"> <div class="note info">