jekyll-docs 3.6.2.0 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/jekyll-docs.rb +7 -5
- data/site/404.html +5 -6
- data/site/community/index.html +9 -297
- data/site/conduct/index.html +3 -2
- data/site/css/screen.css +1 -1
- data/site/docs/assets/index.html +46 -30
- data/site/docs/code_of_conduct/index.html +44 -28
- data/site/docs/collections/index.html +85 -48
- data/site/docs/conduct/index.html +44 -28
- data/site/docs/configuration/index.html +66 -35
- data/site/docs/continuous-integration/buddyworks/index.html +55 -39
- data/site/docs/continuous-integration/circleci/index.html +65 -49
- data/site/docs/continuous-integration/index.html +44 -28
- data/site/docs/continuous-integration/travis-ci/index.html +45 -29
- data/site/docs/contributing/index.html +53 -33
- data/site/docs/datafiles/index.html +71 -62
- data/site/docs/deployment-methods/index.html +49 -33
- data/site/docs/drafts/index.html +44 -28
- data/site/docs/extras/index.html +44 -28
- data/site/docs/frontmatter/index.html +55 -39
- data/site/docs/github-pages/index.html +107 -111
- data/site/docs/history/index.html +299 -115
- data/site/docs/home/index.html +45 -29
- data/site/docs/includes/index.html +51 -34
- data/site/docs/index.html +3 -2
- data/site/docs/installation/index.html +65 -49
- data/site/docs/maintaining/affinity-team-captain/index.html +46 -30
- data/site/docs/maintaining/avoiding-burnout/index.html +44 -28
- data/site/docs/maintaining/becoming-a-maintainer/index.html +45 -29
- data/site/docs/maintaining/index.html +44 -28
- data/site/docs/maintaining/merging-a-pull-request/index.html +45 -29
- data/site/docs/maintaining/reviewing-a-pull-request/index.html +45 -29
- data/site/docs/maintaining/special-labels/index.html +44 -28
- data/site/docs/maintaining/triaging-an-issue/index.html +45 -29
- data/site/docs/migrations/index.html +44 -28
- data/site/docs/pages/index.html +48 -32
- data/site/docs/pagination/index.html +105 -84
- data/site/docs/permalinks/index.html +48 -32
- data/site/docs/plugins/index.html +97 -58
- data/site/docs/posts/index.html +126 -71
- data/site/docs/quickstart/index.html +48 -32
- data/site/docs/resources/index.html +46 -29
- data/site/docs/sites/index.html +44 -28
- data/site/docs/static-files/index.html +44 -28
- data/site/docs/structure/index.html +44 -28
- data/site/docs/support/index.html +725 -0
- data/site/docs/templates/index.html +77 -54
- data/site/docs/themes/index.html +63 -37
- data/site/docs/troubleshooting/index.html +56 -40
- data/site/docs/upgrading/0-to-2/index.html +45 -29
- data/site/docs/upgrading/2-to-3/index.html +50 -34
- data/site/docs/upgrading/index.html +63 -31
- data/site/docs/usage/index.html +68 -44
- data/site/docs/variables/index.html +44 -28
- data/site/docs/windows/index.html +66 -54
- data/site/feed.xml +81 -108
- data/site/github.html +3 -2
- data/site/help/index.html +66 -46
- data/site/img/jekyll-sticker.jpg +0 -0
- data/site/img/jekylllayoutconcept.png +0 -0
- data/site/img/twitter-card.png +0 -0
- data/site/index.html +43 -27
- data/site/issues.html +3 -2
- data/site/jekyllconf/index.html +315 -0
- data/site/latest_version.txt +1 -1
- data/site/news/2013/05/05/jekyll-1-0-0-released/index.html +69 -33
- data/site/news/2013/05/08/jekyll-1-0-1-released/index.html +69 -33
- data/site/news/2013/05/12/jekyll-1-0-2-released/index.html +69 -33
- data/site/news/2013/06/07/jekyll-1-0-3-released/index.html +69 -33
- data/site/news/2013/07/14/jekyll-1-1-0-released/index.html +69 -33
- data/site/news/2013/07/24/jekyll-1-1-1-released/index.html +81 -45
- data/site/news/2013/07/25/jekyll-1-0-4-released/index.html +69 -33
- data/site/news/2013/07/25/jekyll-1-1-2-released/index.html +69 -33
- data/site/news/2013/09/06/jekyll-1-2-0-released/index.html +69 -33
- data/site/news/2013/09/14/jekyll-1-2-1-released/index.html +69 -33
- data/site/news/2013/10/28/jekyll-1-3-0-rc1-released/index.html +69 -33
- data/site/news/2013/11/04/jekyll-1-3-0-released/index.html +69 -33
- data/site/news/2013/11/26/jekyll-1-3-1-released/index.html +69 -33
- data/site/news/2013/12/07/jekyll-1-4-0-released/index.html +69 -33
- data/site/news/2013/12/09/jekyll-1-4-1-released/index.html +69 -33
- data/site/news/2013/12/16/jekyll-1-4-2-released/index.html +69 -33
- data/site/news/2014/01/13/jekyll-1-4-3-released/index.html +69 -33
- data/site/news/2014/03/24/jekyll-1-5-0-released/index.html +69 -33
- data/site/news/2014/03/27/jekyll-1-5-1-released/index.html +69 -33
- data/site/news/2014/05/06/jekyll-turns-2-0-0/index.html +69 -33
- data/site/news/2014/05/08/jekyll-2-0-3-released/index.html +69 -33
- data/site/news/2014/06/04/jekyll-stickers-1-dollar-stickermule/index.html +69 -33
- data/site/news/2014/06/28/jekyll-turns-21-i-mean-2-1-0/index.html +69 -33
- data/site/news/2014/07/01/jekyll-2-1-1-released/index.html +69 -33
- data/site/news/2014/07/29/jekyll-2-2-0-released/index.html +69 -33
- data/site/news/2014/08/10/jekyll-2-3-0-released/index.html +69 -33
- data/site/news/2014/09/09/jekyll-2-4-0-released/index.html +69 -33
- data/site/news/2014/11/05/jekylls-midlife-crisis-jekyll-turns-2-5-0/index.html +70 -34
- data/site/news/2014/11/09/jekyll-2-5-1-released/index.html +69 -33
- data/site/news/2014/11/12/jekyll-2-5-2-released/index.html +69 -33
- data/site/news/2014/12/17/alfredxing-welcome-to-jekyll-core/index.html +69 -33
- data/site/news/2014/12/22/jekyll-2-5-3-released/index.html +70 -34
- data/site/news/2015/01/20/jekyll-meet-and-greet/index.html +69 -33
- data/site/news/2015/01/24/jekyll-3-0-0-beta1-released/index.html +70 -34
- data/site/news/2015/02/26/introducing-jekyll-talk/index.html +69 -33
- data/site/news/2015/10/26/jekyll-3-0-released/index.html +69 -33
- data/site/news/2015/11/17/jekyll-3-0-1-released/index.html +69 -33
- data/site/news/2016/01/20/jekyll-3-0-2-released/index.html +69 -33
- data/site/news/2016/01/24/jekyll-3-1-0-released/index.html +69 -33
- data/site/news/2016/01/28/jekyll-3-1-1-released/index.html +71 -35
- data/site/news/2016/02/08/jekyll-3-0-3-released/index.html +69 -33
- data/site/news/2016/02/19/jekyll-3-1-2-released/index.html +69 -33
- data/site/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/index.html +69 -33
- data/site/news/2016/04/19/jekyll-3-0-4-released/index.html +69 -33
- data/site/news/2016/04/19/jekyll-3-1-3-released/index.html +69 -33
- data/site/news/2016/04/26/jekyll-3-0-5-released/index.html +69 -33
- data/site/news/2016/05/18/jekyll-3-1-4-released/index.html +69 -33
- data/site/news/2016/05/18/jekyll-3-1-5-released/index.html +69 -33
- data/site/news/2016/05/19/jekyll-3-1-6-released/index.html +69 -33
- data/site/news/2016/06/03/update-on-jekyll-s-google-summer-of-code-projects/index.html +69 -33
- data/site/news/2016/07/26/jekyll-3-2-0-released/index.html +69 -33
- data/site/news/2016/08/02/jekyll-3-2-1-released/index.html +70 -34
- data/site/news/2016/08/24/jekyll-admin-initial-release/index.html +69 -33
- data/site/news/2016/10/06/jekyll-3-3-is-here/index.html +69 -33
- data/site/news/2016/11/14/jekyll-3-3-1-released/index.html +69 -33
- data/site/news/2017/01/02/jekyll-3-7-0-released/index.html +626 -0
- data/site/news/2017/01/18/jekyll-3-4-0-released/index.html +69 -33
- data/site/news/2017/03/02/jekyll-3-4-1-released/index.html +69 -33
- data/site/news/2017/03/09/jekyll-3-4-2-released/index.html +69 -33
- data/site/news/2017/03/21/jekyll-3-4-3-released/index.html +69 -33
- data/site/news/2017/06/15/jekyll-3-5-0-released/index.html +71 -35
- data/site/news/2017/07/17/jekyll-3-5-1-released/index.html +69 -33
- data/site/news/2017/08/12/jekyll-3-5-2-released/index.html +69 -33
- data/site/news/2017/09/21/jekyll-3-6-0-released/index.html +69 -33
- data/site/news/2017/10/19/diversity-open-source/index.html +631 -0
- data/site/news/2017/10/21/jekyll-3-6-2-released/index.html +627 -0
- data/site/news/index.html +270 -49
- data/site/news/releases/index.html +204 -49
- data/site/redirects.json +1 -0
- data/site/sitemap.xml +77 -57
- data/site/tutorials/convert-site-to-jekyll/index.html +58 -31
- data/site/tutorials/custom-404-page/index.html +70 -42
- data/site/tutorials/home/index.html +53 -29
- data/site/tutorials/index.html +3 -2
- data/site/tutorials/navigation/index.html +70 -38
- data/site/tutorials/orderofinterpretation/index.html +61 -34
- data/site/tutorials/video-walkthroughs/index.html +352 -0
- metadata +17 -12
- data/site/CNAME +0 -1
- data/site/icomoon-selection.json +0 -96
- data/site/readme.md +0 -23
data/site/docs/posts/index.html
CHANGED
@@ -4,14 +4,16 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
-
<meta name="generator" content="Jekyll v3.
|
7
|
+
<meta name="generator" content="Jekyll v3.7.0">
|
8
8
|
<link type="application/atom+xml" rel="alternate" href="https://jekyllrb.com/feed.xml" title="Jekyll • Simple, blog-aware, static sites">
|
9
9
|
<link rel="alternate" type="application/atom+xml" title="Recent commits to Jekyll’s master branch" href="https://github.com/jekyll/jekyll/commits/master.atom">
|
10
10
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
|
11
12
|
<link rel="stylesheet" href="/css/screen.css">
|
12
13
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
13
|
-
<!-- Begin Jekyll SEO tag v2.
|
14
|
+
<!-- Begin Jekyll SEO tag v2.4.0 -->
|
14
15
|
<title>Writing posts | Jekyll • Simple, blog-aware, static sites</title>
|
16
|
+
<meta name="generator" content="Jekyll v3.7.0">
|
15
17
|
<meta property="og:title" content="Writing posts">
|
16
18
|
<meta property="og:locale" content="en_US">
|
17
19
|
<meta name="description" content="One of Jekyll’s best aspects is that it is “blog aware”. What does this mean, exactly? Well, simply put, it means that blogging is baked into Jekyll’s functionality. If you write articles and publish them online, you can publish and maintain a blog simply by managing a folder of text-files on your computer. Compared to the hassle of configuring and maintaining databases and web-based CMS systems, this will be a welcome change!">
|
@@ -20,12 +22,12 @@
|
|
20
22
|
<meta property="og:url" content="https://jekyllrb.com/docs/posts/">
|
21
23
|
<meta property="og:site_name" content="Jekyll • Simple, blog-aware, static sites">
|
22
24
|
<meta property="og:type" content="article">
|
23
|
-
<meta property="article:published_time" content="
|
25
|
+
<meta property="article:published_time" content="2018-01-03T02:41:17-08:00">
|
24
26
|
<meta name="twitter:card" content="summary">
|
25
27
|
<meta name="twitter:site" content="@jekyllrb">
|
26
28
|
<meta name="google-site-verification" content="onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY">
|
27
29
|
<script type="application/ld+json">
|
28
|
-
{"
|
30
|
+
{"headline":"Writing posts","dateModified":"2018-01-03T02:41:17-08:00","datePublished":"2018-01-03T02:41:17-08:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://jekyllrb.com/docs/posts/"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://jekyllrb.com/img/logo-2x.png"}},"url":"https://jekyllrb.com/docs/posts/","description":"One of Jekyll’s best aspects is that it is “blog aware”. What does this mean, exactly? Well, simply put, it means that blogging is baked into Jekyll’s functionality. If you write articles and publish them online, you can publish and maintain a blog simply by managing a folder of text-files on your computer. Compared to the hassle of configuring and maintaining databases and web-based CMS systems, this will be a welcome change!","@type":"BlogPosting","@context":"http://schema.org"}</script>
|
29
31
|
<!-- End Jekyll SEO tag -->
|
30
32
|
|
31
33
|
<!--[if lt IE 9]>
|
@@ -37,8 +39,17 @@
|
|
37
39
|
|
38
40
|
<body class="wrap">
|
39
41
|
<header>
|
40
|
-
<
|
41
|
-
<
|
42
|
+
<div class="flexbox">
|
43
|
+
<div class="center-on-mobiles">
|
44
|
+
<h1>
|
45
|
+
<a href="/" class="logo">
|
46
|
+
<span class="sr-only">Jekyll</span>
|
47
|
+
<img src="/img/logo-2x.png" width="140" height="65" alt="Jekyll Logo">
|
48
|
+
</a>
|
49
|
+
</h1>
|
50
|
+
</div>
|
51
|
+
<nav class="main-nav hide-on-mobiles">
|
52
|
+
<ul>
|
42
53
|
<li class="">
|
43
54
|
<a href="/">Home</a>
|
44
55
|
</li>
|
@@ -48,29 +59,29 @@
|
|
48
59
|
<li class="">
|
49
60
|
<a href="/news/">News</a>
|
50
61
|
</li>
|
51
|
-
<li class="">
|
52
|
-
<a href="/community/">Community</a>
|
53
|
-
</li>
|
54
62
|
<li class="">
|
55
63
|
<a href="/help/">Help</a>
|
56
64
|
</li>
|
57
|
-
<li>
|
58
|
-
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
59
|
-
</li>
|
60
65
|
</ul>
|
61
66
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<a href="/">
|
67
|
-
<span class="sr-only">Jekyll</span>
|
68
|
-
<img src="/img/logo-2x.png" width="249" height="115" alt="Jekyll Logo">
|
69
|
-
</a>
|
70
|
-
</h1>
|
67
|
+
</nav>
|
68
|
+
<div class="search hide-on-mobiles">
|
69
|
+
<input type="text" id="docsearch-input" placeholder="Search the docs…">
|
70
|
+
|
71
71
|
</div>
|
72
|
-
<
|
72
|
+
<div class="meta hide-on-mobiles">
|
73
73
|
<ul>
|
74
|
+
<li>
|
75
|
+
<a href="https://github.com/jekyll/jekyll/releases/tag/v3.7.0">v3.7.0</a>
|
76
|
+
</li>
|
77
|
+
<li>
|
78
|
+
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
79
|
+
</li>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
<nav class="mobile-nav show-on-mobiles">
|
84
|
+
<ul>
|
74
85
|
<li class="">
|
75
86
|
<a href="/">Home</a>
|
76
87
|
</li>
|
@@ -80,9 +91,6 @@
|
|
80
91
|
<li class="">
|
81
92
|
<a href="/news/">News</a>
|
82
93
|
</li>
|
83
|
-
<li class="">
|
84
|
-
<a href="/community/">Community</a>
|
85
|
-
</li>
|
86
94
|
<li class="">
|
87
95
|
<a href="/help/">Help</a>
|
88
96
|
</li>
|
@@ -91,8 +99,7 @@
|
|
91
99
|
</li>
|
92
100
|
</ul>
|
93
101
|
|
94
|
-
|
95
|
-
</div>
|
102
|
+
</nav>
|
96
103
|
</header>
|
97
104
|
|
98
105
|
|
@@ -310,14 +317,14 @@ static site.</p>
|
|
310
317
|
directory. How you name files in this folder is important. Jekyll requires blog
|
311
318
|
post files to be named according to the following format:</p>
|
312
319
|
|
313
|
-
<div class="
|
320
|
+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>YEAR-MONTH-DAY-title.MARKUP
|
314
321
|
</code></pre></div></div>
|
315
322
|
|
316
323
|
<p>Where <code class="highlighter-rouge">YEAR</code> is a four-digit number, <code class="highlighter-rouge">MONTH</code> and <code class="highlighter-rouge">DAY</code> are both two-digit
|
317
324
|
numbers, and <code class="highlighter-rouge">MARKUP</code> is the file extension representing the format used in the
|
318
325
|
file. For example, the following are examples of valid post filenames:</p>
|
319
326
|
|
320
|
-
<div class="
|
327
|
+
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>2011-12-31-new-years-eve-is-awesome.md
|
321
328
|
2012-09-12-how-to-write-a-blog.md
|
322
329
|
</code></pre></div></div>
|
323
330
|
|
@@ -360,52 +367,47 @@ digital assets along with your text content. While the syntax for linking to
|
|
360
367
|
these resources differs between Markdown and Textile, the problem of working
|
361
368
|
out where to store these files in your site is something everyone will face.</p>
|
362
369
|
|
363
|
-
<p>There are a number of ways to include digital assets in Jekyll.
|
370
|
+
<p>There are a number of ways to include digital assets in Jekyll.
|
364
371
|
One common solution is to create a folder in the root of the project directory
|
365
|
-
called something like <code class="highlighter-rouge">assets</code
|
372
|
+
called something like <code class="highlighter-rouge">assets</code>, into which any images, files
|
366
373
|
or other resources are placed. Then, from within any post, they can be linked
|
367
374
|
to using the site’s root as the path for the asset to include. Again, this will
|
368
375
|
depend on the way your site’s (sub)domain and path are configured, but here are
|
369
|
-
some examples
|
370
|
-
|
376
|
+
some examples in Markdown of how you could do this using the <code class="highlighter-rouge">absolute_url</code>
|
377
|
+
filter in a post.</p>
|
371
378
|
|
372
379
|
<p>Including an image asset in a post:</p>
|
373
380
|
|
374
|
-
<div class="language-
|
375
|
-
|
381
|
+
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>... which is shown in the screenshot below:
|
382
|
+
<span class="p">![</span><span class="nv">My helpful screenshot</span><span class="p">](</span><span class="sx">{{</span> <span class="nn">"/assets/screenshot.jpg"</span> | absolute_url }})
|
376
383
|
</code></pre></div></div>
|
377
384
|
|
378
385
|
<p>Linking to a PDF for readers to download:</p>
|
379
386
|
|
380
|
-
<div class="language-
|
387
|
+
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code>... you can <span class="p">[</span><span class="nv">get the PDF</span><span class="p">](</span><span class="sx">{{</span> <span class="nn">"/assets/mydoc.pdf"</span> | absolute_url }}) directly.
|
381
388
|
</code></pre></div></div>
|
382
389
|
|
383
|
-
<div class="
|
384
|
-
|
385
|
-
<p>
|
386
|
-
You can skip the <code>{{ site.url }}</code> variable
|
387
|
-
if you <strong>know</strong> your site will only ever be displayed at the
|
388
|
-
root URL of your domain. In this case you can reference assets directly with
|
389
|
-
just <code>/path/file.jpg</code>.
|
390
|
-
</p>
|
390
|
+
<div class="info">
|
391
|
+
|
391
392
|
</div>
|
392
393
|
|
393
394
|
<h2 id="a-typical-post">A typical post</h2>
|
394
395
|
|
395
396
|
<p>Jekyll can handle many different iterations of the idea you might associate with a “post,” however a standard blog style post, including a Title, Layout, Publishing Date, and Categories might look like this:</p>
|
396
397
|
|
397
|
-
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code
|
398
|
-
layout
|
399
|
-
title
|
400
|
-
date
|
401
|
-
categories
|
402
|
-
|
403
|
-
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
|
398
|
+
<div class="language-markdown highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
|
399
|
+
<span class="na">layout</span><span class="pi">:</span> <span class="s">post</span>
|
400
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Welcome</span><span class="nv"> </span><span class="s">to</span><span class="nv"> </span><span class="s">Jekyll!"</span>
|
401
|
+
<span class="na">date</span><span class="pi">:</span> <span class="s">2015-11-17 16:16:01 -0600</span>
|
402
|
+
<span class="na">categories</span><span class="pi">:</span> <span class="s">jekyll update</span>
|
403
|
+
<span class="nn">---</span>
|
404
404
|
|
405
|
-
|
405
|
+
You’ll find this post in your <span class="sb">`_posts`</span> directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run <span class="sb">`bundle exec jekyll serve`</span>, which launches a web server and auto-regenerates your site when a file is updated.
|
406
406
|
|
407
|
+
To add new posts, simply add a file in the <span class="sb">`_posts`</span> directory that follows the convention <span class="sb">`YYYY-MM-DD-name-of-post.ext`</span> and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
|
407
408
|
</code></pre></div></div>
|
408
|
-
|
409
|
+
|
410
|
+
<p>Everything in between the first and second <code class="highlighter-rouge">---</code> are part of the YAML Front Matter, and everything after the second <code class="highlighter-rouge">---</code> will be rendered with Markdown and show up as “Content”.</p>
|
409
411
|
|
410
412
|
<h2 id="displaying-an-index-of-posts">Displaying an index of posts</h2>
|
411
413
|
|
@@ -433,6 +435,50 @@ you wish to access the currently-rendering page/posts’s variables (the
|
|
433
435
|
variables of the post/page that has the <code class="highlighter-rouge">for</code> loop in it), use the <code class="highlighter-rouge">page</code>
|
434
436
|
variable instead.</p>
|
435
437
|
|
438
|
+
<h2 id="displaying-post-categories-or-tags">Displaying post categories or tags</h2>
|
439
|
+
|
440
|
+
<p>Hey, that’s pretty neat, but what about showing just some of your posts that are
|
441
|
+
related to each other? For that you can use any of the <a href="https://jekyllrb.com/docs/frontmatter/">variables definable in
|
442
|
+
Front Matter</a>. In the “typical post”
|
443
|
+
section you can see how to define categories. Simply add the categories to your
|
444
|
+
Front Matter as a <a href="https://en.wikipedia.org/wiki/YAML#Basic_components">yaml
|
445
|
+
list</a>.</p>
|
446
|
+
|
447
|
+
<p>Now that your posts have a category or multiple categories, you can make a page
|
448
|
+
or a template displaying just the posts in those categories you specify. Here’s
|
449
|
+
a basic example of how to create a list of posts from a specific category.</p>
|
450
|
+
|
451
|
+
<p>First, in the <code class="highlighter-rouge">_layouts</code> directory create a new file called <code class="highlighter-rouge">category.html</code> - in
|
452
|
+
that file put (at least) the following:</p>
|
453
|
+
|
454
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code>---
|
455
|
+
layout: page
|
456
|
+
---
|
457
|
+
|
458
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span>post<span class="w"> </span>in<span class="w"> </span>site.categories[page.category]<span class="w"> </span><span class="p">%}</span>
|
459
|
+
<a href="<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">url</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">absolute_url</span><span class="w"> </span><span class="p">}}</span>">
|
460
|
+
<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">title</span><span class="w"> </span><span class="p">}}</span>
|
461
|
+
</a>
|
462
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="p">%}</span>
|
463
|
+
</code></pre></div></div>
|
464
|
+
|
465
|
+
<p>Next, in the root directory of your Jekyll install, create a new directory
|
466
|
+
called <code class="highlighter-rouge">category</code> and then create a file for each category you want to list. For
|
467
|
+
example, if you have a category <code class="highlighter-rouge">blog</code> then create a file in the new directory
|
468
|
+
called <code class="highlighter-rouge">blog.html</code> with at least</p>
|
469
|
+
|
470
|
+
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
|
471
|
+
<span class="na">layout</span><span class="pi">:</span> <span class="s">category</span>
|
472
|
+
<span class="na">title</span><span class="pi">:</span> <span class="s">Blog</span>
|
473
|
+
<span class="na">category</span><span class="pi">:</span> <span class="s">blog</span>
|
474
|
+
<span class="nn">---</span>
|
475
|
+
</code></pre></div></div>
|
476
|
+
|
477
|
+
<p>In this case, the listing pages will be accessible at <code class="highlighter-rouge">{baseurl}/category/blog.html</code></p>
|
478
|
+
|
479
|
+
<p>While this example is done with categories, you can easily extend your lists to
|
480
|
+
filter by tags or any other variable created with extensions.</p>
|
481
|
+
|
436
482
|
<h2 id="post-excerpts">Post excerpts</h2>
|
437
483
|
|
438
484
|
<p>Each post automatically takes the first block of text, from the beginning of
|
@@ -441,21 +487,21 @@ Take the above example of an index of posts. Perhaps you want to include
|
|
441
487
|
a little hint about the post’s content by adding the first paragraph of each of
|
442
488
|
your posts:</p>
|
443
489
|
|
444
|
-
<div class="language-
|
445
|
-
{
|
446
|
-
|
447
|
-
<span class="
|
448
|
-
{{ post
|
449
|
-
|
450
|
-
{
|
451
|
-
|
490
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><ul>
|
491
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span>post<span class="w"> </span>in<span class="w"> </span>site.posts<span class="w"> </span><span class="p">%}</span>
|
492
|
+
<li>
|
493
|
+
<a href="<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">url</span><span class="w"> </span><span class="p">}}</span>"><span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">title</span><span class="w"> </span><span class="p">}}</span></a>
|
494
|
+
<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">excerpt</span><span class="w"> </span><span class="p">}}</span>
|
495
|
+
</li>
|
496
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="p">%}</span>
|
497
|
+
</ul>
|
452
498
|
</code></pre></div></div>
|
453
499
|
|
454
500
|
<p>Because Jekyll grabs the first paragraph you will not need to wrap the excerpt
|
455
501
|
in <code class="highlighter-rouge">p</code> tags, which is already done for you. These tags can be removed with the
|
456
502
|
following if you’d prefer:</p>
|
457
503
|
|
458
|
-
<div class="language-
|
504
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">excerpt</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">remove</span><span class="p">:</span><span class="w"> </span><span class="s1">'<p>'</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">remove</span><span class="p">:</span><span class="w"> </span><span class="s1">'</p>'</span><span class="w"> </span><span class="p">}}</span>
|
459
505
|
</code></pre></div></div>
|
460
506
|
|
461
507
|
<p>If you don’t like the automatically-generated post excerpt, it can be
|
@@ -463,13 +509,13 @@ explicitly overridden by adding an <code class="highlighter-rouge">excerpt</code
|
|
463
509
|
Front Matter. Alternatively, you can choose to define a custom
|
464
510
|
<code class="highlighter-rouge">excerpt_separator</code> in the post’s YAML front matter:</p>
|
465
511
|
|
466
|
-
<div class="language-
|
467
|
-
excerpt_separator
|
468
|
-
|
512
|
+
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nn">---</span>
|
513
|
+
<span class="na">excerpt_separator</span><span class="pi">:</span> <span class="s"><!--more--></span>
|
514
|
+
<span class="nn">---</span>
|
469
515
|
|
470
|
-
Excerpt
|
471
|
-
|
472
|
-
Out-of-excerpt
|
516
|
+
<span class="s">Excerpt</span>
|
517
|
+
<span class="s"><!--more--></span>
|
518
|
+
<span class="s">Out-of-excerpt</span>
|
473
519
|
</code></pre></div></div>
|
474
520
|
|
475
521
|
<p>You can also set the <code class="highlighter-rouge">excerpt_separator</code> globally in your <code class="highlighter-rouge">_config.yml</code>
|
@@ -489,7 +535,7 @@ html tags along with the content is not desirable.</p>
|
|
489
535
|
either Pygments or Rouge, and including a code snippet in any post is easy.
|
490
536
|
Just use the dedicated Liquid tag as follows:</p>
|
491
537
|
|
492
|
-
<div class="language-
|
538
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">highlight</span><span class="w"> </span>ruby<span class="w"> </span><span class="p">%}</span>
|
493
539
|
def show
|
494
540
|
@widget = Widget(params[:id])
|
495
541
|
respond_to do |format|
|
@@ -497,7 +543,7 @@ def show
|
|
497
543
|
format.json { render json: @widget }
|
498
544
|
end
|
499
545
|
end
|
500
|
-
{
|
546
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">endhighlight</span><span class="w"> </span><span class="p">%}</span>
|
501
547
|
</code></pre></div></div>
|
502
548
|
|
503
549
|
<p>And the output will look like this:</p>
|
@@ -775,7 +821,7 @@ site.</p>
|
|
775
821
|
<footer>
|
776
822
|
<div class="grid">
|
777
823
|
<div class="unit one-third center-on-mobiles">
|
778
|
-
<p>The contents of this website are <br>©
|
824
|
+
<p>The contents of this website are <br>© 2018 under the terms of the <a href="https://github.com/jekyll/jekyll/blob/master/LICENSE">MIT License</a>.</p>
|
779
825
|
</div>
|
780
826
|
<div class="unit two-thirds align-right center-on-mobiles">
|
781
827
|
<p>
|
@@ -853,6 +899,15 @@ site.</p>
|
|
853
899
|
</script>
|
854
900
|
|
855
901
|
|
902
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
903
|
+
<script type="text/javascript"> docsearch({
|
904
|
+
apiKey: '50fe39c839958dfad797000f33e2ec17',
|
905
|
+
indexName: 'jekyllrb',
|
906
|
+
inputSelector: '#docsearch-input',
|
907
|
+
enhancedSearchInput: true,
|
908
|
+
debug: false // Set debug to true if you want to inspect the dropdown
|
909
|
+
});
|
910
|
+
</script>
|
856
911
|
|
857
912
|
</body>
|
858
913
|
</html>
|
@@ -4,14 +4,16 @@
|
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
5
|
<meta charset="UTF-8">
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
-
<meta name="generator" content="Jekyll v3.
|
7
|
+
<meta name="generator" content="Jekyll v3.7.0">
|
8
8
|
<link type="application/atom+xml" rel="alternate" href="https://jekyllrb.com/feed.xml" title="Jekyll • Simple, blog-aware, static sites">
|
9
9
|
<link rel="alternate" type="application/atom+xml" title="Recent commits to Jekyll’s master branch" href="https://github.com/jekyll/jekyll/commits/master.atom">
|
10
10
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css">
|
11
12
|
<link rel="stylesheet" href="/css/screen.css">
|
12
13
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
13
|
-
<!-- Begin Jekyll SEO tag v2.
|
14
|
+
<!-- Begin Jekyll SEO tag v2.4.0 -->
|
14
15
|
<title>Quick-start guide | Jekyll • Simple, blog-aware, static sites</title>
|
16
|
+
<meta name="generator" content="Jekyll v3.7.0">
|
15
17
|
<meta property="og:title" content="Quick-start guide">
|
16
18
|
<meta property="og:locale" content="en_US">
|
17
19
|
<meta name="description" content="If you already have a full Ruby development environment with all headers and RubyGems installed (see Jekyll’s requirements), you can create a new Jekyll site by doing the following:">
|
@@ -20,12 +22,12 @@
|
|
20
22
|
<meta property="og:url" content="https://jekyllrb.com/docs/quickstart/">
|
21
23
|
<meta property="og:site_name" content="Jekyll • Simple, blog-aware, static sites">
|
22
24
|
<meta property="og:type" content="article">
|
23
|
-
<meta property="article:published_time" content="
|
25
|
+
<meta property="article:published_time" content="2018-01-03T02:41:17-08:00">
|
24
26
|
<meta name="twitter:card" content="summary">
|
25
27
|
<meta name="twitter:site" content="@jekyllrb">
|
26
28
|
<meta name="google-site-verification" content="onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY">
|
27
29
|
<script type="application/ld+json">
|
28
|
-
{"
|
30
|
+
{"headline":"Quick-start guide","dateModified":"2018-01-03T02:41:17-08:00","datePublished":"2018-01-03T02:41:17-08:00","mainEntityOfPage":{"@type":"WebPage","@id":"https://jekyllrb.com/docs/quickstart/"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://jekyllrb.com/img/logo-2x.png"}},"url":"https://jekyllrb.com/docs/quickstart/","description":"If you already have a full Ruby development environment with all headers and RubyGems installed (see Jekyll’s requirements), you can create a new Jekyll site by doing the following:","@type":"BlogPosting","@context":"http://schema.org"}</script>
|
29
31
|
<!-- End Jekyll SEO tag -->
|
30
32
|
|
31
33
|
<!--[if lt IE 9]>
|
@@ -37,8 +39,17 @@
|
|
37
39
|
|
38
40
|
<body class="wrap">
|
39
41
|
<header>
|
40
|
-
<
|
41
|
-
<
|
42
|
+
<div class="flexbox">
|
43
|
+
<div class="center-on-mobiles">
|
44
|
+
<h1>
|
45
|
+
<a href="/" class="logo">
|
46
|
+
<span class="sr-only">Jekyll</span>
|
47
|
+
<img src="/img/logo-2x.png" width="140" height="65" alt="Jekyll Logo">
|
48
|
+
</a>
|
49
|
+
</h1>
|
50
|
+
</div>
|
51
|
+
<nav class="main-nav hide-on-mobiles">
|
52
|
+
<ul>
|
42
53
|
<li class="">
|
43
54
|
<a href="/">Home</a>
|
44
55
|
</li>
|
@@ -48,29 +59,29 @@
|
|
48
59
|
<li class="">
|
49
60
|
<a href="/news/">News</a>
|
50
61
|
</li>
|
51
|
-
<li class="">
|
52
|
-
<a href="/community/">Community</a>
|
53
|
-
</li>
|
54
62
|
<li class="">
|
55
63
|
<a href="/help/">Help</a>
|
56
64
|
</li>
|
57
|
-
<li>
|
58
|
-
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
59
|
-
</li>
|
60
65
|
</ul>
|
61
66
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<a href="/">
|
67
|
-
<span class="sr-only">Jekyll</span>
|
68
|
-
<img src="/img/logo-2x.png" width="249" height="115" alt="Jekyll Logo">
|
69
|
-
</a>
|
70
|
-
</h1>
|
67
|
+
</nav>
|
68
|
+
<div class="search hide-on-mobiles">
|
69
|
+
<input type="text" id="docsearch-input" placeholder="Search the docs…">
|
70
|
+
|
71
71
|
</div>
|
72
|
-
<
|
72
|
+
<div class="meta hide-on-mobiles">
|
73
73
|
<ul>
|
74
|
+
<li>
|
75
|
+
<a href="https://github.com/jekyll/jekyll/releases/tag/v3.7.0">v3.7.0</a>
|
76
|
+
</li>
|
77
|
+
<li>
|
78
|
+
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
79
|
+
</li>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
</div>
|
83
|
+
<nav class="mobile-nav show-on-mobiles">
|
84
|
+
<ul>
|
74
85
|
<li class="">
|
75
86
|
<a href="/">Home</a>
|
76
87
|
</li>
|
@@ -80,9 +91,6 @@
|
|
80
91
|
<li class="">
|
81
92
|
<a href="/news/">News</a>
|
82
93
|
</li>
|
83
|
-
<li class="">
|
84
|
-
<a href="/community/">Community</a>
|
85
|
-
</li>
|
86
94
|
<li class="">
|
87
95
|
<a href="/help/">Help</a>
|
88
96
|
</li>
|
@@ -91,8 +99,7 @@
|
|
91
99
|
</li>
|
92
100
|
</ul>
|
93
101
|
|
94
|
-
|
95
|
-
</div>
|
102
|
+
</nav>
|
96
103
|
</header>
|
97
104
|
|
98
105
|
|
@@ -290,16 +297,16 @@
|
|
290
297
|
<p>If you already have a full <a href="https://www.ruby-lang.org/en/downloads/">Ruby</a> development environment with all headers and <a href="https://rubygems.org/pages/download">RubyGems</a> installed (see Jekyll’s <a href="/docs/installation/#requirements">requirements</a>), you can create a new Jekyll site by doing the following:</p>
|
291
298
|
|
292
299
|
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c"># Install Jekyll and Bundler gems through RubyGems</span>
|
293
|
-
|
300
|
+
gem <span class="nb">install </span>jekyll bundler
|
294
301
|
|
295
302
|
<span class="c"># Create a new Jekyll site at ./myblog</span>
|
296
|
-
|
303
|
+
jekyll new myblog
|
297
304
|
|
298
305
|
<span class="c"># Change into your new directory</span>
|
299
|
-
|
306
|
+
<span class="nb">cd </span>myblog
|
300
307
|
|
301
308
|
<span class="c"># Build the site on the preview server</span>
|
302
|
-
|
309
|
+
bundle <span class="nb">exec </span>jekyll serve
|
303
310
|
|
304
311
|
<span class="c"># Now browse to http://localhost:4000</span>
|
305
312
|
</code></pre></div></div>
|
@@ -567,7 +574,7 @@
|
|
567
574
|
<footer>
|
568
575
|
<div class="grid">
|
569
576
|
<div class="unit one-third center-on-mobiles">
|
570
|
-
<p>The contents of this website are <br>©
|
577
|
+
<p>The contents of this website are <br>© 2018 under the terms of the <a href="https://github.com/jekyll/jekyll/blob/master/LICENSE">MIT License</a>.</p>
|
571
578
|
</div>
|
572
579
|
<div class="unit two-thirds align-right center-on-mobiles">
|
573
580
|
<p>
|
@@ -645,6 +652,15 @@
|
|
645
652
|
</script>
|
646
653
|
|
647
654
|
|
655
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
|
656
|
+
<script type="text/javascript"> docsearch({
|
657
|
+
apiKey: '50fe39c839958dfad797000f33e2ec17',
|
658
|
+
indexName: 'jekyllrb',
|
659
|
+
inputSelector: '#docsearch-input',
|
660
|
+
enhancedSearchInput: true,
|
661
|
+
debug: false // Set debug to true if you want to inspect the dropdown
|
662
|
+
});
|
663
|
+
</script>
|
648
664
|
|
649
665
|
</body>
|
650
666
|
</html>
|