Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c9ca9a

Browse files
committed
Replace {% highlight %} tags with GitHub Flavored Markdown backticks
1 parenta4fd821 commit9c9ca9a

File tree

6 files changed

+48
-62
lines changed

6 files changed

+48
-62
lines changed

‎_posts/2011-03-10-sample-post.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ HTML and <abbr title="cascading stylesheets">CSS<abbr> are our tools. Mauris a a
7070

7171
##Code Snippets
7272

73-
Syntax highlighting viaPygments
73+
Syntax highlighting viaRouge
7474

75-
{% highlightcss %}
75+
```css
7676
#container {
7777
float:left;
7878
margin:0-240px00;
7979
width:100%;
8080
}
81-
{% endhighlight %}
81+
```
8282

8383
Non Pygments code example
8484

@@ -90,9 +90,9 @@ Non Pygments code example
9090

9191
Make any link standout more when applying the`.btn` class.
9292

93-
{% highlighthtml %}
93+
```html
9494
<ahref="#"class="btn btn-success">Success Button</a>
95-
{% endhighlight %}
95+
```
9696

9797
<divmarkdown="0"><ahref="#"class="btn">Primary Button</a></div>
9898
<divmarkdown="0"><ahref="#"class="btn btn-success">Success Button</a></div>

‎_posts/2013-05-22-sample-post-images.md‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Here are some examples of what a post with images might look like. If you want t
2020

2121
Apply the`half` class like so to display two images side by side that share the same caption.
2222

23-
{% highlighthtml %}
23+
```html
2424
<figureclass="half">
2525
<imgsrc="/images/image-filename-1.jpg"alt="">
2626
<imgsrc="/images/image-filename-2.jpg"alt="">
2727
<figcaption>Caption describing these two images.</figcaption>
2828
</figure>
29-
{% endhighlight %}
29+
```
3030

3131
And you'll get something that looks like this:
3232

@@ -42,14 +42,14 @@ And you'll get something that looks like this:
4242

4343
Apply the`third` class like so to display three images side by side that share the same caption.
4444

45-
{% highlighthtml %}
45+
```html
4646
<figureclass="third">
4747
<ahref="http://placehold.it/1200x600.jpg"><imgsrc="http://placehold.it/600x300.jpg"alt=""></a>
4848
<ahref="http://placehold.it/1200x600.jpg"><imgsrc="http://placehold.it/600x300.jpg"alt=""></a>
4949
<ahref="http://placehold.it/1200x600.jpg"><imgsrc="http://placehold.it/600x300.jpg"alt=""></a>
5050
<figcaption>Caption describing these three images.</figcaption>
5151
</figure>
52-
{% endhighlight %}
52+
```
5353

5454
And you'll get something that looks like this:
5555

@@ -71,16 +71,14 @@ and fill the block with any number of links to images. You can mix relative and
7171

7272
Here is the block you might want to use:
7373

74-
{% highlight jinja %}
75-
{% raw %}
76-
{% capture images %}
74+
```liquid
75+
{% raw %}{% capture images %}
7776
/images/abstract-10.jpg
7877
/images/abstract-11.jpg
7978
http://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png
8079
{% endcapture %}
81-
{% include gallery images=images caption="Test images" cols=3 %}
82-
{% endraw %}
83-
{% endhighlight %}
80+
{% include gallery images=images caption="Test images" cols=3 %}{% endraw %}
81+
```
8482

8583
Parameters:
8684

‎_posts/2013-06-25-video-post.md‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ description: "Custom written post descriptions are the way to go... if you're no
55
tags:[sample post, video]
66
---
77

8-
<iframewidth="560"height="315"src="//www.youtube.com/embed/SU3kYxJmWuQ"frameborder="0"></iframe>
8+
<iframewidth="560"height="315"src="//www.youtube.com/embed/SU3kYxJmWuQ"frameborder="0"></iframe>
99

1010
Video embeds are responsive and scale with the width of the main content block with the help of[FitVids](http://fitvidsjs.com/).
1111

12-
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:
13-
14-
{% highlight html %}
15-
<iframewidth="560"height="315"src="//www.youtube.com/embed/SU3kYxJmWuQ"frameborder="0"></iframe>
16-
{% endhighlight %}
12+
```html
13+
<iframewidth="560"height="315"src="//www.youtube.com/embed/SU3kYxJmWuQ"frameborder="0"></iframe>
14+
```

‎_posts/2013-08-16-code-highlighting-post.md‎

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout:post
33
title:Syntax Highlighting Post
44
description:"Demo post displaying the various ways of highlighting code in Markdown."
5-
modified:2016-02-01
5+
modified:2016-06-01T15:27:45-04:00
66
tags:[sample post, code, highlighting]
77
image:
88
feature:abstract-10.jpg
@@ -18,28 +18,26 @@ Syntax highlighting is a feature that displays source code, in different colors
1818

1919
To modify styling and highlight colors edit`/_sass/_syntax.scss`.
2020

21-
{% highlightcss %}
21+
```css
2222
#container {
2323
float:left;
2424
margin:0-240px00;
2525
width:100%;
2626
}
27-
{% endhighlight %}
27+
```
2828

29-
{% highlight html %}
30-
{% raw %}
31-
<navclass="pagination"role="navigation">
29+
```html
30+
{% raw %}<navclass="pagination"role="navigation">
3231
{% if page.previous %}
3332
<ahref="{{ site.url }}{{ page.previous.url }}"class="btn"title="{{ page.previous.title }}">Previous article</a>
3433
{% endif %}
3534
{% if page.next %}
3635
<ahref="{{ site.url }}{{ page.next.url }}"class="btn"title="{{ page.next.title }}">Next article</a>
3736
{% endif %}
38-
</nav><!-- /.pagination-->
39-
{% endraw %}
40-
{% endhighlight %}
37+
</nav><!-- /.pagination-->{% endraw %}
38+
```
4139

42-
{% highlightruby %}
40+
```ruby
4341
moduleJekyll
4442
classTagIndex <Page
4543
definitialize(site,base,dir,tag)
@@ -57,21 +55,19 @@ module Jekyll
5755
end
5856
end
5957
end
60-
{% endhighlight %}
58+
```
6159

6260

6361
###Standard Code Block
6462

65-
{% raw %}
66-
<nav class="pagination" role="navigation">
63+
{% raw %}<nav class="pagination" role="navigation">
6764
{% if page.previous %}
6865
<a href="{{ site.url }}{{ page.previous.url }}" class="btn" title="{{ page.previous.title }}">Previous article</a>
6966
{% endif %}
7067
{% if page.next %}
7168
<a href="{{ site.url }}{{ page.next.url }}" class="btn" title="{{ page.next.title }}">Next article</a>
7269
{% endif %}
73-
</nav><!-- /.pagination -->
74-
{% endraw %}
70+
</nav><!-- /.pagination -->{% endraw %}
7571

7672

7773
###Fenced Code Blocks

‎_posts/2013-10-26-background-image.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ image:
99

1010
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.
1111

12-
{% highlightyaml %}
12+
```yaml
1313
image:
1414
background:filename.png
15-
{% endhighlight %}
15+
```
1616
1717
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.
1818

‎theme-setup/index.md‎

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ The preferred method for running Jekyll is with `bundle exec`, but if you're wil
4646
>
4747
>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.
4848
49-
{% highlight text %}
49+
```bash
5050
bundleexec jekyll build
5151

5252
bundleexec jekyll serve
53-
{% endhighlight %}
53+
```
5454

5555
---
5656

5757
##Folder Structure
5858

59-
{% highlightbash %}
59+
```bash
6060
hpstr-jekyll-theme/
6161
├── _includes
6262
| ├── browser-upgrade.html# prompt to upgrade browser on < IE8
@@ -83,7 +83,7 @@ hpstr-jekyll-theme/
8383
├── posts/# all posts
8484
├── tags/# all posts grouped by tag
8585
└── index.html# home page with pagination
86-
{% endhighlight %}
86+
```
8787

8888
---
8989

@@ -95,17 +95,17 @@ Most of the variables found here are used in the .html files found in `_includes
9595

9696
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:
9797

98-
{% highlightyaml %}
98+
```yaml
9999
comments:false
100-
{% endhighlight %}
100+
```
101101
102102
### Social Share Links
103103
104104
To disable Facebook, Twitter, and Google+ share links on a post or page, add the following to its front matter:
105105
106-
{% highlightyaml %}
106+
```yaml
107107
share:false
108-
{% endhighlight %}
108+
```
109109
110110
### Owner/Author Information
111111
@@ -119,13 +119,13 @@ Your Google Analytics ID goes here along with meta tags for [Google Webmaster To
119119

120120
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.*
121121

122-
{% highlightyaml %}
122+
```yaml
123123
- title: Portfolio
124124
url: /portfolio/
125125
126126
- title: Made Mistakes
127127
url: http://mademistakes.com
128-
{% endhighlight %}
128+
```
129129

130130
---
131131

@@ -151,27 +151,27 @@ A good rule of thumb is to keep feature images nice and wide so you don't push t
151151

152152
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.
153153

154-
{% highlightyaml %}
154+
```yaml
155155
image:
156156
feature: feature-image-filename.jpg
157157
thumb: thumbnail-image.jpg #keep it square 200x200 px is good
158-
{% endhighlight %}
158+
```
159159

160160
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.
161161

162-
{% highlightyaml %}
162+
```yaml
163163
image:
164164
feature: feature-image-filename.jpg
165165
credit: Michael Rose #name of the person or site you want to credit
166166
creditlink: http://mademistakes.com #url to their site or licensing
167-
{% endhighlight %}
167+
```
168168

169169
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`.
170170

171-
{% highlight sass %}
171+
```scss
172172
$feature-image-height: 400px; // min 150px recommended
173173
$front-page-feature-image-height: 400px; // min 150px recommended
174-
{% endhighlight %}
174+
```
175175

176176
#### Post/Page Thumbnails for OG and Twitter Cards
177177

@@ -185,12 +185,6 @@ Here's an example of what a tweet to your site could look like if you activate T
185185

186186
Video embeds are responsive and scale with the width of the main content block with the help of [FitVids](http://fitvidsjs.com/).
187187

188-
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:
189-
190-
{% highlight html %}
191-
<iframewidth="560"height="315"src="http://www.youtube.com/embed/PWf4WUoMXwg"frameborder="0"></iframe>
192-
{% endhighlight %}
193-
194188
### Twitter Cards
195189

196190
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
209203

210204
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`:
211205

212-
{% highlightbash %}
206+
```bash
213207
npm install
214-
{% endhighlight %}
208+
```
215209

216210
From the theme's root, use `grunt` to concatenate JavaScript files and optimize `.jpg`, `.png` and `.svg` files in the `images/` folder.
217211

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp