Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dldx/hpstr-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '_posts/2013-08-16-code-highlighting-post.md')
-rw-r--r--_posts/2013-08-16-code-highlighting-post.md26
1 files changed, 11 insertions, 15 deletions
diff --git a/_posts/2013-08-16-code-highlighting-post.md b/_posts/2013-08-16-code-highlighting-post.md
index 66329f2..ccf93da 100644
--- a/_posts/2013-08-16-code-highlighting-post.md
+++ b/_posts/2013-08-16-code-highlighting-post.md
@@ -2,7 +2,7 @@
layout: post
title: Syntax Highlighting Post
description: "Demo post displaying the various ways of highlighting code in Markdown."
-modified: 2016-02-01
+modified: 2016-06-01T15:27:45-04:00
tags: [sample post, code, highlighting]
image:
feature: abstract-10.jpg
@@ -18,28 +18,26 @@ Syntax highlighting is a feature that displays source code, in different colors
To modify styling and highlight colors edit `/_sass/_syntax.scss`.
-{% highlight css %}
+```css
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
-{% endhighlight %}
+```
-{% highlight html %}
-{% raw %}
-<nav class="pagination" role="navigation">
+```html
+{% raw %}<nav class="pagination" role="navigation">
{% if page.previous %}
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
{% endif %}
{% if page.next %}
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
{% endif %}
-</nav><!-- /.pagination -->
-{% endraw %}
-{% endhighlight %}
+</nav><!-- /.pagination -->{% endraw %}
+```
-{% highlight ruby %}
+```ruby
module Jekyll
class TagIndex < Page
def initialize(site, base, dir, tag)
@@ -57,21 +55,19 @@ module Jekyll
end
end
end
-{% endhighlight %}
+```
### Standard Code Block
- {% raw %}
- <nav class="pagination" role="navigation">
+ {% raw %}<nav class="pagination" role="navigation">
{% if page.previous %}
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
{% endif %}
{% if page.next %}
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
{% endif %}
- </nav><!-- /.pagination -->
- {% endraw %}
+ </nav><!-- /.pagination -->{% endraw %}
### Fenced Code Blocks