jekyll-docs 3.9.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-docs.rb +3 -3
- data/site/404.html +10 -7
- data/site/css/screen.css +3 -1
- data/site/css/screen.css.map +28 -0
- data/site/docs/assets/index.html +412 -453
- data/site/docs/code_of_conduct/index.html +447 -501
- data/site/docs/collections/index.html +487 -674
- data/site/docs/community/bug/index.html +603 -0
- data/site/docs/community/index.html +635 -0
- data/site/docs/conduct/index.html +447 -515
- data/site/docs/configuration/default/index.html +682 -0
- data/site/docs/configuration/environments/index.html +641 -0
- data/site/docs/configuration/front-matter-defaults/index.html +738 -0
- data/site/docs/configuration/incremental-regeneration/index.html +631 -0
- data/site/docs/configuration/index.html +405 -1230
- data/site/docs/configuration/liquid/index.html +616 -0
- data/site/docs/configuration/markdown/index.html +766 -0
- data/site/docs/configuration/options/index.html +1011 -0
- data/site/docs/configuration/webrick/index.html +615 -0
- data/site/docs/continuous-integration/buddyworks/index.html +393 -479
- data/site/docs/continuous-integration/circleci/index.html +465 -481
- data/site/docs/continuous-integration/travis-ci/index.html +450 -507
- data/site/docs/contributing/index.html +425 -514
- data/site/docs/datafiles/index.html +411 -453
- data/site/docs/deployment-methods/index.html +9 -871
- data/site/docs/deployment/automated/index.html +663 -0
- data/site/docs/deployment/index.html +607 -0
- data/site/docs/deployment/manual/index.html +631 -0
- data/site/docs/deployment/third-party/index.html +639 -0
- data/site/docs/drafts/index.html +9 -634
- data/site/docs/extras/index.html +9 -687
- data/site/docs/front-matter/index.html +799 -0
- data/site/docs/frontmatter/index.html +9 -819
- data/site/docs/github-pages/index.html +407 -475
- data/site/docs/history/index.html +1370 -1154
- data/site/docs/home/index.html +9 -627
- data/site/docs/includes/index.html +425 -501
- data/site/docs/index.html +630 -9
- data/site/docs/installation/index.html +403 -540
- data/site/docs/installation/macos/index.html +716 -0
- data/site/docs/installation/other-linux/index.html +613 -0
- data/site/docs/installation/ubuntu/index.html +623 -0
- data/site/docs/installation/windows/index.html +733 -0
- data/site/docs/layouts/index.html +726 -0
- data/site/docs/liquid/filters/index.html +1169 -0
- data/site/docs/liquid/index.html +615 -0
- data/site/docs/liquid/tags/index.html +728 -0
- data/site/docs/maintaining/affinity-team-captain/index.html +395 -479
- data/site/docs/maintaining/avoiding-burnout/index.html +391 -475
- data/site/docs/maintaining/becoming-a-maintainer/index.html +391 -475
- data/site/docs/maintaining/index.html +391 -486
- data/site/docs/maintaining/merging-a-pull-request/index.html +406 -490
- data/site/docs/maintaining/releasing-a-new-version/index.html +409 -485
- data/site/docs/maintaining/reviewing-a-pull-request/index.html +392 -476
- data/site/docs/maintaining/special-labels/index.html +397 -481
- data/site/docs/maintaining/triaging-an-issue/index.html +394 -478
- data/site/docs/markdown-101/index.html +601 -0
- data/site/docs/migrations/index.html +396 -440
- data/site/docs/pages/index.html +408 -482
- data/site/docs/pagination/index.html +450 -509
- data/site/docs/permalinks/index.html +552 -587
- data/site/docs/plugins/commands/index.html +656 -0
- data/site/docs/plugins/converters/index.html +685 -0
- data/site/docs/plugins/filters/index.html +624 -0
- data/site/docs/plugins/generators/index.html +697 -0
- data/site/docs/plugins/hooks/index.html +838 -0
- data/site/docs/plugins/index.html +415 -1565
- data/site/docs/plugins/installation/index.html +681 -0
- data/site/docs/plugins/tags/index.html +699 -0
- data/site/docs/plugins/your-first-plugin/index.html +741 -0
- data/site/docs/posts/index.html +491 -627
- data/site/docs/quickstart/index.html +9 -645
- data/site/docs/resources/index.html +9 -761
- data/site/docs/ruby-101/index.html +640 -0
- data/site/docs/sites/index.html +9 -696
- data/site/docs/static-files/index.html +401 -433
- data/site/docs/step-by-step/01-setup/index.html +771 -0
- data/site/docs/step-by-step/02-liquid/index.html +756 -0
- data/site/docs/step-by-step/03-front-matter/index.html +730 -0
- data/site/docs/step-by-step/04-layouts/index.html +770 -0
- data/site/docs/step-by-step/05-includes/index.html +768 -0
- data/site/docs/step-by-step/06-data-files/index.html +738 -0
- data/site/docs/step-by-step/07-assets/index.html +773 -0
- data/site/docs/step-by-step/08-blogging/index.html +835 -0
- data/site/docs/step-by-step/09-collections/index.html +932 -0
- data/site/docs/step-by-step/10-deployment/index.html +842 -0
- data/site/docs/structure/index.html +411 -430
- data/site/docs/support/index.html +392 -476
- data/site/docs/templates/index.html +9 -1232
- data/site/docs/themes/index.html +487 -521
- data/site/docs/troubleshooting/index.html +443 -520
- data/site/docs/upgrading/0-to-2/index.html +437 -523
- data/site/docs/upgrading/2-to-3/index.html +422 -507
- data/site/docs/upgrading/3-to-4/index.html +765 -0
- data/site/docs/upgrading/index.html +395 -478
- data/site/docs/usage/index.html +409 -506
- data/site/docs/variables/index.html +504 -652
- data/site/docs/windows/index.html +9 -784
- data/site/feed.xml +269 -188
- data/site/feed/release.xml +324 -0
- data/site/fonts/lato-v14-latin-300.woff +0 -0
- data/site/fonts/lato-v14-latin-300.woff2 +0 -0
- data/site/fonts/lato-v14-latin-300italic.woff +0 -0
- data/site/fonts/lato-v14-latin-300italic.woff2 +0 -0
- data/site/fonts/lato-v14-latin-700.woff +0 -0
- data/site/fonts/lato-v14-latin-700.woff2 +0 -0
- data/site/fonts/lato-v14-latin-700italic.woff +0 -0
- data/site/fonts/lato-v14-latin-700italic.woff2 +0 -0
- data/site/fonts/lato-v14-latin-900.woff +0 -0
- data/site/fonts/lato-v14-latin-900.woff2 +0 -0
- data/site/fonts/lato-v14-latin-900italic.woff +0 -0
- data/site/fonts/lato-v14-latin-900italic.woff2 +0 -0
- data/site/fonts/lato-v14-latin-italic.woff +0 -0
- data/site/fonts/lato-v14-latin-italic.woff2 +0 -0
- data/site/fonts/lato-v14-latin-regular.woff +0 -0
- data/site/fonts/lato-v14-latin-regular.woff2 +0 -0
- data/site/help/index.html +9 -247
- data/site/img/forestry-logo.svg +19 -0
- data/site/img/jekyll-og.png +0 -0
- data/site/img/spacer.gif +0 -0
- data/site/index.html +56 -29
- data/site/jekyllconf/index.html +62 -35
- data/site/latest_version.txt +1 -1
- data/site/news/2013/05/05/jekyll-1-0-0-released/index.html +180 -115
- data/site/news/2013/05/08/jekyll-1-0-1-released/index.html +182 -117
- data/site/news/2013/05/12/jekyll-1-0-2-released/index.html +183 -118
- data/site/news/2013/06/07/jekyll-1-0-3-released/index.html +184 -119
- data/site/news/2013/07/14/jekyll-1-1-0-released/index.html +183 -118
- data/site/news/2013/07/24/jekyll-1-1-1-released/index.html +180 -115
- data/site/news/2013/07/25/jekyll-1-0-4-released/index.html +182 -117
- data/site/news/2013/07/25/jekyll-1-1-2-released/index.html +182 -117
- data/site/news/2013/09/06/jekyll-1-2-0-released/index.html +185 -120
- data/site/news/2013/09/14/jekyll-1-2-1-released/index.html +183 -118
- data/site/news/2013/10/28/jekyll-1-3-0-rc1-released/index.html +180 -115
- data/site/news/2013/11/04/jekyll-1-3-0-released/index.html +189 -124
- data/site/news/2013/11/26/jekyll-1-3-1-released/index.html +181 -116
- data/site/news/2013/12/07/jekyll-1-4-0-released/index.html +181 -116
- data/site/news/2013/12/09/jekyll-1-4-1-released/index.html +180 -115
- data/site/news/2013/12/16/jekyll-1-4-2-released/index.html +182 -117
- data/site/news/2014/01/13/jekyll-1-4-3-released/index.html +181 -116
- data/site/news/2014/03/24/jekyll-1-5-0-released/index.html +181 -116
- data/site/news/2014/03/27/jekyll-1-5-1-released/index.html +181 -116
- data/site/news/2014/05/06/jekyll-turns-2-0-0/index.html +184 -119
- data/site/news/2014/05/08/jekyll-2-0-3-released/index.html +180 -115
- data/site/news/2014/06/04/jekyll-stickers-1-dollar-stickermule/index.html +181 -116
- data/site/news/2014/06/28/jekyll-turns-21-i-mean-2-1-0/index.html +185 -120
- data/site/news/2014/07/01/jekyll-2-1-1-released/index.html +182 -117
- data/site/news/2014/07/29/jekyll-2-2-0-released/index.html +181 -116
- data/site/news/2014/08/10/jekyll-2-3-0-released/index.html +189 -124
- data/site/news/2014/09/09/jekyll-2-4-0-released/index.html +187 -122
- data/site/news/2014/11/05/jekylls-midlife-crisis-jekyll-turns-2-5-0/index.html +188 -123
- data/site/news/2014/11/09/jekyll-2-5-1-released/index.html +180 -115
- data/site/news/2014/11/12/jekyll-2-5-2-released/index.html +182 -117
- data/site/news/2014/12/17/alfredxing-welcome-to-jekyll-core/index.html +179 -114
- data/site/news/2014/12/22/jekyll-2-5-3-released/index.html +180 -115
- data/site/news/2015/01/20/jekyll-meet-and-greet/index.html +179 -114
- data/site/news/2015/01/24/jekyll-3-0-0-beta1-released/index.html +180 -115
- data/site/news/2015/02/26/introducing-jekyll-talk/index.html +180 -115
- data/site/news/2015/10/26/jekyll-3-0-released/index.html +185 -120
- data/site/news/2015/11/17/jekyll-3-0-1-released/index.html +184 -119
- data/site/news/2016/01/20/jekyll-3-0-2-released/index.html +182 -117
- data/site/news/2016/01/24/jekyll-3-1-0-released/index.html +186 -121
- data/site/news/2016/01/28/jekyll-3-1-1-released/index.html +183 -118
- data/site/news/2016/02/08/jekyll-3-0-3-released/index.html +181 -116
- data/site/news/2016/02/19/jekyll-3-1-2-released/index.html +182 -117
- data/site/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/index.html +179 -114
- data/site/news/2016/04/19/jekyll-3-0-4-released/index.html +181 -116
- data/site/news/2016/04/19/jekyll-3-1-3-released/index.html +181 -116
- data/site/news/2016/04/26/jekyll-3-0-5-released/index.html +180 -115
- data/site/news/2016/05/18/jekyll-3-1-4-released/index.html +186 -121
- data/site/news/2016/05/18/jekyll-3-1-5-released/index.html +181 -116
- data/site/news/2016/05/19/jekyll-3-1-6-released/index.html +181 -116
- data/site/news/2016/06/03/update-on-jekyll-s-google-summer-of-code-projects/index.html +179 -114
- data/site/news/2016/07/26/jekyll-3-2-0-released/index.html +184 -119
- data/site/news/2016/08/02/jekyll-3-2-1-released/index.html +180 -115
- data/site/news/2016/08/24/jekyll-admin-initial-release/index.html +179 -114
- data/site/news/2016/10/06/jekyll-3-3-is-here/index.html +207 -142
- data/site/news/2016/11/14/jekyll-3-3-1-released/index.html +181 -116
- data/site/news/2017/01/18/jekyll-3-4-0-released/index.html +183 -118
- data/site/news/2017/03/02/jekyll-3-4-1-released/index.html +181 -116
- data/site/news/2017/03/09/jekyll-3-4-2-released/index.html +189 -124
- data/site/news/2017/03/21/jekyll-3-4-3-released/index.html +190 -125
- data/site/news/2017/06/15/jekyll-3-5-0-released/index.html +187 -122
- data/site/news/2017/07/17/jekyll-3-5-1-released/index.html +182 -117
- data/site/news/2017/08/12/jekyll-3-5-2-released/index.html +185 -120
- data/site/news/2017/09/21/jekyll-3-6-0-released/index.html +181 -116
- data/site/news/2017/10/19/diversity-open-source/index.html +181 -116
- data/site/news/2017/10/21/jekyll-3-6-2-released/index.html +183 -118
- data/site/news/2018/01/02/jekyll-3-7-0-released/index.html +184 -119
- data/site/news/2018/01/25/jekyll-3-7-2-released/index.html +189 -124
- data/site/news/2018/02/19/meet-jekyll-s-new-lead-developer/index.html +180 -115
- data/site/news/2018/02/24/jekyll-3-7-3-released/index.html +185 -120
- data/site/news/2018/04/19/development-update/index.html +699 -0
- data/site/news/2018/04/19/jekyll-3-8-0-released/index.html +715 -0
- data/site/news/2018/05/01/jekyll-3-8-1-released/index.html +182 -117
- data/site/news/2018/05/19/jekyll-3-8-2-released/index.html +181 -116
- data/site/news/2018/06/05/jekyll-3-8-3-released/index.html +183 -118
- data/site/news/2018/08/01/jekyll-sponsoring/index.html +748 -0
- data/site/news/2018/09/19/security-fixes-for-3-6-3-7-3-8/index.html +692 -0
- data/site/news/2018/11/04/jekyll-3-8-5-released/index.html +682 -0
- data/site/news/2019/03/18/jekyll-4-0-0-pre-alpha1-released/index.html +710 -0
- data/site/news/2019/07/02/jekyll-3-8-6-released/index.html +180 -115
- data/site/news/2019/07/20/jekyll-4-0-0-pre-beta1-released/index.html +11 -0
- data/site/news/2019/08/04/jekyll-4-0-0-pre-beta1-released/index.html +708 -0
- data/site/news/2019/08/20/jekyll-4-0-0-released/index.html +809 -0
- data/site/news/index.html +976 -326
- data/site/news/releases/index.html +820 -321
- data/site/{philosophy.html → philosophy/index.html} +1 -1
- data/site/redirects.json +1 -1
- data/site/resources/index.html +332 -0
- data/site/showcase/index.html +844 -0
- data/site/sitemap.xml +256 -81
- data/site/team/index.html +63 -77
- data/site/tutorials/cache-api/index.html +418 -0
- data/site/tutorials/convert-site-to-jekyll/index.html +155 -124
- data/site/tutorials/custom-404-page/index.html +76 -43
- data/site/tutorials/home/index.html +64 -37
- data/site/tutorials/navigation/index.html +186 -103
- data/site/tutorials/orderofinterpretation/index.html +80 -53
- data/site/tutorials/using-jekyll-with-bundler/index.html +80 -51
- data/site/tutorials/video-walkthroughs/index.html +62 -35
- metadata +102 -13
- data/site/community/index.html +0 -11
- data/site/docs/continuous-integration/index.html +0 -681
@@ -3,17 +3,18 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="UTF-8">
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
-
<meta name="generator" content="Jekyll
|
6
|
+
<meta name="generator" content="Jekyll v4.0.0">
|
7
7
|
<link type="application/atom+xml" rel="alternate" href="https://jekyllrb.com/feed.xml" title="Jekyll • Simple, blog-aware, static sites" />
|
8
|
+
<link type="application/atom+xml" rel="alternate" href="/feed/release.xml" title="Jekyll releases posts" />
|
8
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">
|
9
|
-
<link rel="
|
10
|
-
<link rel="
|
11
|
-
<link rel="
|
10
|
+
<link rel="preload" href="/fonts/lato-v14-latin-300.woff2" as="font" type="font/woff2" crossorigin />
|
11
|
+
<link rel="preload" href="/fonts/lato-v14-latin-700.woff2" as="font" type="font/woff2" crossorigin />
|
12
|
+
<link rel="preload" href="/css/screen.css" as="style">
|
12
13
|
<link rel="stylesheet" href="/css/screen.css">
|
13
14
|
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
14
15
|
<!-- Begin Jekyll SEO tag v2.6.1 -->
|
15
16
|
<title>Includes | Jekyll • Simple, blog-aware, static sites</title>
|
16
|
-
<meta name="generator" content="Jekyll
|
17
|
+
<meta name="generator" content="Jekyll v4.0.0" />
|
17
18
|
<meta property="og:title" content="Includes" />
|
18
19
|
<meta property="og:locale" content="en_US" />
|
19
20
|
<meta name="description" content="The include tag allows you to include the content from another file stored in the _includes folder:" />
|
@@ -21,14 +22,16 @@
|
|
21
22
|
<link rel="canonical" href="https://jekyllrb.com/docs/includes/" />
|
22
23
|
<meta property="og:url" content="https://jekyllrb.com/docs/includes/" />
|
23
24
|
<meta property="og:site_name" content="Jekyll • Simple, blog-aware, static sites" />
|
25
|
+
<meta property="og:image" content="https://jekyllrb.com/img/jekyll-og.png" />
|
24
26
|
<meta property="og:type" content="article" />
|
25
|
-
<meta property="article:published_time" content="
|
26
|
-
<meta name="twitter:card" content="
|
27
|
+
<meta property="article:published_time" content="2019-09-11T07:30:27-07:00" />
|
28
|
+
<meta name="twitter:card" content="summary_large_image" />
|
29
|
+
<meta property="twitter:image" content="https://jekyllrb.com/img/jekyll-og.png" />
|
27
30
|
<meta property="twitter:title" content="Includes" />
|
28
31
|
<meta name="twitter:site" content="@jekyllrb" />
|
29
32
|
<meta name="google-site-verification" content="onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY" />
|
30
33
|
<script type="application/ld+json">
|
31
|
-
{"
|
34
|
+
{"description":"The include tag allows you to include the content from another file stored in the _includes folder:","@type":"BlogPosting","mainEntityOfPage":{"@type":"WebPage","@id":"https://jekyllrb.com/docs/includes/"},"headline":"Includes","dateModified":"2019-09-11T07:30:27-07:00","url":"https://jekyllrb.com/docs/includes/","datePublished":"2019-09-11T07:30:27-07:00","image":"https://jekyllrb.com/img/jekyll-og.png","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://jekyllrb.com/img/logo-2x.png"}},"@context":"https://schema.org"}</script>
|
32
35
|
<!-- End Jekyll SEO tag -->
|
33
36
|
|
34
37
|
<!--[if lt IE 9]>
|
@@ -51,18 +54,27 @@
|
|
51
54
|
</div>
|
52
55
|
<nav class="main-nav hide-on-mobiles">
|
53
56
|
<ul>
|
54
|
-
|
57
|
+
|
58
|
+
<li>
|
55
59
|
<a href="/">Home</a>
|
56
60
|
</li>
|
61
|
+
|
57
62
|
<li class="current">
|
58
|
-
<a href="/docs/
|
63
|
+
<a href="/docs/">Docs</a>
|
59
64
|
</li>
|
60
|
-
|
61
|
-
|
65
|
+
|
66
|
+
<li>
|
67
|
+
<a href="/resources/">Resources</a>
|
68
|
+
</li>
|
69
|
+
|
70
|
+
<li>
|
71
|
+
<a href="/showcase/">Showcase</a>
|
62
72
|
</li>
|
63
|
-
|
64
|
-
|
73
|
+
|
74
|
+
<li>
|
75
|
+
<a href="/news/">News</a>
|
65
76
|
</li>
|
77
|
+
|
66
78
|
</ul>
|
67
79
|
|
68
80
|
</nav>
|
@@ -73,7 +85,7 @@
|
|
73
85
|
<div class="meta hide-on-mobiles">
|
74
86
|
<ul>
|
75
87
|
<li>
|
76
|
-
<a href="https://github.com/jekyll/jekyll/releases/tag/
|
88
|
+
<a href="https://github.com/jekyll/jekyll/releases/tag/v4.0.0">v4.0.0</a>
|
77
89
|
</li>
|
78
90
|
<li>
|
79
91
|
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
@@ -83,18 +95,24 @@
|
|
83
95
|
</div>
|
84
96
|
<nav class="mobile-nav show-on-mobiles">
|
85
97
|
<ul>
|
86
|
-
|
87
|
-
<
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
+
|
99
|
+
<li>
|
100
|
+
<a href="/">Home</a>
|
101
|
+
</li>
|
102
|
+
|
103
|
+
<li class="current">
|
104
|
+
<a href="/docs/">Docs</a>
|
105
|
+
</li>
|
106
|
+
|
107
|
+
<li>
|
108
|
+
<a href="/resources/">Resources</a>
|
109
|
+
</li>
|
110
|
+
|
111
|
+
|
112
|
+
<li>
|
113
|
+
<a href="/news/">News</a>
|
114
|
+
</li>
|
115
|
+
|
98
116
|
<li>
|
99
117
|
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
100
118
|
</li>
|
@@ -113,176 +131,152 @@
|
|
113
131
|
|
114
132
|
<optgroup label="Getting Started">
|
115
133
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<option value="/docs/configuration/">Configuration</option>
|
143
|
-
|
144
|
-
|
145
|
-
</optgroup>
|
146
|
-
|
147
|
-
<optgroup label="Your Content">
|
134
|
+
|
135
|
+
<option value="/docs/">
|
136
|
+
Quickstart
|
137
|
+
</option>
|
138
|
+
|
139
|
+
|
140
|
+
<option value="/docs/ruby-101/">
|
141
|
+
Ruby 101
|
142
|
+
</option>
|
143
|
+
|
144
|
+
|
145
|
+
<option value="/docs/installation/">
|
146
|
+
Installation
|
147
|
+
</option>
|
148
|
+
|
149
|
+
|
150
|
+
<option value="/docs/community/">
|
151
|
+
Community
|
152
|
+
</option>
|
153
|
+
|
154
|
+
|
155
|
+
<option value="/docs/step-by-step/01-setup/">
|
156
|
+
Step by Step Tutorial
|
157
|
+
</option>
|
148
158
|
|
149
|
-
|
150
|
-
|
151
|
-
<option value="/docs/frontmatter/">Front Matter</option>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<option value="/docs/posts/">Writing posts</option>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<option value="/docs/drafts/">Working with drafts</option>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
<option value="/docs/pages/">Creating pages</option>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
<option value="/docs/static-files/">Static Files</option>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<option value="/docs/variables/">Variables</option>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
<option value="/docs/collections/">Collections</option>
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<option value="/docs/datafiles/">Data Files</option>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
<option value="/docs/assets/">Assets</option>
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<option value="/docs/migrations/">Blog migrations</option>
|
188
|
-
|
189
|
-
|
190
159
|
</optgroup>
|
191
160
|
|
192
|
-
<optgroup label="
|
161
|
+
<optgroup label="Build">
|
162
|
+
|
163
|
+
|
164
|
+
<option value="/docs/usage/">
|
165
|
+
Command Line Usage
|
166
|
+
</option>
|
167
|
+
|
168
|
+
|
169
|
+
<option value="/docs/configuration/">
|
170
|
+
Configuration
|
171
|
+
</option>
|
193
172
|
|
194
|
-
|
195
|
-
|
196
|
-
<option value="/docs/templates/">Templates</option>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
<option value="/docs/includes/">Includes</option>
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
<option value="/docs/permalinks/">Permalinks</option>
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<option value="/docs/pagination/">Pagination</option>
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
<option value="/docs/plugins/">Plugins</option>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
<option value="/docs/themes/">Themes</option>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
<option value="/docs/extras/">Extras</option>
|
221
|
-
|
222
|
-
|
223
173
|
</optgroup>
|
224
174
|
|
225
|
-
<optgroup label="
|
175
|
+
<optgroup label="Content">
|
176
|
+
|
177
|
+
|
178
|
+
<option value="/docs/pages/">
|
179
|
+
Pages
|
180
|
+
</option>
|
181
|
+
|
182
|
+
|
183
|
+
<option value="/docs/posts/">
|
184
|
+
Posts
|
185
|
+
</option>
|
186
|
+
|
187
|
+
|
188
|
+
<option value="/docs/front-matter/">
|
189
|
+
Front Matter
|
190
|
+
</option>
|
191
|
+
|
192
|
+
|
193
|
+
<option value="/docs/collections/">
|
194
|
+
Collections
|
195
|
+
</option>
|
196
|
+
|
197
|
+
|
198
|
+
<option value="/docs/datafiles/">
|
199
|
+
Data Files
|
200
|
+
</option>
|
201
|
+
|
202
|
+
|
203
|
+
<option value="/docs/assets/">
|
204
|
+
Assets
|
205
|
+
</option>
|
206
|
+
|
207
|
+
|
208
|
+
<option value="/docs/static-files/">
|
209
|
+
Static Files
|
210
|
+
</option>
|
226
211
|
|
227
|
-
|
228
|
-
|
229
|
-
<option value="/docs/github-pages/">GitHub Pages</option>
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
<option value="/docs/deployment-methods/">Deployment methods</option>
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
<option value="/docs/continuous-integration/">Continuous Integration</option>
|
238
|
-
|
239
|
-
|
240
212
|
</optgroup>
|
241
213
|
|
242
|
-
<optgroup label="
|
214
|
+
<optgroup label="Site Structure">
|
215
|
+
|
216
|
+
|
217
|
+
<option value="/docs/structure/">
|
218
|
+
Directory Structure
|
219
|
+
</option>
|
220
|
+
|
221
|
+
|
222
|
+
<option value="/docs/liquid/">
|
223
|
+
Liquid
|
224
|
+
</option>
|
225
|
+
|
226
|
+
|
227
|
+
<option value="/docs/variables/">
|
228
|
+
Variables
|
229
|
+
</option>
|
230
|
+
|
231
|
+
|
232
|
+
<option value="/docs/includes/">
|
233
|
+
Includes
|
234
|
+
</option>
|
235
|
+
|
236
|
+
|
237
|
+
<option value="/docs/layouts/">
|
238
|
+
Layouts
|
239
|
+
</option>
|
240
|
+
|
241
|
+
|
242
|
+
<option value="/docs/permalinks/">
|
243
|
+
Permalinks
|
244
|
+
</option>
|
245
|
+
|
246
|
+
|
247
|
+
<option value="/docs/themes/">
|
248
|
+
Themes
|
249
|
+
</option>
|
250
|
+
|
251
|
+
|
252
|
+
<option value="/docs/pagination/">
|
253
|
+
Pagination
|
254
|
+
</option>
|
243
255
|
|
244
|
-
|
245
|
-
|
246
|
-
<option value="/docs/troubleshooting/">Troubleshooting</option>
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
<option value="/docs/sites/">Sites using Jekyll</option>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
<option value="/docs/resources/">Resources</option>
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<option value="/docs/upgrading/0-to-2/">Upgrading from 0.x to 2.x</option>
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
<option value="/docs/upgrading/2-to-3/">Upgrading from 2.x to 3.x</option>
|
263
|
-
|
264
|
-
|
265
256
|
</optgroup>
|
266
257
|
|
267
|
-
<optgroup label="
|
258
|
+
<optgroup label="Guides">
|
259
|
+
|
260
|
+
|
261
|
+
<option value="/docs/plugins/">
|
262
|
+
Plugins
|
263
|
+
</option>
|
264
|
+
|
265
|
+
|
266
|
+
<option value="/docs/migrations/">
|
267
|
+
Blog Migrations
|
268
|
+
</option>
|
269
|
+
|
270
|
+
|
271
|
+
<option value="/docs/upgrading/">
|
272
|
+
Upgrading
|
273
|
+
</option>
|
274
|
+
|
275
|
+
|
276
|
+
<option value="/docs/deployment/">
|
277
|
+
Deployment
|
278
|
+
</option>
|
268
279
|
|
269
|
-
|
270
|
-
|
271
|
-
<option value="/docs/contributing/">Contributing</option>
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
<option value="/docs/maintaining/">Maintaining Jekyll</option>
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
<option value="/docs/conduct/">Code of Conduct</option>
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
<option value="/docs/history/">History</option>
|
284
|
-
|
285
|
-
|
286
280
|
</optgroup>
|
287
281
|
|
288
282
|
</select>
|
@@ -292,31 +286,31 @@
|
|
292
286
|
<div class="unit four-fifths">
|
293
287
|
<article>
|
294
288
|
<div class="improve right hide-on-mobiles">
|
295
|
-
<a href="https://github.com/jekyll/jekyll/edit/master/docs/_docs/includes.md"><i class="fa fa-pencil"></i> Improve this page</a>
|
289
|
+
<a data-proofer-ignore href="https://github.com/jekyll/jekyll/edit/master/docs/_docs/includes.md"><i class="fa fa-pencil"></i> Improve this page</a>
|
296
290
|
</div>
|
297
291
|
<h1>Includes</h1>
|
298
|
-
<p>The <code class="
|
292
|
+
<p>The <code class="highlighter-rouge">include</code> tag allows you to include the content from another file stored in the <code class="highlighter-rouge">_includes</code> folder:</p>
|
299
293
|
|
300
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>footer
|
294
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">footer</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="p">%}</span>
|
301
295
|
</code></pre></div></div>
|
302
296
|
|
303
|
-
<p>Jekyll will look for the referenced file (in this case, <code class="
|
297
|
+
<p>Jekyll will look for the referenced file (in this case, <code class="highlighter-rouge">footer.html</code>) in the <code class="highlighter-rouge">_includes</code> directory at the root of your source directory and insert its contents.</p>
|
304
298
|
|
305
299
|
<h3 id="including-files-relative-to-another-file">Including files relative to another file</h3>
|
306
300
|
|
307
|
-
<p>You can choose to include file fragments relative to the current file by using the <code class="
|
301
|
+
<p>You can choose to include file fragments relative to the current file by using the <code class="highlighter-rouge">include_relative</code> tag:</p>
|
308
302
|
|
309
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">
|
303
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="na">_relative somedir/footer</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="p">%}</span>
|
310
304
|
</code></pre></div></div>
|
311
305
|
|
312
|
-
<p>You won’t need to place your included content within the <code class="
|
306
|
+
<p>You won’t need to place your included content within the <code class="highlighter-rouge">_includes</code> directory. Instead,
|
313
307
|
the inclusion is specifically relative to the file where the tag is being used. For example,
|
314
|
-
if <code class="
|
315
|
-
must be within the <code class="
|
308
|
+
if <code class="highlighter-rouge">_posts/2014-09-03-my-file.markdown</code> uses the <code class="highlighter-rouge">include_relative</code> tag, the included file
|
309
|
+
must be within the <code class="highlighter-rouge">_posts</code> directory or one of its subdirectories.</p>
|
316
310
|
|
317
|
-
<p>Note that you cannot use the <code class="
|
311
|
+
<p>Note that you cannot use the <code class="highlighter-rouge">../</code> syntax to specify an include location that refers to a higher-level directory.</p>
|
318
312
|
|
319
|
-
<p>All the other capabilities of the <code class="
|
313
|
+
<p>All the other capabilities of the <code class="highlighter-rouge">include</code> tag are available to the <code class="highlighter-rouge">include_relative</code> tag,
|
320
314
|
such as variables.</p>
|
321
315
|
|
322
316
|
<h3 id="using-variables-names-for-the-include-file">Using variables names for the include file</h3>
|
@@ -331,14 +325,16 @@ such as variables.</p>
|
|
331
325
|
|
332
326
|
<p>You could then reference that variable in your include:</p>
|
333
327
|
|
334
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="
|
328
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="nv">page</span><span class="p">.</span><span class="nv">my_variable</span><span class="w"> </span><span class="p">%}</span>
|
329
|
+
<span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>{{<span class="w"> </span><span class="nv">page</span><span class="p">.</span><span class="nv">my_variable</span><span class="w"> </span>}}<span class="w"> </span><span class="p">%}</span>
|
330
|
+
<span class="p">{%</span><span class="w"> </span><span class="kr">endif</span><span class="w"> </span><span class="p">%}</span>
|
335
331
|
</code></pre></div></div>
|
336
332
|
|
337
|
-
<p>In this example, the include would insert the file <code class="
|
333
|
+
<p>In this example, the include would insert the file <code class="highlighter-rouge">footer_company_a.html</code> from the <code class="highlighter-rouge">_includes/footer_company_a.html</code> directory.</p>
|
338
334
|
|
339
335
|
<h3 id="passing-parameters-to-includes">Passing parameters to includes</h3>
|
340
336
|
|
341
|
-
<p>You can also pass parameters to an include. For example, suppose you have a file called <code class="
|
337
|
+
<p>You can also pass parameters to an include. For example, suppose you have a file called <code class="highlighter-rouge">note.html</code> in your <code class="highlighter-rouge">_includes</code> folder that contains this formatting:</p>
|
342
338
|
|
343
339
|
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><div markdown="span" class="alert alert-info" role="alert">
|
344
340
|
<i class="fa fa-info-circle"></i> <b>Note:</b>
|
@@ -346,12 +342,12 @@ such as variables.</p>
|
|
346
342
|
</div>
|
347
343
|
</code></pre></div></div>
|
348
344
|
|
349
|
-
<p>The <code class="
|
345
|
+
<p>The <code class="highlighter-rouge">{{ include.content }}</code> is a parameter that gets populated when you call the include and specify a value for that parameter, like this:</p>
|
350
346
|
|
351
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>note
|
347
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">note</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="na">content</span><span class="o">=</span><span class="s2">"This is my sample note."</span><span class="w"> </span><span class="p">%}</span>
|
352
348
|
</code></pre></div></div>
|
353
349
|
|
354
|
-
<p>The value of <code class="
|
350
|
+
<p>The value of <code class="highlighter-rouge">content</code> (which is <code class="highlighter-rouge">This is my sample note</code>) will be inserted into the <code class="highlighter-rouge">{{ include.content }}</code> parameter.</p>
|
355
351
|
|
356
352
|
<p>Passing parameters to includes is especially helpful when you want to hide away complex formatting from your Markdown content.</p>
|
357
353
|
|
@@ -361,6 +357,7 @@ such as variables.</p>
|
|
361
357
|
<span class="nt"><a</span> <span class="na">href=</span><span class="s">"http://jekyllrb.com"</span><span class="nt">></span>
|
362
358
|
<span class="nt"><img</span> <span class="na">src=</span><span class="s">"logo.png"</span> <span class="na">style=</span><span class="s">"max-width: 200px;"</span>
|
363
359
|
<span class="na">alt=</span><span class="s">"Jekyll logo"</span> <span class="nt">/></span>
|
360
|
+
<span class="nt"></a></span>
|
364
361
|
<span class="nt"><figcaption></span>This is the Jekyll logo<span class="nt"></figcaption></span>
|
365
362
|
<span class="nt"></figure></span>
|
366
363
|
</code></pre></div></div>
|
@@ -369,8 +366,9 @@ such as variables.</p>
|
|
369
366
|
|
370
367
|
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><figure>
|
371
368
|
<a href="<span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">url</span><span class="w"> </span><span class="p">}}</span>">
|
372
|
-
<img src="<span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">file</span><span class="w"> </span><span class="p">}}</span>" style="max-width: <span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">max
|
369
|
+
<img src="<span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">file</span><span class="w"> </span><span class="p">}}</span>" style="max-width: <span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">max</span><span class="err">-</span><span class="nv">width</span><span class="w"> </span><span class="p">}}</span>;"
|
373
370
|
alt="<span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">alt</span><span class="w"> </span><span class="p">}}</span>"/>
|
371
|
+
</a>
|
374
372
|
<figcaption><span class="p">{{</span><span class="w"> </span><span class="nv">include</span><span class="p">.</span><span class="nv">caption</span><span class="w"> </span><span class="p">}}</span></figcaption>
|
375
373
|
</figure>
|
376
374
|
</code></pre></div></div>
|
@@ -378,16 +376,16 @@ such as variables.</p>
|
|
378
376
|
<p>This include contains 5 parameters:</p>
|
379
377
|
|
380
378
|
<ul>
|
381
|
-
<li><code class="
|
382
|
-
<li><code class="
|
383
|
-
<li><code class="
|
384
|
-
<li><code class="
|
385
|
-
<li><code class="
|
379
|
+
<li><code class="highlighter-rouge">url</code></li>
|
380
|
+
<li><code class="highlighter-rouge">max-width</code></li>
|
381
|
+
<li><code class="highlighter-rouge">file</code></li>
|
382
|
+
<li><code class="highlighter-rouge">alt</code></li>
|
383
|
+
<li><code class="highlighter-rouge">caption</code></li>
|
386
384
|
</ul>
|
387
385
|
|
388
|
-
<p>Here’s an example that passes all the parameters to this include (the include file is named <code class="
|
386
|
+
<p>Here’s an example that passes all the parameters to this include (the include file is named <code class="highlighter-rouge">image.html</code>):</p>
|
389
387
|
|
390
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>image
|
388
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">image</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="na">url</span><span class="o">=</span><span class="s2">"http://jekyllrb.com"</span><span class="err">
|
391
389
|
</span><span class="na">max-width</span><span class="o">=</span><span class="s2">"200px"</span><span class="w"> </span><span class="na">file</span><span class="o">=</span><span class="s2">"logo.png"</span><span class="w"> </span><span class="na">alt</span><span class="o">=</span><span class="s2">"Jekyll logo"</span><span class="err">
|
392
390
|
</span><span class="na">caption</span><span class="o">=</span><span class="s2">"This is the Jekyll logo."</span><span class="w"> </span><span class="p">%}</span>
|
393
391
|
</code></pre></div></div>
|
@@ -396,322 +394,239 @@ such as variables.</p>
|
|
396
394
|
|
397
395
|
<p>To safeguard situations where users don’t supply a value for the parameter, you can use <a href="https://shopify.github.io/liquid/filters/default/">Liquid’s default filter</a>.</p>
|
398
396
|
|
399
|
-
<p>Overall, you can create includes that act as templates for a variety of uses — inserting audio or video clips, alerts, special formatting, and more.
|
397
|
+
<p>Overall, you can create includes that act as templates for a variety of uses — inserting audio or video clips, alerts, special formatting, and more. Note that you should avoid using too many includes, as this will slow down the build time of your site. For example, don’t use includes every time you insert an image. (The above technique shows a use case for special images.)</p>
|
400
398
|
|
401
399
|
<h3 id="passing-parameter-variables-to-includes">Passing parameter variables to includes</h3>
|
402
400
|
|
403
|
-
<p>Suppose the parameter you want to pass to the include is a variable rather than a string. For example, you might be using <code class="
|
401
|
+
<p>Suppose the parameter you want to pass to the include is a variable rather than a string. For example, you might be using <code class="highlighter-rouge">{{ site.product_name }}</code> to refer to every instance of your product rather than the actual hard-coded name. (In this case, your <code class="highlighter-rouge">_config.yml</code> file would have a key called <code class="highlighter-rouge">product_name</code> with a value of your product’s name.)</p>
|
404
402
|
|
405
|
-
<p>The string you pass to your include parameter can’t contain curly braces. For example, you can’t pass a parameter that contains this: <code class="
|
403
|
+
<p>The string you pass to your include parameter can’t contain curly braces. For example, you can’t pass a parameter that contains this: <code class="highlighter-rouge">"The latest version of {{ site.product_name }} is now available."</code></p>
|
406
404
|
|
407
|
-
<p>If you want to include this variable in your parameter that you pass to an include, you need to store the entire parameter as a variable before passing it to the include. You can use <code class="
|
405
|
+
<p>If you want to include this variable in your parameter that you pass to an include, you need to store the entire parameter as a variable before passing it to the include. You can use <code class="highlighter-rouge">capture</code> tags to create the variable:</p>
|
408
406
|
|
409
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">capture</span><span class="w"> </span><span class="
|
407
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">capture</span><span class="w"> </span><span class="na">download_note</span><span class="w"> </span><span class="p">%}</span>
|
410
408
|
The latest version of <span class="p">{{</span><span class="w"> </span><span class="nv">site</span><span class="p">.</span><span class="nv">product_name</span><span class="w"> </span><span class="p">}}</span> is now available.
|
411
409
|
<span class="p">{%</span><span class="w"> </span><span class="nt">endcapture</span><span class="w"> </span><span class="p">%}</span>
|
412
410
|
</code></pre></div></div>
|
413
411
|
|
414
412
|
<p>Then pass this captured variable into the parameter for the include. Omit the quotation marks around the parameter content because it’s no longer a string (it’s a variable):</p>
|
415
413
|
|
416
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>note
|
417
|
-
</code></pre></div></div>
|
418
|
-
|
419
|
-
<h3 id="passing-references-to-yaml-files-as-parameter-values">Passing references to YAML files as parameter values</h3>
|
420
|
-
|
421
|
-
<p>Instead of passing string variables to the include, you can pass a reference to a YAML data file stored in the <code class="language-plaintext highlighter-rouge">_data</code> folder.</p>
|
422
|
-
|
423
|
-
<p>Here’s an example. In the <code class="language-plaintext highlighter-rouge">_data</code> folder, suppose you have a YAML file called <code class="language-plaintext highlighter-rouge">profiles.yml</code>. Its content looks like this:</p>
|
424
|
-
|
425
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">John Doe</span>
|
426
|
-
<span class="na">login_age</span><span class="pi">:</span> <span class="s">old</span>
|
427
|
-
<span class="na">image</span><span class="pi">:</span> <span class="s">johndoe.jpg</span>
|
428
|
-
|
429
|
-
<span class="pi">-</span> <span class="na">name</span><span class="pi">:</span> <span class="s">Jane Doe</span>
|
430
|
-
<span class="na">login_age</span><span class="pi">:</span> <span class="s">new</span>
|
431
|
-
<span class="na">image</span><span class="pi">:</span> <span class="s">janedoe.jpg</span>
|
414
|
+
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">note</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="na">content</span><span class="o">=</span><span class="nv">download_note</span><span class="w"> </span><span class="p">%}</span>
|
432
415
|
</code></pre></div></div>
|
433
416
|
|
434
|
-
<p>In the <code class="language-plaintext highlighter-rouge">_includes</code> folder, assume you have a file called <code class="language-plaintext highlighter-rouge">spotlight.html</code> with this code:</p>
|
435
|
-
|
436
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span><span class="nv">person</span><span class="w"> </span><span class="nt">in</span><span class="w"> </span><span class="nv">include.participants</span><span class="w"> </span><span class="p">%}</span>
|
437
|
-
<span class="p">{%</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="nv">person</span><span class="p">.</span><span class="nv">login_age</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s2">"new"</span><span class="w"> </span><span class="p">%}</span>
|
438
|
-
<span class="p">{{</span><span class="w"> </span><span class="nv">person</span><span class="p">.</span><span class="nv">name</span><span class="w"> </span><span class="p">}}</span>
|
439
|
-
<span class="p">{%</span><span class="w"> </span><span class="kr">endif</span><span class="w"> </span><span class="p">%}</span>
|
440
|
-
<span class="p">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="p">%}</span>
|
441
|
-
</code></pre></div></div>
|
442
|
-
|
443
|
-
<p>Now when you insert the <code class="language-plaintext highlighter-rouge">spotlight.html</code> include file, you can submit the YAML file as a parameter:</p>
|
444
|
-
|
445
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span>spotlight.html<span class="w"> </span><span class="na">participants</span><span class="o">=</span>site.data.profiles<span class="w"> </span><span class="p">%}</span>
|
446
|
-
</code></pre></div></div>
|
447
|
-
|
448
|
-
<p>In this instance, <code class="language-plaintext highlighter-rouge">site.data.profiles</code> gets inserted in place of <code class="language-plaintext highlighter-rouge">include.participants</code> in the include file, and the Liquid logic processes. The result will be <code class="language-plaintext highlighter-rouge">Jane Doe</code>.</p>
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
417
|
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
<div class="section-nav">
|
513
|
-
<div class="left align-right">
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
<a href="/docs/templates/" class="prev">Back</a>
|
518
|
-
|
519
|
-
</div>
|
520
|
-
<div class="right align-left">
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
<a href="/docs/permalinks/" class="next">Next</a>
|
525
|
-
|
526
|
-
</div>
|
527
|
-
</div>
|
528
|
-
<div class="clear"></div>
|
529
|
-
|
530
418
|
</article>
|
531
419
|
</div>
|
532
420
|
|
533
421
|
<div class="unit one-fifth hide-on-mobiles">
|
534
422
|
<aside>
|
535
423
|
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
<li class=""><a href="/docs/frontmatter/">Front Matter</a></li>
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
<li class=""><a href="/docs/posts/">Writing posts</a></li>
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
<li class=""><a href="/docs/drafts/">Working with drafts</a></li>
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
<li class=""><a href="/docs/pages/">Creating pages</a></li>
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
<li class=""><a href="/docs/static-files/">Static Files</a></li>
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
<li class=""><a href="/docs/variables/">Variables</a></li>
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
<li class=""><a href="/docs/collections/">Collections</a></li>
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
<li class=""><a href="/docs/datafiles/">Data Files</a></li>
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
<li class=""><a href="/docs/assets/">Assets</a></li>
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
<li class=""><a href="/docs/migrations/">Blog migrations</a></li>
|
612
|
-
|
613
|
-
</ul>
|
614
|
-
|
424
|
+
<h4>Getting Started</h4>
|
425
|
+
<ul>
|
426
|
+
|
427
|
+
|
428
|
+
<li>
|
429
|
+
<a href="/docs/">
|
430
|
+
Quickstart
|
431
|
+
</a>
|
432
|
+
</li>
|
433
|
+
|
434
|
+
|
435
|
+
<li>
|
436
|
+
<a href="/docs/ruby-101/">
|
437
|
+
Ruby 101
|
438
|
+
</a>
|
439
|
+
</li>
|
440
|
+
|
441
|
+
|
442
|
+
<li>
|
443
|
+
<a href="/docs/installation/">
|
444
|
+
Installation
|
445
|
+
</a>
|
446
|
+
</li>
|
447
|
+
|
448
|
+
|
449
|
+
<li>
|
450
|
+
<a href="/docs/community/">
|
451
|
+
Community
|
452
|
+
</a>
|
453
|
+
</li>
|
454
|
+
|
455
|
+
|
456
|
+
<li>
|
457
|
+
<a href="/docs/step-by-step/01-setup/">
|
458
|
+
Step by Step Tutorial
|
459
|
+
</a>
|
460
|
+
</li>
|
461
|
+
|
462
|
+
</ul>
|
615
463
|
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
<li class=""><a href="/docs/plugins/">Plugins</a></li>
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
<li class=""><a href="/docs/themes/">Themes</a></li>
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
<li class=""><a href="/docs/extras/">Extras</a></li>
|
646
|
-
|
647
|
-
</ul>
|
648
|
-
|
464
|
+
<h4>Build</h4>
|
465
|
+
<ul>
|
466
|
+
|
467
|
+
|
468
|
+
<li>
|
469
|
+
<a href="/docs/usage/">
|
470
|
+
Command Line Usage
|
471
|
+
</a>
|
472
|
+
</li>
|
473
|
+
|
474
|
+
|
475
|
+
<li>
|
476
|
+
<a href="/docs/configuration/">
|
477
|
+
Configuration
|
478
|
+
</a>
|
479
|
+
</li>
|
480
|
+
|
481
|
+
</ul>
|
649
482
|
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
</
|
666
|
-
|
483
|
+
<h4>Content</h4>
|
484
|
+
<ul>
|
485
|
+
|
486
|
+
|
487
|
+
<li>
|
488
|
+
<a href="/docs/pages/">
|
489
|
+
Pages
|
490
|
+
</a>
|
491
|
+
</li>
|
492
|
+
|
493
|
+
|
494
|
+
<li>
|
495
|
+
<a href="/docs/posts/">
|
496
|
+
Posts
|
497
|
+
</a>
|
498
|
+
</li>
|
499
|
+
|
500
|
+
|
501
|
+
<li>
|
502
|
+
<a href="/docs/front-matter/">
|
503
|
+
Front Matter
|
504
|
+
</a>
|
505
|
+
</li>
|
506
|
+
|
507
|
+
|
508
|
+
<li>
|
509
|
+
<a href="/docs/collections/">
|
510
|
+
Collections
|
511
|
+
</a>
|
512
|
+
</li>
|
513
|
+
|
514
|
+
|
515
|
+
<li>
|
516
|
+
<a href="/docs/datafiles/">
|
517
|
+
Data Files
|
518
|
+
</a>
|
519
|
+
</li>
|
520
|
+
|
521
|
+
|
522
|
+
<li>
|
523
|
+
<a href="/docs/assets/">
|
524
|
+
Assets
|
525
|
+
</a>
|
526
|
+
</li>
|
527
|
+
|
528
|
+
|
529
|
+
<li>
|
530
|
+
<a href="/docs/static-files/">
|
531
|
+
Static Files
|
532
|
+
</a>
|
533
|
+
</li>
|
534
|
+
|
535
|
+
</ul>
|
667
536
|
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
537
|
+
<h4>Site Structure</h4>
|
538
|
+
<ul>
|
539
|
+
|
540
|
+
|
541
|
+
<li>
|
542
|
+
<a href="/docs/structure/">
|
543
|
+
Directory Structure
|
544
|
+
</a>
|
545
|
+
</li>
|
546
|
+
|
547
|
+
|
548
|
+
<li>
|
549
|
+
<a href="/docs/liquid/">
|
550
|
+
Liquid
|
551
|
+
</a>
|
552
|
+
</li>
|
553
|
+
|
554
|
+
|
555
|
+
<li>
|
556
|
+
<a href="/docs/variables/">
|
557
|
+
Variables
|
558
|
+
</a>
|
559
|
+
</li>
|
560
|
+
|
561
|
+
|
562
|
+
<li class="current">
|
563
|
+
<a href="/docs/includes/">
|
564
|
+
Includes
|
565
|
+
</a>
|
566
|
+
</li>
|
567
|
+
|
568
|
+
|
569
|
+
<li>
|
570
|
+
<a href="/docs/layouts/">
|
571
|
+
Layouts
|
572
|
+
</a>
|
573
|
+
</li>
|
574
|
+
|
575
|
+
|
576
|
+
<li>
|
577
|
+
<a href="/docs/permalinks/">
|
578
|
+
Permalinks
|
579
|
+
</a>
|
580
|
+
</li>
|
581
|
+
|
582
|
+
|
583
|
+
<li>
|
584
|
+
<a href="/docs/themes/">
|
585
|
+
Themes
|
586
|
+
</a>
|
587
|
+
</li>
|
588
|
+
|
589
|
+
|
590
|
+
<li>
|
591
|
+
<a href="/docs/pagination/">
|
592
|
+
Pagination
|
593
|
+
</a>
|
594
|
+
</li>
|
595
|
+
|
596
|
+
</ul>
|
693
597
|
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
598
|
+
<h4>Guides</h4>
|
599
|
+
<ul>
|
600
|
+
|
601
|
+
|
602
|
+
<li>
|
603
|
+
<a href="/docs/plugins/">
|
604
|
+
Plugins
|
605
|
+
</a>
|
606
|
+
</li>
|
607
|
+
|
608
|
+
|
609
|
+
<li>
|
610
|
+
<a href="/docs/migrations/">
|
611
|
+
Blog Migrations
|
612
|
+
</a>
|
613
|
+
</li>
|
614
|
+
|
615
|
+
|
616
|
+
<li>
|
617
|
+
<a href="/docs/upgrading/">
|
618
|
+
Upgrading
|
619
|
+
</a>
|
620
|
+
</li>
|
621
|
+
|
622
|
+
|
623
|
+
<li>
|
624
|
+
<a href="/docs/deployment/">
|
625
|
+
Deployment
|
626
|
+
</a>
|
627
|
+
</li>
|
628
|
+
|
629
|
+
</ul>
|
715
630
|
|
716
631
|
</aside>
|
717
632
|
</div>
|
@@ -726,7 +641,8 @@ The latest version of <span class="p">{{</span><span class="w"> </span><span cla
|
|
726
641
|
<footer>
|
727
642
|
<div class="grid">
|
728
643
|
<div class="unit one-third center-on-mobiles">
|
729
|
-
<p>
|
644
|
+
<p>Jekyll is lovingly maintained by the <a href="/team/">core team</a> of volunteers. </p>
|
645
|
+
<p>The contents of this website are <br />© 2019 under the terms of the <a href="https://github.com/jekyll/jekyll/blob/master/LICENSE">MIT License</a>.</p>
|
730
646
|
</div>
|
731
647
|
<div class="unit two-thirds align-right center-on-mobiles">
|
732
648
|
<p>
|
@@ -736,6 +652,14 @@ The latest version of <span class="p">{{</span><span class="w"> </span><span cla
|
|
736
652
|
</a>
|
737
653
|
</p>
|
738
654
|
</div>
|
655
|
+
<div class="unit two-thirds align-right center-on-mobiles">
|
656
|
+
<p>
|
657
|
+
Jekyll is funded thanks to its
|
658
|
+
<a href="https://github.com/jekyll/jekyll#sponsors">
|
659
|
+
sponsors!
|
660
|
+
</a>
|
661
|
+
</p>
|
662
|
+
</div>
|
739
663
|
</div>
|
740
664
|
</footer>
|
741
665
|
|