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:
authorMichael Rose <est.michael@gmail.com>2016-06-01 22:31:09 +0300
committerMichael Rose <est.michael@gmail.com>2016-06-01 22:31:09 +0300
commit9c9ca9a5e1f701b8414a56f99c116a6a9c1382a0 (patch)
treed8bc89f77f771d4909036f8bbef286bc782abef7
parenta4fd8210703bb98079c21a88efa5bcc84fcc4080 (diff)
Replace {% highlight %} tags with GitHub Flavored Markdown backticks
-rw-r--r--_posts/2011-03-10-sample-post.md10
-rw-r--r--_posts/2013-05-22-sample-post-images.md18
-rw-r--r--_posts/2013-06-25-video-post.md10
-rw-r--r--_posts/2013-08-16-code-highlighting-post.md26
-rw-r--r--_posts/2013-10-26-background-image.md4
-rw-r--r--theme-setup/index.md42
6 files changed, 48 insertions, 62 deletions
diff --git a/_posts/2011-03-10-sample-post.md b/_posts/2011-03-10-sample-post.md
index 6b4c236..a075a8c 100644
--- a/_posts/2011-03-10-sample-post.md
+++ b/_posts/2011-03-10-sample-post.md
@@ -70,15 +70,15 @@ HTML and <abbr title="cascading stylesheets">CSS<abbr> are our tools. Mauris a a
## Code Snippets
-Syntax highlighting via Pygments
+Syntax highlighting via Rouge
-{% highlight css %}
+```css
#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
-{% endhighlight %}
+```
Non Pygments code example
@@ -90,9 +90,9 @@ Non Pygments code example
Make any link standout more when applying the `.btn` class.
-{% highlight html %}
+```html
<a href="#" class="btn btn-success">Success Button</a>
-{% endhighlight %}
+```
<div markdown="0"><a href="#" class="btn">Primary Button</a></div>
<div markdown="0"><a href="#" class="btn btn-success">Success Button</a></div>
diff --git a/_posts/2013-05-22-sample-post-images.md b/_posts/2013-05-22-sample-post-images.md
index 08700a5..7c41120 100644
--- a/_posts/2013-05-22-sample-post-images.md
+++ b/_posts/2013-05-22-sample-post-images.md
@@ -20,13 +20,13 @@ Here are some examples of what a post with images might look like. If you want t
Apply the `half` class like so to display two images side by side that share the same caption.
-{% highlight html %}
+```html
<figure class="half">
<img src="/images/image-filename-1.jpg" alt="">
<img src="/images/image-filename-2.jpg" alt="">
<figcaption>Caption describing these two images.</figcaption>
</figure>
-{% endhighlight %}
+```
And you'll get something that looks like this:
@@ -42,14 +42,14 @@ And you'll get something that looks like this:
Apply the `third` class like so to display three images side by side that share the same caption.
-{% highlight html %}
+```html
<figure class="third">
<a href="http://placehold.it/1200x600.jpg"><img src="http://placehold.it/600x300.jpg" alt=""></a>
<a href="http://placehold.it/1200x600.jpg"><img src="http://placehold.it/600x300.jpg" alt=""></a>
<a href="http://placehold.it/1200x600.jpg"><img src="http://placehold.it/600x300.jpg" alt=""></a>
<figcaption>Caption describing these three images.</figcaption>
</figure>
-{% endhighlight %}
+```
And you'll get something that looks like this:
@@ -71,16 +71,14 @@ and fill the block with any number of links to images. You can mix relative and
Here is the block you might want to use:
-{% highlight jinja %}
-{% raw %}
-{% capture images %}
+```liquid
+{% raw %}{% capture images %}
/images/abstract-10.jpg
/images/abstract-11.jpg
http://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png
{% endcapture %}
-{% include gallery images=images caption="Test images" cols=3 %}
-{% endraw %}
-{% endhighlight %}
+{% include gallery images=images caption="Test images" cols=3 %}{% endraw %}
+```
Parameters:
diff --git a/_posts/2013-06-25-video-post.md b/_posts/2013-06-25-video-post.md
index 0ea69a0..9a0d217 100644
--- a/_posts/2013-06-25-video-post.md
+++ b/_posts/2013-06-25-video-post.md
@@ -5,12 +5,10 @@ description: "Custom written post descriptions are the way to go... if you're no
tags: [sample post, video]
---
-<iframe width="560" height="315" src="//www.youtube.com/embed/SU3kYxJmWuQ" frameborder="0"> </iframe>
+<iframe width="560" height="315" src="//www.youtube.com/embed/SU3kYxJmWuQ" frameborder="0"></iframe>
Video embeds are responsive and scale with the width of the main content block with the help of [FitVids](http://fitvidsjs.com/).
-Not sure if this only effects Kramdown or if it's an issue with Markdown in general. But adding YouTube video embeds causes errors when building your Jekyll site. To fix add a space between the `<iframe>` tags and remove `allowfullscreen`. Example below:
-
-{% highlight html %}
-<iframe width="560" height="315" src="//www.youtube.com/embed/SU3kYxJmWuQ" frameborder="0"> </iframe>
-{% endhighlight %} \ No newline at end of file
+```html
+<iframe width="560" height="315" src="//www.youtube.com/embed/SU3kYxJmWuQ" frameborder="0"></iframe>
+``` \ No newline at end of file
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
diff --git a/_posts/2013-10-26-background-image.md b/_posts/2013-10-26-background-image.md
index 5992f9d..95d3c17 100644
--- a/_posts/2013-10-26-background-image.md
+++ b/_posts/2013-10-26-background-image.md
@@ -9,10 +9,10 @@ image:
Here be a sample post with a custom background image. To utilize this "feature" just add the following YAML to a post's front matter.
-{% highlight yaml %}
+```yaml
image:
background: filename.png
-{% endhighlight %}
+```
This little bit of YAML makes the assumption that your background image asset is in the `/images` folder. If you place it somewhere else or are hotlinking from the web, just include the full http(s):// URL. Either way you should have a background image that is tiled.
diff --git a/theme-setup/index.md b/theme-setup/index.md
index 45073b5..43cb696 100644
--- a/theme-setup/index.md
+++ b/theme-setup/index.md
@@ -46,17 +46,17 @@ The preferred method for running Jekyll is with `bundle exec`, but if you're wil
>
>However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine.
-{% highlight text %}
+```bash
bundle exec jekyll build
bundle exec jekyll serve
-{% endhighlight %}
+```
---
## Folder Structure
-{% highlight bash %}
+```bash
hpstr-jekyll-theme/
├── _includes
| ├── browser-upgrade.html # prompt to upgrade browser on < IE8
@@ -83,7 +83,7 @@ hpstr-jekyll-theme/
├── posts/ # all posts
├── tags/ # all posts grouped by tag
└── index.html # home page with pagination
-{% endhighlight %}
+```
---
@@ -95,17 +95,17 @@ Most of the variables found here are used in the .html files found in `_includes
Create a [Disqus](http://disqus.com) account and change `disqus_shortname` in `_config.yml` to the Disqus *shortname* you just setup. By default comments appear on all post and pages if you assigned a shortname. To disable commenting on a post or page, add the following to its YAML Front Matter:
-{% highlight yaml %}
+```yaml
comments: false
-{% endhighlight %}
+```
### Social Share Links
To disable Facebook, Twitter, and Google+ share links on a post or page, add the following to its front matter:
-{% highlight yaml %}
+```yaml
share: false
-{% endhighlight %}
+```
### Owner/Author Information
@@ -119,13 +119,13 @@ Your Google Analytics ID goes here along with meta tags for [Google Webmaster To
To add additional links in the drop down menu edit `_data/navigation.yml`. Use the following format to set the URL and title for as many links as you'd like. *External links will open in a new window.*
-{% highlight yaml %}
+```yaml
- title: Portfolio
url: /portfolio/
- title: Made Mistakes
url: http://mademistakes.com
-{% endhighlight %}
+```
---
@@ -151,27 +151,27 @@ A good rule of thumb is to keep feature images nice and wide so you don't push t
The two layouts make the assumption that the feature images live in the *images* folder. To add a feature image to a post or page just include the filename in the front matter like so.
-{% highlight yaml %}
+```yaml
image:
feature: feature-image-filename.jpg
thumb: thumbnail-image.jpg #keep it square 200x200 px is good
-{% endhighlight %}
+```
If you want to apply attribution to a feature image use the following YAML front matter on posts or pages. Image credits appear directly below the feature image with a link back to the original source.
-{% highlight yaml %}
+```yaml
image:
feature: feature-image-filename.jpg
credit: Michael Rose #name of the person or site you want to credit
creditlink: http://mademistakes.com #url to their site or licensing
-{% endhighlight %}
+```
By default the `<div>` containing feature images is set to have a minimum height of 400px with CSS. Anything taller is hidden with an `overflow: hidden` declaration. You can customize the height of the homepage feature image and those appearing on posts/pages by modifying the following variables in `/_sass/_variables.scss`.
-{% highlight sass %}
+```scss
$feature-image-height: 400px; // min 150px recommended
$front-page-feature-image-height: 400px; // min 150px recommended
-{% endhighlight %}
+```
#### Post/Page Thumbnails for OG and Twitter Cards
@@ -185,12 +185,6 @@ Here's an example of what a tweet to your site could look like if you activate T
Video embeds are responsive and scale with the width of the main content block with the help of [FitVids](http://fitvidsjs.com/).
-Not sure if this only effects Kramdown or if it's an issue with Markdown in general. But adding YouTube video embeds causes errors when building your Jekyll site. To fix add a space between the `<iframe>` tags and remove `allowfullscreen`. Example below:
-
-{% highlight html %}
-<iframe width="560" height="315" src="http://www.youtube.com/embed/PWf4WUoMXwg" frameborder="0"> </iframe>
-{% endhighlight %}
-
### Twitter Cards
Twitter cards make it possible to attach images and post summaries to Tweets that link to your content. Summary Card meta tags have been added to `head.html` to support this, you just need to [validate and apply your domain](https://dev.twitter.com/docs/cards) to turn it on.
@@ -209,9 +203,9 @@ For example if you wanted a red background instead of white you'd change `$bodyc
To modify the site's JavaScript files I setup a Grunt build script to lint/concatenate/minify all scripts into `scripts.min.js`. [Install Node.js](http://nodejs.org/), then [install Grunt](http://gruntjs.com/getting-started), and then finally install the dependencies for the theme contained in `package.json`:
-{% highlight bash %}
+```bash
npm install
-{% endhighlight %}
+```
From the theme's root, use `grunt` to concatenate JavaScript files and optimize `.jpg`, `.png` and `.svg` files in the `images/` folder.