jekyll-docs 3.6.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll.rb +195 -0
- data/lib/jekyll/cleaner.rb +110 -0
- data/lib/jekyll/collection.rb +230 -0
- data/lib/jekyll/command.rb +78 -0
- data/lib/jekyll/commands/build.rb +102 -0
- data/lib/jekyll/commands/clean.rb +43 -0
- data/lib/jekyll/commands/doctor.rb +153 -0
- data/lib/jekyll/commands/help.rb +34 -0
- data/lib/jekyll/commands/new.rb +156 -0
- data/lib/jekyll/commands/new_theme.rb +40 -0
- data/lib/jekyll/commands/serve.rb +245 -0
- data/lib/jekyll/commands/serve/servlet.rb +62 -0
- data/lib/jekyll/configuration.rb +410 -0
- data/lib/jekyll/converter.rb +54 -0
- data/lib/jekyll/converters/identity.rb +23 -0
- data/lib/jekyll/converters/markdown.rb +104 -0
- data/lib/jekyll/converters/markdown/kramdown_parser.rb +123 -0
- data/lib/jekyll/converters/markdown/rdiscount_parser.rb +35 -0
- data/lib/jekyll/converters/markdown/redcarpet_parser.rb +108 -0
- data/lib/jekyll/converters/smartypants.rb +36 -0
- data/lib/jekyll/convertible.rb +251 -0
- data/lib/jekyll/deprecator.rb +52 -0
- data/lib/jekyll/document.rb +507 -0
- data/lib/jekyll/drops/collection_drop.rb +22 -0
- data/lib/jekyll/drops/document_drop.rb +69 -0
- data/lib/jekyll/drops/drop.rb +214 -0
- data/lib/jekyll/drops/excerpt_drop.rb +15 -0
- data/lib/jekyll/drops/jekyll_drop.rb +33 -0
- data/lib/jekyll/drops/site_drop.rb +47 -0
- data/lib/jekyll/drops/static_file_drop.rb +13 -0
- data/lib/jekyll/drops/unified_payload_drop.rb +25 -0
- data/lib/jekyll/drops/url_drop.rb +88 -0
- data/lib/jekyll/entry_filter.rb +123 -0
- data/lib/jekyll/errors.rb +20 -0
- data/lib/jekyll/excerpt.rb +126 -0
- data/lib/jekyll/external.rb +74 -0
- data/lib/jekyll/filters.rb +430 -0
- data/lib/jekyll/filters/grouping_filters.rb +65 -0
- data/lib/jekyll/filters/url_filters.rb +60 -0
- data/lib/jekyll/frontmatter_defaults.rb +197 -0
- data/lib/jekyll/generator.rb +5 -0
- data/lib/jekyll/hooks.rb +104 -0
- data/lib/jekyll/layout.rb +62 -0
- data/lib/jekyll/liquid_extensions.rb +24 -0
- data/lib/jekyll/liquid_renderer.rb +49 -0
- data/lib/jekyll/liquid_renderer/file.rb +56 -0
- data/lib/jekyll/liquid_renderer/table.rb +96 -0
- data/lib/jekyll/log_adapter.rb +147 -0
- data/lib/jekyll/mime.types +825 -0
- data/lib/jekyll/page.rb +187 -0
- data/lib/jekyll/plugin.rb +98 -0
- data/lib/jekyll/plugin_manager.rb +113 -0
- data/lib/jekyll/publisher.rb +23 -0
- data/lib/jekyll/reader.rb +134 -0
- data/lib/jekyll/readers/collection_reader.rb +22 -0
- data/lib/jekyll/readers/data_reader.rb +77 -0
- data/lib/jekyll/readers/layout_reader.rb +71 -0
- data/lib/jekyll/readers/page_reader.rb +25 -0
- data/lib/jekyll/readers/post_reader.rb +72 -0
- data/lib/jekyll/readers/static_file_reader.rb +25 -0
- data/lib/jekyll/readers/theme_assets_reader.rb +49 -0
- data/lib/jekyll/regenerator.rb +201 -0
- data/lib/jekyll/related_posts.rb +52 -0
- data/lib/jekyll/renderer.rb +269 -0
- data/lib/jekyll/site.rb +471 -0
- data/lib/jekyll/static_file.rb +162 -0
- data/lib/jekyll/stevenson.rb +61 -0
- data/lib/jekyll/tags/highlight.rb +141 -0
- data/lib/jekyll/tags/include.rb +215 -0
- data/lib/jekyll/tags/link.rb +37 -0
- data/lib/jekyll/tags/post_url.rb +103 -0
- data/lib/jekyll/theme.rb +68 -0
- data/lib/jekyll/theme_builder.rb +119 -0
- data/lib/jekyll/url.rb +161 -0
- data/lib/jekyll/utils.rb +337 -0
- data/lib/jekyll/utils/ansi.rb +59 -0
- data/lib/jekyll/utils/exec.rb +27 -0
- data/lib/jekyll/utils/platforms.rb +82 -0
- data/lib/jekyll/utils/rouge.rb +21 -0
- data/lib/jekyll/utils/win_tz.rb +75 -0
- data/lib/jekyll/version.rb +5 -0
- data/lib/site_template/404.html +24 -0
- data/lib/site_template/_config.yml +43 -0
- data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +25 -0
- data/lib/site_template/about.md +18 -0
- data/lib/site_template/index.md +6 -0
- data/lib/theme_template/CODE_OF_CONDUCT.md.erb +74 -0
- data/lib/theme_template/Gemfile +4 -0
- data/lib/theme_template/LICENSE.txt.erb +21 -0
- data/lib/theme_template/README.md.erb +52 -0
- data/lib/theme_template/_layouts/default.html +1 -0
- data/lib/theme_template/_layouts/page.html +5 -0
- data/lib/theme_template/_layouts/post.html +5 -0
- data/lib/theme_template/example/_config.yml.erb +1 -0
- data/lib/theme_template/example/_post.md +12 -0
- data/lib/theme_template/example/index.html +14 -0
- data/lib/theme_template/example/style.scss +7 -0
- data/lib/theme_template/gitignore.erb +5 -0
- data/lib/theme_template/theme.gemspec.erb +19 -0
- metadata +103 -156
- data/lib/jekyll-docs.rb +0 -31
- data/site/404.html +0 -153
- data/site/CNAME +0 -1
- data/site/community/index.html +0 -299
- data/site/conduct/index.html +0 -10
- data/site/css/screen.css +0 -1
- data/site/docs/assets/index.html +0 -724
- data/site/docs/code_of_conduct/index.html +0 -730
- data/site/docs/collections/index.html +0 -1097
- data/site/docs/conduct/index.html +0 -744
- data/site/docs/configuration/index.html +0 -1403
- data/site/docs/continuous-integration/buddyworks/index.html +0 -726
- data/site/docs/continuous-integration/circleci/index.html +0 -757
- data/site/docs/continuous-integration/index.html +0 -681
- data/site/docs/continuous-integration/travis-ci/index.html +0 -891
- data/site/docs/contributing/index.html +0 -863
- data/site/docs/datafiles/index.html +0 -780
- data/site/docs/deployment-methods/index.html +0 -875
- data/site/docs/drafts/index.html +0 -636
- data/site/docs/extras/index.html +0 -689
- data/site/docs/frontmatter/index.html +0 -807
- data/site/docs/github-pages/index.html +0 -819
- data/site/docs/history/index.html +0 -3955
- data/site/docs/home/index.html +0 -644
- data/site/docs/includes/index.html +0 -800
- data/site/docs/index.html +0 -10
- data/site/docs/installation/index.html +0 -732
- data/site/docs/maintaining/affinity-team-captain/index.html +0 -706
- data/site/docs/maintaining/avoiding-burnout/index.html +0 -709
- data/site/docs/maintaining/becoming-a-maintainer/index.html +0 -717
- data/site/docs/maintaining/index.html +0 -713
- data/site/docs/maintaining/merging-a-pull-request/index.html +0 -747
- data/site/docs/maintaining/reviewing-a-pull-request/index.html +0 -725
- data/site/docs/maintaining/special-labels/index.html +0 -705
- data/site/docs/maintaining/triaging-an-issue/index.html +0 -735
- data/site/docs/migrations/index.html +0 -647
- data/site/docs/pages/index.html +0 -695
- data/site/docs/pagination/index.html +0 -870
- data/site/docs/permalinks/index.html +0 -1027
- data/site/docs/plugins/index.html +0 -1800
- data/site/docs/posts/index.html +0 -858
- data/site/docs/quickstart/index.html +0 -650
- data/site/docs/resources/index.html +0 -769
- data/site/docs/sites/index.html +0 -702
- data/site/docs/static-files/index.html +0 -720
- data/site/docs/structure/index.html +0 -822
- data/site/docs/templates/index.html +0 -1208
- data/site/docs/themes/index.html +0 -935
- data/site/docs/troubleshooting/index.html +0 -893
- data/site/docs/upgrading/0-to-2/index.html +0 -826
- data/site/docs/upgrading/2-to-3/index.html +0 -824
- data/site/docs/upgrading/index.html +0 -693
- data/site/docs/usage/index.html +0 -705
- data/site/docs/variables/index.html +0 -1048
- data/site/docs/windows/index.html +0 -799
- data/site/favicon.ico +0 -0
- data/site/feed.xml +0 -372
- data/site/fonts/FontAwesome.eot +0 -0
- data/site/fonts/FontAwesome.svg +0 -12
- data/site/fonts/FontAwesome.ttf +0 -0
- data/site/fonts/FontAwesome.woff +0 -0
- data/site/github.html +0 -10
- data/site/help/index.html +0 -244
- data/site/icomoon-selection.json +0 -96
- data/site/img/article-footer.png +0 -0
- data/site/img/footer-arrow.png +0 -0
- data/site/img/footer-logo.png +0 -0
- data/site/img/jekyll-sticker.jpg +0 -0
- data/site/img/jekylllayoutconcept.png +0 -0
- data/site/img/logo-2x.png +0 -0
- data/site/img/logo-rss.png +0 -0
- data/site/img/octojekyll.png +0 -0
- data/site/index.html +0 -267
- data/site/issues.html +0 -10
- data/site/js/html5shiv.min.js +0 -4
- data/site/js/respond.min.js +0 -5
- data/site/latest_version.txt +0 -1
- data/site/news/2013/05/05/jekyll-1-0-0-released/index.html +0 -570
- data/site/news/2013/05/08/jekyll-1-0-1-released/index.html +0 -570
- data/site/news/2013/05/12/jekyll-1-0-2-released/index.html +0 -571
- data/site/news/2013/06/07/jekyll-1-0-3-released/index.html +0 -568
- data/site/news/2013/07/14/jekyll-1-1-0-released/index.html +0 -570
- data/site/news/2013/07/24/jekyll-1-1-1-released/index.html +0 -569
- data/site/news/2013/07/25/jekyll-1-0-4-released/index.html +0 -565
- data/site/news/2013/07/25/jekyll-1-1-2-released/index.html +0 -565
- data/site/news/2013/09/06/jekyll-1-2-0-released/index.html +0 -572
- data/site/news/2013/09/14/jekyll-1-2-1-released/index.html +0 -566
- data/site/news/2013/10/28/jekyll-1-3-0-rc1-released/index.html +0 -564
- data/site/news/2013/11/04/jekyll-1-3-0-released/index.html +0 -599
- data/site/news/2013/11/26/jekyll-1-3-1-released/index.html +0 -568
- data/site/news/2013/12/07/jekyll-1-4-0-released/index.html +0 -583
- data/site/news/2013/12/09/jekyll-1-4-1-released/index.html +0 -565
- data/site/news/2013/12/16/jekyll-1-4-2-released/index.html +0 -564
- data/site/news/2014/01/13/jekyll-1-4-3-released/index.html +0 -573
- data/site/news/2014/03/24/jekyll-1-5-0-released/index.html +0 -564
- data/site/news/2014/03/27/jekyll-1-5-1-released/index.html +0 -569
- data/site/news/2014/05/06/jekyll-turns-2-0-0/index.html +0 -585
- data/site/news/2014/05/08/jekyll-2-0-3-released/index.html +0 -565
- data/site/news/2014/06/04/jekyll-stickers-1-dollar-stickermule/index.html +0 -567
- data/site/news/2014/06/28/jekyll-turns-21-i-mean-2-1-0/index.html +0 -582
- data/site/news/2014/07/01/jekyll-2-1-1-released/index.html +0 -579
- data/site/news/2014/07/29/jekyll-2-2-0-released/index.html +0 -568
- data/site/news/2014/08/10/jekyll-2-3-0-released/index.html +0 -588
- data/site/news/2014/09/09/jekyll-2-4-0-released/index.html +0 -574
- data/site/news/2014/11/05/jekylls-midlife-crisis-jekyll-turns-2-5-0/index.html +0 -597
- data/site/news/2014/11/09/jekyll-2-5-1-released/index.html +0 -575
- data/site/news/2014/11/12/jekyll-2-5-2-released/index.html +0 -565
- data/site/news/2014/12/17/alfredxing-welcome-to-jekyll-core/index.html +0 -572
- data/site/news/2014/12/22/jekyll-2-5-3-released/index.html +0 -567
- data/site/news/2015/01/20/jekyll-meet-and-greet/index.html +0 -568
- data/site/news/2015/01/24/jekyll-3-0-0-beta1-released/index.html +0 -588
- data/site/news/2015/02/26/introducing-jekyll-talk/index.html +0 -563
- data/site/news/2015/10/26/jekyll-3-0-released/index.html +0 -592
- data/site/news/2015/11/17/jekyll-3-0-1-released/index.html +0 -576
- data/site/news/2016/01/20/jekyll-3-0-2-released/index.html +0 -566
- data/site/news/2016/01/24/jekyll-3-1-0-released/index.html +0 -599
- data/site/news/2016/01/28/jekyll-3-1-1-released/index.html +0 -583
- data/site/news/2016/02/08/jekyll-3-0-3-released/index.html +0 -578
- data/site/news/2016/02/19/jekyll-3-1-2-released/index.html +0 -569
- data/site/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/index.html +0 -565
- data/site/news/2016/04/19/jekyll-3-0-4-released/index.html +0 -571
- data/site/news/2016/04/19/jekyll-3-1-3-released/index.html +0 -566
- data/site/news/2016/04/26/jekyll-3-0-5-released/index.html +0 -572
- data/site/news/2016/05/18/jekyll-3-1-4-released/index.html +0 -576
- data/site/news/2016/05/18/jekyll-3-1-5-released/index.html +0 -564
- data/site/news/2016/05/19/jekyll-3-1-6-released/index.html +0 -566
- data/site/news/2016/06/03/update-on-jekyll-s-google-summer-of-code-projects/index.html +0 -567
- data/site/news/2016/07/26/jekyll-3-2-0-released/index.html +0 -676
- data/site/news/2016/08/02/jekyll-3-2-1-released/index.html +0 -571
- data/site/news/2016/08/24/jekyll-admin-initial-release/index.html +0 -566
- data/site/news/2016/10/06/jekyll-3-3-is-here/index.html +0 -645
- data/site/news/2016/11/14/jekyll-3-3-1-released/index.html +0 -569
- data/site/news/2017/01/18/jekyll-3-4-0-released/index.html +0 -592
- data/site/news/2017/03/02/jekyll-3-4-1-released/index.html +0 -649
- data/site/news/2017/03/09/jekyll-3-4-2-released/index.html +0 -598
- data/site/news/2017/03/21/jekyll-3-4-3-released/index.html +0 -594
- data/site/news/2017/06/15/jekyll-3-5-0-released/index.html +0 -589
- data/site/news/2017/07/17/jekyll-3-5-1-released/index.html +0 -569
- data/site/news/2017/08/12/jekyll-3-5-2-released/index.html +0 -573
- data/site/news/2017/09/21/jekyll-3-6-0-released/index.html +0 -565
- data/site/news/index.html +0 -3609
- data/site/news/releases/index.html +0 -3344
- data/site/philosophy.html +0 -46
- data/site/readme.md +0 -23
- data/site/robots.txt +0 -1
- data/site/sitemap.xml +0 -485
- data/site/tutorials/convert-site-to-jekyll/index.html +0 -793
- data/site/tutorials/custom-404-page/index.html +0 -358
- data/site/tutorials/home/index.html +0 -323
- data/site/tutorials/index.html +0 -10
- data/site/tutorials/navigation/index.html +0 -872
- data/site/tutorials/orderofinterpretation/index.html +0 -441
@@ -1,1403 +0,0 @@
|
|
1
|
-
<!DOCTYPE HTML>
|
2
|
-
<html lang="en-US">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7
|
-
<meta name="generator" content="Jekyll v3.6.0">
|
8
|
-
<link type="application/atom+xml" rel="alternate" href="https://jekyllrb.com/feed.xml" title="Jekyll • Simple, blog-aware, static sites">
|
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
|
-
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
|
11
|
-
<link rel="stylesheet" href="/css/screen.css">
|
12
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
13
|
-
<!-- Begin Jekyll SEO tag v2.3.0 -->
|
14
|
-
<title>Configuration | Jekyll • Simple, blog-aware, static sites</title>
|
15
|
-
<meta property="og:title" content="Configuration">
|
16
|
-
<meta property="og:locale" content="en_US">
|
17
|
-
<meta name="description" content="Jekyll allows you to concoct your sites in any way you can dream up, and it’s thanks to the powerful and flexible configuration options that this is possible. These options can either be specified in a _config.yml file placed in your site’s root directory, or can be specified as flags for the jekyll executable in the terminal.">
|
18
|
-
<meta property="og:description" content="Jekyll allows you to concoct your sites in any way you can dream up, and it’s thanks to the powerful and flexible configuration options that this is possible. These options can either be specified in a _config.yml file placed in your site’s root directory, or can be specified as flags for the jekyll executable in the terminal.">
|
19
|
-
<link rel="canonical" href="https://jekyllrb.com/docs/configuration/">
|
20
|
-
<meta property="og:url" content="https://jekyllrb.com/docs/configuration/">
|
21
|
-
<meta property="og:site_name" content="Jekyll • Simple, blog-aware, static sites">
|
22
|
-
<meta property="og:type" content="article">
|
23
|
-
<meta property="article:published_time" content="2017-10-24T08:07:43-07:00">
|
24
|
-
<meta name="twitter:card" content="summary">
|
25
|
-
<meta name="twitter:site" content="@jekyllrb">
|
26
|
-
<meta name="google-site-verification" content="onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY">
|
27
|
-
<script type="application/ld+json">
|
28
|
-
{"name":null,"description":"Jekyll allows you to concoct your sites in any way you can dream up, and it’s thanks to the powerful and flexible configuration options that this is possible. These options can either be specified in a _config.yml file placed in your site’s root directory, or can be specified as flags for the jekyll executable in the terminal.","url":"https://jekyllrb.com/docs/configuration/","headline":"Configuration","dateModified":"2017-10-24T08:07:43-07:00","datePublished":"2017-10-24T08:07:43-07:00","sameAs":null,"@type":"BlogPosting","author":null,"image":null,"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://jekyllrb.com/img/logo-2x.png"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://jekyllrb.com/docs/configuration/"},"@context":"http://schema.org"}</script>
|
29
|
-
<!-- End Jekyll SEO tag -->
|
30
|
-
|
31
|
-
<!--[if lt IE 9]>
|
32
|
-
<script src="/js/html5shiv.min.js"></script>
|
33
|
-
<script src="/js/respond.min.js"></script>
|
34
|
-
<![endif]-->
|
35
|
-
</head>
|
36
|
-
|
37
|
-
|
38
|
-
<body class="wrap">
|
39
|
-
<header>
|
40
|
-
<nav class="mobile-nav show-on-mobiles">
|
41
|
-
<ul>
|
42
|
-
<li class="">
|
43
|
-
<a href="/">Home</a>
|
44
|
-
</li>
|
45
|
-
<li class="current">
|
46
|
-
<a href="/docs/home/">Docs</a>
|
47
|
-
</li>
|
48
|
-
<li class="">
|
49
|
-
<a href="/news/">News</a>
|
50
|
-
</li>
|
51
|
-
<li class="">
|
52
|
-
<a href="/community/">Community</a>
|
53
|
-
</li>
|
54
|
-
<li class="">
|
55
|
-
<a href="/help/">Help</a>
|
56
|
-
</li>
|
57
|
-
<li>
|
58
|
-
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
59
|
-
</li>
|
60
|
-
</ul>
|
61
|
-
|
62
|
-
</nav>
|
63
|
-
<div class="grid">
|
64
|
-
<div class="unit one-third center-on-mobiles">
|
65
|
-
<h1>
|
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>
|
71
|
-
</div>
|
72
|
-
<nav class="main-nav unit two-thirds hide-on-mobiles">
|
73
|
-
<ul>
|
74
|
-
<li class="">
|
75
|
-
<a href="/">Home</a>
|
76
|
-
</li>
|
77
|
-
<li class="current">
|
78
|
-
<a href="/docs/home/">Docs</a>
|
79
|
-
</li>
|
80
|
-
<li class="">
|
81
|
-
<a href="/news/">News</a>
|
82
|
-
</li>
|
83
|
-
<li class="">
|
84
|
-
<a href="/community/">Community</a>
|
85
|
-
</li>
|
86
|
-
<li class="">
|
87
|
-
<a href="/help/">Help</a>
|
88
|
-
</li>
|
89
|
-
<li>
|
90
|
-
<a href="https://github.com/jekyll/jekyll">GitHub</a>
|
91
|
-
</li>
|
92
|
-
</ul>
|
93
|
-
|
94
|
-
</nav>
|
95
|
-
</div>
|
96
|
-
</header>
|
97
|
-
|
98
|
-
|
99
|
-
<section class="docs">
|
100
|
-
<div class="grid">
|
101
|
-
|
102
|
-
<div class="docs-nav-mobile unit whole show-on-mobiles">
|
103
|
-
<select onchange="if (this.value) window.location.href=this.value">
|
104
|
-
<option value="">Navigate the docs…</option>
|
105
|
-
|
106
|
-
<optgroup label="Getting Started">
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<option value="/docs/home/">Welcome</option>
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
<option value="/docs/quickstart/">Quick-start guide</option>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<option value="/docs/installation/">Installation</option>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
<option value="/docs/windows/">Jekyll on Windows</option>
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
<option value="/docs/usage/">Basic Usage</option>
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
<option value="/docs/structure/">Directory structure</option>
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<option value="/docs/configuration/">Configuration</option>
|
135
|
-
|
136
|
-
|
137
|
-
</optgroup>
|
138
|
-
|
139
|
-
<optgroup label="Your Content">
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
<option value="/docs/frontmatter/">Front Matter</option>
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
<option value="/docs/posts/">Writing posts</option>
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
<option value="/docs/drafts/">Working with drafts</option>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<option value="/docs/pages/">Creating pages</option>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
<option value="/docs/static-files/">Static Files</option>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
<option value="/docs/variables/">Variables</option>
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
<option value="/docs/collections/">Collections</option>
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
<option value="/docs/datafiles/">Data Files</option>
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
<option value="/docs/assets/">Assets</option>
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<option value="/docs/migrations/">Blog migrations</option>
|
180
|
-
|
181
|
-
|
182
|
-
</optgroup>
|
183
|
-
|
184
|
-
<optgroup label="Customization">
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
<option value="/docs/templates/">Templates</option>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
<option value="/docs/includes/">Includes</option>
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
<option value="/docs/permalinks/">Permalinks</option>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
<option value="/docs/pagination/">Pagination</option>
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
<option value="/docs/plugins/">Plugins</option>
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<option value="/docs/themes/">Themes</option>
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
<option value="/docs/extras/">Extras</option>
|
213
|
-
|
214
|
-
|
215
|
-
</optgroup>
|
216
|
-
|
217
|
-
<optgroup label="Deployment">
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
<option value="/docs/github-pages/">GitHub Pages</option>
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
<option value="/docs/deployment-methods/">Deployment methods</option>
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
<option value="/docs/continuous-integration/">Continuous Integration</option>
|
230
|
-
|
231
|
-
|
232
|
-
</optgroup>
|
233
|
-
|
234
|
-
<optgroup label="Miscellaneous">
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
<option value="/docs/troubleshooting/">Troubleshooting</option>
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
<option value="/docs/sites/">Sites using Jekyll</option>
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<option value="/docs/resources/">Resources</option>
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
<option value="/docs/upgrading/0-to-2/">Upgrading from 0.x to 2.x</option>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
<option value="/docs/upgrading/2-to-3/">Upgrading from 2.x to 3.x</option>
|
255
|
-
|
256
|
-
|
257
|
-
</optgroup>
|
258
|
-
|
259
|
-
<optgroup label="Meta">
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
<option value="/docs/contributing/">Contributing</option>
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<option value="/docs/maintaining/">Maintaining Jekyll</option>
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
<option value="/docs/conduct/">Code of Conduct</option>
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
<option value="/docs/history/">History</option>
|
276
|
-
|
277
|
-
|
278
|
-
</optgroup>
|
279
|
-
|
280
|
-
</select>
|
281
|
-
</div>
|
282
|
-
|
283
|
-
|
284
|
-
<div class="unit four-fifths">
|
285
|
-
<article>
|
286
|
-
<div class="improve right hide-on-mobiles">
|
287
|
-
<a href="https://github.com/jekyll/jekyll/edit/master/docs/_docs/configuration.md"><i class="fa fa-pencil"></i> Improve this page</a>
|
288
|
-
</div>
|
289
|
-
<h1>Configuration</h1>
|
290
|
-
<p>Jekyll allows you to concoct your sites in any way you can dream up, and it’s
|
291
|
-
thanks to the powerful and flexible configuration options that this is possible.
|
292
|
-
These options can either be specified in a <code class="highlighter-rouge">_config.yml</code> file placed in your
|
293
|
-
site’s root directory, or can be specified as flags for the <code class="highlighter-rouge">jekyll</code> executable
|
294
|
-
in the terminal.</p>
|
295
|
-
|
296
|
-
<h2 id="configuration-settings">Configuration Settings</h2>
|
297
|
-
|
298
|
-
<h3 id="global-configuration">Global Configuration</h3>
|
299
|
-
|
300
|
-
<p>The table below lists the available settings for Jekyll, and the various <code class="option">options</code> (specified in the configuration file) and <code class="flag">flags</code> (specified on the command-line) that control them.</p>
|
301
|
-
|
302
|
-
<div class="mobile-side-scroller">
|
303
|
-
<table>
|
304
|
-
<thead>
|
305
|
-
<tr>
|
306
|
-
<th>Setting</th>
|
307
|
-
<th>
|
308
|
-
<span class="option">Options</span> and <span class="flag">Flags</span>
|
309
|
-
</th>
|
310
|
-
</tr>
|
311
|
-
</thead>
|
312
|
-
<tbody>
|
313
|
-
<tr class="setting">
|
314
|
-
<td>
|
315
|
-
<p class="name"><strong>Site Source</strong></p>
|
316
|
-
<p class="description">Change the directory where Jekyll will read files</p>
|
317
|
-
</td>
|
318
|
-
<td class="align-center">
|
319
|
-
<p><code class="option">source: DIR</code></p>
|
320
|
-
<p><code class="flag">-s, --source DIR</code></p>
|
321
|
-
</td>
|
322
|
-
</tr>
|
323
|
-
<tr class="setting">
|
324
|
-
<td>
|
325
|
-
<p class="name"><strong>Site Destination</strong></p>
|
326
|
-
<p class="description">Change the directory where Jekyll will write files</p>
|
327
|
-
</td>
|
328
|
-
<td class="align-center">
|
329
|
-
<p><code class="option">destination: DIR</code></p>
|
330
|
-
<p><code class="flag">-d, --destination DIR</code></p>
|
331
|
-
</td>
|
332
|
-
</tr>
|
333
|
-
<tr class="setting">
|
334
|
-
<td>
|
335
|
-
<p class="name"><strong>Safe</strong></p>
|
336
|
-
<p class="description">Disable <a href="../plugins/">custom plugins, and ignore symbolic links</a>.</p>
|
337
|
-
</td>
|
338
|
-
<td class="align-center">
|
339
|
-
<p><code class="option">safe: BOOL</code></p>
|
340
|
-
<p><code class="flag">--safe</code></p>
|
341
|
-
</td>
|
342
|
-
</tr>
|
343
|
-
<tr class="setting">
|
344
|
-
<td>
|
345
|
-
<p class="name"><strong>Exclude</strong></p>
|
346
|
-
<p class="description">
|
347
|
-
Exclude directories and/or files from the
|
348
|
-
conversion. These exclusions are relative to the site's
|
349
|
-
source directory and cannot be outside the source directory.
|
350
|
-
</p>
|
351
|
-
</td>
|
352
|
-
<td class="align-center">
|
353
|
-
<p><code class="option">exclude: [DIR, FILE, ...]</code></p>
|
354
|
-
</td>
|
355
|
-
</tr>
|
356
|
-
<tr class="setting">
|
357
|
-
<td>
|
358
|
-
<p class="name"><strong>Include</strong></p>
|
359
|
-
<p class="description">
|
360
|
-
Force inclusion of directories and/or files in the conversion.
|
361
|
-
<code>.htaccess</code> is a good example since dotfiles are excluded
|
362
|
-
by default.
|
363
|
-
</p>
|
364
|
-
</td>
|
365
|
-
<td class="align-center">
|
366
|
-
<p><code class="option">include: [DIR, FILE, ...]</code></p>
|
367
|
-
</td>
|
368
|
-
</tr>
|
369
|
-
<tr class="setting">
|
370
|
-
<td>
|
371
|
-
<p class="name"><strong>Keep files</strong></p>
|
372
|
-
<p class="description">
|
373
|
-
When clobbering the site destination, keep the selected files.
|
374
|
-
Useful for files that are not generated by jekyll; e.g. files or
|
375
|
-
assets that are generated by your build tool.
|
376
|
-
The paths are relative to the <code>destination</code>.
|
377
|
-
</p>
|
378
|
-
</td>
|
379
|
-
<td class="align-center">
|
380
|
-
<p><code class="option">keep_files: [DIR, FILE, ...]</code></p>
|
381
|
-
</td>
|
382
|
-
</tr>
|
383
|
-
<tr class="setting">
|
384
|
-
<td>
|
385
|
-
<p class="name"><strong>Time Zone</strong></p>
|
386
|
-
<p class="description">
|
387
|
-
Set the time zone for site generation. This sets the <code>TZ</code>
|
388
|
-
environment variable, which Ruby uses to handle time and date
|
389
|
-
creation and manipulation. Any entry from the
|
390
|
-
<a href="https://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
|
391
|
-
Database</a> is valid, e.g. <code>America/New_York</code>. A list of all
|
392
|
-
available values can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
|
393
|
-
here</a>. The default is the local time zone, as set by your operating system.
|
394
|
-
</p>
|
395
|
-
</td>
|
396
|
-
<td class="align-center">
|
397
|
-
<p><code class="option">timezone: TIMEZONE</code></p>
|
398
|
-
</td>
|
399
|
-
</tr>
|
400
|
-
<tr class="setting">
|
401
|
-
<td>
|
402
|
-
<p class="name"><strong>Encoding</strong></p>
|
403
|
-
<p class="description">
|
404
|
-
Set the encoding of files by name (only available for Ruby
|
405
|
-
1.9 or later).
|
406
|
-
The default value is <code>utf-8</code> starting in 2.0.0,
|
407
|
-
and <code>nil</code> before 2.0.0, which will yield the Ruby
|
408
|
-
default of <code>ASCII-8BIT</code>.
|
409
|
-
Available encodings can be shown by the
|
410
|
-
command <code>ruby -e 'puts Encoding::list.join("\n")'</code>.
|
411
|
-
</p>
|
412
|
-
</td>
|
413
|
-
<td class="align-center">
|
414
|
-
<p><code class="option">encoding: ENCODING</code></p>
|
415
|
-
</td>
|
416
|
-
</tr>
|
417
|
-
<tr>
|
418
|
-
<td>
|
419
|
-
<p class="name"><strong>Defaults</strong></p>
|
420
|
-
<p class="description">
|
421
|
-
Set defaults for <a href="../frontmatter/" title="YAML Front Matter">YAML Front Matter</a>
|
422
|
-
variables.
|
423
|
-
</p>
|
424
|
-
</td>
|
425
|
-
<td class="align-center">
|
426
|
-
<p>see <a href="#front-matter-defaults" title="details">below</a></p>
|
427
|
-
</td>
|
428
|
-
</tr>
|
429
|
-
</tbody>
|
430
|
-
</table>
|
431
|
-
</div>
|
432
|
-
|
433
|
-
<div class="note warning">
|
434
|
-
<h5>Destination folders are cleaned on site builds</h5>
|
435
|
-
<p>
|
436
|
-
The contents of <code><destination></code> are automatically
|
437
|
-
cleaned, by default, when the site is built. Files or folders that are not
|
438
|
-
created by your site will be removed. Some files could be retained
|
439
|
-
by specifying them within the <code><keep_files></code> configuration directive.
|
440
|
-
</p>
|
441
|
-
<p>
|
442
|
-
Do not use an important location for <code><destination></code>; instead, use it as
|
443
|
-
a staging area and copy files from there to your web server.
|
444
|
-
</p>
|
445
|
-
</div>
|
446
|
-
|
447
|
-
<h3 id="build-command-options">Build Command Options</h3>
|
448
|
-
|
449
|
-
<div class="mobile-side-scroller">
|
450
|
-
<table>
|
451
|
-
<thead>
|
452
|
-
<tr>
|
453
|
-
<th>Setting</th>
|
454
|
-
<th>
|
455
|
-
<span class="option">Options</span> and <span class="flag">Flags</span>
|
456
|
-
</th>
|
457
|
-
</tr>
|
458
|
-
</thead>
|
459
|
-
<tbody>
|
460
|
-
<tr class="setting">
|
461
|
-
<td>
|
462
|
-
<p class="name"><strong>Regeneration</strong></p>
|
463
|
-
<p class="description">Enable auto-regeneration of the site when files are modified.</p>
|
464
|
-
</td>
|
465
|
-
<td class="align-center">
|
466
|
-
<p><code class="flag">-w, --[no-]watch</code></p>
|
467
|
-
</td>
|
468
|
-
</tr>
|
469
|
-
<tr class="setting">
|
470
|
-
<td>
|
471
|
-
<p class="name"><strong>Configuration</strong></p>
|
472
|
-
<p class="description">Specify config files instead of using <code>_config.yml</code> automatically. Settings in later files override settings in earlier files.</p>
|
473
|
-
</td>
|
474
|
-
<td class="align-center">
|
475
|
-
<p><code class="flag">--config FILE1[,FILE2,...]</code></p>
|
476
|
-
</td>
|
477
|
-
</tr>
|
478
|
-
<tr class="setting">
|
479
|
-
<td>
|
480
|
-
<p class="name"><strong>Drafts</strong></p>
|
481
|
-
<p class="description">Process and render draft posts.</p>
|
482
|
-
</td>
|
483
|
-
<td class="align-center">
|
484
|
-
<p><code class="option">show_drafts: BOOL</code></p>
|
485
|
-
<p><code class="flag">--drafts</code></p>
|
486
|
-
</td>
|
487
|
-
</tr>
|
488
|
-
<tr class="setting">
|
489
|
-
<td>
|
490
|
-
<p class="name"><strong>Environment</strong></p>
|
491
|
-
<p class="description">Use a specific environment value in the build.</p>
|
492
|
-
</td>
|
493
|
-
<td class="align-center">
|
494
|
-
<p><code class="flag">JEKYLL_ENV=production</code></p>
|
495
|
-
</td>
|
496
|
-
</tr>
|
497
|
-
<tr class="setting">
|
498
|
-
<td>
|
499
|
-
<p class="name"><strong>Future</strong></p>
|
500
|
-
<p class="description">Publish posts or collection documents with a future date.</p>
|
501
|
-
</td>
|
502
|
-
<td class="align-center">
|
503
|
-
<p><code class="option">future: BOOL</code></p>
|
504
|
-
<p><code class="flag">--future</code></p>
|
505
|
-
</td>
|
506
|
-
</tr>
|
507
|
-
<tr class="setting">
|
508
|
-
<td>
|
509
|
-
<p class="name"><strong>Unpublished</strong></p>
|
510
|
-
<p class="description">Render posts that were marked as unpublished.</p>
|
511
|
-
</td>
|
512
|
-
<td class="align-center">
|
513
|
-
<p><code class="option">unpublished: BOOL</code></p>
|
514
|
-
<p><code class="flag">--unpublished</code></p>
|
515
|
-
</td>
|
516
|
-
</tr>
|
517
|
-
<tr class="setting">
|
518
|
-
<td>
|
519
|
-
<p class="name"><strong>LSI</strong></p>
|
520
|
-
<p class="description">Produce an index for related posts. Requires the <a href="http://www.classifier-reborn.com/">classifier-reborn</a> plugin.</p>
|
521
|
-
</td>
|
522
|
-
<td class="align-center">
|
523
|
-
<p><code class="option">lsi: BOOL</code></p>
|
524
|
-
<p><code class="flag">--lsi</code></p>
|
525
|
-
</td>
|
526
|
-
</tr>
|
527
|
-
<tr class="setting">
|
528
|
-
<td>
|
529
|
-
<p class="name"><strong>Limit Posts</strong></p>
|
530
|
-
<p class="description">Limit the number of posts to parse and publish.</p>
|
531
|
-
</td>
|
532
|
-
<td class="align-center">
|
533
|
-
<p><code class="option">limit_posts: NUM</code></p>
|
534
|
-
<p><code class="flag">--limit_posts NUM</code></p>
|
535
|
-
</td>
|
536
|
-
</tr>
|
537
|
-
<tr class="setting">
|
538
|
-
<td>
|
539
|
-
<p class="name"><strong>Force polling</strong></p>
|
540
|
-
<p class="description">Force watch to use polling.</p>
|
541
|
-
</td>
|
542
|
-
<td class="align-center">
|
543
|
-
<p><code class="flag">--force_polling</code></p>
|
544
|
-
</td>
|
545
|
-
</tr>
|
546
|
-
<tr class="setting">
|
547
|
-
<td>
|
548
|
-
<p class="name"><strong>Verbose output</strong></p>
|
549
|
-
<p class="description">Print verbose output.</p>
|
550
|
-
</td>
|
551
|
-
<td class="align-center">
|
552
|
-
<p><code class="flag">-V, --verbose</code></p>
|
553
|
-
</td>
|
554
|
-
</tr>
|
555
|
-
<tr class="setting">
|
556
|
-
<td>
|
557
|
-
<p class="name"><strong>Silence Output</strong></p>
|
558
|
-
<p class="description">Silence the normal output from Jekyll
|
559
|
-
during a build</p>
|
560
|
-
</td>
|
561
|
-
<td class="align-center">
|
562
|
-
<p><code class="flag">-q, --quiet</code></p>
|
563
|
-
</td>
|
564
|
-
</tr>
|
565
|
-
<tr class="setting">
|
566
|
-
<td>
|
567
|
-
<p class="name"><strong>Incremental build</strong></p>
|
568
|
-
<p class="description">
|
569
|
-
Enable the experimental incremental build feature. Incremental build only
|
570
|
-
re-builds posts and pages that have changed, resulting in significant performance
|
571
|
-
improvements for large sites, but may also break site generation in certain
|
572
|
-
cases.
|
573
|
-
</p>
|
574
|
-
</td>
|
575
|
-
<td class="align-center">
|
576
|
-
<p><code class="option">incremental: BOOL</code></p>
|
577
|
-
<p><code class="flag">-I, --incremental</code></p>
|
578
|
-
</td>
|
579
|
-
</tr>
|
580
|
-
<tr class="setting">
|
581
|
-
<td>
|
582
|
-
<p class="name"><strong>Liquid profiler</strong></p>
|
583
|
-
<p class="description">
|
584
|
-
Generate a Liquid rendering profile to help you identify performance bottlenecks.
|
585
|
-
</p>
|
586
|
-
</td>
|
587
|
-
<td class="align-center">
|
588
|
-
<p><code class="option">profile: BOOL</code></p>
|
589
|
-
<p><code class="flag">--profile</code></p>
|
590
|
-
</td>
|
591
|
-
</tr>
|
592
|
-
<tr class="setting">
|
593
|
-
<td>
|
594
|
-
<p class="name"><strong>Strict Front Matter</strong></p>
|
595
|
-
<p class="description">
|
596
|
-
Cause a build to fail if there is a YAML syntax error in a page's front matter.
|
597
|
-
</p>
|
598
|
-
</td>
|
599
|
-
<td class="align-center">
|
600
|
-
<p><code class="option">strict_front_matter: BOOL</code></p>
|
601
|
-
<p><code class="flag">--strict_front_matter</code></p>
|
602
|
-
</td>
|
603
|
-
</tr>
|
604
|
-
</tbody>
|
605
|
-
</table>
|
606
|
-
</div>
|
607
|
-
|
608
|
-
<h3 id="serve-command-options">Serve Command Options</h3>
|
609
|
-
|
610
|
-
<p>In addition to the options below, the <code class="highlighter-rouge">serve</code> sub-command can accept any of the options
|
611
|
-
for the <code class="highlighter-rouge">build</code> sub-command, which are then applied to the site build which occurs right
|
612
|
-
before your site is served.</p>
|
613
|
-
|
614
|
-
<div class="mobile-side-scroller">
|
615
|
-
<table>
|
616
|
-
<thead>
|
617
|
-
<tr>
|
618
|
-
<th>Setting</th>
|
619
|
-
<th>
|
620
|
-
<span class="option">Options</span> and <span class="flag">Flags</span>
|
621
|
-
</th>
|
622
|
-
</tr>
|
623
|
-
</thead>
|
624
|
-
<tbody>
|
625
|
-
<tr class="setting">
|
626
|
-
<td>
|
627
|
-
<p class="name"><strong>Local Server Port</strong></p>
|
628
|
-
<p class="description">Listen on the given port.</p>
|
629
|
-
</td>
|
630
|
-
<td class="align-center">
|
631
|
-
<p><code class="option">port: PORT</code></p>
|
632
|
-
<p><code class="flag">--port PORT</code></p>
|
633
|
-
</td>
|
634
|
-
</tr>
|
635
|
-
<tr class="setting">
|
636
|
-
<td>
|
637
|
-
<p class="name"><strong>Local Server Hostname</strong></p>
|
638
|
-
<p class="description">Listen at the given hostname.</p>
|
639
|
-
</td>
|
640
|
-
<td class="align-center">
|
641
|
-
<p><code class="option">host: HOSTNAME</code></p>
|
642
|
-
<p><code class="flag">--host HOSTNAME</code></p>
|
643
|
-
</td>
|
644
|
-
</tr>
|
645
|
-
<tr class="setting">
|
646
|
-
<td>
|
647
|
-
<p class="name"><strong>Base URL</strong></p>
|
648
|
-
<p class="description">Serve the website from the given base URL</p>
|
649
|
-
</td>
|
650
|
-
<td class="align-center">
|
651
|
-
<p><code class="option">baseurl: URL</code></p>
|
652
|
-
<p><code class="flag">--baseurl URL</code></p>
|
653
|
-
</td>
|
654
|
-
</tr>
|
655
|
-
<tr class="setting">
|
656
|
-
<td>
|
657
|
-
<p class="name"><strong>Detach</strong></p>
|
658
|
-
<p class="description">Detach the server from the terminal</p>
|
659
|
-
</td>
|
660
|
-
<td class="align-center">
|
661
|
-
<p><code class="option">detach: BOOL</code></p>
|
662
|
-
<p><code class="flag">-B, --detach</code></p>
|
663
|
-
</td>
|
664
|
-
</tr>
|
665
|
-
<tr class="setting">
|
666
|
-
<td>
|
667
|
-
<p class="name"><strong>Skips the initial site build.</strong></p>
|
668
|
-
<p class="description">Skips the initial site build which occurs before the server is started.</p>
|
669
|
-
</td>
|
670
|
-
<td class="align-center">
|
671
|
-
<p><code class="flag">--skip-initial-build</code></p>
|
672
|
-
</td>
|
673
|
-
</tr>
|
674
|
-
<tr class="setting">
|
675
|
-
<td>
|
676
|
-
<p class="name"><strong>X.509 (SSL) Private Key</strong></p>
|
677
|
-
<p class="description">SSL Private Key.</p>
|
678
|
-
</td>
|
679
|
-
<td class="align-center">
|
680
|
-
<p><code class="flag">--ssl-key</code></p>
|
681
|
-
</td>
|
682
|
-
</tr>
|
683
|
-
<tr class="setting">
|
684
|
-
<td>
|
685
|
-
<p class="name"><strong>X.509 (SSL) Certificate</strong></p>
|
686
|
-
<p class="description">SSL Public certificate.</p>
|
687
|
-
</td>
|
688
|
-
<td class="align-center">
|
689
|
-
<p><code class="flag">--ssl-cert</code></p>
|
690
|
-
</td>
|
691
|
-
</tr>
|
692
|
-
</tbody>
|
693
|
-
</table>
|
694
|
-
</div>
|
695
|
-
|
696
|
-
<div class="note warning">
|
697
|
-
<h5>Do not use tabs in configuration files</h5>
|
698
|
-
<p>
|
699
|
-
This will either lead to parsing errors, or Jekyll will revert to the
|
700
|
-
default settings. Use spaces instead.
|
701
|
-
</p>
|
702
|
-
</div>
|
703
|
-
|
704
|
-
<h2 id="custom-webrick-headers">Custom WEBrick Headers</h2>
|
705
|
-
|
706
|
-
<p>You can provide custom headers for your site by adding them to <code class="highlighter-rouge">_config.yml</code></p>
|
707
|
-
|
708
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># File: _config.yml</span>
|
709
|
-
<span class="na">webrick</span><span class="pi">:</span>
|
710
|
-
<span class="na">headers</span><span class="pi">:</span>
|
711
|
-
<span class="na">My-Header</span><span class="pi">:</span> <span class="s">My-Value</span>
|
712
|
-
<span class="na">My-Other-Header</span><span class="pi">:</span> <span class="s">My-Other-Value</span>
|
713
|
-
</code></pre></div></div>
|
714
|
-
|
715
|
-
<h3 id="defaults">Defaults</h3>
|
716
|
-
|
717
|
-
<p>We provide by default <code class="highlighter-rouge">Content-Type</code> and <code class="highlighter-rouge">Cache-Control</code> response headers: one
|
718
|
-
dynamic in order to specify the nature of the data being served, the other
|
719
|
-
static in order to disable caching so that you don’t have to fight with Chrome’s
|
720
|
-
aggressive caching when you are in development mode.</p>
|
721
|
-
|
722
|
-
<h2 id="specifying-a-jekyll-environment-at-build-time">Specifying a Jekyll environment at build time</h2>
|
723
|
-
|
724
|
-
<p>In the build (or serve) arguments, you can specify a Jekyll environment and value. The build will then apply this value in any conditional statements in your content.</p>
|
725
|
-
|
726
|
-
<p>For example, suppose you set this conditional statement in your code:</p>
|
727
|
-
|
728
|
-
<div class="language-liquid highlighter-rouge"><div class="highlight"><pre class="highlight"><code>
|
729
|
-
<span class="p">{%</span><span class="w"> </span><span class="kr">if</span><span class="w"> </span><span class="nv">jekyll</span><span class="p">.</span><span class="nv">environment</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="s2">"production"</span><span class="w"> </span><span class="p">%}</span>
|
730
|
-
<span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">disqus</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="p">%}</span>
|
731
|
-
<span class="p">{%</span><span class="w"> </span><span class="kr">endif</span><span class="w"> </span><span class="p">%}</span>
|
732
|
-
|
733
|
-
</code></pre></div></div>
|
734
|
-
|
735
|
-
<p>When you build your Jekyll site, the content inside the <code class="highlighter-rouge">if</code> statement won’t be run unless you also specify a <code class="highlighter-rouge">production</code> environment in the build command, like this:</p>
|
736
|
-
|
737
|
-
<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">JEKYLL_ENV</span><span class="o">=</span>production jekyll build
|
738
|
-
</code></pre></div></div>
|
739
|
-
|
740
|
-
<p>Specifying an environment value allows you to make certain content available only within specific environments.</p>
|
741
|
-
|
742
|
-
<p>The default value for <code class="highlighter-rouge">JEKYLL_ENV</code> is <code class="highlighter-rouge">development</code>. Therefore if you omit <code class="highlighter-rouge">JEKYLL_ENV</code> from the build arguments, the default value will be <code class="highlighter-rouge">JEKYLL_ENV=development</code>. Any content inside <code class="highlighter-rouge">{% if jekyll.environment == "development" %}</code> tags will automatically appear in the build.</p>
|
743
|
-
|
744
|
-
<p>Your environment values can be anything you want (not just <code class="highlighter-rouge">development</code> or <code class="highlighter-rouge">production</code>). Some elements you might want to hide in development environments include Disqus comment forms or Google Analytics. Conversely, you might want to expose an “Edit me in GitHub” button in a development environment but not include it in production environments.</p>
|
745
|
-
|
746
|
-
<p>By specifying the option in the build command, you avoid having to change values in your configuration files when moving from one environment to another.</p>
|
747
|
-
|
748
|
-
<h2 id="front-matter-defaults">Front Matter defaults</h2>
|
749
|
-
|
750
|
-
<p>Using <a href="../frontmatter/">YAML Front Matter</a> is one way that you can specify configuration in the pages and posts for your site. Setting things like a default layout, or customizing the title, or specifying a more precise date/time for the post can all be added to your page or post front matter.</p>
|
751
|
-
|
752
|
-
<p>Often times, you will find that you are repeating a lot of configuration options. Setting the same layout in each file, adding the same category - or categories - to a post, etc. You can even add custom variables like author names, which might be the same for the majority of posts on your blog.</p>
|
753
|
-
|
754
|
-
<p>Instead of repeating this configuration each time you create a new post or page, Jekyll provides a way to set these defaults in the site configuration. To do this, you can specify site-wide defaults using the <code class="highlighter-rouge">defaults</code> key in the <code class="highlighter-rouge">_config.yml</code> file in your project’s root directory.</p>
|
755
|
-
|
756
|
-
<p>The <code class="highlighter-rouge">defaults</code> key holds an array of scope/values pairs that define what defaults should be set for a particular file path, and optionally, a file type in that path.</p>
|
757
|
-
|
758
|
-
<p>Let’s say that you want to add a default layout to all pages and posts in your site. You would add this to your <code class="highlighter-rouge">_config.yml</code> file:</p>
|
759
|
-
|
760
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">defaults</span><span class="pi">:</span>
|
761
|
-
<span class="pi">-</span>
|
762
|
-
<span class="na">scope</span><span class="pi">:</span>
|
763
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span> <span class="c1"># an empty string here means all files in the project</span>
|
764
|
-
<span class="na">values</span><span class="pi">:</span>
|
765
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">default"</span>
|
766
|
-
</code></pre></div></div>
|
767
|
-
|
768
|
-
<div class="note info">
|
769
|
-
<h5>Please stop and rerun `jekyll serve` command.</h5>
|
770
|
-
<p>
|
771
|
-
The <code>_config.yml</code> master configuration file contains global configurations
|
772
|
-
and variable definitions that are read once at execution time. Changes made to <code>_config.yml</code>
|
773
|
-
during automatic regeneration are not loaded until the next execution.
|
774
|
-
</p>
|
775
|
-
<p>
|
776
|
-
Note <a href="../datafiles">Data Files</a> are included and reloaded during automatic regeneration.
|
777
|
-
</p>
|
778
|
-
</div>
|
779
|
-
|
780
|
-
<p>Here, we are scoping the <code class="highlighter-rouge">values</code> to any file that exists in the path <code class="highlighter-rouge">scope</code>. Since the path is set as an empty string, it will apply to <strong>all files</strong> in your project. You probably don’t want to set a layout on every file in your project - like css files, for example - so you can also specify a <code class="highlighter-rouge">type</code> value under the <code class="highlighter-rouge">scope</code> key.</p>
|
781
|
-
|
782
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">defaults</span><span class="pi">:</span>
|
783
|
-
<span class="pi">-</span>
|
784
|
-
<span class="na">scope</span><span class="pi">:</span>
|
785
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span> <span class="c1"># an empty string here means all files in the project</span>
|
786
|
-
<span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">posts"</span> <span class="c1"># previously `post` in Jekyll 2.2.</span>
|
787
|
-
<span class="na">values</span><span class="pi">:</span>
|
788
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">default"</span>
|
789
|
-
</code></pre></div></div>
|
790
|
-
|
791
|
-
<p>Now, this will only set the layout for files where the type is <code class="highlighter-rouge">posts</code>.
|
792
|
-
The different types that are available to you are <code class="highlighter-rouge">pages</code>, <code class="highlighter-rouge">posts</code>, <code class="highlighter-rouge">drafts</code> or any collection in your site. While <code class="highlighter-rouge">type</code> is optional, you must specify a value for <code class="highlighter-rouge">path</code> when creating a <code class="highlighter-rouge">scope/values</code> pair.</p>
|
793
|
-
|
794
|
-
<p>As mentioned earlier, you can set multiple scope/values pairs for <code class="highlighter-rouge">defaults</code>.</p>
|
795
|
-
|
796
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">defaults</span><span class="pi">:</span>
|
797
|
-
<span class="pi">-</span>
|
798
|
-
<span class="na">scope</span><span class="pi">:</span>
|
799
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
|
800
|
-
<span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">pages"</span>
|
801
|
-
<span class="na">values</span><span class="pi">:</span>
|
802
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">my-site"</span>
|
803
|
-
<span class="pi">-</span>
|
804
|
-
<span class="na">scope</span><span class="pi">:</span>
|
805
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">projects"</span>
|
806
|
-
<span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">pages"</span> <span class="c1"># previously `page` in Jekyll 2.2.</span>
|
807
|
-
<span class="na">values</span><span class="pi">:</span>
|
808
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">project"</span> <span class="c1"># overrides previous default layout</span>
|
809
|
-
<span class="na">author</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Mr.</span><span class="nv"> </span><span class="s">Hyde"</span>
|
810
|
-
</code></pre></div></div>
|
811
|
-
|
812
|
-
<p>With these defaults, all pages would use the <code class="highlighter-rouge">my-site</code> layout. Any html files that exist in the <code class="highlighter-rouge">projects/</code> folder will use the <code class="highlighter-rouge">project</code> layout, if it exists. Those files will also have the <code class="highlighter-rouge">page.author</code> <a href="../variables/">liquid variable</a> set to <code class="highlighter-rouge">Mr. Hyde</code>.</p>
|
813
|
-
|
814
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">collections</span><span class="pi">:</span>
|
815
|
-
<span class="na">my_collection</span><span class="pi">:</span>
|
816
|
-
<span class="na">output</span><span class="pi">:</span> <span class="no">true</span>
|
817
|
-
|
818
|
-
<span class="na">defaults</span><span class="pi">:</span>
|
819
|
-
<span class="pi">-</span>
|
820
|
-
<span class="na">scope</span><span class="pi">:</span>
|
821
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span>
|
822
|
-
<span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">my_collection"</span> <span class="c1"># a collection in your site, in plural form</span>
|
823
|
-
<span class="na">values</span><span class="pi">:</span>
|
824
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">default"</span>
|
825
|
-
</code></pre></div></div>
|
826
|
-
|
827
|
-
<p>In this example, the <code class="highlighter-rouge">layout</code> is set to <code class="highlighter-rouge">default</code> inside the
|
828
|
-
<a href="../collections/">collection</a> with the name <code class="highlighter-rouge">my_collection</code>.</p>
|
829
|
-
|
830
|
-
<h3 id="precedence">Precedence</h3>
|
831
|
-
|
832
|
-
<p>Jekyll will apply all of the configuration settings you specify in the <code class="highlighter-rouge">defaults</code> section of your <code class="highlighter-rouge">_config.yml</code> file. However, you can choose to override settings from other scope/values pair by specifying a more specific path for the scope.</p>
|
833
|
-
|
834
|
-
<p>You can see that in the second to last example above. First, we set the default page layout to <code class="highlighter-rouge">my-site</code>. Then, using a more specific path, we set the default layout for pages in the <code class="highlighter-rouge">projects/</code> path to <code class="highlighter-rouge">project</code>. This can be done with any value that you would set in the page or post front matter.</p>
|
835
|
-
|
836
|
-
<p>Finally, if you set defaults in the site configuration by adding a <code class="highlighter-rouge">defaults</code> section to your <code class="highlighter-rouge">_config.yml</code> file, you can override those settings in a post or page file. All you need to do is specify the settings in the post or page front matter. For example:</p>
|
837
|
-
|
838
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># In _config.yml</span>
|
839
|
-
<span class="nn">...</span>
|
840
|
-
<span class="na">defaults</span><span class="pi">:</span>
|
841
|
-
<span class="pi">-</span>
|
842
|
-
<span class="na">scope</span><span class="pi">:</span>
|
843
|
-
<span class="na">path</span><span class="pi">:</span> <span class="s2">"</span><span class="s">projects"</span>
|
844
|
-
<span class="na">type</span><span class="pi">:</span> <span class="s2">"</span><span class="s">pages"</span>
|
845
|
-
<span class="na">values</span><span class="pi">:</span>
|
846
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">project"</span>
|
847
|
-
<span class="na">author</span><span class="pi">:</span> <span class="s2">"</span><span class="s">Mr.</span><span class="nv"> </span><span class="s">Hyde"</span>
|
848
|
-
<span class="na">category</span><span class="pi">:</span> <span class="s2">"</span><span class="s">project"</span>
|
849
|
-
<span class="nn">...</span>
|
850
|
-
</code></pre></div></div>
|
851
|
-
|
852
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># In projects/foo_project.md</span>
|
853
|
-
<span class="nn">---</span>
|
854
|
-
<span class="na">author</span><span class="pi">:</span> <span class="s2">"</span><span class="s">John</span><span class="nv"> </span><span class="s">Smith"</span>
|
855
|
-
<span class="na">layout</span><span class="pi">:</span> <span class="s2">"</span><span class="s">foobar"</span>
|
856
|
-
<span class="nn">---</span>
|
857
|
-
<span class="s">The post text goes here...</span>
|
858
|
-
</code></pre></div></div>
|
859
|
-
|
860
|
-
<p>The <code class="highlighter-rouge">projects/foo_project.md</code> would have the <code class="highlighter-rouge">layout</code> set to <code class="highlighter-rouge">foobar</code> instead
|
861
|
-
of <code class="highlighter-rouge">project</code> and the <code class="highlighter-rouge">author</code> set to <code class="highlighter-rouge">John Smith</code> instead of <code class="highlighter-rouge">Mr. Hyde</code> when
|
862
|
-
the site is built.</p>
|
863
|
-
|
864
|
-
<h2 id="default-configuration">Default Configuration</h2>
|
865
|
-
|
866
|
-
<p>Jekyll runs with the following configuration options by default. Alternative
|
867
|
-
settings for these options can be explicitly specified in the configuration
|
868
|
-
file or on the command-line.</p>
|
869
|
-
|
870
|
-
<div class="note warning">
|
871
|
-
<h5>There are two unsupported kramdown options</h5>
|
872
|
-
<p>
|
873
|
-
Please note that both <code>remove_block_html_tags</code> and
|
874
|
-
<code>remove_span_html_tags</code> are currently unsupported in Jekyll due
|
875
|
-
to the fact that they are not included within the kramdown HTML converter.
|
876
|
-
</p>
|
877
|
-
</div>
|
878
|
-
|
879
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c1"># Where things are</span>
|
880
|
-
<span class="na">source</span><span class="pi">:</span> <span class="s">.</span>
|
881
|
-
<span class="na">destination</span><span class="pi">:</span> <span class="s">./_site</span>
|
882
|
-
<span class="na">plugins_dir</span><span class="pi">:</span> <span class="s">_plugins</span>
|
883
|
-
<span class="na">layouts_dir</span><span class="pi">:</span> <span class="s">_layouts</span>
|
884
|
-
<span class="na">data_dir</span><span class="pi">:</span> <span class="s">_data</span>
|
885
|
-
<span class="na">includes_dir</span><span class="pi">:</span> <span class="s">_includes</span>
|
886
|
-
<span class="na">collections</span><span class="pi">:</span>
|
887
|
-
<span class="na">posts</span><span class="pi">:</span>
|
888
|
-
<span class="na">output</span><span class="pi">:</span> <span class="no">true</span>
|
889
|
-
|
890
|
-
<span class="c1"># Handling Reading</span>
|
891
|
-
<span class="na">safe</span><span class="pi">:</span> <span class="no">false</span>
|
892
|
-
<span class="na">include</span><span class="pi">:</span> <span class="pi">[</span><span class="s2">"</span><span class="s">.htaccess"</span><span class="pi">]</span>
|
893
|
-
<span class="na">exclude</span><span class="pi">:</span> <span class="pi">[</span><span class="s2">"</span><span class="s">Gemfile"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">Gemfile.lock"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">node_modules"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">vendor/bundle/"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">vendor/cache/"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">vendor/gems/"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">vendor/ruby/"</span><span class="pi">]</span>
|
894
|
-
<span class="na">keep_files</span><span class="pi">:</span> <span class="pi">[</span><span class="s2">"</span><span class="s">.git"</span><span class="pi">,</span> <span class="s2">"</span><span class="s">.svn"</span><span class="pi">]</span>
|
895
|
-
<span class="na">encoding</span><span class="pi">:</span> <span class="s2">"</span><span class="s">utf-8"</span>
|
896
|
-
<span class="na">markdown_ext</span><span class="pi">:</span> <span class="s2">"</span><span class="s">markdown,mkdown,mkdn,mkd,md"</span>
|
897
|
-
<span class="na">strict_front_matter</span><span class="pi">:</span> <span class="no">false</span>
|
898
|
-
|
899
|
-
<span class="c1"># Filtering Content</span>
|
900
|
-
<span class="na">show_drafts</span><span class="pi">:</span> <span class="no">null</span>
|
901
|
-
<span class="na">limit_posts</span><span class="pi">:</span> <span class="s">0</span>
|
902
|
-
<span class="na">future</span><span class="pi">:</span> <span class="no">false</span>
|
903
|
-
<span class="na">unpublished</span><span class="pi">:</span> <span class="no">false</span>
|
904
|
-
|
905
|
-
<span class="c1"># Plugins</span>
|
906
|
-
<span class="na">whitelist</span><span class="pi">:</span> <span class="pi">[]</span>
|
907
|
-
<span class="na">plugins</span><span class="pi">:</span> <span class="pi">[]</span>
|
908
|
-
|
909
|
-
<span class="c1"># Conversion</span>
|
910
|
-
<span class="na">markdown</span><span class="pi">:</span> <span class="s">kramdown</span>
|
911
|
-
<span class="na">highlighter</span><span class="pi">:</span> <span class="s">rouge</span>
|
912
|
-
<span class="na">lsi</span><span class="pi">:</span> <span class="no">false</span>
|
913
|
-
<span class="na">excerpt_separator</span><span class="pi">:</span> <span class="s2">"</span><span class="se">\n\n</span><span class="s">"</span>
|
914
|
-
<span class="na">incremental</span><span class="pi">:</span> <span class="no">false</span>
|
915
|
-
|
916
|
-
<span class="c1"># Serving</span>
|
917
|
-
<span class="na">detach</span><span class="pi">:</span> <span class="no">false</span>
|
918
|
-
<span class="na">port</span><span class="pi">:</span> <span class="s">4000</span>
|
919
|
-
<span class="na">host</span><span class="pi">:</span> <span class="s">127.0.0.1</span>
|
920
|
-
<span class="na">baseurl</span><span class="pi">:</span> <span class="s2">"</span><span class="s">"</span> <span class="c1"># does not include hostname</span>
|
921
|
-
<span class="na">show_dir_listing</span><span class="pi">:</span> <span class="no">false</span>
|
922
|
-
|
923
|
-
<span class="c1"># Outputting</span>
|
924
|
-
<span class="na">permalink</span><span class="pi">:</span> <span class="s">date</span>
|
925
|
-
<span class="na">paginate_path</span><span class="pi">:</span> <span class="s">/page:num</span>
|
926
|
-
<span class="na">timezone</span><span class="pi">:</span> <span class="no">null</span>
|
927
|
-
|
928
|
-
<span class="na">quiet</span><span class="pi">:</span> <span class="no">false</span>
|
929
|
-
<span class="na">verbose</span><span class="pi">:</span> <span class="no">false</span>
|
930
|
-
<span class="na">defaults</span><span class="pi">:</span> <span class="pi">[]</span>
|
931
|
-
|
932
|
-
<span class="na">liquid</span><span class="pi">:</span>
|
933
|
-
<span class="na">error_mode</span><span class="pi">:</span> <span class="s">warn</span>
|
934
|
-
|
935
|
-
<span class="c1"># Markdown Processors</span>
|
936
|
-
<span class="na">rdiscount</span><span class="pi">:</span>
|
937
|
-
<span class="na">extensions</span><span class="pi">:</span> <span class="pi">[]</span>
|
938
|
-
|
939
|
-
<span class="na">redcarpet</span><span class="pi">:</span>
|
940
|
-
<span class="na">extensions</span><span class="pi">:</span> <span class="pi">[]</span>
|
941
|
-
|
942
|
-
<span class="na">kramdown</span><span class="pi">:</span>
|
943
|
-
<span class="na">auto_ids</span><span class="pi">:</span> <span class="no">true</span>
|
944
|
-
<span class="na">entity_output</span><span class="pi">:</span> <span class="s">as_char</span>
|
945
|
-
<span class="na">toc_levels</span><span class="pi">:</span> <span class="s">1..6</span>
|
946
|
-
<span class="na">smart_quotes</span><span class="pi">:</span> <span class="s">lsquo,rsquo,ldquo,rdquo</span>
|
947
|
-
<span class="na">input</span><span class="pi">:</span> <span class="s">GFM</span>
|
948
|
-
<span class="na">hard_wrap</span><span class="pi">:</span> <span class="no">false</span>
|
949
|
-
<span class="na">footnote_nr</span><span class="pi">:</span> <span class="s">1</span>
|
950
|
-
</code></pre></div></div>
|
951
|
-
|
952
|
-
<h2 id="liquid-options">Liquid Options</h2>
|
953
|
-
|
954
|
-
<p>Liquid’s response to errors can be configured by setting <code class="highlighter-rouge">error_mode</code>. The
|
955
|
-
options are</p>
|
956
|
-
|
957
|
-
<ul>
|
958
|
-
<li>
|
959
|
-
<code class="highlighter-rouge">lax</code> — Ignore all errors.</li>
|
960
|
-
<li>
|
961
|
-
<code class="highlighter-rouge">warn</code> — Output a warning on the console for each error.</li>
|
962
|
-
<li>
|
963
|
-
<code class="highlighter-rouge">strict</code> — Output an error message and stop the build.</li>
|
964
|
-
</ul>
|
965
|
-
|
966
|
-
<h2 id="markdown-options">Markdown Options</h2>
|
967
|
-
|
968
|
-
<p>The various Markdown renderers supported by Jekyll sometimes have extra options
|
969
|
-
available.</p>
|
970
|
-
|
971
|
-
<h3 id="redcarpet">Redcarpet</h3>
|
972
|
-
|
973
|
-
<p>Redcarpet can be configured by providing an <code class="highlighter-rouge">extensions</code> sub-setting, whose
|
974
|
-
value should be an array of strings. Each string should be the name of one of
|
975
|
-
the <code class="highlighter-rouge">Redcarpet::Markdown</code> class’s extensions; if present in the array, it will
|
976
|
-
set the corresponding extension to <code class="highlighter-rouge">true</code>.</p>
|
977
|
-
|
978
|
-
<p>Jekyll handles two special Redcarpet extensions:</p>
|
979
|
-
|
980
|
-
<ul>
|
981
|
-
<li>
|
982
|
-
<code class="highlighter-rouge">no_fenced_code_blocks</code> — By default, Jekyll sets the <code class="highlighter-rouge">fenced_code_blocks</code>
|
983
|
-
extension (for delimiting code blocks with triple tildes or triple backticks)
|
984
|
-
to <code class="highlighter-rouge">true</code>, probably because GitHub’s eager adoption of them is starting to make
|
985
|
-
them inescapable. Redcarpet’s normal <code class="highlighter-rouge">fenced_code_blocks</code> extension is inert
|
986
|
-
when used with Jekyll; instead, you can use this inverted version of the
|
987
|
-
extension for disabling fenced code.</li>
|
988
|
-
</ul>
|
989
|
-
|
990
|
-
<p>Note that you can also specify a language for highlighting after the first
|
991
|
-
delimiter:</p>
|
992
|
-
|
993
|
-
<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code> ```ruby
|
994
|
-
# ...ruby code
|
995
|
-
```
|
996
|
-
</code></pre></div></div>
|
997
|
-
|
998
|
-
<p>With both fenced code blocks and highlighter enabled, this will statically
|
999
|
-
highlight the code; without any syntax highlighter, it will add a
|
1000
|
-
<code class="highlighter-rouge">class="LANGUAGE"</code> attribute to the <code class="highlighter-rouge"><code></code> element, which can be used as a
|
1001
|
-
hint by various JavaScript code highlighting libraries.</p>
|
1002
|
-
|
1003
|
-
<ul>
|
1004
|
-
<li>
|
1005
|
-
<code class="highlighter-rouge">smart</code> — This pseudo-extension turns on SmartyPants, which converts
|
1006
|
-
straight quotes to curly quotes and runs of hyphens to em (<code class="highlighter-rouge">---</code>) and en (<code class="highlighter-rouge">--</code>) dashes.</li>
|
1007
|
-
</ul>
|
1008
|
-
|
1009
|
-
<p>All other extensions retain their usual names from Redcarpet, and no renderer
|
1010
|
-
options aside from <code class="highlighter-rouge">smart</code> can be specified in Jekyll. <a href="https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use">A list of available
|
1011
|
-
extensions can be found in the Redcarpet README file.</a>
|
1012
|
-
Make sure you’re looking at the README for the right version of
|
1013
|
-
Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
|
1014
|
-
extensions are:</p>
|
1015
|
-
|
1016
|
-
<ul>
|
1017
|
-
<li><code class="highlighter-rouge">tables</code></li>
|
1018
|
-
<li><code class="highlighter-rouge">no_intra_emphasis</code></li>
|
1019
|
-
<li><code class="highlighter-rouge">autolink</code></li>
|
1020
|
-
</ul>
|
1021
|
-
|
1022
|
-
<h3 id="custom-markdown-processors">Custom Markdown Processors</h3>
|
1023
|
-
|
1024
|
-
<p>If you’re interested in creating a custom markdown processor, you’re in luck! Create a new class in the <code class="highlighter-rouge">Jekyll::Converters::Markdown</code> namespace:</p>
|
1025
|
-
|
1026
|
-
<div class="language-ruby highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">class</span> <span class="nc">Jekyll</span><span class="o">::</span><span class="no">Converters</span><span class="o">::</span><span class="no">Markdown</span><span class="o">::</span><span class="no">MyCustomProcessor</span>
|
1027
|
-
<span class="k">def</span> <span class="nf">initialize</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
|
1028
|
-
<span class="nb">require</span> <span class="s1">'funky_markdown'</span>
|
1029
|
-
<span class="vi">@config</span> <span class="o">=</span> <span class="n">config</span>
|
1030
|
-
<span class="k">rescue</span> <span class="no">LoadError</span>
|
1031
|
-
<span class="no">STDERR</span><span class="p">.</span><span class="nf">puts</span> <span class="s1">'You are missing a library required for Markdown. Please run:'</span>
|
1032
|
-
<span class="no">STDERR</span><span class="p">.</span><span class="nf">puts</span> <span class="s1">' $ [sudo] gem install funky_markdown'</span>
|
1033
|
-
<span class="k">raise</span> <span class="no">FatalException</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="s2">"Missing dependency: funky_markdown"</span><span class="p">)</span>
|
1034
|
-
<span class="k">end</span>
|
1035
|
-
|
1036
|
-
<span class="k">def</span> <span class="nf">convert</span><span class="p">(</span><span class="n">content</span><span class="p">)</span>
|
1037
|
-
<span class="o">::</span><span class="no">FunkyMarkdown</span><span class="p">.</span><span class="nf">new</span><span class="p">(</span><span class="n">content</span><span class="p">).</span><span class="nf">convert</span>
|
1038
|
-
<span class="k">end</span>
|
1039
|
-
<span class="k">end</span>
|
1040
|
-
</code></pre></div></div>
|
1041
|
-
|
1042
|
-
<p>Once you’ve created your class and have it properly set up either as a plugin
|
1043
|
-
in the <code class="highlighter-rouge">_plugins</code> folder or as a gem, specify it in your <code class="highlighter-rouge">_config.yml</code>:</p>
|
1044
|
-
|
1045
|
-
<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">markdown</span><span class="pi">:</span> <span class="s">MyCustomProcessor</span>
|
1046
|
-
</code></pre></div></div>
|
1047
|
-
|
1048
|
-
<h2 id="incremental-regeneration">Incremental Regeneration</h2>
|
1049
|
-
<div class="note warning">
|
1050
|
-
<h5>Incremental regeneration is still an experimental feature</h5>
|
1051
|
-
<p>
|
1052
|
-
While incremental regeneration will work for the most common cases, it will
|
1053
|
-
not work correctly in every scenario. Please be extremely cautious when
|
1054
|
-
using the feature, and report any problems not listed below by
|
1055
|
-
<a href="https://github.com/jekyll/jekyll/issues/new">opening an issue on GitHub</a>.
|
1056
|
-
</p>
|
1057
|
-
</div>
|
1058
|
-
|
1059
|
-
<p>Incremental regeneration helps shorten build times by only generating documents
|
1060
|
-
and pages that were updated since the previous build. It does this by keeping
|
1061
|
-
track of both file modification times and inter-document dependencies in the
|
1062
|
-
<code class="highlighter-rouge">.jekyll-metadata</code> file.</p>
|
1063
|
-
|
1064
|
-
<p>Under the current implementation, incremental regeneration will only generate a
|
1065
|
-
document or page if either it, or one of its dependencies, is modified. Currently,
|
1066
|
-
the only types of dependencies tracked are includes (using the
|
1067
|
-
<code class="highlighter-rouge">{% include %}</code> tag) and layouts. This means that plain
|
1068
|
-
references to other documents (for example, the common case of iterating over
|
1069
|
-
<code class="highlighter-rouge">site.posts</code> in a post listings page) will not be detected as a dependency.</p>
|
1070
|
-
|
1071
|
-
<p>To remedy some of these shortfalls, putting <code class="highlighter-rouge">regenerate: true</code> in the front-matter
|
1072
|
-
of a document will force Jekyll to regenerate it regardless of whether it has been
|
1073
|
-
modified. Note that this will generate the specified document only; references
|
1074
|
-
to other documents’ contents will not work since they won’t be re-rendered.</p>
|
1075
|
-
|
1076
|
-
<p>Incremental regeneration can be enabled via the <code class="highlighter-rouge">--incremental</code> flag (<code class="highlighter-rouge">-I</code> for
|
1077
|
-
short) from the command-line or by setting <code class="highlighter-rouge">incremental: true</code> in your
|
1078
|
-
configuration file.</p>
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
<div class="section-nav">
|
1107
|
-
<div class="left align-right">
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
<a href="/docs/structure/" class="prev">Back</a>
|
1112
|
-
|
1113
|
-
</div>
|
1114
|
-
<div class="right align-left">
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
<a href="/docs/frontmatter/" class="next">Next</a>
|
1119
|
-
|
1120
|
-
</div>
|
1121
|
-
</div>
|
1122
|
-
<div class="clear"></div>
|
1123
|
-
|
1124
|
-
</article>
|
1125
|
-
</div>
|
1126
|
-
|
1127
|
-
<div class="unit one-fifth hide-on-mobiles">
|
1128
|
-
<aside>
|
1129
|
-
|
1130
|
-
<h4>Getting Started</h4>
|
1131
|
-
<ul>
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
<li class=""><a href="/docs/home/">Welcome</a></li>
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
<li class=""><a href="/docs/quickstart/">Quick-start guide</a></li>
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
<li class=""><a href="/docs/installation/">Installation</a></li>
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
<li class=""><a href="/docs/windows/">Jekyll on Windows</a></li>
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
<li class=""><a href="/docs/usage/">Basic Usage</a></li>
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
<li class=""><a href="/docs/structure/">Directory structure</a></li>
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
<li class="current"><a href="/docs/configuration/">Configuration</a></li>
|
1160
|
-
|
1161
|
-
</ul>
|
1162
|
-
|
1163
|
-
|
1164
|
-
<h4>Your Content</h4>
|
1165
|
-
<ul>
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
<li class=""><a href="/docs/frontmatter/">Front Matter</a></li>
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
<li class=""><a href="/docs/posts/">Writing posts</a></li>
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
<li class=""><a href="/docs/drafts/">Working with drafts</a></li>
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
<li class=""><a href="/docs/pages/">Creating pages</a></li>
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
<li class=""><a href="/docs/static-files/">Static Files</a></li>
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
<li class=""><a href="/docs/variables/">Variables</a></li>
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
<li class=""><a href="/docs/collections/">Collections</a></li>
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
<li class=""><a href="/docs/datafiles/">Data Files</a></li>
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
<li class=""><a href="/docs/assets/">Assets</a></li>
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
<li class=""><a href="/docs/migrations/">Blog migrations</a></li>
|
1206
|
-
|
1207
|
-
</ul>
|
1208
|
-
|
1209
|
-
|
1210
|
-
<h4>Customization</h4>
|
1211
|
-
<ul>
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
<li class=""><a href="/docs/templates/">Templates</a></li>
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
<li class=""><a href="/docs/includes/">Includes</a></li>
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
<li class=""><a href="/docs/permalinks/">Permalinks</a></li>
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
<li class=""><a href="/docs/pagination/">Pagination</a></li>
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
<li class=""><a href="/docs/plugins/">Plugins</a></li>
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
<li class=""><a href="/docs/themes/">Themes</a></li>
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
<li class=""><a href="/docs/extras/">Extras</a></li>
|
1240
|
-
|
1241
|
-
</ul>
|
1242
|
-
|
1243
|
-
|
1244
|
-
<h4>Deployment</h4>
|
1245
|
-
<ul>
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
<li class=""><a href="/docs/github-pages/">GitHub Pages</a></li>
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
<li class=""><a href="/docs/deployment-methods/">Deployment methods</a></li>
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
<li class=""><a href="/docs/continuous-integration/">Continuous Integration</a></li>
|
1258
|
-
|
1259
|
-
</ul>
|
1260
|
-
|
1261
|
-
|
1262
|
-
<h4>Miscellaneous</h4>
|
1263
|
-
<ul>
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
<li class=""><a href="/docs/troubleshooting/">Troubleshooting</a></li>
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
<li class=""><a href="/docs/sites/">Sites using Jekyll</a></li>
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
<li class=""><a href="/docs/resources/">Resources</a></li>
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
<li class=""><a href="/docs/upgrading/0-to-2/">Upgrading from 0.x to 2.x</a></li>
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
<li class=""><a href="/docs/upgrading/2-to-3/">Upgrading from 2.x to 3.x</a></li>
|
1284
|
-
|
1285
|
-
</ul>
|
1286
|
-
|
1287
|
-
|
1288
|
-
<h4>Meta</h4>
|
1289
|
-
<ul>
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
<li class=""><a href="/docs/contributing/">Contributing</a></li>
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
<li class=""><a href="/docs/maintaining/">Maintaining Jekyll</a></li>
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
<li class=""><a href="/docs/conduct/">Code of Conduct</a></li>
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
<li class=""><a href="/docs/history/">History</a></li>
|
1306
|
-
|
1307
|
-
</ul>
|
1308
|
-
|
1309
|
-
|
1310
|
-
</aside>
|
1311
|
-
</div>
|
1312
|
-
|
1313
|
-
|
1314
|
-
<div class="clear"></div>
|
1315
|
-
|
1316
|
-
</div>
|
1317
|
-
</section>
|
1318
|
-
|
1319
|
-
|
1320
|
-
<footer>
|
1321
|
-
<div class="grid">
|
1322
|
-
<div class="unit one-third center-on-mobiles">
|
1323
|
-
<p>The contents of this website are <br>© 2017 under the terms of the <a href="https://github.com/jekyll/jekyll/blob/master/LICENSE">MIT License</a>.</p>
|
1324
|
-
</div>
|
1325
|
-
<div class="unit two-thirds align-right center-on-mobiles">
|
1326
|
-
<p>
|
1327
|
-
Proudly hosted by
|
1328
|
-
<a href="https://github.com">
|
1329
|
-
<img src="/img/footer-logo.png" width="100" height="30" alt="GitHub • Social coding">
|
1330
|
-
</a>
|
1331
|
-
</p>
|
1332
|
-
</div>
|
1333
|
-
</div>
|
1334
|
-
</footer>
|
1335
|
-
|
1336
|
-
<script>
|
1337
|
-
var anchorForId = function (id) {
|
1338
|
-
var anchor = document.createElement("a");
|
1339
|
-
anchor.className = "header-link";
|
1340
|
-
anchor.href = "#" + id;
|
1341
|
-
anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
|
1342
|
-
anchor.title = "Permalink";
|
1343
|
-
return anchor;
|
1344
|
-
};
|
1345
|
-
|
1346
|
-
var linkifyAnchors = function (level, containingElement) {
|
1347
|
-
var headers = containingElement.getElementsByTagName("h" + level);
|
1348
|
-
for (var h = 0; h < headers.length; h++) {
|
1349
|
-
var header = headers[h];
|
1350
|
-
|
1351
|
-
if (typeof header.id !== "undefined" && header.id !== "") {
|
1352
|
-
header.appendChild(anchorForId(header.id));
|
1353
|
-
}
|
1354
|
-
}
|
1355
|
-
};
|
1356
|
-
|
1357
|
-
document.onreadystatechange = function () {
|
1358
|
-
if (this.readyState === "complete") {
|
1359
|
-
var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
|
1360
|
-
if (!contentBlock) {
|
1361
|
-
return;
|
1362
|
-
}
|
1363
|
-
for (var level = 1; level <= 6; level++) {
|
1364
|
-
linkifyAnchors(level, contentBlock);
|
1365
|
-
}
|
1366
|
-
}
|
1367
|
-
};
|
1368
|
-
</script>
|
1369
|
-
|
1370
|
-
|
1371
|
-
<!-- Gauges (http://get.gaug.es/) -->
|
1372
|
-
<script>
|
1373
|
-
var _gauges = _gauges || [];
|
1374
|
-
(function() {
|
1375
|
-
var t = document.createElement('script');
|
1376
|
-
t.type = 'text/javascript';
|
1377
|
-
t.async = true;
|
1378
|
-
t.id = 'gauges-tracker';
|
1379
|
-
t.setAttribute('data-site-id', '503c5af6613f5d0f19000027');
|
1380
|
-
t.src = '//secure.gaug.es/track.js';
|
1381
|
-
var s = document.getElementsByTagName('script')[0];
|
1382
|
-
s.parentNode.insertBefore(t, s);
|
1383
|
-
})();
|
1384
|
-
</script>
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
<!-- Google Analytics (https://www.google.com/analytics) -->
|
1389
|
-
<script>
|
1390
|
-
!function(j,e,k,y,l,L){j.GoogleAnalyticsObject=y,j[y]||(j[y]=function(){
|
1391
|
-
(j[y].q=j[y].q||[]).push(arguments)}),j[y].l=+new Date,l=e.createElement(k),
|
1392
|
-
L=e.getElementsByTagName(k)[0],l.src='//www.google-analytics.com/analytics.js',
|
1393
|
-
L.parentNode.insertBefore(l,L)}(window,document,'script','ga');
|
1394
|
-
|
1395
|
-
ga('create', 'UA-50755011-1', 'jekyllrb.com');
|
1396
|
-
ga('send', 'pageview');
|
1397
|
-
|
1398
|
-
</script>
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
</body>
|
1403
|
-
</html>
|