jekyll-docs 3.4.3 → 3.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-docs.rb +1 -1
  3. data/site/404.html +5 -11
  4. data/site/community/index.html +9 -15
  5. data/site/css/screen.css +1 -1468
  6. data/site/docs/assets/index.html +20 -16
  7. data/site/docs/collections/index.html +115 -109
  8. data/site/docs/conduct/index.html +19 -15
  9. data/site/docs/configuration/index.html +39 -23
  10. data/site/docs/continuous-integration/buddyworks/index.html +728 -0
  11. data/site/docs/continuous-integration/circleci/index.html +19 -15
  12. data/site/docs/continuous-integration/index.html +20 -15
  13. data/site/docs/continuous-integration/travis-ci/index.html +21 -18
  14. data/site/docs/contributing/index.html +20 -16
  15. data/site/docs/datafiles/index.html +23 -15
  16. data/site/docs/deployment-methods/index.html +24 -20
  17. data/site/docs/drafts/index.html +19 -15
  18. data/site/docs/extras/index.html +31 -16
  19. data/site/docs/frontmatter/index.html +28 -15
  20. data/site/docs/github-pages/index.html +21 -17
  21. data/site/docs/history/index.html +521 -315
  22. data/site/docs/home/index.html +16 -15
  23. data/site/docs/includes/index.html +21 -17
  24. data/site/docs/installation/index.html +41 -31
  25. data/site/docs/maintaining/affinity-team-captain/index.html +19 -15
  26. data/site/docs/maintaining/avoiding-burnout/index.html +19 -15
  27. data/site/docs/maintaining/becoming-a-maintainer/index.html +19 -15
  28. data/site/docs/maintaining/index.html +19 -15
  29. data/site/docs/maintaining/merging-a-pull-request/index.html +19 -15
  30. data/site/docs/maintaining/reviewing-a-pull-request/index.html +19 -15
  31. data/site/docs/maintaining/special-labels/index.html +23 -15
  32. data/site/docs/maintaining/triaging-an-issue/index.html +20 -16
  33. data/site/docs/migrations/index.html +19 -15
  34. data/site/docs/pages/index.html +19 -15
  35. data/site/docs/pagination/index.html +19 -15
  36. data/site/docs/permalinks/index.html +19 -15
  37. data/site/docs/plugins/index.html +36 -23
  38. data/site/docs/posts/index.html +23 -19
  39. data/site/docs/quickstart/index.html +18 -17
  40. data/site/docs/resources/index.html +19 -15
  41. data/site/docs/sites/index.html +22 -15
  42. data/site/docs/static-files/index.html +52 -15
  43. data/site/docs/structure/index.html +19 -15
  44. data/site/docs/templates/index.html +29 -25
  45. data/site/docs/themes/index.html +65 -39
  46. data/site/docs/troubleshooting/index.html +41 -19
  47. data/site/docs/upgrading/0-to-2/index.html +19 -15
  48. data/site/docs/upgrading/2-to-3/index.html +20 -16
  49. data/site/docs/upgrading/index.html +22 -15
  50. data/site/docs/usage/index.html +20 -16
  51. data/site/docs/variables/index.html +19 -15
  52. data/site/docs/windows/index.html +135 -136
  53. data/site/feed.xml +228 -180
  54. data/site/help/index.html +11 -13
  55. data/site/img/jekylllayoutconcept.png +0 -0
  56. data/site/index.html +7 -14
  57. data/site/latest_version.txt +1 -1
  58. data/site/news/2013/05/05/jekyll-1-0-0-released/index.html +33 -19
  59. data/site/news/2013/05/08/jekyll-1-0-1-released/index.html +33 -19
  60. data/site/news/2013/05/12/jekyll-1-0-2-released/index.html +33 -19
  61. data/site/news/2013/06/07/jekyll-1-0-3-released/index.html +33 -19
  62. data/site/news/2013/07/14/jekyll-1-1-0-released/index.html +33 -19
  63. data/site/news/2013/07/24/jekyll-1-1-1-released/index.html +33 -19
  64. data/site/news/2013/07/25/jekyll-1-0-4-released/index.html +33 -19
  65. data/site/news/2013/07/25/jekyll-1-1-2-released/index.html +33 -19
  66. data/site/news/2013/09/06/jekyll-1-2-0-released/index.html +33 -19
  67. data/site/news/2013/09/14/jekyll-1-2-1-released/index.html +33 -19
  68. data/site/news/2013/10/28/jekyll-1-3-0-rc1-released/index.html +33 -19
  69. data/site/news/2013/11/04/jekyll-1-3-0-released/index.html +33 -19
  70. data/site/news/2013/11/26/jekyll-1-3-1-released/index.html +33 -19
  71. data/site/news/2013/12/07/jekyll-1-4-0-released/index.html +33 -19
  72. data/site/news/2013/12/09/jekyll-1-4-1-released/index.html +33 -19
  73. data/site/news/2013/12/16/jekyll-1-4-2-released/index.html +33 -19
  74. data/site/news/2014/01/13/jekyll-1-4-3-released/index.html +33 -19
  75. data/site/news/2014/03/24/jekyll-1-5-0-released/index.html +33 -19
  76. data/site/news/2014/03/27/jekyll-1-5-1-released/index.html +33 -19
  77. data/site/news/2014/05/06/jekyll-turns-2-0-0/index.html +33 -19
  78. data/site/news/2014/05/08/jekyll-2-0-3-released/index.html +33 -19
  79. data/site/news/2014/06/04/jekyll-stickers-1-dollar-stickermule/index.html +35 -21
  80. data/site/news/2014/06/28/jekyll-turns-21-i-mean-2-1-0/index.html +33 -19
  81. data/site/news/2014/07/01/jekyll-2-1-1-released/index.html +33 -19
  82. data/site/news/2014/07/29/jekyll-2-2-0-released/index.html +33 -19
  83. data/site/news/2014/08/10/jekyll-2-3-0-released/index.html +33 -19
  84. data/site/news/2014/09/09/jekyll-2-4-0-released/index.html +33 -19
  85. data/site/news/2014/11/05/jekylls-midlife-crisis-jekyll-turns-2-5-0/index.html +33 -19
  86. data/site/news/2014/11/09/jekyll-2-5-1-released/index.html +33 -19
  87. data/site/news/2014/11/12/jekyll-2-5-2-released/index.html +33 -19
  88. data/site/news/2014/12/17/alfredxing-welcome-to-jekyll-core/index.html +33 -19
  89. data/site/news/2014/12/22/jekyll-2-5-3-released/index.html +33 -19
  90. data/site/news/2015/01/20/jekyll-meet-and-greet/index.html +33 -19
  91. data/site/news/2015/01/24/jekyll-3-0-0-beta1-released/index.html +33 -19
  92. data/site/news/2015/02/26/introducing-jekyll-talk/index.html +33 -19
  93. data/site/news/2015/10/26/jekyll-3-0-released/index.html +33 -19
  94. data/site/news/2015/11/17/jekyll-3-0-1-released/index.html +33 -19
  95. data/site/news/2016/01/20/jekyll-3-0-2-released/index.html +33 -19
  96. data/site/news/2016/01/24/jekyll-3-1-0-released/index.html +33 -19
  97. data/site/news/2016/01/28/jekyll-3-1-1-released/index.html +33 -19
  98. data/site/news/2016/02/08/jekyll-3-0-3-released/index.html +33 -19
  99. data/site/news/2016/02/19/jekyll-3-1-2-released/index.html +33 -19
  100. data/site/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/index.html +33 -19
  101. data/site/news/2016/04/19/jekyll-3-0-4-released/index.html +33 -19
  102. data/site/news/2016/04/19/jekyll-3-1-3-released/index.html +33 -19
  103. data/site/news/2016/04/26/jekyll-3-0-5-released/index.html +33 -19
  104. data/site/news/2016/05/18/jekyll-3-1-4-released/index.html +33 -19
  105. data/site/news/2016/05/18/jekyll-3-1-5-released/index.html +33 -19
  106. data/site/news/2016/05/19/jekyll-3-1-6-released/index.html +33 -19
  107. data/site/news/2016/06/03/update-on-jekyll-s-google-summer-of-code-projects/index.html +33 -19
  108. data/site/news/2016/07/26/jekyll-3-2-0-released/index.html +35 -21
  109. data/site/news/2016/08/02/jekyll-3-2-1-released/index.html +34 -20
  110. data/site/news/2016/08/24/jekyll-admin-initial-release/index.html +33 -19
  111. data/site/news/2016/10/06/jekyll-3-3-is-here/index.html +35 -21
  112. data/site/news/2016/11/14/jekyll-3-3-1-released/index.html +34 -20
  113. data/site/news/2017/01/18/jekyll-3-4-0-released/index.html +36 -22
  114. data/site/news/2017/03/02/jekyll-3-4-1-released/index.html +651 -0
  115. data/site/news/2017/03/09/jekyll-3-4-2-released/index.html +592 -0
  116. data/site/news/2017/03/21/jekyll-3-4-3-released/index.html +588 -0
  117. data/site/news/2017/06/15/jekyll-3-5-0-released/index.html +581 -0
  118. data/site/news/2017/07/17/jekyll-3-5-1-released/index.html +561 -0
  119. data/site/news/index.html +405 -22
  120. data/site/news/releases/index.html +405 -22
  121. data/site/philosophy.html +46 -0
  122. data/site/sitemap.xml +95 -48
  123. data/site/tutorials/convert-site-to-jekyll/index.html +851 -0
  124. data/site/tutorials/custom-404-page/index.html +366 -0
  125. data/site/tutorials/home/index.html +323 -0
  126. data/site/tutorials/index.html +10 -0
  127. data/site/tutorials/navigation/index.html +908 -0
  128. data/site/tutorials/orderofinterpretation/index.html +459 -0
  129. metadata +20 -7
  130. data/site/feed.xslt.xml +0 -4
@@ -0,0 +1,46 @@
1
+ <p>Jekyll offers a unique philosophy when approaching the problem of static
2
+ site generation. This core philosophy drives development and product
3
+ decisions. When a contributor, maintainer, or user asks herself what Jekyll
4
+ is about, the following principles should come to mind:</p>
5
+
6
+ <h3 id="1-no-magic">1. No Magic</h3>
7
+
8
+ <p>Jekyll is not magic. A user should be able to understand the underlying
9
+ processes that make up the Jekyll build without much reading. It should
10
+ do only what you ask it to and nothing more. When a user takes a certain
11
+ action, the outcome should be easily understandable and focused.</p>
12
+
13
+ <h3 id="2-it-just-works">2. It “Just Works”</h3>
14
+
15
+ <p>The out-of-the-box experience should be that it “just works.” Run
16
+ <code class="highlighter-rouge">gem install jekyll</code> and it should build any Jekyll site that it’s given.
17
+ Features like auto-regeneration and settings like the markdown renderer
18
+ should represent sane defaults that work perfectly for the vast majority of
19
+ cases. The burden of initial configuration should not be placed on the user.</p>
20
+
21
+ <h3 id="3-content-is-king">3. Content is King</h3>
22
+
23
+ <p>Why is Jekyll so loved by content creators? It focuses on content first and
24
+ foremost, making the process of publishing content on the Web easy. Users
25
+ should find the management of their content enjoyable and simple.</p>
26
+
27
+ <h3 id="4-stability">4. Stability</h3>
28
+
29
+ <p>If a user’s site builds today, it should build tomorrow.
30
+ Backwards-compatibility should be strongly preferred over breaking changes.
31
+ Breaking changes should be made to support a strong practical goal, and
32
+ breaking changes should never be made to drive forward “purity” of the
33
+ codebase, or other changes purely to make the maintainers’ lives easier.
34
+ Breaking changes provide a significant amount of friction between upgrades
35
+ and reduce the confidence of users in this software, and should thus be
36
+ avoided unless absolutely necessary.
37
+ Upon breaking changes, provide a clear path for users to upgrade.</p>
38
+
39
+ <h3 id="5-small--extensible">5. Small &amp; Extensible</h3>
40
+
41
+ <p>The core of Jekyll should be simple and small, and extensibility should be
42
+ a first-class feature to provide added functionality from community
43
+ contributors. The core should be kept to features used by at least 90% of
44
+ users–everything else should be provided as a plugin. New features should
45
+ be shipped as plugins and focus should be put on creating extensible core
46
+ API’s to support rich plugins.</p>
data/site/sitemap.xml CHANGED
@@ -2,187 +2,191 @@
2
2
  <urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <url>
4
4
  <loc>https://jekyllrb.com/docs/assets/</loc>
5
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
5
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
6
6
  </url>
7
7
  <url>
8
8
  <loc>https://jekyllrb.com/docs/collections/</loc>
9
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
9
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
10
10
  </url>
11
11
  <url>
12
12
  <loc>https://jekyllrb.com/docs/conduct/</loc>
13
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
13
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
14
14
  </url>
15
15
  <url>
16
16
  <loc>https://jekyllrb.com/docs/configuration/</loc>
17
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
17
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
18
+ </url>
19
+ <url>
20
+ <loc>https://jekyllrb.com/docs/continuous-integration/buddyworks/</loc>
21
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
18
22
  </url>
19
23
  <url>
20
24
  <loc>https://jekyllrb.com/docs/continuous-integration/circleci/</loc>
21
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
25
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
22
26
  </url>
23
27
  <url>
24
28
  <loc>https://jekyllrb.com/docs/continuous-integration/</loc>
25
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
29
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
26
30
  </url>
27
31
  <url>
28
32
  <loc>https://jekyllrb.com/docs/continuous-integration/travis-ci/</loc>
29
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
33
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
30
34
  </url>
31
35
  <url>
32
36
  <loc>https://jekyllrb.com/docs/contributing/</loc>
33
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
37
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
34
38
  </url>
35
39
  <url>
36
40
  <loc>https://jekyllrb.com/docs/datafiles/</loc>
37
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
41
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
38
42
  </url>
39
43
  <url>
40
44
  <loc>https://jekyllrb.com/docs/deployment-methods/</loc>
41
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
45
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
42
46
  </url>
43
47
  <url>
44
48
  <loc>https://jekyllrb.com/docs/drafts/</loc>
45
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
49
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
46
50
  </url>
47
51
  <url>
48
52
  <loc>https://jekyllrb.com/docs/extras/</loc>
49
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
53
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
50
54
  </url>
51
55
  <url>
52
56
  <loc>https://jekyllrb.com/docs/frontmatter/</loc>
53
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
57
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
54
58
  </url>
55
59
  <url>
56
60
  <loc>https://jekyllrb.com/docs/github-pages/</loc>
57
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
61
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
58
62
  </url>
59
63
  <url>
60
64
  <loc>https://jekyllrb.com/docs/history/</loc>
61
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
65
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
62
66
  </url>
63
67
  <url>
64
68
  <loc>https://jekyllrb.com/docs/includes/</loc>
65
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
69
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
66
70
  </url>
67
71
  <url>
68
72
  <loc>https://jekyllrb.com/docs/home/</loc>
69
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
73
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
70
74
  </url>
71
75
  <url>
72
76
  <loc>https://jekyllrb.com/docs/installation/</loc>
73
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
77
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
74
78
  </url>
75
79
  <url>
76
80
  <loc>https://jekyllrb.com/docs/maintaining/affinity-team-captain/</loc>
77
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
81
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
78
82
  </url>
79
83
  <url>
80
84
  <loc>https://jekyllrb.com/docs/maintaining/avoiding-burnout/</loc>
81
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
85
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
82
86
  </url>
83
87
  <url>
84
88
  <loc>https://jekyllrb.com/docs/maintaining/becoming-a-maintainer/</loc>
85
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
89
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
86
90
  </url>
87
91
  <url>
88
92
  <loc>https://jekyllrb.com/docs/maintaining/</loc>
89
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
93
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
90
94
  </url>
91
95
  <url>
92
96
  <loc>https://jekyllrb.com/docs/maintaining/merging-a-pull-request/</loc>
93
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
97
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
94
98
  </url>
95
99
  <url>
96
100
  <loc>https://jekyllrb.com/docs/maintaining/reviewing-a-pull-request/</loc>
97
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
101
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
98
102
  </url>
99
103
  <url>
100
104
  <loc>https://jekyllrb.com/docs/maintaining/special-labels/</loc>
101
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
105
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
102
106
  </url>
103
107
  <url>
104
108
  <loc>https://jekyllrb.com/docs/maintaining/triaging-an-issue/</loc>
105
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
109
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
106
110
  </url>
107
111
  <url>
108
112
  <loc>https://jekyllrb.com/docs/migrations/</loc>
109
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
113
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
110
114
  </url>
111
115
  <url>
112
116
  <loc>https://jekyllrb.com/docs/pages/</loc>
113
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
117
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
114
118
  </url>
115
119
  <url>
116
120
  <loc>https://jekyllrb.com/docs/pagination/</loc>
117
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
121
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
118
122
  </url>
119
123
  <url>
120
124
  <loc>https://jekyllrb.com/docs/permalinks/</loc>
121
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
125
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
122
126
  </url>
123
127
  <url>
124
128
  <loc>https://jekyllrb.com/docs/plugins/</loc>
125
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
129
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
126
130
  </url>
127
131
  <url>
128
132
  <loc>https://jekyllrb.com/docs/posts/</loc>
129
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
133
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
130
134
  </url>
131
135
  <url>
132
136
  <loc>https://jekyllrb.com/docs/quickstart/</loc>
133
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
137
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
134
138
  </url>
135
139
  <url>
136
140
  <loc>https://jekyllrb.com/docs/resources/</loc>
137
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
141
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
138
142
  </url>
139
143
  <url>
140
144
  <loc>https://jekyllrb.com/docs/sites/</loc>
141
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
145
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
142
146
  </url>
143
147
  <url>
144
148
  <loc>https://jekyllrb.com/docs/static-files/</loc>
145
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
149
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
146
150
  </url>
147
151
  <url>
148
152
  <loc>https://jekyllrb.com/docs/structure/</loc>
149
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
153
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
150
154
  </url>
151
155
  <url>
152
156
  <loc>https://jekyllrb.com/docs/templates/</loc>
153
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
157
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
154
158
  </url>
155
159
  <url>
156
160
  <loc>https://jekyllrb.com/docs/themes/</loc>
157
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
161
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
158
162
  </url>
159
163
  <url>
160
164
  <loc>https://jekyllrb.com/docs/troubleshooting/</loc>
161
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
165
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
162
166
  </url>
163
167
  <url>
164
168
  <loc>https://jekyllrb.com/docs/upgrading/</loc>
165
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
169
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
166
170
  </url>
167
171
  <url>
168
172
  <loc>https://jekyllrb.com/docs/upgrading/0-to-2/</loc>
169
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
173
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
170
174
  </url>
171
175
  <url>
172
176
  <loc>https://jekyllrb.com/docs/upgrading/2-to-3/</loc>
173
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
177
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
174
178
  </url>
175
179
  <url>
176
180
  <loc>https://jekyllrb.com/docs/usage/</loc>
177
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
181
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
178
182
  </url>
179
183
  <url>
180
184
  <loc>https://jekyllrb.com/docs/variables/</loc>
181
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
185
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
182
186
  </url>
183
187
  <url>
184
188
  <loc>https://jekyllrb.com/docs/windows/</loc>
185
- <lastmod>2017-03-22T08:08:47-07:00</lastmod>
189
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
186
190
  </url>
187
191
  <url>
188
192
  <loc>https://jekyllrb.com/news/2013/05/05/jekyll-1-0-0-released/</loc>
@@ -409,7 +413,44 @@
409
413
  <lastmod>2017-01-18T11:19:13-08:00</lastmod>
410
414
  </url>
411
415
  <url>
412
- <loc>https://jekyllrb.com/news/</loc>
416
+ <loc>https://jekyllrb.com/news/2017/03/02/jekyll-3-4-1-released/</loc>
417
+ <lastmod>2017-03-02T11:20:26-08:00</lastmod>
418
+ </url>
419
+ <url>
420
+ <loc>https://jekyllrb.com/news/2017/03/09/jekyll-3-4-2-released/</loc>
421
+ <lastmod>2017-03-09T12:41:57-08:00</lastmod>
422
+ </url>
423
+ <url>
424
+ <loc>https://jekyllrb.com/news/2017/03/21/jekyll-3-4-3-released/</loc>
425
+ <lastmod>2017-03-21T06:52:53-07:00</lastmod>
426
+ </url>
427
+ <url>
428
+ <loc>https://jekyllrb.com/news/2017/06/15/jekyll-3-5-0-released/</loc>
429
+ <lastmod>2017-06-15T14:32:32-07:00</lastmod>
430
+ </url>
431
+ <url>
432
+ <loc>https://jekyllrb.com/news/2017/07/17/jekyll-3-5-1-released/</loc>
433
+ <lastmod>2017-07-17T09:40:37-07:00</lastmod>
434
+ </url>
435
+ <url>
436
+ <loc>https://jekyllrb.com/tutorials/convert-site-to-jekyll/</loc>
437
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
438
+ </url>
439
+ <url>
440
+ <loc>https://jekyllrb.com/tutorials/custom-404-page/</loc>
441
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
442
+ </url>
443
+ <url>
444
+ <loc>https://jekyllrb.com/tutorials/home/</loc>
445
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
446
+ </url>
447
+ <url>
448
+ <loc>https://jekyllrb.com/tutorials/navigation/</loc>
449
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
450
+ </url>
451
+ <url>
452
+ <loc>https://jekyllrb.com/tutorials/orderofinterpretation/</loc>
453
+ <lastmod>2017-07-17T13:16:40-07:00</lastmod>
413
454
  </url>
414
455
  <url>
415
456
  <loc>https://jekyllrb.com/</loc>
@@ -418,9 +459,15 @@
418
459
  <loc>https://jekyllrb.com/news/releases/</loc>
419
460
  </url>
420
461
  <url>
421
- <loc>https://jekyllrb.com/help/</loc>
462
+ <loc>https://jekyllrb.com/news/</loc>
422
463
  </url>
423
464
  <url>
424
465
  <loc>https://jekyllrb.com/community/</loc>
425
466
  </url>
467
+ <url>
468
+ <loc>https://jekyllrb.com/help/</loc>
469
+ </url>
470
+ <url>
471
+ <loc>https://jekyllrb.com/philosophy.html</loc>
472
+ </url>
426
473
  </urlset>
@@ -0,0 +1,851 @@
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.5.1">
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.2.3 -->
14
+ <title>Convert an HTML site to Jekyll | Jekyll • Simple, blog-aware, static sites</title>
15
+ <meta property="og:title" content="Convert an HTML site to Jekyll">
16
+ <meta property="og:locale" content="en_US">
17
+ <meta name="description" content="If you’re looking for themes for your Jekyll site, you don’t have to restrict yourself to existing Jekyll themes. It’s pretty easy to convert almost any static HTML files into a Jekyll website.">
18
+ <meta property="og:description" content="If you’re looking for themes for your Jekyll site, you don’t have to restrict yourself to existing Jekyll themes. It’s pretty easy to convert almost any static HTML files into a Jekyll website.">
19
+ <link rel="canonical" href="https://jekyllrb.com/tutorials/convert-site-to-jekyll/">
20
+ <meta property="og:url" content="https://jekyllrb.com/tutorials/convert-site-to-jekyll/">
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-07-17T13:16:40-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
+ {"@context":"http://schema.org","@type":"BlogPosting","headline":"Convert an HTML site to Jekyll","datePublished":"2017-07-17T13:16:40-07:00","dateModified":"2017-07-17T13:16:40-07:00","description":"If you’re looking for themes for your Jekyll site, you don’t have to restrict yourself to existing Jekyll themes. It’s pretty easy to convert almost any static HTML files into a Jekyll website.","publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://jekyllrb.com/img/logo-2x.png"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://jekyllrb.com/tutorials/convert-site-to-jekyll/"},"url":"https://jekyllrb.com/tutorials/convert-site-to-jekyll/"}</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="">
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="">
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 tutorials…</option>
105
+
106
+ <optgroup label="Tutorials">
107
+
108
+
109
+
110
+ <option value="/tutorials/home/">Tutorials</option>
111
+
112
+
113
+
114
+ <option value="/tutorials/navigation/">Navigation</option>
115
+
116
+
117
+
118
+ <option value="/tutorials/orderofinterpretation/">Order of interpretation</option>
119
+
120
+
121
+
122
+ <option value="/tutorials/custom-404-page/">Custom 404 Page</option>
123
+
124
+
125
+
126
+ <option value="/tutorials/convert-site-to-jekyll/">Convert an HTML site to Jekyll</option>
127
+
128
+
129
+ </optgroup>
130
+
131
+ </select>
132
+ </div>
133
+
134
+
135
+ <div class="unit four-fifths">
136
+ <article>
137
+ <div class="improve right hide-on-mobiles">
138
+ <a href="https://github.com/jekyll/jekyll/edit/master/docs/_tutorials/convert-existing-site-to-jekyll.md"><i class="fa fa-pencil"></i>  Improve this page</a>
139
+ </div>
140
+ <h1>Convert an HTML site to Jekyll</h1>
141
+ <p>If you’re looking for themes for your Jekyll site, you don’t have to restrict yourself to existing Jekyll themes. It’s pretty easy to convert almost any static HTML files into a Jekyll website.</p>
142
+
143
+ <p>In many ways, any site that is currently a static site is <em>already</em> a Jekyll website. Jekyll just allows you to automate parts of the site (like inserting pages into templates, rendering lists for navigation, generating feeds and sitemaps, and more) as it processes the files.</p>
144
+
145
+ <p>Understanding how to convert any HTML site into Jekyll templates will open your world to many more options for Jekyll themes. Instead of <a href="https://duckduckgo.com/?q=Jekyll+themes">searching online for <em>Jekyll themes</em></a>, you can choose from the large variety of HTML templates for your site, quickly Jekyll-ize the HTML templates as you need to, and build the output with Jekyll.</p>
146
+
147
+ <p>Although websites can have sophisticated features and controls, we’ll keep things simple in this tutorial.</p>
148
+
149
+ <h2 id="what-is-a-jekyll-website">What is a Jekyll Website?</h2>
150
+
151
+ <p>First, let’s start with a grounding in the basics. Stripping a Jekyll site down to an extremely basic level will help clarify what happens in a Jekyll site. If you haven’t already installed the jekyll gem, <a href="/docs/installation/">install it</a>.</p>
152
+
153
+ <p>We’ll start with a <em>basic Jekyll site</em> consisting of three files:</p>
154
+
155
+ <div class="highlighter-rouge">
156
+ <pre class="highlight"><code>├── _config.yml
157
+ ├── _layouts
158
+ │   └── default.html
159
+ └── index.md
160
+ </code></pre>
161
+ </div>
162
+
163
+ <p>Manually create these three files in a folder called <code class="highlighter-rouge">my_jekyll_site</code> or whatever suits you the most, and place <code class="highlighter-rouge">default.html</code> inside a folder named <code class="highlighter-rouge">_layouts</code>.</p>
164
+
165
+ <div class="language-sh highlighter-rouge">
166
+ <pre class="highlight"><code><span class="gp">$ </span>touch _config.yml index.md default.html
167
+ <span class="gp">$ </span>mkdir _layouts <span class="o">&amp;&amp;</span> mv default.html _layouts
168
+ </code></pre>
169
+ </div>
170
+
171
+ <p>Fire up your favorite editor, and populate the contents of the <code class="highlighter-rouge">default.html</code> and <code class="highlighter-rouge">index.md</code> files as follows:</p>
172
+
173
+ <p><strong>_config.yml</strong></p>
174
+
175
+ <div class="language-yaml highlighter-rouge">
176
+ <pre class="highlight"><code><span class="s">name</span><span class="pi">:</span> <span class="s">My Jekyll Website</span>
177
+ </code></pre>
178
+ </div>
179
+
180
+ <p><strong>_layouts/default.html</strong></p>
181
+
182
+ <div class="language-html highlighter-rouge">
183
+ <pre class="highlight"><code><span class="cp">&lt;!DOCTYPE html&gt;</span>
184
+ <span class="nt">&lt;html&gt;</span>
185
+ <span class="nt">&lt;body&gt;</span>
186
+ {{ content }}
187
+ <span class="nt">&lt;/body&gt;</span>
188
+ <span class="nt">&lt;/html&gt;</span>
189
+ </code></pre>
190
+ </div>
191
+
192
+ <p><strong>index.md</strong></p>
193
+
194
+ <div class="language-yaml highlighter-rouge">
195
+ <pre class="highlight"><code><span class="nn">---</span>
196
+ <span class="s">title</span><span class="pi">:</span> <span class="s">My page</span>
197
+ <span class="s">layout</span><span class="pi">:</span> <span class="s">default</span>
198
+ <span class="nn">---</span>
199
+
200
+ <span class="c1"># {{ page.title }}</span>
201
+
202
+ <span class="s">Content is written in [Markdown](https://learnxinyminutes.com/docs/markdown/). Plain text format allows you to focus on your **content**.</span>
203
+
204
+ <span class="s">&lt;!--</span>
205
+ <span class="s">You can use HTML elements in Markdown, such as the comment element, and they won't be affected by a markdown parser. However, if you create an HTML element in your markdown file, you cannot use markdown syntax within that element's contents.</span>
206
+ <span class="s">--&gt;</span>
207
+ </code></pre>
208
+ </div>
209
+
210
+ <p>Now <code class="highlighter-rouge">cd</code> to <code class="highlighter-rouge">my_jekyll_site</code> and serve the site with the built-in server:</p>
211
+
212
+ <div class="highlighter-rouge">
213
+ <pre class="highlight"><code>cd my_jekyll_site
214
+ jekyll serve
215
+ </code></pre>
216
+ </div>
217
+
218
+ <p class="note info">If you have a Gemfile, <a href="/docs/quickstart/#about-bundler">use Bundler</a> by typing <code class="highlighter-rouge">bundle exec jekyll serve</code> instead.</p>
219
+
220
+ <p>When you serve the site, you get a preview URL such as <code class="highlighter-rouge">http://127.0.0.1:4000/</code> (which is the same as <code class="highlighter-rouge">http://localhost:4000/</code>). The site’s files are built into the <code class="highlighter-rouge">_site</code> folder by default.</p>
221
+
222
+ <p>This is a Jekyll site at the most basic functional level. Here’s what is happening:</p>
223
+
224
+ <ul>
225
+ <li>The <code class="highlighter-rouge">_config.yml</code> file contains settings that Jekyll uses as it processes your site. An empty config file will use default values for building a Jekyll site. For example, to convert <a href="https://learnxinyminutes.com/docs/markdown/">Markdown</a> to HTML, Jekyll will automatically use the <a href="https://rubygems.org/gems/kramdown/">kramdown Markdown filter</a>, without any need to specify it.</li>
226
+ <li>Jekyll looks for files with <a href="/docs/frontmatter/">front matter tags</a> (the two sets of dashed lines <code class="highlighter-rouge">---</code> like those in <code class="highlighter-rouge">index.md</code>) and processes the files (populating site variables, rendering any <a href="https://shopify.github.io/liquid/">Liquid</a>, and converting Markdown to HTML).</li>
227
+ <li>Jekyll pushes the content from all pages and posts into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> variable in the layout specified (<code class="highlighter-rouge">default</code>) in the front matter tags.</li>
228
+ <li>The processed files get written as <code class="highlighter-rouge">.html</code> files in the <code class="highlighter-rouge">_site</code> directory.</li>
229
+ </ul>
230
+
231
+ <p>You can read more about how Jekyll processes the files in <a href="/tutorials/orderofinterpretation/">order of Interpretation</a>.</p>
232
+
233
+ <p>With this basic understanding of how a Jekyll site works, you can convert almost any HTML theme for Jekyll. The following sections will take you through a step-by-step tutorial to do so.</p>
234
+
235
+ <h2 id="1-create-a-template-for-your-default-layout">1. Create a template for your default layout</h2>
236
+
237
+ <p>Find your HTML theme and save it as a <code class="highlighter-rouge">default</code> layout. If you’re converting or cloning an existing site, you can right-click the page and view the source code.</p>
238
+
239
+ <p>For example, suppose you’re cloning your company site to create a documentation site with the same branding. Or suppose you have a personal site that you built with HTML and now want to make it a Jekyll site. Get the HTML source code for your site.</p>
240
+
241
+ <p class="note info">Regardless of the site, do check the license and make sure you have permission to copy and use the code.</p>
242
+
243
+ <p>Copy and paste the source code into a file called <code class="highlighter-rouge">default.html</code>. Put the <code class="highlighter-rouge">default.html</code> file inside the <code class="highlighter-rouge">_layouts</code> folder. This will be the default layout template for your pages and posts — that is, each page or post will use this layout when Jekyll builds the site.</p>
244
+
245
+ <p>Note that in looking for templates, you want the HTML output of the template. If the template has PHP tags or other dynamic scripts, these dynamic elements will need to be converted to HTML or to <a href="https://shopify.github.io/liquid/">Liquid</a>. Liquid is <a href="/docs/templates/">Jekyll templating system</a> to retrieve dynamic content.</p>
246
+
247
+ <p>Open <code class="highlighter-rouge">default.html</code> into your browser locally to ensure the site looks and behaves like it does online. You will likely need to adjust CSS, JS, and image paths so they work.</p>
248
+
249
+ <p>For example, if the paths were relative on the site you copied, you’ll need to either download the same assets into your Jekyll site or use absolute paths to the same assets in the cloud. (Syntax such as <code class="highlighter-rouge">src="//</code> requires a prefix such as <code class="highlighter-rouge">src="http://</code> to work in your local browser.)</p>
250
+
251
+ <p>Jekyll provides some <a href="/docs/templates/#filters">filters</a> to prepend a site URL before path. For example, you could preface your stylesheet like this:</p>
252
+
253
+ <div class="language-liquid highlighter-rouge">
254
+ <pre class="highlight"><code><span class="p">{{</span><span class="w"> </span><span class="s2">"/assets/style.css"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">relative_url</span><span class="w"> </span><span class="p">}}</span>
255
+ </code></pre>
256
+ </div>
257
+
258
+ <p>The <code class="highlighter-rouge">relative_url</code> filter will prepend the <a href="https://byparker.com/blog/2014/clearing-up-confusion-around-baseurl/"><code class="highlighter-rouge">baseurl</code></a> value from your config file (as<code class="highlighter-rouge">blog</code> for instance) to the input. This is useful if your site is hosted at a subpath rather than at the root of the domain (for example, <code class="highlighter-rouge">http://mysite.com/blog/</code>).</p>
259
+
260
+ <p>You can also use an <code class="highlighter-rouge">absolute_url</code> filter. This filter will prepend the <code class="highlighter-rouge">url</code> <em>and</em> <code class="highlighter-rouge">baseurl</code> value to the input:</p>
261
+
262
+ <div class="language-liquid highlighter-rouge">
263
+ <pre class="highlight"><code><span class="p">{{</span><span class="w"> </span><span class="s2">"/assets/style.css"</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">absolute_url</span><span class="w"> </span><span class="p">}}</span>
264
+ </code></pre>
265
+ </div>
266
+
267
+ <p>Again, both <code class="highlighter-rouge">url</code> and <code class="highlighter-rouge">baseurl</code> can be defined in your site’s config file, like this:</p>
268
+
269
+ <div class="highlighter-rouge">
270
+ <pre class="highlight"><code>url: http://mysite.com
271
+ baseurl: /blog
272
+ </code></pre>
273
+ </div>
274
+
275
+ <p>The result in the output will be <code class="highlighter-rouge">http://mysite.com/blog/assets/style.css</code>.</p>
276
+
277
+ <p>Note that the <code class="highlighter-rouge">url</code> property of any page begins with a forward slash (<code class="highlighter-rouge">/</code>), so omit this at the end of your <code class="highlighter-rouge">url</code> or <code class="highlighter-rouge">baseurl</code> property.</p>
278
+
279
+ <p>You don’t have to prepend filters to link paths like this. You could also use relative links across your entire site. However you decide to code the paths to your assets, make sure they render correctly.</p>
280
+
281
+ <p>Does your local <code class="highlighter-rouge">default.html</code> page look good in your browser? Are all images, styles, and other elements showing up correctly? If so, great. Keep going. You can use this template as the layout for all your pages and posts or create as many templates as you need.</p>
282
+
283
+ <p>In the next section, you’ll blank out the content of the layout and replace it with placeholder tags that get populated dynamically with your Jekyll pages.</p>
284
+
285
+ <h2 id="2-identify-the-content-part-of-the-layout">2. Identify the content part of the layout</h2>
286
+
287
+ <p>In <code class="highlighter-rouge">default.html</code>, find where the page content begins (usually at <code class="highlighter-rouge">h1</code> or <code class="highlighter-rouge">h2</code> tags). Replace the title that appears inside these tags with <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">page.title</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code>.</p>
288
+
289
+ <p>Remove the content part (keep everything else: navigation menu, sidebar, footer, etc.) and replace it with <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code>.</p>
290
+
291
+ <p>Check the layout again in your browser and make sure you didn’t corrupt or alter it up by inadvertently removing a crucial <code class="highlighter-rouge">div</code> tag or other element. The only change should be to the title and page content, which are now blanked out or showing the placeholder tag.</p>
292
+
293
+ <h2 id="3-create-a-couple-of-files-with-front-matter-tags">3. Create a couple of files with front matter tags</h2>
294
+
295
+ <p>Create a couple of files (<code class="highlighter-rouge">index.md</code> and <code class="highlighter-rouge">about.md</code>) in your root directory.</p>
296
+
297
+ <p>In your <code class="highlighter-rouge">index.md</code> file, add some front matter tags containing a <code class="highlighter-rouge">title</code> and <code class="highlighter-rouge">layout</code> property, like this:</p>
298
+
299
+ <div class="language-yaml highlighter-rouge">
300
+ <pre class="highlight"><code><span class="nn">---</span>
301
+ <span class="s">title</span><span class="pi">:</span> <span class="s">Home</span>
302
+ <span class="s">layout</span><span class="pi">:</span> <span class="s">default</span>
303
+ <span class="nn">---</span>
304
+
305
+ <span class="s">Some page content here...</span>
306
+ </code></pre>
307
+ </div>
308
+
309
+ <p>Create another page for testing called <code class="highlighter-rouge">about.md</code> with similar front matter tags.</p>
310
+
311
+ <p class="note info">If you don’t specify a layout in your pages, Jekyll will simply render that page as an unstyled basic HTML page.</p>
312
+
313
+ <h2 id="4-add-a-configuration-file">4. Add a configuration file</h2>
314
+
315
+ <p>Add a <code class="highlighter-rouge">_config.yml</code> file in your root directory. In <code class="highlighter-rouge">_config.yml</code>, you can optionally specify the markdown filter you want. By default, <a href="https://kramdown.gettalong.org/">kramdown</a> is used (without the need to specify it). If no other filter is specified, your config file will automatically apply the following as a default setting:</p>
316
+
317
+ <div class="highlighter-rouge">
318
+ <pre class="highlight"><code>markdown: kramdown
319
+ </code></pre>
320
+ </div>
321
+
322
+ <p>You can also specify <a href="https://kramdown.gettalong.org/converter/html.html">some options</a> for kramdown to make it behave more like <a href="https://github.github.com/gfm/">GitHub Flavored Markdown (GFM)</a>:</p>
323
+
324
+ <div class="highlighter-rouge">
325
+ <pre class="highlight"><code>kramdown:
326
+ input: GFM
327
+ auto_ids: true
328
+ hard_wrap: false
329
+ syntax_highlighter: rouge
330
+ </code></pre>
331
+ </div>
332
+
333
+ <h2 id="5-test-your-pages">5. Test your pages</h2>
334
+
335
+ <p>Now run <code class="highlighter-rouge">jekyll serve</code> and toggle between your <code class="highlighter-rouge">index.html</code> and <code class="highlighter-rouge">about.html</code> pages. The default layout should load for both pages.</p>
336
+
337
+ <p>You’ve now extracted your content out into separate files and defined a common layout for pages.</p>
338
+
339
+ <p>You could define any number of layouts you want for pages. Then just identify the layout you want that particular page to use. For example:</p>
340
+
341
+ <div class="highlighter-rouge">
342
+ <pre class="highlight"><code>---
343
+ title: Sample page
344
+ layout: homepage
345
+ ---
346
+ </code></pre>
347
+ </div>
348
+
349
+ <p>This page would then use the <code class="highlighter-rouge">homepage.html</code> template in the <code class="highlighter-rouge">_layouts</code> folder.</p>
350
+
351
+ <p>You can even set <a href="/docs/configuration/#front-matter-defaults">default front matter tags</a> for pages, posts, or <a href="/docs/collections/">collections</a> in your <code class="highlighter-rouge">_config.yml</code> file so that you don’t have to specify the layout in the front matter variables. Anywayd, setting defaults is beyond the scope of this tutorial, let’s get back to work.</p>
352
+
353
+ <h2 id="6-configure-site-variables">6. Configure site variables</h2>
354
+
355
+ <p>You already configured the page title using <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">page.title</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tags. But there are more <code class="highlighter-rouge">title</code> tags to populate. Pages also have a <a href="https://moz.com/learn/seo/title-tag"><code class="highlighter-rouge">title</code></a> tag that appears in the browser tab or window. Typically you put the page title followed by the site title here.</p>
356
+
357
+ <p>In your <code class="highlighter-rouge">default.html</code> layout, look for the <code class="highlighter-rouge">title</code> tags below your <code class="highlighter-rouge">head</code> tags:</p>
358
+
359
+ <div class="highlighter-rouge">
360
+ <pre class="highlight"><code>&lt;title&gt;ACME Website&lt;/title&gt;
361
+ </code></pre>
362
+ </div>
363
+
364
+ <p>Insert the following site variables:</p>
365
+
366
+ <div class="highlighter-rouge">
367
+ <pre class="highlight"><code>&lt;title&gt;{{ page.title }} | {{ site.title }}&lt;/title&gt;
368
+ </code></pre>
369
+ </div>
370
+
371
+ <p>Open <code class="highlighter-rouge">_config.yml</code> and add a <code class="highlighter-rouge">title</code> property for your site’s name.</p>
372
+
373
+ <div class="highlighter-rouge">
374
+ <pre class="highlight"><code>title: ACME Website
375
+ </code></pre>
376
+ </div>
377
+
378
+ <p>Any properties you add in your <code class="highlighter-rouge">_config.yml</code> file are accessible through the <code class="highlighter-rouge">site</code> namespace. Similarly, any properties in your page’s front matter are accessible through the <code class="highlighter-rouge">page</code> namespace. Use dot notation after <code class="highlighter-rouge">site</code> or <code class="highlighter-rouge">page</code> to access the value.</p>
379
+
380
+ <p>Stop your Jekyll server with <kbd>Ctrl</kbd> + <kbd>C</kbd> and restart it. Verify that the <code class="highlighter-rouge">title</code> tags are populating correctly.</p>
381
+
382
+ <p class="note info">Every time you modify your config file, you have to restart Jekyll for the changes to take effect. When you modify other files, Jekyll automatically picks up the changes when it rebuilds.</p>
383
+
384
+ <p>If you have other variables to populate in your site, rinse and repeat.</p>
385
+
386
+ <h2 id="7-show-posts-on-a-page">7. Show posts on a page</h2>
387
+
388
+ <p>It’s common to show a list of posts on the homepage. First, let’s create some posts so that we have something to showcase.</p>
389
+
390
+ <p>Add some posts in a <code class="highlighter-rouge">_posts</code> folder following the standard <code class="highlighter-rouge">YYYY-MM-DD-title.md</code> post format:</p>
391
+
392
+ <ul>
393
+ <li><code class="highlighter-rouge">2017-01-02-my-first-post.md</code></li>
394
+ <li><code class="highlighter-rouge">2017-01-15-my-second-post.md</code></li>
395
+ <li><code class="highlighter-rouge">2017-02-08-my-third-post.md</code></li>
396
+ </ul>
397
+
398
+ <p>In each post, add some basic content:</p>
399
+
400
+ <div class="highlighter-rouge">
401
+ <pre class="highlight"><code>---
402
+ title: My First Post
403
+ layout: default
404
+ ---
405
+
406
+ Some sample content...
407
+ </code></pre>
408
+ </div>
409
+
410
+ <p>Now let’s create a layout that will display the posts. Create a new file in <code class="highlighter-rouge">_layouts</code> called <code class="highlighter-rouge">home.html</code> and add the following logic:</p>
411
+
412
+ <div class="highlighter-rouge">
413
+ <pre class="highlight"><code>---
414
+ layout: default
415
+ ---
416
+
417
+ {{ content }}
418
+ &lt;ul class="myposts"&gt;
419
+ {% for post in site.posts %}
420
+ &lt;li&gt;&lt;a href="{{ post.url }}"&gt;{{ post.title}}&lt;/a&gt;
421
+ &lt;span class="postDate"&gt;{{ post.date | date: "%b %-d, %Y" }}&lt;/span&gt;
422
+ &lt;/li&gt;
423
+ {% endfor %}
424
+ &lt;/ul&gt;
425
+ </code></pre>
426
+ </div>
427
+
428
+ <p>Create a file called <code class="highlighter-rouge">blog.md</code> in your root directory and specify the <code class="highlighter-rouge">home</code> layout:</p>
429
+
430
+ <div class="highlighter-rouge">
431
+ <pre class="highlight"><code>---
432
+ title: Blog
433
+ layout: home
434
+ ---
435
+ </code></pre>
436
+ </div>
437
+
438
+ <p>In this case, contents of <code class="highlighter-rouge">blog.md</code> will be pushed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag in the <code class="highlighter-rouge">home</code> layout. Then the <code class="highlighter-rouge">home</code> layout will be pushed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag of the <code class="highlighter-rouge">default</code> layout.</p>
439
+
440
+ <h3 id="how-layouts-work">How layouts work</h3>
441
+
442
+ <p>When a layout specifies another layout, it means the content of the first layout will be stuffed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag of the second layout. As an analogy, think of Russian dolls that fit into each other. Each layout fits into another layout that it specifies.</p>
443
+
444
+ <p>The following diagram shows how layouts work in Jekyll:</p>
445
+
446
+ <p><img src="../../img/jekylllayoutconcept.png" alt="Concept of Jekyll layouts"></p>
447
+
448
+ <p class="image-description">In this example, the content from a Markdown document <code class="highlighter-rouge">document.md</code> that specifies <code class="highlighter-rouge">layout: docs</code> gets pushed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag of the layout file <code class="highlighter-rouge">docs.html</code>. Because the <code class="highlighter-rouge">docs</code> layout itself specifies <code class="highlighter-rouge">layout: page</code>, the content from <code class="highlighter-rouge">docs.html</code> gets pushed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag in the layout file <code class="highlighter-rouge">page.html</code>. Finally because the <code class="highlighter-rouge">page</code> layout specifies <code class="highlighter-rouge">layout: default</code>, the content from <code class="highlighter-rouge">page.html</code> gets pushed into the <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code> tag of the layout file <code class="highlighter-rouge">default.html</code>.</p>
449
+
450
+ <p>You don’t need multiple layouts. You could just use one: <code class="highlighter-rouge">default</code>. You have options for how you design your site. In general, it’s common to define one layout for pages and another layout for posts, but for both of these layouts to inherit the <code class="highlighter-rouge">default</code> template (which usually defines the top and bottom parts of the site).</p>
451
+
452
+ <p>In your browser, go to <code class="highlighter-rouge">blog.html</code> and see the list of posts.
453
+ Note that you don’t have to use the method described here. You could have simply added the <code class="highlighter-rouge">for</code> loop to any page, such as <code class="highlighter-rouge">index.md</code>, to display these posts. But given that you may have more complex logic for other features, it can be helpful to store your logic in templates separate from the page area where you frequently type your content.</p>
454
+
455
+ <p class="note info">At minimum, a layout should contain <code class="highlighter-rouge"><span class="p">{</span><span class="err">{</span><span class="w"> </span><span class="err">content</span><span class="w"> </span><span class="p">}</span><span class="err">}</span></code>, which acts as a receiver for the <em>content</em> to be rendered.</p>
456
+
457
+ <h3 id="for-loops">For loops</h3>
458
+
459
+ <p>By the way, let’s pause here to look at the <code class="highlighter-rouge">for</code> loop logic a little more closely. <a href="https://help.shopify.com/themes/liquid/tags/iteration-tags#for">For loops in Liquid</a> are one of the most commonly used Liquid tags. <em>For loops</em> let you iterate through content in your Jekyll site and build out a result. The <code class="highlighter-rouge">for</code> loop also has <a href="https://help.shopify.com/themes/liquid/objects/for-loops">certain properties available</a> (like first or last iteration) based on the loop’s position in the loop as well.</p>
460
+
461
+ <p>We’ve only scratched the surface of what you can do with <code class="highlighter-rouge">for</code> loops in retrieving posts. For example, if you wanted to display posts from a specific category, you could do so by adding a <code class="highlighter-rouge">categories</code> property to your post’s front matter and then look in those categories. Further, you could limit the number of results by adding a <code class="highlighter-rouge">limit</code> property. Here’s an example:</p>
462
+
463
+ <div class="language-liquid highlighter-rouge">
464
+ <pre class="highlight"><code>&lt;ul class="myposts"&gt;
465
+ <span class="p">{%</span><span class="w"> </span><span class="nt">for</span><span class="w"> </span>post<span class="w"> </span>in<span class="w"> </span>site.categories.podcasts<span class="w"> </span><span class="na">limit</span><span class="o">:</span><span class="mi">3</span><span class="w"> </span><span class="p">%}</span>
466
+ &lt;li&gt;&lt;a href="<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">url</span><span class="w"> </span><span class="p">}}</span>"&gt;<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">title</span><span class="p">}}</span>&lt;/a&gt;
467
+ &lt;span class="postDate"&gt;<span class="p">{{</span><span class="w"> </span><span class="nv">post</span><span class="p">.</span><span class="nv">date</span><span class="w"> </span><span class="p">|</span><span class="w"> </span><span class="nf">date</span><span class="p">:</span><span class="w"> </span><span class="s2">"%b %-d, %Y"</span><span class="w"> </span><span class="p">}}</span>&lt;/span&gt;
468
+ &lt;/li&gt;
469
+ <span class="p">{%</span><span class="w"> </span><span class="nt">endfor</span><span class="w"> </span><span class="p">%}</span>
470
+ </code></pre>
471
+ </div>
472
+
473
+ <p>This loop would get the latest three posts that have a category called <code class="highlighter-rouge">podcasts</code> in the front matter.</p>
474
+
475
+ <h2 id="8-configure-navigation">8. Configure navigation</h2>
476
+
477
+ <p>Now that you’ve configured posts, let’s configure page navigation. Most websites have some navigation either in the sidebar or header area.</p>
478
+
479
+ <p>In this tutorial, we’ll assume you’ve got a simple list of pages you want to generate. If you only have a handful of pages, you could list them by using a <code class="highlighter-rouge">for</code> loop to iterate through the <code class="highlighter-rouge">site.pages</code> object and then order them by a front matter property.</p>
480
+
481
+ <p>Identify the part of your code where the list of pages appears. Usually this is a <code class="highlighter-rouge">&lt;ul&gt;</code> element with various child <code class="highlighter-rouge">&lt;li&gt;</code> elements. Replace the code with the following:</p>
482
+
483
+ <div class="language-html highlighter-rouge">
484
+ <pre class="highlight"><code><span class="nt">&lt;ul&gt;</span>
485
+ {% assign mypages = site.pages | sort: "order" %}
486
+ {% for page in mypages %}
487
+ <span class="nt">&lt;li&gt;&lt;a</span> <span class="na">href=</span><span class="s">"{{ page.url | absolute_url }}"</span><span class="nt">&gt;</span>{{ page.title }}<span class="nt">&lt;/a&gt;&lt;/li&gt;</span>
488
+ {% endfor %}
489
+ <span class="nt">&lt;/ul&gt;</span>
490
+ </code></pre>
491
+ </div>
492
+
493
+ <p>This example assumes each page would have front matter containing both a <code class="highlighter-rouge">title</code> and <code class="highlighter-rouge">order</code> property like this:</p>
494
+
495
+ <div class="highlighter-rouge">
496
+ <pre class="highlight"><code>---
497
+ title: My page
498
+ order: 2
499
+ ---
500
+ </code></pre>
501
+ </div>
502
+
503
+ <p>Here the <code class="highlighter-rouge">order</code> property will define how the pages get sorted, with <code class="highlighter-rouge">1</code> appearing first in the list.</p>
504
+
505
+ <p>You could also iterate through a list of pages that you maintain in a separate data file. This might be more appropriate if you have a lot of pages, or you have other properties about the pages you want to store.</p>
506
+
507
+ <p>To manage page links this way, create a folder in your Jekyll project called <code class="highlighter-rouge">_data</code>. In this folder, create a file called e.g. <code class="highlighter-rouge">navigation.yml</code> with this content:</p>
508
+
509
+ <div class="language-yaml highlighter-rouge">
510
+ <pre class="highlight"><code><span class="pi">-</span> <span class="s">title</span><span class="pi">:</span> <span class="s">Sample page 1</span>
511
+ <span class="s">url</span><span class="pi">:</span> <span class="s">/page-1-permalink/</span>
512
+
513
+ <span class="pi">-</span> <span class="s">title</span><span class="pi">:</span> <span class="s">Sample page 2</span>
514
+ <span class="s">url</span><span class="pi">:</span> <span class="s">/page-2-permalink/</span>
515
+
516
+ <span class="pi">-</span> <span class="s">title</span><span class="pi">:</span> <span class="s">Sample page 3</span>
517
+ <span class="s">url</span><span class="pi">:</span> <span class="s">/page-3-permalink/</span>
518
+ </code></pre>
519
+ </div>
520
+
521
+ <p class="note info">If you never wrote any YAML before, you’ll get quickly familiar with it. Take a look at <a href="https://learnxinyminutes.com/docs/yaml/">what you can do with YAML</a>.</p>
522
+
523
+ <p>You can store additional properties for each item in this data file as desired. Arrange the list items in the order you want them to appear.</p>
524
+
525
+ <p>To print the list of pages from the data file, use code like this:</p>
526
+
527
+ <div class="language-html highlighter-rouge">
528
+ <pre class="highlight"><code><span class="nt">&lt;ul&gt;</span>
529
+ {% for link in site.data.navigation %}
530
+ <span class="nt">&lt;li&gt;&lt;a</span> <span class="na">href=</span><span class="s">"{{ link.url }}"</span><span class="nt">&gt;</span>{{ link.title }}<span class="nt">&lt;/a&gt;&lt;/li&gt;</span>
531
+ {% endfor %}
532
+ <span class="nt">&lt;/ul&gt;</span>
533
+ </code></pre>
534
+ </div>
535
+
536
+ <p>If you have more sophisticated requirements around navigation, such as when building a documentation site, see the <a href="/tutorials/navigation/">detailed tutorial on navigation</a>.</p>
537
+
538
+ <h2 id="9-simplify-your-site-with-includes">9. Simplify your site with includes</h2>
539
+
540
+ <p>Let’s suppose your <code class="highlighter-rouge">default.html</code> file is massive and hard to work with. You can break up your layout by putting some of the HTML code in <em>include</em> files.</p>
541
+
542
+ <p>Add a folder called <code class="highlighter-rouge">_includes</code> in your root directory. In that folder, add a file there called <code class="highlighter-rouge">sidebar.html</code>.</p>
543
+
544
+ <p>Remove your sidebar code from your <code class="highlighter-rouge">default.html</code> layout and insert it into the <code class="highlighter-rouge">sidebar.html</code> file.</p>
545
+
546
+ <p>Where the sidebar code previously existed in <code class="highlighter-rouge">default.html</code>, pull in your “include” like this:</p>
547
+
548
+ <div class="language-liquid highlighter-rouge">
549
+ <pre class="highlight"><code><span class="p">{%</span><span class="w"> </span><span class="nt">include</span><span class="w"> </span><span class="na">sidebar</span><span class="p">.</span><span class="na">html</span><span class="w"> </span><span class="p">%}</span>
550
+ </code></pre>
551
+ </div>
552
+
553
+ <p>You can break up other elements of your theme like this, such as your header or footer. Then you can apply these common elements to other layout files. This way you won’t have duplicate code.</p>
554
+
555
+ <h2 id="10-rss-feed">10. RSS feed</h2>
556
+
557
+ <p>Your Jekyll site needs an RSS feed. Here’s the <a href="http://www.w3schools.com/xml/xml_rss.asp">basic RSS feed syntax</a>. To create an RSS file in Jekyll, create a file called <code class="highlighter-rouge">feed.xml</code> in your root directory and add the following:</p>
558
+
559
+ <div class="language-xml highlighter-rouge">
560
+ <pre class="highlight"><code>---
561
+ layout: null
562
+ ---
563
+
564
+ <span class="cp">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span>
565
+ <span class="nt">&lt;rss</span> <span class="na">version=</span><span class="s">"2.0"</span><span class="nt">&gt;</span>
566
+
567
+ <span class="nt">&lt;channel&gt;</span>
568
+ <span class="nt">&lt;title&gt;</span>{{ site.title }}<span class="nt">&lt;/title&gt;</span>
569
+ <span class="nt">&lt;link&gt;</span>{{ site.url }}<span class="nt">&lt;/link&gt;</span>
570
+ <span class="nt">&lt;description&gt;</span>{{ site.description }}<span class="nt">&lt;/description&gt;</span>
571
+ <span class="nt">&lt;lastBuildDate&gt;</span>{{ site.time | date_to_rfc822 }}<span class="nt">&lt;/lastBuildDate&gt;</span>
572
+ {% for post in site.posts %}
573
+ <span class="nt">&lt;item&gt;</span>
574
+ <span class="nt">&lt;description&gt;</span>
575
+ {{ post.content | escape | truncate: '400' }}
576
+ <span class="nt">&lt;/description&gt;</span>
577
+ <span class="nt">&lt;pubDate&gt;</span>{{ post.date | date_to_rfc822 }}<span class="nt">&lt;/pubDate&gt;</span>
578
+ <span class="nt">&lt;guid&gt;</span>
579
+ {{ post.url | prepend: site.url }}
580
+ <span class="nt">&lt;/guid&gt;</span>
581
+ <span class="nt">&lt;/item&gt;</span>
582
+ {% endfor %}
583
+ <span class="nt">&lt;/channel&gt;</span>
584
+ <span class="nt">&lt;/rss&gt;</span>
585
+ </code></pre>
586
+ </div>
587
+
588
+ <p>Make sure your <code class="highlighter-rouge">_config.yml</code> file has properties for <code class="highlighter-rouge">title</code>, <code class="highlighter-rouge">url</code>, and <code class="highlighter-rouge">description</code>.</p>
589
+
590
+ <p>This code uses a <code class="highlighter-rouge">for</code> loop to look through your last 20 posts. The content from the posts gets escaped and truncated to the last 400 characters using <a href="https://help.shopify.com/themes/liquid/filters">Liquid filters</a>.</p>
591
+
592
+ <p>In your <code class="highlighter-rouge">default.html</code> layout, look for a reference to the RSS or Atom feed in your header, and replace it with a reference to the file you just created. For example:</p>
593
+
594
+ <div class="language-html highlighter-rouge">
595
+ <pre class="highlight"><code><span class="nt">&lt;link</span> <span class="na">rel=</span><span class="s">"alternate"</span> <span class="na">type=</span><span class="s">"application/rss+xml"</span> <span class="na">href=</span><span class="s">"{{ site.url }}/feed.xml"</span> <span class="na">title=</span><span class="s">"{{ site.title }}"</span><span class="nt">&gt;</span>
596
+ </code></pre>
597
+ </div>
598
+
599
+ <p>You can also auto-generate your posts feed by adding a gem called <a href="https://help.github.com/articles/atom-rss-feeds-for-github-pages/"><code class="highlighter-rouge">jekyll-feed</code></a>. This gem will also work on GitHub Pages.</p>
600
+
601
+ <h2 id="11-add-a-sitemap">11. Add a sitemap</h2>
602
+
603
+ <p>Finally, add a <a href="https://www.sitemaps.org/protocol.html">site map</a>. Create a <code class="highlighter-rouge">sitemap.xml</code> file in your root directory and add this code:</p>
604
+
605
+ <div class="language-xml highlighter-rouge">
606
+ <pre class="highlight"><code>---
607
+ layout: null
608
+ search: exclude
609
+ ---
610
+
611
+ <span class="cp">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</span>
612
+ <span class="nt">&lt;urlset</span> <span class="na">xmlns=</span><span class="s">"http://www.sitemaps.org/schemas/sitemap/0.9"</span><span class="nt">&gt;</span>
613
+
614
+ {% for page in site.pages %}
615
+ <span class="nt">&lt;url&gt;</span>
616
+ <span class="nt">&lt;loc&gt;</span>{{page.url}}<span class="nt">&lt;/loc&gt;</span>
617
+ <span class="nt">&lt;lastmod&gt;</span>{{site.time | date: '%Y-%m-%d' }}<span class="nt">&lt;/lastmod&gt;</span>
618
+ <span class="nt">&lt;changefreq&gt;</span>daily<span class="nt">&lt;/changefreq&gt;</span>
619
+ <span class="nt">&lt;priority&gt;</span>0.5<span class="nt">&lt;/priority&gt;</span>
620
+ <span class="nt">&lt;/url&gt;</span>
621
+ {% endfor %}
622
+
623
+ {% for post in site.posts %}
624
+ <span class="nt">&lt;url&gt;</span>
625
+ <span class="nt">&lt;loc&gt;</span>{{post.url}}<span class="nt">&lt;/loc&gt;</span>
626
+ <span class="nt">&lt;lastmod&gt;</span>{{site.time | date: '%Y-%m-%d' }}<span class="nt">&lt;/lastmod&gt;</span>
627
+ <span class="nt">&lt;changefreq&gt;</span>daily<span class="nt">&lt;/changefreq&gt;</span>
628
+ <span class="nt">&lt;priority&gt;</span>0.5<span class="nt">&lt;/priority&gt;</span>
629
+ <span class="nt">&lt;/url&gt;</span>
630
+ {% endfor %}
631
+
632
+ <span class="nt">&lt;/urlset&gt;</span>
633
+ </code></pre>
634
+ </div>
635
+
636
+ <p>Again, we’re using a <code class="highlighter-rouge">for</code> loop here to iterate through all posts and pages to add them to the sitemap.</p>
637
+
638
+ <p>You can also auto-generate your sitemap by adding a gem called <a href="https://help.github.com/articles/sitemaps-for-github-pages/"><code class="highlighter-rouge">jekyll-sitemap</code></a>. This gem will also work on GitHub Pages.</p>
639
+
640
+ <h2 id="12-add-external-services">12. Add external services</h2>
641
+
642
+ <p>For other services you might need (such as contact forms, search, comments, and more), look for third-party services. For example, you might use the following:</p>
643
+
644
+ <ul>
645
+ <li>For comments: <a href="https://disqus.com/">Disqus</a>
646
+ </li>
647
+ <li>For a newsletter: <a href="https://tinyletter.com/">Tinyletter</a>
648
+ </li>
649
+ <li>For contact forms: <a href="https://www.wufoo.com/">Wufoo</a>
650
+ </li>
651
+ <li>For search: <a href="https://community.algolia.com/docsearch/">Algolia Docsearch</a>
652
+ </li>
653
+ </ul>
654
+
655
+ <p>For more details on services for static sites, see the <a href="https://learn.cloudcannon.com/jekyll-third-parties/">Third Parties</a> list and tutorials from CloudCannon.</p>
656
+
657
+ <p>Your Jekyll pages consist of HTML, CSS, and JavaScript, so pretty much any code you need to embed will work without a problem.</p>
658
+
659
+ <p>As you integrate code for these services, note that <strong>if a page in your Jekyll site doesn’t have front matter tags, Jekyll won’t process any of the content in that page.</strong> The page will just be passed to the <code class="highlighter-rouge">_site</code> folder when you build your site.</p>
660
+
661
+ <p>If you do want Jekyll to process some page content (for example, to populate a variable that you define in your site’s config file), just add front matter tags to the page. If you don’t want any layout applied to the page, specify <code class="highlighter-rouge">layout: null</code> like this:</p>
662
+
663
+ <div class="highlighter-rouge">
664
+ <pre class="highlight"><code>---
665
+ layout: null
666
+ ---
667
+ </code></pre>
668
+ </div>
669
+
670
+ <h2 id="13-conclusion">13. Conclusion</h2>
671
+
672
+ <p>Although websites can implement more sophisticated features and functionality, we’ve covered the basics in this tutorial. You now have a fully functional Jekyll site.</p>
673
+
674
+ <p>To deploy your site, consider using <a href="https://pages.github.com/">GitHub Pages</a>, <a href="https://www.netlify.com/">Netlify</a>, <a href="https://aws.amazon.com/s3/">Amazon AWS S3</a> using the <a href="https://github.com/laurilehmijoki/s3_website">s3_website plugin</a>, or just FTP your files to your web server.</p>
675
+
676
+ <p>You can also package your layouts, includes and assets into a Ruby <code class="highlighter-rouge">gem</code> and <a href="/docs/themes/#creating-a-theme">make it a Jekyll theme</a>.</p>
677
+
678
+ <h2 id="additional-resources">Additional resources</h2>
679
+
680
+ <p>Here are some additional tutorials on creating Jekyll sites:</p>
681
+
682
+ <ul>
683
+ <li><a href="http://jekyll.tips/jekyll-casts/converting-a-static-site-to-jekyll/">Convert a static site to Jekyll</a></li>
684
+ <li><a href="https://css-tricks.com/building-a-jekyll-site-part-1-of-3/">Building a Jekyll Site – Part 1 of 3: Converting a Static Website To Jekyll</a></li>
685
+ </ul>
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+ <div class="section-nav">
709
+ <div class="left align-right">
710
+
711
+
712
+
713
+ <a href="/tutorials/custom-404-page/" class="prev">Back</a>
714
+
715
+ </div>
716
+ <div class="right align-left">
717
+
718
+ <span class="next disabled">Next</span>
719
+
720
+ </div>
721
+ </div>
722
+ <div class="clear"></div>
723
+
724
+ </article>
725
+ </div>
726
+
727
+ <div class="unit one-fifth hide-on-mobiles">
728
+ <aside>
729
+
730
+ <h4>Tutorials</h4>
731
+
732
+ <ul>
733
+
734
+
735
+
736
+ <li class=""><a href="/tutorials/home/">Tutorials</a></li>
737
+
738
+
739
+
740
+ <li class=""><a href="/tutorials/navigation/">Navigation</a></li>
741
+
742
+
743
+
744
+ <li class=""><a href="/tutorials/orderofinterpretation/">Order of interpretation</a></li>
745
+
746
+
747
+
748
+ <li class=""><a href="/tutorials/custom-404-page/">Custom 404 Page</a></li>
749
+
750
+
751
+
752
+ <li class="current"><a href="/tutorials/convert-site-to-jekyll/">Convert an HTML site to Jekyll</a></li>
753
+
754
+ </ul>
755
+
756
+
757
+
758
+ </aside>
759
+ </div>
760
+
761
+
762
+ <div class="clear"></div>
763
+
764
+ </div>
765
+ </section>
766
+
767
+
768
+ <footer>
769
+ <div class="grid">
770
+ <div class="unit one-third center-on-mobiles">
771
+ <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>
772
+ </div>
773
+ <div class="unit two-thirds align-right center-on-mobiles">
774
+ <p>
775
+ Proudly hosted by
776
+ <a href="https://github.com">
777
+ <img src="/img/footer-logo.png" width="100" height="30" alt="GitHub • Social coding">
778
+ </a>
779
+ </p>
780
+ </div>
781
+ </div>
782
+ </footer>
783
+
784
+ <script>
785
+ var anchorForId = function (id) {
786
+ var anchor = document.createElement("a");
787
+ anchor.className = "header-link";
788
+ anchor.href = "#" + id;
789
+ anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
790
+ anchor.title = "Permalink";
791
+ return anchor;
792
+ };
793
+
794
+ var linkifyAnchors = function (level, containingElement) {
795
+ var headers = containingElement.getElementsByTagName("h" + level);
796
+ for (var h = 0; h < headers.length; h++) {
797
+ var header = headers[h];
798
+
799
+ if (typeof header.id !== "undefined" && header.id !== "") {
800
+ header.appendChild(anchorForId(header.id));
801
+ }
802
+ }
803
+ };
804
+
805
+ document.onreadystatechange = function () {
806
+ if (this.readyState === "complete") {
807
+ var contentBlock = document.getElementsByClassName("docs")[0] || document.getElementsByClassName("news")[0];
808
+ if (!contentBlock) {
809
+ return;
810
+ }
811
+ for (var level = 1; level <= 6; level++) {
812
+ linkifyAnchors(level, contentBlock);
813
+ }
814
+ }
815
+ };
816
+ </script>
817
+
818
+
819
+ <!-- Gauges (http://get.gaug.es/) -->
820
+ <script>
821
+ var _gauges = _gauges || [];
822
+ (function() {
823
+ var t = document.createElement('script');
824
+ t.type = 'text/javascript';
825
+ t.async = true;
826
+ t.id = 'gauges-tracker';
827
+ t.setAttribute('data-site-id', '503c5af6613f5d0f19000027');
828
+ t.src = '//secure.gaug.es/track.js';
829
+ var s = document.getElementsByTagName('script')[0];
830
+ s.parentNode.insertBefore(t, s);
831
+ })();
832
+ </script>
833
+
834
+
835
+
836
+ <!-- Google Analytics (https://www.google.com/analytics) -->
837
+ <script>
838
+ !function(j,e,k,y,l,L){j.GoogleAnalyticsObject=y,j[y]||(j[y]=function(){
839
+ (j[y].q=j[y].q||[]).push(arguments)}),j[y].l=+new Date,l=e.createElement(k),
840
+ L=e.getElementsByTagName(k)[0],l.src='//www.google-analytics.com/analytics.js',
841
+ L.parentNode.insertBefore(l,L)}(window,document,'script','ga');
842
+
843
+ ga('create', 'UA-50755011-1', 'jekyllrb.com');
844
+ ga('send', 'pageview');
845
+
846
+ </script>
847
+
848
+
849
+
850
+ </body>
851
+ </html>