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,48 +42,46 @@ 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
<a href="https://github.com/github/pages-gem">github-pages</a>
gem which is used to manage Jekyll and its dependencies on
GitHub Pages. Using it in your projects means that when you deploy
your site to GitHub Pages, you will not be caught by unexpected
differences between various versions of the gems. To use the
currently-deployed version of the gem in your project, add the
following to your <code>Gemfile</code>:
</p>
{% highlight ruby %} Our friends at GitHub have provided the
source 'https://rubygems.org' <a href="https://github.com/github/pages-gem">github-pages</a>
gem which is used to manage Jekyll and its dependencies on
GitHub Pages. Using it in your projects means that when you deploy
your site to GitHub Pages, you will not be caught by unexpected
differences between various versions of the gems. To use the
currently-deployed version of the gem in your project, add the
following to your `Gemfile`:
require 'json' <div class="code-block" markdown="1">
require 'open-uri' ```ruby
versions = JSON.parse(open('https://pages.github.com/versions.json').read) source 'https://rubygems.org'
gem 'github-pages', versions['github-pages'] require 'json'
{% endhighlight %} require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
<p> gem 'github-pages', versions['github-pages']
This will ensure that when you run <code>bundle install</code>, you ```
have the correct version of the <code>github-pages</code> gem. </div>
If that fails, simplify it: This will ensure that when you run `bundle install`, you
</p> have the correct version of the `github-pages` gem.
If that fails, simplify it:
{% highlight ruby %} <div class="code-block" markdown="1">
source 'https://rubygems.org' ```ruby
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">