Compare commits

..

391 Commits

Author SHA1 Message Date
Mike Neumegen
b87eb8f612 fix conflicts 2018-11-05 08:48:30 -08:00
Mike Neumegen
3fc4cc265c new design init 2018-11-05 08:12:34 -08:00
olivia hugger
22d9936042 Merge pull request #7354 from jekyll/add-3.8.5-post
Add 3.8.5 post
2018-11-04 21:23:03 +01:00
olivia
271e476e67 reflect 3.8.5 release 2018-11-04 21:22:28 +01:00
olivia
d0c1cde922 Add 3.8.5 post 2018-11-04 21:07:14 +01:00
olivia hugger
564f7735b3 test for stable and backport branches on travis 2018-11-04 20:41:10 +01:00
jekyllbot
d971e39b4f Update history to reflect merge of #6727 [ci skip] 2018-11-04 14:03:21 -05:00
Ashwin Maroli
d926ebf688 Incorporate relative_url filter in link tag (#6727)
Merge pull request 6727
2018-11-04 14:03:18 -05:00
jekyllbot
1825813c93 Update history to reflect merge of #7250 [ci skip] 2018-11-04 14:02:02 -05:00
Ashwin Maroli
592b530de1 Re-implement handling Liquid blocks in excerpts (#7250)
Merge pull request 7250
2018-11-04 14:02:00 -05:00
jekyllbot
b586bed0ee Update history to reflect merge of #7273 [ci skip] 2018-10-31 13:10:21 -04:00
Ashwin Maroli
f0af098abe Memoize the return value of Site#documents (#7273)
Merge pull request 7273
2018-10-31 13:10:19 -04:00
jekyllbot
501d0253fa Update history to reflect merge of #7343 [ci skip] 2018-10-28 11:39:34 -04:00
Frank Taillandier
c9dda7ad50 docs: minimize rendering count (#7343)
Merge pull request 7343
2018-10-28 11:39:32 -04:00
jekyllbot
7d9667f13f Update history to reflect merge of #7304 [ci skip] 2018-10-28 06:08:34 -04:00
Ashwin Maroli
d67cbb4e5f Load config file from within current theme-gem (#7304)
Merge pull request 7304
2018-10-28 06:08:32 -04:00
jekyllbot
56c35f1a7d Update history to reflect merge of #7316 [ci skip] 2018-10-28 06:04:29 -04:00
Ashwin Maroli
9152b1c9b8 Measure the no. of times a template gets rendered (#7316)
Merge pull request 7316
2018-10-28 06:04:27 -04:00
Frank Taillandier
fbec40589d docs: exclude .jekyll-cache
Stop regenerating: files in  .jekyll-cache
2018-10-28 06:31:11 +01:00
jekyllbot
d492766220 Update history to reflect merge of #7276 [ci skip] 2018-10-28 01:12:05 -04:00
Ashwin Maroli
ea8ac3a7fa Memoize Site#post_attr_hash (#7276)
Merge pull request 7276
2018-10-28 01:12:04 -04:00
jekyllbot
266a8bb746 Update history to reflect merge of #7342 [ci skip] 2018-10-27 18:33:44 -04:00
Aidan Fitzgerald
4bbbb8d3e2 Remove redundant instruction comment (#7342)
Merge pull request 7342
2018-10-27 18:33:43 -04:00
jekyllbot
587111ec9f Update history to reflect merge of #7338 [ci skip] 2018-10-26 09:43:42 -04:00
Ashwin Maroli
8d80ada92b Bump RuboCop to v0.60.x (#7338)
Merge pull request 7338
2018-10-26 09:43:40 -04:00
Frank Taillandier
41c25f30e1 style: commas [ci skip]
Co-Authored-By: Ashwin Maroli <ashmaroli@users.noreply.github.com>
2018-10-26 15:31:20 +02:00
Frank Taillandier
bc11acc7b1 docs: use YAML data for paginator obkect 2018-10-26 15:00:17 +02:00
Frank Taillandier
9ff6a24a06 docs: variables table as include
Co-Authored-By: Ashwin Maroli <ashmaroli@users.noreply.github.com>
2018-10-24 17:23:00 +02:00
Frank Taillandier
29ba846f9b Merge pull request #7336 from jekyll/docs/data-variables
docs: Page variables as YAML data
2018-10-24 16:09:01 +02:00
Ashwin Maroli
75f1bccaa4 Adjust whitespace 2018-10-24 19:21:30 +05:30
Frank Taillandier
a7a9c52ae6 docs: Page variables as YAML data 2018-10-24 14:31:30 +02:00
jekyllbot
4ac66931d0 Update history to reflect merge of #7335 [ci skip] 2018-10-24 07:08:03 -04:00
Ashwin Maroli
7422b741c1 Document Jekyll Filters with YAML data (#7335)
Merge pull request 7335
2018-10-24 07:08:00 -04:00
Frank Taillandier
fe74976942 Merge pull request #7334 from ashmaroli/liquid-filters-template
Liquid templating to DRY content
2018-10-24 09:33:16 +02:00
Ashwin Maroli
6413df69e5 Liquid templating to DRY content 2018-10-24 08:28:07 +05:30
Frank Taillandier
bd623967ff docs: fix link to liquid filter 2018-10-24 01:26:06 +02:00
jekyllbot
3987256119 Update history to reflect merge of #7333 [ci skip] 2018-10-23 19:20:30 -04:00
Frank Taillandier
2b146a64fc docs: list all standard liquid filters (#7333)
Merge pull request 7333
2018-10-23 19:20:28 -04:00
olivia hugger
f3c85d4095 Merge pull request #7319 from jekyll/add-tidelift
Add Tidelift to site sponsors
2018-10-19 23:49:07 +02:00
jekyllbot
ecaefdb991 Update history to reflect merge of #7326 [ci skip] 2018-10-19 16:29:16 -04:00
Ashwin Maroli
c7a99f276c Revert "Cache converter in renderer" (#7326)
Merge pull request 7326
2018-10-19 16:29:14 -04:00
jekyllbot
5925c1a531 Update history to reflect merge of #7327 [ci skip] 2018-10-19 15:42:58 -04:00
Brett C
1530e246d8 grammar change (#7327)
Merge pull request 7327
2018-10-19 15:42:56 -04:00
jekyllbot
b3a7ba5a26 Update history to reflect merge of #7302 [ci skip] 2018-10-19 11:35:44 -04:00
Mario
ad7a5c0121 Skip processing posts that can not be read (#7302)
Merge pull request 7302
2018-10-19 11:35:42 -04:00
Frank Taillandier
7a1254563a Docs: reorganize README
Put things in order: getting started, diving in, then asking for help 😄
2018-10-18 14:04:09 +02:00
jekyllbot
2d14125d53 Update history to reflect merge of #7325 [ci skip] 2018-10-18 07:50:47 -04:00
_94gsc
885f76f84e Add a link to Giraffe Academy's tutorial (#7325)
Merge pull request 7325
2018-10-18 07:50:46 -04:00
olivia
8c9dcfee66 add final newline 2018-10-17 15:01:16 +02:00
olivia
42ecb661e4 add footer section for tidelift instead 2018-10-17 14:57:18 +02:00
olivia
bf02c401a3 add tidelift to site sponsors 2018-10-17 12:08:36 +02:00
Frank Taillandier
fd6e01fd6a docs: tweak capture delay [ci-skip]
Screenshots are better now but with Lazyloading it feels really slow. 🐢
Ideally we'd cache and use the former screenshot as placeholder and replace it with the newer version.
2018-10-12 19:32:50 +02:00
Frank Taillandier
77bc82b92f docs: add a bit of delay before capture [ci-skip]
Some images in the showcase show not fully loaded pages. A bit of delay should help.

Documentation: https://docs.capture.techulus.in/docs/screenshot-options
2018-10-12 19:24:49 +02:00
Frank Taillandier
f65bcd9920 docs: update showcase [ci-skip] 2018-10-12 19:11:56 +02:00
olivia hugger
a28fc8531a update my email in the sponsoring post 2018-10-12 19:01:40 +02:00
olivia hugger
5779b29855 fix typo in blank site template 2018-10-12 13:01:38 +02:00
jekyllbot
749415c47f Update history to reflect merge of #7310 [ci skip] 2018-10-12 06:57:47 -04:00
jekyllbot
37baaec83e feat: enhance --blank scaffolding (#7310)
Merge pull request 7310
2018-10-12 06:57:45 -04:00
jekyllbot
1bb7f03e44 Update history to reflect merge of #7312 [ci skip] 2018-10-10 17:15:42 -04:00
XhmikosR
f6f6a5661d Update appveyor.yml (#7312)
Merge pull request 7312
2018-10-10 17:15:41 -04:00
jekyllbot
153f24c4e4 Update history to reflect merge of #7307 [ci skip] 2018-10-09 20:21:40 -04:00
Jordan Morgan
2966b7ff94 "This restricts you..." to "This restricts your" (#7307)
Merge pull request 7307
2018-10-09 20:21:39 -04:00
jekyllbot
5795bf08fb Update history to reflect merge of #7306 [ci skip] 2018-10-09 18:13:26 -04:00
Jordan Morgan
3b4eb69d22 Added missing semicolon (#7306)
Merge pull request 7306
2018-10-09 18:13:24 -04:00
jekyllbot
148ac25190 Update history to reflect merge of #7300 [ci skip] 2018-10-07 04:50:18 -04:00
Preston Lim
51fe430fdd Add Isomer to showcase (#7300)
Merge pull request 7300
2018-10-07 04:50:17 -04:00
jekyllbot
7eca92adf8 Update history to reflect merge of #7299 [ci skip] 2018-10-05 09:43:07 -04:00
argv-minus-one
052dbf8b98 Automatically load _config.toml (#7299)
Merge pull request 7299
2018-10-05 09:43:06 -04:00
jekyllbot
fec13b3d05 Update history to reflect merge of #7136 [ci skip] 2018-10-03 11:29:48 -04:00
Ashwin Maroli
a2d61f976f Optimize rendering Liquid templates (#7136)
Merge pull request 7136
2018-10-03 11:29:45 -04:00
jekyllbot
440374aa4d Update history to reflect merge of #7190 [ci skip] 2018-10-02 07:27:16 -04:00
Pat Hawks
139ea09967 Do not dump undumpable objects (#7190)
Merge pull request 7190
2018-10-02 07:27:15 -04:00
Frank Taillandier
28cb55c455 chore(history): rendered includes are still WIP 2018-10-02 11:36:25 +02:00
Frank Taillandier
1eeb89460e Update History.markdown 2018-10-02 11:19:26 +02:00
jekyllbot
2cd15712c7 Update history to reflect merge of #7108 [ci skip] 2018-10-02 04:55:46 -04:00
jekyllbot
15128418be Update history to reflect merge of #7183 [ci skip] 2018-10-02 04:16:51 -04:00
Pat Hawks
b8dfc9a32f Cache converter in renderer (#7183)
Merge pull request 7183
2018-10-02 04:16:49 -04:00
jekyllbot
0b90e536ab Update history to reflect merge of #7159 [ci skip] 2018-10-02 04:07:09 -04:00
Pat Hawks
18d33b1fd6 Cache converted markdown (#7159)
Merge pull request 7159
2018-10-02 04:07:08 -04:00
jekyllbot
93b5b57aea Update history to reflect merge of #7291 [ci skip] 2018-10-02 03:14:55 -04:00
Andy Alt
517eb749a0 Docs: Add link tag to item in RSS template (#7291)
Merge pull request 7291
2018-10-02 03:14:54 -04:00
jekyllbot
d667f12941 Update history to reflect merge of #7289 [ci skip] 2018-10-01 14:37:17 -04:00
Grzegorz Kaczorek
55dd39d580 Document converter methods (#7289)
Merge pull request 7289
2018-10-01 14:37:15 -04:00
jekyllbot
452c1c88d0 Update history to reflect merge of #7287 [ci skip] 2018-10-01 08:49:33 -04:00
Ashwin Maroli
faed9c4143 Drop support for jekyll-watch-1.4.0 and older (#7287)
Merge pull request 7287
2018-10-01 08:49:31 -04:00
jekyllbot
a70ed3713f Update history to reflect merge of #7285 [ci skip] 2018-09-30 11:03:03 -04:00
jekyllbot
05f109071d Remove default config for markdown (#7285)
Merge pull request 7285
2018-09-30 11:03:02 -04:00
Frank Taillandier
63deec3074 Add links to YAML cheatsheets
Fix #6054
2018-09-30 11:00:57 +02:00
jekyllbot
8dcb14c582 Update history to reflect merge of #7283 [ci skip] 2018-09-29 08:31:29 -04:00
Frank Taillandier
688d0734b8 Docs: more inclusive writing (#7283)
Merge pull request 7283
2018-09-29 08:31:28 -04:00
jekyllbot
94baf09753 Update history to reflect merge of #7282 [ci skip] 2018-09-28 18:43:27 -04:00
Andy Alt
6c6595bd1e tutorial/convert existing site.md/rss:add title tag to item (#7282)
Merge pull request 7282
2018-09-28 18:43:25 -04:00
Frank Taillandier
927a09b4c5 Add latest version for sidebar
props @pathawks
2018-09-28 09:24:22 +02:00
Frank Taillandier
997c9044d5 Thanks @parkr 🙏 2018-09-27 14:54:25 +02:00
Frank Taillandier
4a6edf4778 Typo 2018-09-27 14:47:22 +02:00
jekyllbot
3055992712 Update history to reflect merge of #7259 [ci skip] 2018-09-27 08:38:32 -04:00
Ashwin Maroli
00311d2638 Add Release Post for v3.6.3, v3.7.4 and v3.8.4 (#7259)
Merge pull request 7259
2018-09-27 08:38:30 -04:00
jekyllbot
353574307a Update history to reflect merge of #7118 [ci skip] 2018-09-27 08:29:48 -04:00
Ashwin Maroli
4707017936 Drop support for pygments as syntax-highlighter (#7118)
Merge pull request 7118
2018-09-27 08:29:46 -04:00
jekyllbot
deff194cbf Update history to reflect merge of #7278 [ci skip] 2018-09-26 15:20:53 -04:00
liv
d306ba74e1 update yajl-ruby (#7278)
Merge pull request 7278
2018-09-26 15:20:51 -04:00
jekyllbot
0d2394bdca Update history to reflect merge of #7277 [ci skip] 2018-09-26 10:18:58 -04:00
Ashwin Maroli
57da5c0e29 Check key in collections only if it isn't "posts" (#7277)
Merge pull request 7277
2018-09-26 10:18:57 -04:00
liv
44a8035d13 reorder doc change template 2018-09-24 19:37:46 +02:00
jekyllbot
ec47c9dd9d Update history to reflect merge of #7200 [ci skip] 2018-09-24 13:29:08 -04:00
Maxwell Gerber
b8cf387b71 Fix Contributors link (#7200)
Merge pull request 7200
2018-09-24 13:29:06 -04:00
jekyllbot
3fc1d5b54b Update history to reflect merge of #7182 [ci skip] 2018-09-24 13:27:46 -04:00
Ashwin Maroli
6eee8b7e06 Strip extra slashes via Jekyll.sanitized_path (#7182)
Merge pull request 7182
2018-09-24 13:27:44 -04:00
jekyllbot
ce05f9cb15 Update history to reflect merge of #7010 [ci skip] 2018-09-24 13:26:34 -04:00
Isaac Goodman
81792c29d3 Use OpenSSL instead of GnuTLS (#7010)
Merge pull request 7010
2018-09-24 13:26:32 -04:00
Frank Taillandier
a0c2e65ed7 add issue template for documentation 2018-09-24 18:46:52 +02:00
jekyllbot
4d293d3376 Update history to reflect merge of #7269 [ci skip] 2018-09-24 12:34:34 -04:00
liv
d83d3e880e Add more issue template(s) and pull request template (#7269)
Merge pull request 7269
2018-09-24 12:34:32 -04:00
jekyllbot
1e81243ef8 Update history to reflect merge of #7270 [ci skip] 2018-09-24 12:31:37 -04:00
Grzegorz Kaczorek
8a7ecfce36 Document two methods, simplify one of the methods (#7270)
Merge pull request 7270
2018-09-24 12:31:36 -04:00
jekyllbot
5267e0b215 Update history to reflect merge of #7267 [ci skip] 2018-09-24 12:29:57 -04:00
ikeji
0960ae0755 Ignore permission error of /proc/version (#7267)
Merge pull request 7267
2018-09-24 12:29:55 -04:00
jekyllbot
f043eeabc5 Update history to reflect merge of #7268 [ci skip] 2018-09-23 06:09:37 -04:00
Luis Guillermo Yáñez
e9aa4ff2c1 Update 10-deployment.md (#7268)
Merge pull request 7268
2018-09-23 06:09:36 -04:00
jekyllbot
05fdb6733f Update history to reflect merge of #7266 [ci skip] 2018-09-22 08:51:36 -04:00
Tobias
096afbeee4 environments.md: reference the build command options that allows multiple config files (#7266)
Merge pull request 7266
2018-09-22 08:51:34 -04:00
Frank Taillandier
e59ff78f9d docs: fix path to Ubuntu 2018-09-21 10:33:31 +02:00
Frank Taillandier
879a4c44f6 docs: install dependencies on Debian 2018-09-21 10:30:58 +02:00
Frank Taillandier
47ec61f9b5 docs: Linux, not Ubuntu 2018-09-21 09:14:13 +02:00
jekyllbot
141a7b784b Update history to reflect merge of #7262 [ci skip] 2018-09-20 09:49:41 -04:00
jekyllbot
88dbe5db8a chore(release): reflect latest patched releases (#7262)
Merge pull request 7262
2018-09-20 09:49:39 -04:00
jekyllbot
f692f0999c Update history to reflect merge of #7263 [ci skip] 2018-09-20 09:45:55 -04:00
Ashwin Maroli
88e0472160 Check if scope applies to type before given path (#7263)
Merge pull request 7263
2018-09-20 09:45:53 -04:00
jekyllbot
72dc3a56f3 Update history to reflect merge of #7260 [ci skip] 2018-09-19 14:02:45 -04:00
Jorie Tappa
2e1492da55 Fix a small grammar error/typo in the docs (#7260)
Merge pull request 7260
2018-09-19 14:02:44 -04:00
jekyllbot
1987c36f27 Update history to reflect merge of #7229 [ci skip] 2018-09-19 07:56:17 -04:00
jekyllbot
bd41ebb97b Update history to reflect merge of #6888 [ci skip] 2018-09-19 07:46:41 -04:00
Ashwin Maroli
352133f39b cache matched defaults sets for given parameters (#6888)
Merge pull request 6888
2018-09-19 07:46:39 -04:00
Frank Taillandier
a0dc346e6c Unlock bundler
https://github.com/bundler/bundler/issues/6629 has been fixed
2018-09-19 02:35:41 -07:00
jekyllbot
573c7edbc1 Update history to reflect merge of #7228 [ci skip] 2018-09-18 12:24:17 -04:00
Frank Taillandier
a22cd6d603 Unpublish unreleased Cache API tutorial 2018-09-15 11:44:37 +02:00
Frank Taillandier
cc363657cb Add Kotn website 2018-09-15 11:09:46 +02:00
Frank Taillandier
495456bb3c Note: building from scratch
Fix #7242
2018-09-13 10:54:32 +02:00
jekyllbot
20d0326d30 Update history to reflect merge of #7241 [ci skip] 2018-09-11 18:26:20 -04:00
Stephen Weiss
938b2f1d01 explicit location of where to create blog.html (#7241)
Merge pull request 7241
2018-09-11 18:26:19 -04:00
Frank Taillandier
f9c981e317 Redirects Fixes #7230 2018-09-11 08:42:12 +02:00
jekyllbot
5dedcd5fce Update history to reflect merge of #7238 [ci skip] 2018-09-10 12:19:32 -04:00
Chris Finazzo
74c185c461 Minor grammar fixes (#7238)
Merge pull request 7238
2018-09-10 12:19:30 -04:00
jekyllbot
4271495fca Update history to reflect merge of #7237 [ci skip] 2018-09-09 18:14:48 -04:00
jekyllbot
a28f54a59f Bump Rubocop to v0.59.0 (#7237)
Merge pull request 7237
2018-09-09 18:14:46 -04:00
jekyllbot
6d777a2a21 Update history to reflect merge of #7234 [ci skip] 2018-09-09 17:27:04 -04:00
Stephen Weiss
d6c1216244 clarified front matter requirement (#7234)
Merge pull request 7234
2018-09-09 17:27:02 -04:00
jekyllbot
874ec5c3e2 Update history to reflect merge of #7226 [ci skip] 2018-09-07 15:17:56 -04:00
Parker Moore
f1c87a9129 Security: fix include bypass of EntryFilter#filter symlink check (#7226)
Merge pull request 7226
2018-09-07 15:17:55 -04:00
liv
863a93f9ff update forestry's sponsor url 2018-09-06 13:07:01 +02:00
jekyllbot
27cade4a28 Update history to reflect merge of #7223 [ci skip] 2018-09-06 02:16:21 -04:00
Justin Vallelonga
e56bf80bfc removes quotes from markdown for assets (#7223)
Merge pull request 7223
2018-09-06 02:16:19 -04:00
Frank Taillandier
56dd010c82 Explain the help command 2018-09-05 10:37:24 +02:00
Frank Taillandier
0db83b5008 Update link 2018-09-04 16:50:03 +02:00
jekyllbot
28492e8401 Update history to reflect merge of #7217 [ci skip] 2018-09-03 16:38:14 -04:00
Bilawal Hameed
895e58b01b Add developer.spotify.com to the Jekyll Showcase (#7217)
Merge pull request 7217
2018-09-03 16:38:12 -04:00
Frank Taillandier
7d5479e52f Update showcase.yml 2018-09-03 15:38:40 +02:00
jekyllbot
0b21d67507 Update history to reflect merge of #7215 [ci skip] 2018-09-03 08:18:33 -04:00
Sundaram Kalyan Vedala
93507f02dc Fix minor grammatical error (#7215)
Merge pull request 7215
2018-09-03 08:18:32 -04:00
jekyllbot
8e5c5a4e8a Update history to reflect merge of #7213 [ci skip] 2018-09-03 04:07:12 -04:00
Ashwin Maroli
182327d49c Add cucumber feature to test include_relative tag (#7213)
Merge pull request 7213
2018-09-03 04:07:11 -04:00
jekyllbot
d626fc07c2 Update history to reflect merge of #7214 [ci skip] 2018-09-03 04:05:39 -04:00
Thanos Kolovos
f22425ad2a Add some minor improvements to image loading (#7214)
Merge pull request 7214
2018-09-03 04:05:38 -04:00
jekyllbot
5c61d69c94 Update history to reflect merge of #7211 [ci skip] 2018-09-02 14:01:12 -04:00
Vitor Oliveira
397d289cd2 Refactoring: Fix benchmark code smell (#7211)
Merge pull request 7211
2018-09-02 14:01:11 -04:00
Frank Taillandier
a693153755 Typo 2018-09-02 10:13:43 +02:00
Frank Taillandier
d684e390df jekyll-plugin topic on GitHub 2018-09-02 07:58:09 +02:00
jekyllbot
8c5ee833d4 Update history to reflect merge of #7210 [ci skip] 2018-09-02 01:50:16 -04:00
ninevra
418018a41f Correct stylesheet url in tutorial step 7 (#7210)
Merge pull request 7210
2018-09-02 01:50:14 -04:00
jekyllbot
1e9cd27dc4 Update history to reflect merge of #7205 [ci skip] 2018-09-01 04:39:58 -04:00
Mike Neumegen
805f438f24 New docs (#7205)
Merge pull request 7205
2018-09-01 04:39:57 -04:00
jekyllbot
3aa41a6055 Update history to reflect merge of #7203 [ci skip] 2018-08-29 13:20:55 -04:00
Ashwin Maroli
9f93fd092f Interpolate Jekyll::Page subclass on inspection (#7203)
Merge pull request 7203
2018-08-29 13:20:52 -04:00
jekyllbot
58f10f8e8a Update history to reflect merge of #7198 [ci skip] 2018-08-26 09:50:36 -04:00
Samuel Gruetter
bd9162a3bb installation instructions for Fedora (#7198)
Merge pull request 7198
2018-08-26 09:50:35 -04:00
jekyllbot
d3fba977f7 Update history to reflect merge of #7196 [ci skip] 2018-08-26 07:45:08 -04:00
Ma HongJun
a983bac6ca Resolve "Unable to locate package ruby2.4" error (#7196)
Merge pull request 7196
2018-08-26 07:45:06 -04:00
jekyllbot
5666e42474 Update history to reflect merge of #7199 [ci skip] 2018-08-26 07:38:02 -04:00
Anny
535637ba06 Add missing html end tag for code example in section 'For loops' (#7199)
Merge pull request 7199
2018-08-26 07:38:00 -04:00
jekyllbot
2913ab2891 Update history to reflect merge of #6854 [ci skip] 2018-08-25 06:07:29 -04:00
ExE Boss
9195b61d51 Add support for *.xhtml files (#6854)
Merge pull request 6854
2018-08-25 06:07:28 -04:00
jekyllbot
130292f15e Update history to reflect merge of #7189 [ci skip] 2018-08-21 10:39:33 -04:00
Ashwin Maroli
7f09faa954 Replace regex arg to :gsub with a string arg (#7189)
Merge pull request 7189
2018-08-21 10:39:31 -04:00
jekyllbot
3f62fd96d3 Update history to reflect merge of #7169 [ci skip] 2018-08-21 03:38:54 -04:00
Pat Hawks
24dd9f1457 Add Cache class (#7169)
Merge pull request 7169
2018-08-21 03:38:53 -04:00
jekyllbot
30568ca7b8 Update history to reflect merge of #7184 [ci skip] 2018-08-16 16:30:52 -04:00
Frank Taillandier
7791ad27a2 update .gitignore 2018-08-16 18:06:56 +02:00
liv
61bb9e9626 change team page phrasing 2018-08-15 21:32:12 +02:00
jekyllbot
19a7c1f06a Update history to reflect merge of #7181 [ci skip] 2018-08-14 08:07:21 -04:00
David J. Malan
176489b95c Corrected sample usage of postfiles (#7181)
Merge pull request 7181
2018-08-14 08:07:19 -04:00
jekyllbot
9a9c480831 Update history to reflect merge of #7179 [ci skip] 2018-08-09 06:30:21 -04:00
Victor Afanasev
5ec7324559 Add info how to deploy using pre-push git hook (#7179)
Merge pull request 7179
2018-08-09 06:30:20 -04:00
jekyllbot
4814b45847 Update history to reflect merge of #7173 [ci skip] 2018-08-06 15:02:19 -04:00
Ashwin Maroli
81392ae0ee Output Jekyll Version while debugging (#7173)
Merge pull request 7173
2018-08-06 15:02:17 -04:00
olivia
9136e9c394 add cloudcannon to site sponsors 2018-08-06 18:33:31 +02:00
liv
4d6edb3a26 update sponsor links 2018-08-04 19:38:08 +02:00
olivia
fb7a13ab1e add siteleaf to site sponsors 2018-08-03 13:31:41 +02:00
jekyllbot
87cc350313 Update history to reflect merge of #7168 [ci skip] 2018-08-02 15:05:10 -04:00
Ken Salomon
85be75160c Document TSV as a supported data file format (#7168)
Merge pull request 7168
2018-08-02 15:05:09 -04:00
Frank Taillandier
0ff2ef7d28 Merge pull request #7171 from ashmaroli/codeclimate-badges
Fix links in Code Climate badges
2018-08-02 20:58:26 +02:00
Ashwin Maroli
aaa723373b Fix links in Code Climate badges 2018-08-02 22:30:33 +05:30
liv
ce6173360d revert and manually use sponsor images 2018-08-02 09:24:04 +02:00
liv
b4b90a989c use the correct sponsor embed 2018-08-02 09:22:13 +02:00
liv
edbd9f3028 fix opencollective display in readme 2018-08-01 14:25:41 +02:00
liv
2eb0c5bc8d Merge pull request #7142 from monkeywithacupcake/patch-1
Display Open Collective backers and sponsors
2018-08-01 14:12:13 +02:00
liv
e51f9c346c Merge pull request #7143 from jekyll/sponsor
Prepare docs for sponsoring
2018-08-01 14:11:33 +02:00
liv
f0da10a77a update blog post date 2018-08-01 09:56:40 +02:00
jekyllbot
51629865de Update history to reflect merge of #7158 [ci skip] 2018-07-31 16:12:59 -04:00
Pat Hawks
6e980f3f6a Remove 'cache_dir' during jekyll clean (#7158)
Merge pull request 7158
2018-07-31 16:12:57 -04:00
jekyllbot
37c9347422 Update history to reflect merge of #7163 [ci skip] 2018-07-28 12:22:16 -04:00
Zhang Xiangze
0001895968 Add closing tags for <a> (#7163)
Merge pull request 7163
2018-07-28 12:22:15 -04:00
jekyllbot
d0f8c86d2f Update history to reflect merge of #7162 [ci skip] 2018-07-27 15:17:03 -04:00
Kevin Plattret
493757d7cf Add version badge for date filters with ordinal (#7162)
Merge pull request 7162
2018-07-27 15:17:00 -04:00
Pat Hawks
ef41eeb7d4 Name some of our Travis builds 2018-07-23 13:29:36 -05:00
jekyllbot
fe0a6caa7f Update history to reflect merge of #7146 [ci skip] 2018-07-20 19:22:46 -04:00
Ken Salomon
5701087e7b Do not process Liquid in post excerpt when disabled in front matter (#7146)
Merge pull request 7146
2018-07-20 19:22:44 -04:00
Ashwin Maroli
e9f78247de Merge branch 'master' into sponsor 2018-07-17 22:06:47 +05:30
jekyllbot
02a2f9460a Update history to reflect merge of #7144 [ci skip] 2018-07-17 10:42:12 -04:00
Ashwin Maroli
e61cc513e9 Lock Travis to Bundler-1.16.2 (#7144)
Merge pull request 7144
2018-07-17 10:42:10 -04:00
olivia
477dbb34f4 update with suggestions 2018-07-17 16:04:14 +02:00
olivia
f0e26e9c1a add intentions to post; change title 2018-07-17 15:58:16 +02:00
olivia
9f05275619 Merge branch 'master' into sponsor 2018-07-17 12:20:54 +02:00
olivia
89ac354d5a add blank newline 2018-07-17 12:20:09 +02:00
jess
5c41eb743f Update README.markdown
Hi, I'm making updates for Open Collective. Either you or a supporter signed this repo up for Open Collective. This pull request adds backers and sponsors from your Open Collective https://opencollective.com/jekyll❤️

It adds two badges at the top to show the latest number of backers and sponsors. It also adds placeholders so that the avatar/logo of new backers/sponsors can automatically be shown without having to update your README.md. [more info](https://github.com/opencollective/opencollective/wiki/Github-banner). See how it looks on this [repo](https://github.com/apex/apex#backers).

You can also add a postinstall script to let people know after npm|yarn install that you are welcoming donations (optional). [More info](https://github.com/OpenCollective/opencollective-cli)
You can also add a "Donate" button to your website and automatically show your backers and sponsors there with our widgets. Have a look here: https://opencollective.com/widgets

P.S: As with any pull request, feel free to comment or suggest changes. The only thing "required" are the placeholders on the README because we believe it's important to acknowledge the people in your community that are contributing (financially or with code!).

Thank you for your great contribution to the open source community. You are awesome! 🙌
And welcome to the open collective community! 😊

Come chat with us in the #opensource channel on https://slack.opencollective.com - great place to ask questions and share best practices with other open source sustainers!
2018-07-16 13:06:18 -07:00
jekyllbot
ad9fbeb4b1 Update history to reflect merge of #7140 [ci skip] 2018-07-16 15:04:22 -04:00
Ashwin Maroli
50e0379444 Initialize upgrading doc for v4.0 (#7140)
Merge pull request 7140
2018-07-16 15:04:19 -04:00
Frank Taillandier
c2649ce5fb Merge pull request #7141 from belhassen07/master
Add dev.to link
2018-07-16 17:14:37 +02:00
Frank Taillandier
4cfba70355 Merge branch 'master' into master 2018-07-16 17:14:22 +02:00
Belhassen Chelbi
6802ec93eb Add Dev.to website link 2018-07-16 15:13:26 +01:00
jekyllbot
707e48a412 Update history to reflect merge of #7139 [ci skip] 2018-07-16 09:58:28 -04:00
Belhassen Chelbi
ca2766c2a1 Add DEV Community's Jekyll tag to community page (#7139)
Merge pull request 7139
2018-07-16 09:58:26 -04:00
Belhassen Chelbi
af78a1a568 Add DEV Community's Jekyll tag to community page 2018-07-16 03:17:22 +01:00
jekyllbot
34a1b7aeef Update history to reflect merge of #7138 [ci skip] 2018-07-15 18:18:44 -04:00
104fps
b2c6d03b47 Update docs about post creation (#7138)
Merge pull request 7138
2018-07-15 18:18:43 -04:00
jekyllbot
e49f507e4f Update history to reflect merge of #7134 [ci skip] 2018-07-15 16:11:46 -04:00
Ashwin Maroli
506c764e1e fix incorrectly passed arguments to assert_equal (#7134)
Merge pull request 7134
2018-07-15 16:11:45 -04:00
jekyllbot
16e9820dac Update history to reflect merge of #7133 [ci skip] 2018-07-13 19:48:02 -04:00
Ken Salomon
c7ce7ae054 fix up refute_equal call (#7133)
Merge pull request 7133
2018-07-13 19:48:00 -04:00
jekyllbot
3be9e74942 Update history to reflect merge of #6824 [ci skip] 2018-07-13 12:12:51 -04:00
Pat Hawks
7a4b3fe03d Disable Liquid via front matter (#6824)
Merge pull request 6824
2018-07-13 12:12:49 -04:00
jekyllbot
b69196cad3 Update history to reflect merge of #7132 [ci skip] 2018-07-13 06:33:58 -04:00
Scott Killen
f9ada3ced6 Fix custom 404 page for GitHub pages (#7132)
Merge pull request 7132
2018-07-13 06:33:56 -04:00
jekyllbot
e10444abf7 Update history to reflect merge of #7128 [ci skip] 2018-07-12 10:21:25 -04:00
Ashwin Maroli
9adac3a11e Fix Rubocop offences in test files (#7128)
Merge pull request 7128
2018-07-12 10:21:23 -04:00
jekyllbot
0612542582 Update history to reflect merge of #7125 [ci skip] 2018-07-11 13:32:41 -04:00
jekyllbot
5d1f85928a Use a real theme in the example (#7125)
Merge pull request 7125
2018-07-11 13:32:39 -04:00
jekyllbot
dcbc443387 Update history to reflect merge of #7126 [ci skip] 2018-07-11 10:01:20 -04:00
Jakob Krigovsky
1801793035 Use .markdown for page templates (#7126)
Merge pull request 7126
2018-07-11 10:01:17 -04:00
jekyllbot
0e0960e2c3 Update history to reflect merge of #7127 [ci skip] 2018-07-11 09:14:16 -04:00
Nicolas Hoizey
402ee84abb Add the jekyll-firstimage filter plugin (#7127)
Merge pull request 7127
2018-07-11 09:14:14 -04:00
jekyllbot
5950a7c113 Update history to reflect merge of #7122 [ci skip] 2018-07-09 23:06:56 -04:00
Alex Wood
8846741ed2 Fix #7082 Add call to unused method (#7122)
Merge pull request 7122
2018-07-09 23:06:54 -04:00
jekyllbot
a1ea95d445 Update history to reflect merge of #7114 [ci skip] 2018-07-09 12:12:39 -04:00
Derek Smart
3650baa5db add jekyll-xml-source (#7114)
Merge pull request 7114
2018-07-09 12:12:37 -04:00
Pat Hawks
4c7dbb6915 Fix tests to have "expected value" as the first argument passed to assert_equal (#7104)
* assert_equal(exp, act)

* improve clarity of PageWithoutAFile test

* Hoist invariant out of loop
2018-07-09 11:10:35 -05:00
jekyllbot
c124937e69 Update history to reflect merge of #6608 [ci skip] 2018-07-09 01:25:34 -04:00
Kelly-Ann Green
f4fcfbdaa0 Update item_property to return numbers as numbers instead of strings (#6608)
Merge pull request 6608
2018-07-09 01:25:32 -04:00
jekyllbot
caa0846e7b Update history to reflect merge of #7095 [ci skip] 2018-07-08 14:12:13 -04:00
Alexey Kopytko
d57715031a Instructions to view theme’s files under Linux (#7095)
Merge pull request 7095
2018-07-08 14:12:11 -04:00
jekyllbot
565567ac08 Update history to reflect merge of #7105 [ci skip] 2018-07-08 14:04:43 -04:00
Christian Oliff
385bf36724 Updates to v1.4 (#7105)
Merge pull request 7105
2018-07-08 14:04:41 -04:00
Frank Taillandier
70f4d4908d Fix: Escape Liquid 2018-07-07 13:01:41 +02:00
jekyllbot
bfd58fa949 Update history to reflect merge of #7112 [ci skip] 2018-07-06 14:47:05 -04:00
Boris van Hoytema
43f4fc6c70 GitHub enables you to use themes from other repos (#7112)
Merge pull request 7112
2018-07-06 14:47:03 -04:00
jekyllbot
4d96e4b7bd Update history to reflect merge of #7024 [ci skip] 2018-06-29 15:36:39 -04:00
Tom Harvey
e418d9b2f4 Example of CircleCI deployment through CircleCI v2 (#7024)
Merge pull request 7024
2018-06-29 15:36:37 -04:00
olivia
2dcdc49a36 add sponsoring post 2018-06-28 19:17:50 +02:00
olivia
efb7819d2e add forestry logo 2018-06-28 17:55:29 +02:00
olivia
67331185c2 add sponsor display in website footer 2018-06-26 22:48:26 +02:00
jekyllbot
caae9d2eca Update history to reflect merge of #7078 [ci skip] 2018-06-25 21:43:35 -04:00
Ralph
cb84017bbe Update rubocop version to 0.57.x (#7078)
Merge pull request 7078
2018-06-25 21:43:33 -04:00
jekyllbot
0728ccf08b Update history to reflect merge of #7093 [ci skip] 2018-06-23 16:57:36 -04:00
jekyllbot
0b6962cfe9 Use assert_include (#7093)
Merge pull request 7093
2018-06-23 16:57:35 -04:00
jekyllbot
3204445d6f Update history to reflect merge of #7091 [ci skip] 2018-06-23 09:27:32 -04:00
Steven Westmoreland
76422b03b7 Adding jekyll-info plugin (#7091)
Merge pull request 7091
2018-06-23 09:27:30 -04:00
jekyllbot
76919eea3b Update history to reflect merge of #7089 [ci skip] 2018-06-21 05:25:52 -04:00
Anne Gentle
1d461224dd Update travis-ci.md (#7089)
Merge pull request 7089
2018-06-21 05:25:50 -04:00
jekyllbot
8b63fbed6b Update history to reflect merge of #7086 [ci skip] 2018-06-20 11:43:50 -04:00
Jan Pobořil
f0cbbbb304 Added plugin json-get. (#7086)
Merge pull request 7086
2018-06-20 11:43:48 -04:00
jekyllbot
55ea4c840b Update history to reflect merge of #7066 [ci skip] 2018-06-17 11:36:56 -04:00
jekyllbot
bbc9c99cf9 Remember to release docs gem (#7066)
Merge pull request 7066
2018-06-17 11:36:54 -04:00
Frank Taillandier
6dbf8f469c Merge pull request #7070 from chrisfinazzo/remove-gemnasium
Remove Gemnasium badge
2018-06-12 17:55:34 +02:00
chrisfinazzo
cd996387a5 Remove Gemnasium badge 2018-06-11 22:05:38 -04:00
jekyllbot
baf70295f9 Update history to reflect merge of #7049 [ci skip] 2018-06-05 13:27:04 -04:00
Patrick Favre-Bulle
10b23f7466 Add Hints for some Improved Travis Config in Doc (#7049)
Merge pull request 7049
2018-06-05 13:27:02 -04:00
jekyllbot
e47dad9d20 Update history to reflect merge of #7058 [ci skip] 2018-06-05 12:09:26 -04:00
Stephan Fischer
4baa0093ed [Doc] Fixing a small typo (#7058)
Merge pull request 7058
2018-06-05 12:09:24 -04:00
Frank Taillandier
d7cef0c6db Merge branch 'master' into release-3.8.3 2018-06-05 16:08:49 +02:00
Pat Hawks
4c2c33aefd Merge branch '3.8-stable' into master 2018-06-05 08:31:40 -05:00
jekyllbot
c6415ce081 Update history to reflect merge of #7046 [ci skip] 2018-06-02 13:56:29 -04:00
Keith Mifsud
0e360623cb Listed the keyll-target-blank plugin in plugins list. (#7046)
Merge pull request 7046
2018-06-02 13:56:27 -04:00
jekyllbot
035ea729ff Update history to reflect merge of #7050 [ci skip] 2018-06-02 06:50:34 -04:00
Frank Taillandier
6c771608e5 Update Rubocop's config (#7050)
Merge pull request 7050
2018-06-02 06:50:32 -04:00
jekyllbot
6805f1c342 Update history to reflect merge of #7044 [ci skip] 2018-05-31 12:13:47 -04:00
Parker Moore
1684905ec7 Allow i18n v0.9.5 and higher (#7044)
Merge pull request 7044
2018-05-31 12:13:45 -04:00
jekyllbot
d64493806c Update history to reflect merge of #7037 [ci skip] 2018-05-24 16:27:59 -04:00
Ali Thompson
e3b325931b Update drafts.md (#7037)
Merge pull request 7037
2018-05-24 16:27:57 -04:00
jekyllbot
a96f846bdb Update history to reflect merge of #7031 [ci skip] 2018-05-21 02:45:05 -04:00
Dan Friedman
97c28f5495 Updated to supported version (#7031)
Merge pull request 7031
2018-05-21 02:45:03 -04:00
jekyllbot
e932a1e27f Update history to reflect merge of #7027 [ci skip] 2018-05-20 12:30:17 -04:00
Philip Belesky
9aec161550 Fix --unpublished not affecting collection documents (#7027)
Merge pull request 7027
2018-05-20 12:30:15 -04:00
jekyllbot
9968df06b3 Update history to reflect merge of #6768 [ci skip] 2018-05-19 15:49:56 -04:00
Ana María Martínez Gómez
bc84603017 Useless privates removed (#6768)
Merge pull request 6768
2018-05-19 15:49:54 -04:00
Pat Hawks
784f2e2c0d Merge branch '3.8-stable' 2018-05-19 10:30:00 -05:00
jekyllbot
aed72f6464 Update history to reflect merge of #7015 [ci skip] 2018-05-17 18:22:33 -04:00
Kyle Barbour
b915c7577b Add whitespace control to LIQUID_TAG_REGEX (#7015)
Merge pull request 7015
2018-05-17 18:22:32 -04:00
jekyllbot
3bf940b7ee Update history to reflect merge of #7016 [ci skip] 2018-05-15 15:37:08 -04:00
Nikita Skalkin
fbaf591c12 Update rubocop version (#7016)
Merge pull request 7016
2018-05-15 15:37:05 -04:00
liv
007af750f4 Merge pull request #6995 from jekyll/oe-patch-1
Replace individual core team emails with link to team page
2018-05-15 17:39:23 +02:00
jekyllbot
62d297d4a0 Update history to reflect merge of #7011 [ci skip] 2018-05-14 10:05:24 -04:00
Martin Scharm
df0a5f7b0b added the CAT plugin to the plugin list (#7011)
Merge pull request 7011
2018-05-14 10:05:22 -04:00
Ashwin Maroli
8bb98632b4 Merge branch 'master' into oe-patch-1 2018-05-11 12:41:02 +05:30
jekyllbot
5a41149b7b Update history to reflect merge of #7007 [ci skip] 2018-05-10 18:28:40 -04:00
Ashwin Maroli
4f06767ac8 Load Rouge for TestKramdown (#7007)
Merge pull request 7007
2018-05-10 18:28:39 -04:00
Frank Taillandier
c6000597d9 Rephrase sentence 2018-05-10 18:35:18 +02:00
jekyllbot
b63036989a Update history to reflect merge of #7005 [ci skip] 2018-05-10 10:40:55 -04:00
penguinpet
9343d2e6bb proposed change for passive voice. (#7005)
Merge pull request 7005
2018-05-10 10:40:54 -04:00
jekyllbot
5d1823b604 Update history to reflect merge of #6988 [ci skip] 2018-05-09 09:44:38 -04:00
jekyllbot
149d5de59a Remove support for rdiscount (#6988)
Merge pull request 6988
2018-05-09 09:44:36 -04:00
jekyllbot
c2211eec0c Update history to reflect merge of #6985 [ci skip] 2018-05-09 07:52:13 -04:00
Andreas Möller
0b196ebd00 Mention _drafts in custom collections_dir note (#6985)
Merge pull request 6985
2018-05-09 07:52:11 -04:00
jekyllbot
56593bf897 Update history to reflect merge of #7003 [ci skip] 2018-05-09 07:45:21 -04:00
Frank Taillandier
e9b507a0df Textile is only supported through a converter plugin (#7003)
Merge pull request 7003
2018-05-09 07:45:18 -04:00
jekyllbot
a59eaff789 Update history to reflect merge of #7002 [ci skip] 2018-05-09 06:20:25 -04:00
Frank Taillandier
e2d8d3b92f List all static files variables (#7002)
Merge pull request 7002
2018-05-09 06:20:23 -04:00
olivia
66f8e748fe Replace individual core team emails 2018-05-07 19:52:59 +02:00
jekyllbot
0c5b74377b Update history to reflect merge of #6994 [ci skip] 2018-05-07 13:49:56 -04:00
Arjun Thakur
cec17d03f8 Updated nginx configuration for custom-404-page documentation (#6994)
Merge pull request 6994
2018-05-07 13:49:55 -04:00
Frank Taillandier
9e76d2b496 Merge pull request #6993 from ashmaroli/revert-docs-liquified-link
Revert update to docs meant for v4.0
2018-05-07 10:21:20 +02:00
Ashwin Maroli
192df096b0 Revert update to docs meant for v4.0 2018-05-07 13:43:41 +05:30
jekyllbot
694800270a Update history to reflect merge of #6990 [ci skip] 2018-05-07 03:45:34 -04:00
jekyllbot
7612056bed Update history to reflect merge of #6987 [ci skip] 2018-05-06 10:18:04 -04:00
Nikita Skalkin
e0758ba550 Remove support for Redcarpet (#6987)
Merge pull request 6987
2018-05-06 10:18:02 -04:00
Frank Taillandier
41fa9cda36 Fix tests
Co-Authored-By: ashmaroli <ashmaroli@users.noreply.github.com>
2018-05-04 14:14:44 +02:00
jekyllbot
be25b47486 Update history to reflect merge of #6978 [ci skip] 2018-05-03 10:03:57 -04:00
Ashwin Maroli
f8dfbd2f7b Drop support for older versions of Rouge (#6978)
Merge pull request 6978
2018-05-03 10:03:55 -04:00
jekyllbot
acdbf81476 Update history to reflect merge of #6551 [ci skip] 2018-05-03 08:53:32 -04:00
Ashwin Maroli
7e1afd32a5 Suggest re-running command with --trace on fail (#6551)
Merge pull request 6551
2018-05-03 08:53:30 -04:00
Frank Taillandier
1eff0214d1 Update index.html 2018-05-03 10:43:10 +02:00
Frank Taillandier
bb1889afe4 Update quickstart.md 2018-05-03 10:41:04 +02:00
jekyllbot
3eb73f2795 Update history to reflect merge of #6269 [ci skip] 2018-05-02 19:58:14 -04:00
Alexey Pelykh
b95151c4a7 Liquefied link tag (#6269)
Merge pull request 6269
2018-05-02 19:58:12 -04:00
jekyllbot
c0ae27f068 Update history to reflect merge of #6926 [ci skip] 2018-05-02 16:59:34 -04:00
Lars Kanis
64677e7c36 Update Windows install docs (#6926)
Merge pull request 6926
2018-05-02 16:59:32 -04:00
jekyllbot
3899bf52f8 Update history to reflect merge of #6977 [ci skip] 2018-05-02 14:46:39 -04:00
Pat Hawks
15f1ed8c4f We are not using Ruby 2.2 anymore (#6977)
Merge pull request 6977
2018-05-02 14:46:37 -04:00
jekyllbot
b6201db17f Update history to reflect merge of #6976 [ci skip] 2018-05-02 12:14:21 -04:00
Nikita Skalkin
ed9e72db9e yajl-ruby update to v1.4.0 (#6976)
Merge pull request 6976
2018-05-02 12:14:19 -04:00
jekyllbot
a499018dc8 Update history to reflect merge of #6975 [ci skip] 2018-05-02 07:33:55 -04:00
Pat Hawks
c08b882717 Update instructions for releasing docs Gem (#6975)
Merge pull request 6975
2018-05-02 07:33:53 -04:00
Pat Hawks
b0a1c42222 Merge branch '3.8-stable' 2018-05-01 15:12:42 -05:00
jekyllbot
da6c4c488a Update history to reflect merge of #6956 [ci skip] 2018-05-01 13:57:27 -04:00
Karel Bílek
a80442ee87 Add version number for group_by_exp doc (#6956)
Merge pull request 6956
2018-05-01 13:57:25 -04:00
jekyllbot
305342ffa4 Update history to reflect merge of #6959 [ci skip] 2018-05-01 11:04:40 -04:00
Ashwin Maroli
b22e281bc5 Liquify documents unless published == false (#6959)
Merge pull request 6959
2018-05-01 11:04:38 -04:00
jekyllbot
5b37555835 Update history to reflect merge of #6931 [ci skip] 2018-05-01 09:33:53 -04:00
jekyllbot
95a103b882 bump i18n (#6931)
Merge pull request 6931
2018-05-01 09:33:51 -04:00
jekyllbot
12fa319ee4 Update history to reflect merge of #6967 [ci skip] 2018-05-01 08:37:46 -04:00
Pat Hawks
9461c900c0 Loggers should accept both numbers and symbols (#6967)
Merge pull request 6967
2018-05-01 08:37:45 -04:00
Pat Hawks
e00c8c72e9 Backported to 3.8-stable, NOT master 2018-04-30 19:52:50 -05:00
jekyllbot
3e8196fc7e Update history to reflect merge of #6970 [ci skip] 2018-04-30 20:49:18 -04:00
jekyllbot
eea203c77e Update history to reflect merge of #6951 [ci skip] 2018-04-30 20:00:13 -04:00
Ashwin Maroli
8c8e2db0e5 Memoize computing excerpt's relative_path (#6951)
Merge pull request 6951
2018-04-30 20:00:11 -04:00
jekyllbot
ebce53dd08 Update history to reflect merge of #6968 [ci skip] 2018-04-30 18:29:25 -04:00
030
34b710e133 [#6920] prevent that vendor folder will be committed (#6968)
Merge pull request 6968
2018-04-30 18:29:23 -04:00
jekyllbot
f686b244cf Update history to reflect merge of #6969 [ci skip] 2018-04-30 15:40:13 -04:00
Chris Finazzo
739411ff3b Fix typo (#6969)
Merge pull request 6969
2018-04-30 15:40:11 -04:00
jekyllbot
c8eb0c1950 Update history to reflect merge of #6781 [ci skip] 2018-04-30 15:03:35 -04:00
Damien Solodow
27ca1282fa update windows doc (#6781)
Merge pull request 6781
2018-04-30 15:03:34 -04:00
jekyllbot
b22915fe22 Update history to reflect merge of #6770 [ci skip] 2018-04-30 15:01:00 -04:00
Ashwin Maroli
cf6d60b145 remove unnecessary Jekyll::Page constant (#6770)
Merge pull request 6770
2018-04-30 15:00:58 -04:00
jekyllbot
c60dd66db5 Update history to reflect merge of #6560 [ci skip] 2018-04-30 11:44:50 -04:00
Ashwin Maroli
c2851766c5 Drop support for Ruby 2.1 and 2.2 (#6560)
Merge pull request 6560
2018-04-30 11:44:48 -04:00
jekyllbot
c27533c75d Update history to reflect merge of #6511 [ci skip] 2018-04-30 11:19:45 -04:00
Ashwin Maroli
f81f1e8e1b remove unused error class (#6511)
Merge pull request 6511
2018-04-30 11:19:43 -04:00
jekyllbot
99da7cd940 Update history to reflect merge of #6927 [ci skip] 2018-04-30 10:59:35 -04:00
Chris Finazzo
3e32d12c45 WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
Merge pull request 6927
2018-04-30 10:59:33 -04:00
jekyllbot
3af8553c7c Update history to reflect merge of #6945 [ci skip] 2018-04-26 01:58:27 -04:00
Ashwin Maroli
7f9ac93e4f Fix rendering Liquid constructs in excerpts (#6945)
Merge pull request 6945
2018-04-26 01:58:25 -04:00
jekyllbot
4dd00fd354 Update history to reflect merge of #6949 [ci skip] 2018-04-22 22:11:47 -04:00
Monica Powell
3ee71c048c Updated casing of SaaS (#6949)
Merge pull request 6949
2018-04-22 22:11:45 -04:00
jekyllbot
77fe78eaf7 Update history to reflect merge of #6934 [ci skip] 2018-04-22 16:28:47 -04:00
olivia
0dede77a4a Add 4.0 development post (#6934)
Merge pull request 6934
2018-04-22 16:28:45 -04:00
jekyllbot
f9f5d5fa57 Update history to reflect merge of #6946 [ci skip] 2018-04-22 08:35:07 -04:00
Robert Riemann
d5c2ebe610 add liquid tag jekyll-flickr (#6946)
Merge pull request 6946
2018-04-22 08:35:05 -04:00
jekyllbot
f691121d2b Update history to reflect merge of #6932 [ci skip] 2018-04-20 15:24:41 -04:00
jekyllbot
29787c7eb7 use jekyll-compose if installed (#6932)
Merge pull request 6932
2018-04-20 15:24:39 -04:00
jekyllbot
83d950a4b7 Update history to reflect merge of #6925 [ci skip] 2018-04-20 05:29:24 -04:00
Mike Kasberg
5966e84313 Add Installation Instructions for Ubuntu (#6925)
Merge pull request 6925
2018-04-20 05:29:22 -04:00
jekyllbot
66a8a03124 Update history to reflect merge of #6849 [ci skip] 2018-04-19 11:08:03 -04:00
Ashwin Maroli
40d6ebd85e Release post for v3.8.0 (#6849)
Merge pull request 6849
2018-04-19 11:08:01 -04:00
370 changed files with 10145 additions and 10189 deletions

View File

@@ -25,7 +25,7 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull requests are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.

View File

@@ -1,78 +0,0 @@
<!--
Hi! Thanks for considering to file a bug with Jekyll. Please take the time to
answer the basic questions. You can convert `[ ]` into `[x]` to check boxes (or submit
and check.) If there is no need for certain fields like output and redirection, please delete
those headers before submitting. We know not all tickets require those steps.
Otherwise, please try to be as detailed as possible.
If you are unsure this is a bug in Jekyll, or this is a bug caused
by a plugin that isn't directly related to Jekyll, or if this is just
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Thanks!
-->
- [ ] I believe this to be a bug, not a question about using Jekyll.
- [ ] I updated to the latest Jekyll (or) if on GitHub Pages to the latest `github-pages`
- [ ] I ran `jekyll doctor` to check my configuration
- [ ] I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
- [ ] This is a feature request.
---
- [ ] I am on (or have tested on) ***macOS*** 10+
- [ ] I am on (or have tested on) ***Debian/Ubuntu*** GNU/Linux
- [ ] I am on (or have tested on) ***Fedora*** GNU/Linux
- [ ] I am on (or have tested on) ***Arch*** GNU/Linux
- [ ] I am on (or have tested on) ***Other*** GNU/Linux
- [ ] I am on (or have tested on) ***Windows*** 10+
<!--
Other GNU/Linux includes Scientific GNU/Linux, CentOS GNU/Linux, and others.
If you are on a minor sub-distro (such as ElementaryOS which does not diverge from
Ubuntu much, please check the parent distro. Kubuntu, Edubuntu, Lubuntu should
also be flagged as Ubuntu as their packages come from upstream Ubuntu.
-->
---
- [ ] I was trying to install.
- [ ] There is a broken Plugin API.
- [ ] I had an error on GitHub Pages, and I have reproduced it locally.
- [ ] I had an error on GitHub Pages, and GitHub Support said it was a Jekyll Bug.
- [ ] I had an error on GitHub Pages and I did not test it locally.
- [ ] I was trying to build.
- [ ] It was another bug.
## My Reproduction Steps
<!--
If this error occurred on GitHub Pages, please try to provide us with logs,
and look at them yourself, to determine if this is an actual Jekyll bug. In
the event you are unsure, file a ticket, however, when you do please provide
the logs (strip them of personal information.)
If you have trouble finding your logs, please email support@github.com and
they will happily help you. If you cannot find logs, please try your best to
replicate it locally because we cannot fix a problem if we do not know
exactly what caused it, or within a relatively close distance.
-->
<!--
Insert the steps you took to for this problem to exist. Such as the
directories you created and, the full command you ran, and include any
plugins you have installed, this is very important.
If your steps are complicated, you can also submit a GitHub
repository (please no zips, they will be removed and rejected by maintainers,)
and just supply a command for us to reproduce it ourselves.
-->
## The Output I Wanted
<!--
Insert the output from the command. Alter it as little as you can.
The minimum should be personal information. Though we normally don't log
anything like that so there should be no need to alter it.
-->

67
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,67 @@
---
name: Bug Report
about: Is something not working as expected?
---
<!--
Hi! Thanks for considering to file a bug with Jekyll. Please take the time to
answer the basic questions. Please try to be as detailed as possible.
If you are unsure this is a bug in Jekyll, or this is a bug caused
by a plugin that isn't directly related to Jekyll, or if this is just
a generic usage question, please consider asking your question at
https://talk.jekyllrb.com where non-bug questions go.
Thanks!
-->
<!--
Make sure that you've done all of these. If you're sure that the bug you're
reporting is only apparent in a previous version of Jekyll, please say so explicitly
in your description.
- I updated to the latest Jekyll (or) if on GitHub Pages to the latest `github-pages`
- I ran `jekyll doctor` to check my configuration
- I read the contributing document at https://jekyllrb.com/docs/contributing/
-->
## My Environment
<!--
Replace the values in the Version(s) column with the ones in your build. If you're not
using `github-pages`, just replace it with "No".
-->
| Software | Version(s) |
| ---------------- | ---------- |
| Operating System | |
| `jekyll` | Latest |
| `github-pages` | Latest |
---
## Expected Behaviour
<!--
What is it you expected to happen? This should be a description of how the
functionality you tried to use is supposed to work.
-->
## Current Behavior
<!--
Describe the details of the bug. Be sure to include any steps you took for the
problem to exist, such as the directories you created and the full command
you ran. Include any plugins you have installed (this is very important!).
You can include any logs you think relevant here. If you're using GitHub pages
and you're not sure where your logs are, please email support@github.com and
they will happily help you.
-->
## Code Sample
<!--
Please provide a code repository, gist, code snippet or sample files to
reproduce the issue.
-->

20
.github/ISSUE_TEMPLATE/documentation.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Documentation
about: Found a typo or something that isn't crystal clear in our docs?
---
<!-- Thanks for taking the time to open an issue and help us make Jekyll better! -->
## Motivation
<!-- Why should we update our docs? -->
## Suggestion
<!-- What should we do instead? -->
<!-- Thanks for taking the time to open an issue and help us make Jekyll better! -->

View File

@@ -0,0 +1,69 @@
---
name: Feature Request
about: Want us to add any features to Jekyll?
---
<!--
Hi! Thanks for considering to file a feature request with Jekyll. Please take the time to
answer the basic questions. Please try to be as detailed as possible.
Thanks!
-->
## Summary
<!--
A one-paragraph explanation of the feature.
-->
## Motivation
<!--
Why do you want to see this feature in Jekyll? What makes you sure that it should not be
implemented at the plugin level, but in Jekyll core? What use cases does it support?
NOTE: Please be mindful of the Jekyll philosophy (https://jekyllrb.com/philosophy/),
particularily Section 5. Think about if 90% of the users would benefit from your
feature request, and whether your feature would be better off in a plugin.
-->
## Guide-level explanation
<!--
Explain the proposal as if it was already included in the project and you
were teaching it to another programmer. That generally means:
- Introducing new named concepts.
- Explaining the feature largely in terms of examples.
- If applicable, provide sample error messages, deprecation warnings, or
migration guidance.
If this is a small feature, you may omit this section.
-->
## Reference-level explanation
<!--
This is the technical portion of the feature request. Explain the design in
sufficient detail that:
- Its interaction with other features is clear.
- It is reasonably clear how the feature would be implemented.
- Corner cases are dissected by example.
If you do not know how to answer this, you can omit it. No worries!
-->
## Drawbacks
<!--
Why should we *not* do this?
-->
## Unresolved Questions
<!--
What related issues do you consider out of scope for this feature that could be
addressed in the future independently of the solution that comes out of this
feature?
-->

11
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,11 @@
---
name: Question
about: Have any questions about how Jekyll works?
---
<!--
The Jekyll issue tracker IS NOT for usage questions! Please post your
question on our dedicated forum at https://talk.jekyllrb.com.
Thank you!
-->

43
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,43 @@
<!--
Thanks for creating a Pull Request! Before you submit, please make sure
you've done the following:
- I read the contributing document at https://jekyllrb.com/docs/contributing/
-->
<!--
Make our lives easier! Choose one of the following by uncommenting it:
-->
<!-- This is a 🐛 bug fix. -->
<!-- This is a 🙋 feature or enhancement. -->
<!-- This is a 🔦 documentation change. -->
<!--
Before you submit this pull request, make sure to have a look at the following
checklist. If you don't know how to do some of these, that's fine! Submit
your pull request and we will help you out on the way.
- I've added tests (if it's a bug, feature or enhancement)
- I've adjusted the documentation (if it's a feature or enhancement)
- The test suite passes (run `script/cibuild` to verify this)
-->
## Summary
<!--
Provide a description of what your pull request changes.
-->
## Context
<!--
Is this related to any GitHub issue(s)?
-->
## Semver Changes
<!--
Which semantic version change would you recommend?
If you don't know, feel free to omit it.
-->

30
.gitignore vendored
View File

@@ -1,23 +1,29 @@
*.gem
*.swp
*~
.DS_Store
.analysis
# Jekyll
_site/
.jekyll-cache
.jekyll-metadata
.sass-cache
# Ruby
.bundle/
.byebug_history
.jekyll-metadata
.ruby-gemset
.ruby-version
.sass-cache
/test/source/file_name.txt
/vendor
*.gem
Gemfile.lock
_site/
bin/
# Files
.analysis
.DS_Store
*.swp
*~
# Folders
/vendor
bbin/
bin/
coverage
gh-pages/
pkg/
site/_site/
test/dest
tmp/*

View File

@@ -8,9 +8,10 @@ Jekyll/NoPutsAllowed:
- rake/*.rake
AllCops:
TargetRubyVersion: 2.1
TargetRubyVersion: 2.3
Include:
- lib/**/*.rb
- test/**/*.rb
Exclude:
- bin/**/*
- exe/**/*
@@ -18,30 +19,14 @@ AllCops:
- script/**/*
- vendor/**/*
- tmp/**/*
Layout/AlignArray:
Enabled: false
Layout/AlignHash:
EnforcedHashRocketStyle: table
Layout/AlignParameters:
Enabled: false
Layout/EmptyLinesAroundAccessModifier:
Enabled: false
Layout/EmptyLinesAroundModuleBody:
Enabled: false
Layout/EndOfLine:
EnforcedStyle: native
Layout/ExtraSpacing:
AllowForAlignment: true
Layout/FirstParameterIndentation:
EnforcedStyle: consistent
Layout/IndentationWidth:
Severity: error
Layout/IndentArray:
EnforcedStyle: consistent
Layout/IndentHash:
EnforcedStyle: consistent
Layout/IndentHeredoc:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented
Layout/MultilineOperationIndentation:
@@ -55,10 +40,9 @@ Layout/EndAlignment:
Severity: error
Lint/UnreachableCode:
Severity: error
Lint/UselessAccessModifier:
Enabled: false
Lint/Void:
Enabled: false
Exclude:
- lib/jekyll/site.rb
Metrics/AbcSize:
Max: 21
Metrics/BlockLength:
@@ -66,22 +50,26 @@ Metrics/BlockLength:
- test/**/*.rb
- lib/jekyll/configuration.rb
- rake/*.rake
- jekyll.gemspec
Metrics/ClassLength:
Exclude:
- !ruby/regexp /features\/.*.rb$/
- !ruby/regexp /test\/.*.rb$/
Max: 300
- lib/jekyll/document.rb
- lib/jekyll/site.rb
- lib/jekyll/commands/serve.rb
- lib/jekyll/configuration.rb
Max: 240
Metrics/CyclomaticComplexity:
Max: 9
Exclude:
- lib/jekyll/utils.rb
- lib/jekyll/commands/serve.rb
Metrics/LineLength:
Exclude:
- !ruby/regexp /features\/.*.rb/
- Rakefile
- rake/*.rake
- Gemfile
- jekyll.gemspec
Max: 90
Max: 100
Severity: warning
Metrics/MethodLength:
CountComments: false
@@ -96,12 +84,14 @@ Metrics/PerceivedComplexity:
Naming/FileName:
Enabled: false
Naming/HeredocDelimiterNaming:
Enabled: false
Exclude:
- test/**/*.rb
Naming/MemoizedInstanceVariableName:
Exclude:
- lib/jekyll/page_without_a_file.rb
- lib/jekyll/drops/unified_payload_drop.rb
- lib/jekyll/convertible.rb
- lib/jekyll/drops/site_drop.rb
- lib/jekyll/drops/unified_payload_drop.rb
- lib/jekyll/page_without_a_file.rb
Naming/UncommunicativeMethodParamName:
AllowedNames:
- _
@@ -113,20 +103,19 @@ Security/YAMLLoad:
Exclude:
- !ruby/regexp /features\/.*.rb/
- !ruby/regexp /test\/.*.rb$/
Style/Alias:
Style/AccessModifierDeclarations:
Enabled: false
Style/Alias:
EnforcedStyle: prefer_alias_method
Style/AndOr:
Severity: error
Style/BracesAroundHashParameters:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Exclude:
- test/**/*.rb
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Style/Documentation:
Enabled: false
Exclude:
- !ruby/regexp /features\/.*.rb$/
Style/DoubleNegation:
Enabled: false
Style/FormatStringToken:
@@ -137,10 +126,6 @@ Style/GuardClause:
Style/HashSyntax:
EnforcedStyle: hash_rockets
Severity: error
Style/IfUnlessModifier:
Enabled: false
Style/InverseMethods:
Enabled: false
Style/MixinUsage:
Exclude:
- test/helper.rb
@@ -157,24 +142,21 @@ Style/PercentLiteralDelimiters:
"%w": "()"
"%W": "()"
"%x": "()"
Style/RedundantReturn:
Enabled: false
Style/RedundantSelf:
Enabled: false
Style/RegexpLiteral:
EnforcedStyle: percent_r
Style/RescueModifier:
Enabled: false
Style/SafeNavigation:
Exclude:
- lib/jekyll/document.rb
Style/SignalException:
EnforcedStyle: only_raise
Style/SingleLineMethods:
Enabled: false
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
Style/SymbolArray:
Enabled: false
EnforcedStyle: brackets
Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma
Style/TrailingCommaInHashLiteral:

View File

@@ -8,17 +8,16 @@ rvm:
- &ruby1 2.5.1
- &ruby2 2.4.4
- &ruby3 2.3.7
- &ruby4 2.2.10
- &jruby jruby-9.1.16.0
matrix:
include:
- rvm: *ruby1
env: TEST_SUITE=fmt
name: "🤖️ Code Format"
- rvm: *ruby1
env: TEST_SUITE=default-site
- rvm: *ruby1
env: ROUGE_VERSION=1.11.1 # runs everything with this version
name: "🏠️ Default Site"
exclude:
- rvm: *jruby
env: TEST_SUITE=cucumber
@@ -31,7 +30,8 @@ branches:
only:
- master
- themes
- /*-stable/
- /^.*-stable/
- /.*backport.*/
notifications:
slack:

View File

@@ -1,49 +1,46 @@
# Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
## Our Pledge
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Our Responsibilities
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting a project maintainer. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. Maintainers are obligated to
maintain confidentiality with regard to the reporter of an incident.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
## Enforcement
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting a project maintainer. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
[homepage]: https://www.contributor-covenant.org/
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

21
Gemfile
View File

@@ -5,11 +5,6 @@ gemspec :name => "jekyll"
gem "rake", "~> 12.0"
gem "rouge", ENV["ROUGE"] if ENV["ROUGE"]
# Dependency of jekyll-mentions. RubyGems in Ruby 2.1 doesn't shield us from this.
gem "activesupport", "~> 4.2", :groups => [:test_legacy, :site] if RUBY_VERSION < "2.2.2"
group :development do
gem "launchy", "~> 2.3"
gem "pry"
@@ -23,15 +18,14 @@ end
group :test do
gem "codeclimate-test-reporter", "~> 1.0.5"
gem "cucumber", RUBY_VERSION >= "2.2" ? "~> 3.0" : "3.0.1"
gem "cucumber", "~> 3.0"
gem "httpclient"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"
# nokogiri v1.8 does not work with ruby 2.1 and below
gem "nokogiri", RUBY_VERSION >= "2.2" ? "~> 1.7" : "~> 1.7.0"
gem "nokogiri", "~> 1.7"
gem "rspec"
gem "rspec-mocks"
gem "rubocop", "~> 0.56.0"
gem "rubocop", "~> 0.60.0"
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)
@@ -41,7 +35,7 @@ end
#
group :test_legacy do
if RUBY_PLATFORM =~ %r!cygwin! || RUBY_VERSION.start_with?("2.2")
if RUBY_PLATFORM =~ %r!cygwin!
gem "test-unit"
end
@@ -75,16 +69,13 @@ group :jekyll_optional_dependencies do
gem "jekyll-redirect-from"
gem "kramdown", "~> 1.14"
gem "mime-types", "~> 3.0"
gem "rdoc", RUBY_VERSION >= "2.2.2" ? "~> 6.0" : "~> 5.1"
gem "rdoc", "~> 6.0"
gem "tomlrb", "~> 1.2"
platform :ruby, :mswin, :mingw, :x64_mingw do
gem "classifier-reborn", "~> 2.2.0"
gem "liquid-c", "~> 3.0"
gem "pygments.rb", "~> 1.0"
gem "rdiscount", "~> 2.0"
gem "redcarpet", "~> 3.2", ">= 3.2.3"
gem "yajl-ruby", "~> 1.3.1"
gem "yajl-ruby", "~> 1.4"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

View File

@@ -1,8 +1,179 @@
## HEAD
* Textile is only supported through a converter plugin (#7003)
* Add info how to deploy using pre-push git hook (#7179)
* chore(release): reflect latest patched releases (#7262)
### Documentation
* Release post for v3.8.0 (#6849)
* Add Installation Instructions for Ubuntu (#6925)
* add liquid tag jekyll-flickr (#6946)
* Add 4.0 development post (#6934)
* Updated copy - fixed casing of SaaS on resources page. (#6949)
* WIP: Do not advise users to install Jekyll outside of Bundler (#6927)
* Don&#39;t prompt for sudo when installing with Ubuntu WSL (#6781)
* Fix typo (#6969)
* Add version number for group_by_exp doc (#6956)
* Update Windows install docs (#6926)
* Remove documentation for using Redcarpet (#6990)
* Updated nginx configuration for custom-404-page documentation (#6994)
* List all static files variables (#7002)
* Document that _drafts need to be contained within the custom collection directory (#6985)
* proposed change for passive voice. (#7005)
* added the CAT plugin to the plugin list (#7011)
* Updated to supported version (#7031)
* Clarify definition of &#39;draft&#39; (#7037)
* Listed the jekyll-target-blank plugin in plugins list. (#7046)
* Typo (#7058)
* Add Hints for some Improved Travis Config in Doc (#7049)
* Added plugin json-get. (#7086)
* Update travis-ci.md to point out &#34;this is an example Gemfile&#34; (#7089)
* Adding `jekyll-info` plugin (#7091)
* GitHub enables you to use themes from other repos (#7112)
* Updates to CODE OF CONDUCT (v1.4.0) (#7105)
* Instructions to view themes files under Linux (#7095)
* add jekyll-xml-source (#7114)
* Add the jekyll-firstimage filter plugin (#7127)
* Use a real theme in the example (#7125)
* Update docs about post creation (#7138)
* Add DEV Community&#39;s Jekyll tag to community page (#7139)
* Initialize upgrading doc for v4.0 (#7140)
* Add version badge for date filters with ordinal (#7162)
* Add closing tags for &lt;a&gt; (#7163)
* Add TSV to list of supported _data files. (#7168)
* Corrected sample usage of postfiles (#7181)
* Add missing html end tag for code example in section &#39;For loops&#39; (#7199)
* Resolve &#34;Unable to locate package ruby2.4&#34; error (#7196)
* installation instructions for Fedora (#7198)
* New docs (#7205)
* Correct stylesheet url in tutorial step 7 (#7210)
* Add some minor improvements to image loading in Showcase page (#7214)
* Fix minor grammatical error (#7215)
* Add developer.spotify.com to the Jekyll Showcase (#7217)
* removes quotes from markdown for assets (#7223)
* clarified front matter requirement (#7234)
* Minor whitespace fixes (#7238)
* explicit location of where to create blog.html (#7241)
* Fix a small grammar error/typo in the docs (#7260)
* environments.md: reference the build command options that allows multiple config files (#7266)
* Update 10-deployment.md (#7268)
* Add more issue template(s) and pull request template (#7269)
* Suggest sites use OpenSSL instead of GnuTLS for their site&#39;s CI (#7010)
* Fix broken Contributors link in README.markdown (#7200)
* Docs: Add title tag to item in RSS template (#7282)
* Docs: more inclusive writing (#7283)
* Document converter methods (#7289)
* Docs: Add link tag to item in RSS template (#7291)
* Add Isomer to showcase (#7300)
* Added missing semicolon (#7306)
* &#34;This restricts you...&#34; to &#34;This restricts your&#34; (#7307)
* Add a link to Giraffe Academy&#39;s tutorial (#7325)
* grammar correction (#7327)
* docs: list all standard liquid filters (#7333)
* Document Jekyll Filters with YAML data (#7335)
* Remove redundant instruction comment (#7342)
* docs: minimize rendering count (#7343)
### Minor Enhancements
* use jekyll-compose if installed (#6932)
* Memoize computing excerpt&#39;s relative_path (#6951)
* Liquefied link tag (#6269)
* Suggest re-running command with --trace on fail (#6551)
* Update item_property to return numbers as numbers instead of strings (#6608)
* Use .markdown for page templates (#7126)
* Fix custom 404 page for GitHub pages (#7132)
* Add support for `*.xhtml` files (#6854)
* Cache matched defaults sets for given parameters (#6888)
* Ignore permission error of /proc/version (#7267)
* Strip extra slashes via `Jekyll.sanitized_path` (#7182)
* Site template: remove default config for markdown (#7285)
* Cache: Do not dump undumpable objects (#7190)
* Optimize rendering Liquid templates (#7136)
* Automatically load _config.toml (#7299)
* feat: enhance --blank scaffolding (#7310)
* Skip processing posts that can not be read (#7302)
* Memoize Site#post_attr_hash (#7276)
* Load config file from within current theme-gem (#7304)
* Memoize the return value of Site#documents (#7273)
### Major Enhancements
* Remove unused error class (#6511)
* Drop support for Ruby 2.1 and 2.2 (#6560)
* Add vendor folder to a newly installed site&#39;s .gitignore (#6968)
* bump i18n (#6931)
* We are not using Ruby 2.2 anymore (#6977)
* Drop support for older versions of Rouge (#6978)
* Remove support for Redcarpet (#6987)
* Remove support for rdiscount (#6988)
* Remove &#39;cache_dir&#39; during `jekyll clean` (#7158)
* Output Jekyll Version while debugging (#7173)
* Drop support for pygments as syntax-highlighter (#7118)
* Add Cache class (#7169)
* Cache converted markdown (#7159)
* Ignore cache directory (#7184)
* Incorporate `relative_url` filter in `link` tag (#6727)
### Development Fixes
* Remove unnecessary Jekyll::Page constant (#6770)
* Loggers should accept both numbers and symbols (#6967)
* Update instructions for releasing docs Gem (#6975)
* yajl-ruby update to v1.4.0 (#6976)
* Load Rouge for TestKramdown (#7007)
* Useless privates removed (#6768)
* Allow i18n v0.9.5 and higher (#7044)
* Update Rubocop&#39;s config (#7050)
* Remember to release docs gem (#7066)
* Use assert_include (#7093)
* Update rubocop version to 0.57.x ### -docs (#7078)
* Example of CircleCI deployment through CircleCI v2 (#7024)
* Fix Rubocop offences in test files (#7128)
* fix up refute_equal call (#7133)
* Fix incorrectly passed arguments to assert_equal (#7134)
* Lock Travis to Bundler-1.16.2 (#7144)
* Replace regex arg to :gsub with a string arg (#7189)
* Interpolate Jekyll::Page subclass on inspection (#7203)
* Small benchmark refactoring (#7211)
* Add cucumber feature to test include_relative tag (#7213)
* Bump Rubocop to v0.59.0 (#7237)
* update yajl-ruby (#7278)
* Drop support for `jekyll-watch-1.4.0` and older (#7287)
* CI(Appveyor): shallow clone with 5 last commits (#7312)
* Bump RuboCop to v0.60.x (#7338)
### Bug Fixes
* Add call to unused method `validate_options` in `commands/serve.rb` (#7122)
* Security: fix `include` bypass of `EntryFilter#filter` symlink check (#7226)
* Check if scope applies to type before given path (#7263)
* Document two methods, simplify one of the methods (#7270)
* Check key in collections only if it isn&#39;t &#34;posts&#34; (#7277)
* Revert &#34;Cache converter in renderer&#34; (#7326)
* Measure the no. of times a template gets rendered (#7316)
* Re-implement handling Liquid blocks in excerpts (#7250)
### feature
* Disable Liquid via front matter (#6824)
* Do not process Liquid in post excerpt when disabled in front matter (#7146)
### Site Enhancements
* Add Release Post for v3.6.3, v3.7.4 and v3.8.4 (#7259)
## 3.8.5 / 2018-11-04
### Bug Fixes
* Re-implement handling Liquid blocks in excerpts (#7250)
## 3.8.4 / 2018-09-18
### Bug Fixes
* security: fix `include` bypass of `EntryFilter#filter` symlink check (#7228)
* 3.8.x: security: fix `include` bypass of `EntryFilter#filter` symlink check (#7228)
## 3.8.3 / 2018-06-05
@@ -121,6 +292,12 @@
* Handle liquid tags in excerpts robustly (#6891)
* Allow front matter defaults to be applied properly to documents gathered under custom `collections_dir` (#6885)
## 3.7.4 / 2018-09-07
### Bug Fixes
* Security: fix `include` bypass of EntryFilter#filter symlink check (#7224)
## 3.7.3 / 2018-02-25
### Bug Fixes
@@ -287,6 +464,12 @@
* Improve docs styling for code to be run in shell (#6641)
* Fix permalink icon markup in news-item layout (#6639)
## 3.6.3 / 2018-09-18
### Bug Fixes
* 3.6.x: security: fix `include` bypass of `EntryFilter#filter` symlink check (#7229)
## 3.6.2 / 2017-10-21
### Development Fixes
@@ -359,7 +542,7 @@
* add SUPPORT file for GitHub (#6324)
* Rename CODE_OF_CONDUCT to show in banner (#6325)
* Docs : illustrate page.id for a collection&#39;s document (#6329)
* Docs: post&#39;s date can be overriden in YAML front matter (#6334)
* Docs: post&#39;s date can be overriden in front matter (#6334)
* Docs: `site.url` behavior on development and production environments (#6270)
* Fix typo in site.url section of variables.md :-[ (#6337)
* Docs: updates (#6343)
@@ -1025,7 +1208,7 @@
* Fix typo on Chocolatey name in Windows documentation (#4686)
* Use the correct URL, Fixes #4698 (#4699)
* Add jekyll-paspagon plugin (#4700)
* Bold-italicize note in assets documentation about needing yaml front matter (#4706)
* Bold-italicize note in assets documentation about needing front matter (#4706)
* Highlight the `script/` calls in the Contributing documentation (#4712)
* Add Hawkins to the list of third-party plugins (#4755)
* Fix a typo in pagination doc (#4763)
@@ -1193,7 +1376,7 @@
* Drop: fix hash setter precedence (#4312)
* utils: `has_yaml_header?` should accept files with extraneous spaces (#4290)
* Escape html from site.title and page.title in site template (#4307)
* Allow custom file extensions if defined in `permalink` YAML front matter (#4314)
* Allow custom file extensions if defined in `permalink` front matter (#4314)
* Fix deep_merge_hashes! handling of drops and hashes (#4359)
* Page should respect output extension of its permalink (#4373)
* Disable auto-regeneration when running server detached (#4376)
@@ -1396,7 +1579,7 @@
* Internal: trigger hooks by owner symbol (#3871)
* Update MIME types from mime-db (#3933)
* Add header to site template `_config.yml` for clarity & direction (#3997)
* Site template: add timezone offset to post date frontmatter (#4001)
* Site template: add timezone offset to post date front matter (#4001)
* Make a constant for the regex to find hidden files (#4032)
* Site template: refactor github & twitter icons into includes (#4049)
* Site template: add background to Kramdown Rouge-ified backtick code blocks (#4053)
@@ -1413,7 +1596,7 @@
* Fix nav items alignment when on multiple rows (#3264)
* Highlight: Only Strip Newlines/Carriage Returns, not Spaces (#3278)
* Find variables in front matter defaults by searching with relative file path. (#2774)
* Allow variables (e.g `:categories`) in YAML front matter permalinks (#3320)
* Allow variables (e.g `:categories`) in front matter permalinks (#3320)
* Handle nil URL placeholders in permalinks (#3325)
* Template: Fix nav items alignment when in "burger" mode (#3329)
* Template: Remove `!important` from nav SCSS introduced in #3329 (#3375)
@@ -1430,7 +1613,7 @@
* Add WOFF2 font MIME type to Jekyll server MIME types (#3647)
* Be smarter about extracting the extname in `StaticFile` (#3632)
* Process metadata for all dependencies (#3608)
* Show error message if the YAML front matter on a page/post is invalid. (#3643)
* Show error message if the front matter on a page/post is invalid. (#3643)
* Upgrade redcarpet to 3.2 (Security fix: OSVDB-120415) (#3652)
* Create #mock_expects that goes directly to RSpec Mocks. (#3658)
* Open `.jekyll-metadata` in binary mode to read binary Marshal data (#3713)
@@ -1508,7 +1691,7 @@
* Add a Resources link to tutorial on building dynamic navbars (#3185)
* Semantic structure improvements to the post and page layouts (#3251)
* Add new AsciiDoc plugin to list of third-party plugins. (#3277)
* Specify that all transformable collection documents must contain YAML front matter (#3271)
* Specify that all transformable collection documents must contain front matter (#3271)
* Assorted accessibility fixes (#3256)
* Update configuration docs to mention `keep_files` for `destination` (#3288, #3296)
* Break when we successfully generate nav link to save CPU cycles. (#3291)
@@ -1536,7 +1719,7 @@
* Add a link on all the docs pages to "Improve this page". (#3510)
* Add jekyll-auto-image generator to the list of third-party plugins (#3489)
* Replace link to the proposed `picture` element spec (#3530)
* Add frontmatter date formatting information (#3469)
* Add front matter date formatting information (#3469)
* Improve consistency and clarity of plugins options note (#3546)
* Add permalink warning to pagination docs (#3551)
* Fix grammar in Collections docs API stability warning (#3560)
@@ -2045,7 +2228,7 @@
* Clean up the `<head>` in the site template (#2186)
* Permit YAML blocks to end with three dots to better conform with the YAML spec (#2110)
* Use `File.exist?` instead of deprecated `File.exists?` (#2214)
* Require newline after start of YAML Front Matter header (#2211)
* Require newline after start of front matter header (#2211)
* Add the ability for pages to be marked as `published: false` (#1492)
* Add `Jekyll::LiquidExtensions` with `.lookup_variable` method for easy looking up of variable values in a Liquid context. (#2253)
* Remove literal lang name from class (#2292)
@@ -2723,7 +2906,7 @@
* Bullet-proof `limit_posts` option (#1004)
* Read in YAML as UTF-8 to accept non-ASCII chars (#836)
* Fix the CLI option `--plugins` to actually accept dirs and files (#993)
* Allow 'excerpt' in YAML front matter to override the extracted excerpt (#946)
* Allow 'excerpt' in front matter to override the extracted excerpt (#946)
* Fix cascade problem with site.baseurl, site.port and site.host. (#935)
* Filter out directories with valid post names (#875)
* Fix symlinked static files not being correctly built in unsafe mode (#909)
@@ -2735,7 +2918,7 @@
* Patch for multibyte URI problem with `jekyll serve` (#723)
* Order plugin execution by priority (#864)
* Fixed Page#dir and Page#url for edge cases (#536)
* Fix broken `post_url` with posts with a time in their YAML front matter (#831)
* Fix broken `post_url` with posts with a time in their front matter (#831)
* Look for plugins under the source directory (#654)
* Tumblr Migrator: finds `_posts` dir correctly, fixes truncation of long post names (#775)
* Force Categories to be Strings (#767)
@@ -2926,7 +3109,7 @@
* Bug Fixes
* Require redcloth >= 4.2.1 in tests (#92)
* Don't break on triple dashes in yaml front matter (#93)
* Don't break on triple dashes in front matter (#93)
### Minor Enhancements
@@ -2958,7 +3141,7 @@
* Added --paginate option to the executable along with a paginator object for the payload (@calavera)
* Upgraded RedCloth to 4.2.1, which makes `<notextile>` tags work once again.
* Configuration options set in config.yml are now available through the site payload (@vilcans)
* Posts can now have an empty YAML front matter or none at all (@ bahuvrihi)
* Posts can now have an empty front matter or none at all (@ bahuvrihi)
* Bug Fixes
* Fixing Ruby 1.9 issue that requires `#to_s` on the err object (@Chrononaut)
* Fixes for pagination and ordering posts on the same day (@ujh)
@@ -2966,7 +3149,7 @@
* Index.html file should always have index.html permalink (@eugenebolshakov)
* Added trailing slash to pretty permalink style so Apache is happy (@eugenebolshakov)
* Bad markdown processor in config fails sooner and with better message (@ gcnovus)
* Allow CRLFs in yaml front matter (@juretta)
* Allow CRLFs in front matter (@juretta)
* Added Date#xmlschema for Ruby versions < 1.9
## 0.5.1 / 2009-05-06
@@ -3045,7 +3228,7 @@
* Added post categories based on directories containing `_posts` (@mreid)
* Added post topics based on directories underneath `_posts`
* Added new date filter that shows the full month name (@mreid)
* Merge Post's YAML front matter into its to_liquid payload (@remi)
* Merge Post's front matter into its to_liquid payload (@remi)
* Restrict includes to regular files underneath `_includes`
* Bug Fixes
* Change YAML delimiter matcher so as to not chew up 2nd level markdown headers (@mreid)

View File

@@ -3,13 +3,13 @@
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
[![Linux Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg?label=Linux%20build)][travis]
[![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
[![Maintainability](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/maintainability)](codeclimate)
[![Test Coverage](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/test_coverage)](coverage)
[![Dependency Status](https://img.shields.io/gemnasium/jekyll/jekyll.svg)][gemnasium]
[![Maintainability](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/maintainability)][codeclimate]
[![Test Coverage](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/test_coverage)][coverage]
[![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
[![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
[ruby-gems]: https://rubygems.org/gems/jekyll
[gemnasium]: https://gemnasium.com/jekyll/jekyll
[codeclimate]: https://codeclimate.com/github/jekyll/jekyll
[coverage]: https://codeclimate.com/github/jekyll/jekyll/coverage
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
@@ -24,10 +24,6 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
See: https://jekyllrb.com/philosophy
## Having trouble?
See: https://jekyllrb.com/docs/troubleshooting/
## Getting Started
* [Install](https://jekyllrb.com/docs/installation/) the gem
@@ -36,6 +32,20 @@ See: https://jekyllrb.com/docs/troubleshooting/
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
## Diving In
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
* Learn how [Front Matter](https://jekyllrb.com/docs/front-matter/) works
* Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
* Watch [video tutorials from Giraffe Academy](https://jekyllrb.com/tutorials/video-walkthroughs/)
## Need help?
If you don't find the answer to your problem in our [docs](https://jekyllrb.com/docs/), or in the [troubleshooting section](https://jekyllrb.com/docs/troubleshooting/), ask the [community](https://jekyllrb.com/docs/community/) for help.
## Code of Conduct
In order to have a more open and welcoming community, Jekyll adheres to a
@@ -45,16 +55,28 @@ conduct.
Please adhere to this code of conduct in any interactions you have in the
Jekyll community. It is strictly enforced on all official Jekyll
repositories, websites, and resources. If you encounter someone violating
these terms, please let one of our core team members [Olivia](mailto:olivia@jekyllrb.com?subject=Jekyll%20CoC%20Violation), [Pat](mailto:pat@jekyllrb.com?subject=Jekyll%20CoC%20Violation), [Matt](mailto:matt@jekyllrb.com?subject=Jekyll%20CoC%20Violation) or [Parker](mailto:parker@jekyllrb.com?subject=Jekyll%20CoC%20Violation) know and we will address it as soon as possible.
these terms, please let one of our [core team members](https://jekyllrb.com/team/#core-team) know and we will address it as soon as possible.
## Diving In
## Credits
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
* Learn how the [YAML Front Matter](https://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
### Contributors
This project exists thanks to all the people who contribute.
<a href="../../graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
### Backers
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
<a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
<a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
<a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
## License

View File

@@ -1,6 +1,6 @@
version: "{build}"
clone_depth: 10
clone_depth: 5
branches:
only:
@@ -9,10 +9,6 @@ branches:
build: off
install:
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%\bin;%PATH%
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle
environment:
BUNDLE_WITHOUT: "benchmark:site:development"
matrix:
@@ -28,8 +24,10 @@ environment:
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "23"
TEST_SUITE: "test"
- RUBY_FOLDER_VER: "22"
TEST_SUITE: "test"
install:
- SET PATH=C:\Ruby%RUBY_FOLDER_VER%\bin;%PATH%
- bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle
test_script:
- ruby --version
@@ -38,5 +36,5 @@ test_script:
- bash ./script/cibuild
cache:
# If one of the files after the right arrow changes, cache will be skipped
# If one of the files after the right arrow changes, cache will be invalidated
- 'vendor\bundle -> appveyor.yml,Gemfile,jekyll.gemspec'

View File

@@ -90,26 +90,21 @@ end
Correctness.new(site_docs, "redirect_from".freeze).assert!
Correctness.new(site_docs, "title".freeze).assert!
# First, test with a property only a handful of documents have.
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report('sort_by_property_directly with sparse property') do
sort_by_property_directly(site_docs, "redirect_from".freeze)
def test_property(property, meta_key)
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report("sort_by_property_directly with #{property} property") do
sort_by_property_directly(site_docs, meta_key)
end
x.report("schwartzian_transform with #{property} property") do
schwartzian_transform(site_docs, meta_key)
end
x.compare!
end
x.report('schwartzian_transform with sparse property') do
schwartzian_transform(site_docs, "redirect_from".freeze)
end
x.compare!
end
# First, test with a property only a handful of documents have.
test_property('sparse', 'redirect_from')
# Next, test with a property they all have.
Benchmark.ips do |x|
x.config(time: 10, warmup: 5)
x.report('sort_by_property_directly with non-sparse property') do
sort_by_property_directly(site_docs, "title".freeze)
end
x.report('schwartzian_transform with non-sparse property') do
schwartzian_transform(site_docs, "title".freeze)
end
x.compare!
end
test_property('non-sparse', 'title')

2
docs/.gitignore vendored
View File

@@ -1,5 +1,5 @@
_site/
.idea/
*.swp
pkg/
test/
.idea/

View File

@@ -1,5 +1,5 @@
---
version: 3.8.4
version: 3.8.5
name: Jekyll • Simple, blog-aware, static sites
description: Transform your plain text into static websites and blogs
url: https://jekyllrb.com
@@ -29,7 +29,7 @@ defaults:
path: _posts
type: posts
values:
layout: news_item
layout: post
image: "/img/twitter-card.png"
plugins:
- jekyll-avatar
@@ -42,7 +42,7 @@ plugins:
sass:
style: compressed
exclude:
- ".gitignore"
- .gitignore
- .jekyll-cache
- CNAME
- icomoon-selection.json
- readme.md

View File

@@ -1,53 +0,0 @@
- title: Getting Started
docs:
- home
- quickstart
- installation
- windows
- usage
- structure
- configuration
- title: Your Content
docs:
- frontmatter
- posts
- drafts
- pages
- static-files
- variables
- collections
- datafiles
- assets
- migrations
- title: Customization
docs:
- templates
- includes
- permalinks
- pagination
- plugins
- themes
- extras
- title: Deployment
docs:
- github-pages
- deployment-methods
- continuous-integration
- title: Miscellaneous
docs:
- troubleshooting
- sites
- resources
- upgrading/0-to-2
- upgrading/2-to-3
- title: Meta
docs:
- contributing
- maintaining
- conduct
- history

36
docs/_data/docs_nav.yml Normal file
View File

@@ -0,0 +1,36 @@
- title: Getting Started
items:
- link: /docs/
- link: /docs/ruby-101/
- link: /docs/installation/
- link: /docs/community/
- link: /docs/step-by-step/01-setup/
- title: Build
items:
- link: /docs/usage/
- link: /docs/configuration/
- title: Content
items:
- link: /docs/pages/
- link: /docs/posts/
- link: /docs/front-matter/
- link: /docs/collections/
- link: /docs/datafiles/
- link: /docs/assets/
- link: /docs/static-files/
- title: Site Structure
items:
- link: /docs/structure/
- link: /docs/liquid/
- link: /docs/variables/
- link: /docs/includes/
- link: /docs/layouts/
- link: /docs/permalinks/
- link: /docs/themes/
- link: /docs/pagination/
- title: Guides
items:
- link: /docs/plugins/
- link: /docs/migrations/
- link: /docs/upgrading/
- link: /docs/deployment/

View File

@@ -0,0 +1,298 @@
#
# ---------------------------------------------------------------------------------------
# List of Liquid Filters provided by Jekyll Core that will be utilized for their
# documentation.
#
# To document a new filter, create a new "list-item" below with the following keys:
# name: : [REQUIRED] A string label that identifies the filter
# description: : [REQUIRED] A short description of what to expect from the filter
# version_badge: : [OPTIONAL] Jekyll version that introduced the filter
# examples: : [REQUIRED] A 'nested list' comprised of inputs and outputs
# input: : [REQUIRED] The filter syntax and usage
# output: : [OPTIONAL] The output from the filter
#
# Tip: Use YAML Block notations to "fold" a long string, or to "break" a long string
# to the following line. Block notations can also be used to avoid having to use
# backslashes to escape quotes.
# ---------------------------------------------------------------------------------------
#
- name: Relative URL
description: >-
Prepend the <code>baseurl</code> value to the input. Useful if
your site is hosted at a subpath rather than the root of the domain.
examples:
- input: '{{ "/assets/style.css" | relative_url }}'
output: '/my-baseurl/assets/style.css'
#
- name: Absolute URL
description: Prepend the <code>url</code> and <code>baseurl</code> value to the input.
examples:
- input: '{{ "/assets/style.css" | absolute_url }}'
output: 'http://example.com/my-baseurl/assets/style.css'
#
- name: Date to XML Schema
description: Convert a Date into XML Schema (ISO 8601) format.
examples:
- input: '{{ site.time | date_to_xmlschema }}'
output: '2008-11-07T13:07:54-08:00'
#
- name: Date to RFC-822 Format
description: Convert a Date into the RFC-822 format used for RSS feeds.
examples:
- input: '{{ site.time | date_to_rfc822 }}'
output: 'Mon, 07 Nov 2008 13:07:54 -0800'
#
- name: Date to String
description: Convert a date to short format.
examples:
- input: '{{ site.time | date_to_string }}'
output: '07 Nov 2008'
#
- name: Date to String in ordinal US style
description: 'Format a date to ordinal, US, short format.'
version_badge: 3.8.0
examples:
- input: '{{ site.time | date_to_string: "ordinal", "US" }}'
output: 'Nov 7th, 2008'
#
- name: Date to Long String
description: Format a date to long format.
examples:
- input: '{{ site.time | date_to_long_string }}'
output: '07 November 2008'
#
- name: Date to Long String in ordinal UK style
description: 'Format a date to ordinal, UK, long format.'
version_badge: 3.8.0
examples:
- input: '{{ site.time | date_to_long_string: "ordinal" }}'
output: '7th November 2008'
#
- name: Where
description: Select all the objects in an array where the key has the given value.
examples:
- input: '{{ site.members | where:"graduation_year","2014" }}'
output:
#
- name: Where Expression
description: Select all the objects in an array where the expression is true.
version_badge: 3.2.0
examples:
- input: |-
{{ site.members | where_exp:"item",
"item.graduation_year == 2014" }}
output:
- input: |-
{{ site.members | where_exp:"item",
"item.graduation_year < 2014" }}
output:
- input: |-
{{ site.members | where_exp:"item",
"item.projects contains 'foo'" }}
output:
#
- name: Group By
description: Group an array's items by a given property.
examples:
- input: '{{ site.members | group_by:"graduation_year" }}'
output: |-
[{"name"=>"2013", "items"=>[...]},
{"name"=>"2014", "items"=>[...]}]
#
- name: Group By Expression
description: Group an array's items using a Liquid expression.
version_badge: 3.4.0
examples:
- input: |-
{{ site.members | group_by_exp: "item",
"item.graduation_year | truncate 3, ''" }}
output: |-
[{"name"=>"201...", "items"=>[...]},
{"name"=>"200...", "items"=>[...]}]
#
- name: XML Escape
description: Escape some text for use in XML.
examples:
- input: '{{ page.content | xml_escape }}'
output:
#
- name: CGI Escape
description: >-
CGI escape a string for use in a URL. Replaces any special characters
with appropriate <code>%XX</code> replacements. CGI escape normally
replaces a space with a plus <code>+</code> sign.
examples:
- input: '{{ "foo, bar; baz?" | cgi_escape }}'
output: 'foo%2C+bar%3B+baz%3F'
#
- name: URI Escape
description: >-
Percent encodes any special characters in a URI.
URI escape normally replaces a space with <code>%20</code>.
<a href="https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters">Reserved characters</a>
will not be escaped.
examples:
- input: '{{ "http://foo.com/?q=foo, \bar?" | uri_escape }}'
output: 'http://foo.com/?q=foo,%20%5Cbar?'
#
- name: Number of Words
description: Count the number of words in some text.
examples:
- input: '{{ page.content | number_of_words }}'
output: 1337
#
- name: Array to Sentence
description: >-
Convert an array into a sentence. Useful for listing tags.
Optional argument for connector.
examples:
- input: '{{ page.tags | array_to_sentence_string }}'
output: 'foo, bar, and baz'
- input: '{{ page.tags | array_to_sentence_string: "or" }}'
output: 'foo, bar, or baz'
#
- name: Markdownify
description: Convert a Markdown-formatted string into HTML.
examples:
- input: '{{ page.excerpt | markdownify }}'
output:
#
- name: Smartify
description: 'Convert "quotes" into &ldquo;smart quotes.&rdquo;'
examples:
- input: '{{ page.title | smartify }}'
output:
#
- name: Converting Sass/SCSS
description: Convert a Sass- or SCSS-formatted string into CSS.
examples:
- input: '{{ some_sass | sassify }}'
output:
- input: '{{ some_scss | scssify }}'
output:
#
- name: Slugify
description: Convert a string into a lowercase URL "slug". See below for options.
examples:
- input: '{{ "The _config.yml file" | slugify }}'
output: 'the-config-yml-file'
- input: '{{ "The _config.yml file" | slugify: "pretty" }}'
output: 'the-_config.yml-file'
- input: '{{ "The _cönfig.yml file" | slugify: "ascii" }}'
output: 'the-c-nfig-yml-file'
- input: '{{ "The cönfig.yml file" | slugify: "latin" }}'
output: 'the-config-yml-file'
#
- name: Data To JSON
description: Convert Hash or Array to JSON.
examples:
- input: '{{ site.data.projects | jsonify }}'
output:
#
- name: Normalize Whitespace
description: Replace any occurrence of whitespace with a single space.
examples:
- input: '{{ "a \n b" | normalize_whitespace }}'
output:
#
- name: Sort
description: >-
Sort an array. Optional arguments for hashes
1.&nbsp;property name
2.&nbsp;nils order (<em>first</em> or <em>last</em>).
examples:
- input: '{{ page.tags | sort }}'
output:
- input: '{{ site.posts | sort: "author" }}'
output:
- input: '{{ site.pages | sort: "title", "last" }}'
output:
#
- name: Sample
description: 'Pick a random value from an array. Optionally, pick multiple values.'
examples:
- input: '{{ site.pages | sample }}'
output:
- input: '{{ site.pages | sample: 2 }}'
output:
#
- name: To Integer
description: Convert a string or boolean to integer.
examples:
- input: '{{ some_var | to_integer }}'
output:
#
- name: Array Filters
description: >-
Push, pop, shift, and unshift elements from an Array.
These are <strong>NON-DESTRUCTIVE</strong>, i.e. they do not mutate the array,
but rather make a copy and mutate that.
examples:
- input: '{{ page.tags | push: "Spokane" }}'
output: '["Seattle", "Tacoma", "Spokane"]'
- input: '{{ page.tags | pop }}'
output: '["Seattle"]'
- input: '{{ page.tags | shift }}'
output: '["Tacoma"]'
- input: '{{ page.tags | unshift: "Olympia" }}'
output: '["Olympia", "Seattle", "Tacoma"]'
#
- name: Inspect
description: Convert an object into its String representation for debugging.
examples:
- input: '{{ some_var | inspect }}'
output:

View File

@@ -0,0 +1,162 @@
# Variables provided by Jekyll core
#
# name: : name of the variable
# description: : content returned by the varialble
global:
- name: site
description: >-
Site wide information + configuration settings from <code>_config.yml</code>.
See below for details.
- name: page
description: >-
Page specific information + the <a href="/docs/front-matter/">front matter</a>.
Custom variables set via the front matter will be available here. See below for details.
- name: layout
description: >-
Layout specific information + the <a href="/docs/front-matter/">front matter</a>.
Custom variables set via front matter in layouts will be available here.
- name: content
description: >-
In layout files, the rendered content of the Post or Page being wrapped.
Not defined in Post or Page files.
- name: paginator
description: >-
When the <code>paginate</code> configuration option is set, this variable becomes available
for use. See <a href="../pagination/">Pagination</a> for details.
site:
- name: site.time
description: >-
The current time (when you run the <code>jekyll</code> command).
- name: site.pages
description: >-
A list of all Pages.
- name: site.posts
description: >-
A reverse chronological list of all Posts.
- name: site.related_posts
description: >-
If the page being processed is a Post, this contains a list of up to ten related Posts.
By default, these are the ten most recent posts. For high quality but slow to compute
results, run the <code>jekyll</code> command with the <code>--lsi</code>
(<a href="https://en.wikipedia.org/wiki/Latent_semantic_analysis#Latent_semantic_indexing">latent semantic indexing</a>)
option. Also note GitHub Pages does not support the
<code>lsi</code> option when generating sites.
- name: site.static_files
description: >-
A list of all <a href="/docs/static-files/">static files</a> (i.e.
files not processed by Jekyll's converters or the Liquid renderer).
Each file has five properties: <code>path</code>, <code>modified_time</code>,
<code>name</code>, <code>basename</code> and <code>extname</code>.
- name: site.html_pages
description: >-
A subset of `site.pages` listing those which end in `.html`.
- name: site.html_files
description: >-
A subset of `site.static_files` listing those which end in `.html`.
- name: site.collections
description: >-
A list of all the collections (including posts).
- name: site.data
description: >-
A list containing the data loaded from the YAML files located in the <code>_data</code>
directory.
- name: site.documents
description: >-
A list of all the documents in every collection.
- name: site.categories.CATEGORY
description: >-
The list of all Posts in category <code>CATEGORY</code>.
- name: site.tags.TAG
description: >-
The list of all Posts with tag <code>TAG</code>.
- name: site.url
description: >-
Contains the url of your site as it is configured in the <code>_config.yml</code>.
For example, if you have <code>url: http://mysite.com</code> in your configuration file,
then it will be accessible in Liquid as <code>site.url</code>. For the development
environment there is <a href="/news/#3-siteurl-is-set-by-the-development-server">an
exception</a>, if you are running <code>jekyll serve</code> in a development environment
<code>site.url</code> will be set to the value of <code>host</code>, <code>port</code>,
and SSL-related options. This defaults to <code>url: http://localhost:4000</code>.
- name: "site.[CONFIGURATION_DATA]"
description: >-
All the variables set via the command line and your <code>_config.yml</code> are available
through the <code>site</code> variable. For example, if you have <code>foo: bar</code> in
your configuration file, then it will be accessible in Liquid as <code>site.foo</code>.
Jekyll does not parse changes to <code>_config.yml</code> in
<code>watch</code> mode, you must restart Jekyll to see changes to variables.
page:
- name: page.content
description: >-
The content of the Page, rendered or un-rendered depending upon
what Liquid is being processed and what <code>page</code> is.
- name: page.title
description: >-
The title of the Page.
- name: page.excerpt
description: >-
The un-rendered excerpt of a document.
- name: page.url
description: >-
The URL of the Post without the domain, but with a leading slash, e.g.
<code>/2008/12/14/my-post.html</code>
- name: page.date
description: >-
The Date assigned to the Post. This can be overridden in a Posts front matter by specifying
a new date/time in the format <code>YYYY-MM-DD HH:MM:SS</code> (assuming UTC), or
<code>YYYY-MM-DD HH:MM:SS +/-TTTT</code> (to specify a time zone using an offset from UTC.
e.g. <code>2008-12-14 10:30:00 +0900</code>).
- name: page.id
description: >-
An identifier unique to a document in a Collection or a Post (useful in RSS feeds). e.g.
<code>/2008/12/14/my-post</code><code>/my-collection/my-document</code>
- name: page.categories
description: >-
The list of categories to which this post belongs. Categories are derived from the directory
structure above the <code>_posts</code> directory. For example, a post at
<code>/work/code/_posts/2008-12-24-closures.md</code> would have this field set to
<code>['work', 'code']</code>. These can also be specified in the
<a href="/docs/front-matter/">front matter</a>.
- name: page.tags
description: >-
The list of tags to which this post belongs. These can be specified in the
<a href="/docs/front-matter/">front matter</a>.
- name: page.path
description: >-
The path to the raw post or page. Example usage: Linking back to the page or posts source
on GitHub. This can be overridden in the <a href="/docs/front-matter/">front matter</a>.
- name: page.next
description: >-
The next post relative to the position of the current post in <code>site.posts</code>.
Returns <code>nil</code> for the last entry.
- name: page.previous
description: >-
The previous post relative to the position of the current post in <code>site.posts</code>.
Returns <code>nil</code> for the first entry.
paginator:
- name: paginator.page
description: The number of the current page
- name: paginator.per_page
description: Number of posts per page
- name: paginator.posts
description: Posts available for the current page
- name: paginator.total_posts
description: Total number of posts
- name: paginator.total_pages
description: Total number of pages
- name: paginator.previous_page
description: >-
The number of the previous page, or <code>nil</code> if no previous page exists
- name: paginator.previous_page_path
description: >-
The path to the previous page, or <code>nil</code> if no previous page exists
- name: paginator.next_page
description: >-
The number of the next page, or <code>nil</code> if no subsequent page exists
- name: paginator.next_page_path
description: >-
The path to the next page, or <code>nil</code> if no subsequent page exists

View File

@@ -53,7 +53,7 @@
year: 2016
- speaker: Amy Johnston
twitter_handle: amybeukenex
twitter_handle: AmyJohnstonXL
youtube_id: HR12JiUI2Zc
topic: Jekyll for Technical Documentation
year: 2016
@@ -83,7 +83,7 @@
year: 2016
- speaker: Julio Faerman
twitter_handle: jmfaerman
twitter_handle: juliodevrel
youtube_id: SOMonG8Iqak
topic: Jekyll on AWS
year: 2016
@@ -131,7 +131,7 @@
year: 2016
- speaker: Nils Borchers
twitter_handle: nilsborchers
twitter_handle: nilsbo
youtube_id: DtNMjuv6Rbo
topic: Building a living brand guide with Jekyll and Hologram
year: 2016

View File

@@ -0,0 +1,15 @@
- title: Home
link: /
show_on_mobile: true
- title: Docs
link: /docs/
show_on_mobile: true
- title: Resources
link: /resources/
show_on_mobile: true
- title: Showcase
link: /showcase/
show_on_mobile: false
- title: News
link: /news/
show_on_mobile: true

241
docs/_data/showcase.yml Normal file
View File

@@ -0,0 +1,241 @@
- name: Tom Preston Werner Blog
url: http://tom.preston-werner.com/
categories:
- personal
- blog
- name: GitHub On Demand Training
url: https://services.github.com/on-demand/
categories:
- software
- knowledgebase
- name: Vesterheim Norwegian-American Museum
url: http://vesterheim.org/
categories:
- marketing-site
- name: KOTN
url: https://kotn.com/
categories:
- marketing-site
- name: MvvmCross
url: https://www.mvvmcross.com/
categories:
- software
- marketing-site
- name: Vidgrid
url: https://www.vidgrid.com/
categories:
- software
- marketing-site
- name: Bitcoin
url: https://bitcoin.org/en/
categories:
- software
- marketing-site
- name: Mapwize
url: https://www.mapwize.io/
categories:
- software
- marketing-site
- name: Auth0 Blog
url: https://auth0.com/blog/
categories:
- software
- blog
- name: AWS Amplify
url: https://aws-amplify.github.io/
categories:
- open-source
- marketing-site
- name: Yeoman
url: http://yeoman.io/
categories:
- open-source
- marketing-site
- name: Ionic Framwork
url: https://ionicframework.com/
categories:
- software
- marketing-site
- name: Release Management Blog
url: https://release.mozilla.org/
categories:
- software
- blog
- name: Freedom of Information Act
url: https://www.foia.gov/
categories:
- government
- name: Art & About Sydney
url: https://www.artandabout.com.au/
categories:
- government
- name: Passbolt Help
url: https://help.passbolt.com/
categories:
- knowledgebase
- name: We are COLLINS
url: https://www.wearecollins.com/
categories:
- agency
- name: Light Burn
url: https://lightburn.co/
categories:
- agency
- name: italia.it
url: https://developers.italia.it/
categories:
- community
- name: Sydney New Years Eve
url: https://www.sydneynewyearseve.com/
categories:
- government
- name: Login.gov
url: https://login.gov/
categories:
- government
- name: plainlanguage.gov
url: https://plainlanguage.gov/
categories:
- government
- name: U.S. Web Design Standards
url: https://standards.usa.gov/
categories:
- government
- name: Grantmaker Search
url: https://www.grantmakers.io/
categories:
- marketing-site
- name: Rehan Butt
url: http://rehanbutt.com/
categories:
- personal
- portfolio
- name: The Markdown Guide
url: https://www.markdownguide.org/
categories:
- knowledgebase
- name: PROBOT
url: https://probot.github.io/
categories:
- documentation
- name: Matt Grey
url: https://himatt.com/
categories:
- personal
- portfolio
- name: frame.ai
url: https://frame.ai/
categories:
- software
- marketing-site
- name: AdHawk
url: https://www.tryadhawk.com/
categories:
- agency
- name: City of Boston Budget
url: https://budget.boston.gov/
categories:
- government
- name: Lattice
url: https://latticehq.com/
categories:
- software
- marketing-site
- name: MailTape
url: https://www.mailta.pe/
categories:
- other
- name: Digital Democracy
url: http://www.digital-democracy.org/
categories:
- other
- name: HTML Reference
url: http://htmlreference.io/
categories:
- documentation
- name: CSS Reference
url: http://cssreference.io/
categories:
- documentation
- name: Chain
url: https://chain.com/
categories:
- marketing-site
- name: Boxy Suite
url: https://www.boxysuite.com/
categories:
- marketing-site
- software
- name: Pattern Lab
url: http://patternlab.io/
categories:
- documentation
- name: IBM MobileFirst Foundation
url: https://mobilefirstplatform.ibmcloud.com/
categories:
- documentation
- name: 18F
url: https://18f.gsa.gov/
categories:
- agency
- government
- name: Mapbox
url: https://mapbox.com/
categories:
- marketing-site
- name: Development Seed
url: https://developmentseed.org/
categories:
- agency
- name: Isomer - Singapore Government Static Websites
url: https://isomer.gov.sg/
categories:
- government
- name: SiteLeaf
url: https://siteleaf.com
categories:
- software
- marketing-site
- name: CloudCannon
url: https://cloudcannon.com/
categories:
- software
- marketing-site
- name: Ruby on Rails
url: http://rubyonrails.org/
categories:
- marketing-site
- documentation
- name: White House Social and Behavioral Sciences Team
url: https://sbst.gov/
categories:
- government
- name: UN World Statistics
url: https://worldstatisticsday.org
categories:
- government
- name: Sketch App
url: https://sketchapp.com/
categories:
- software
- marketing-site
- name: Netflix Devices
url: https://devices.netflix.com/en/
categories:
- marketing-site
- name: TwitchCon
url: https://www.twitchcon.com/
categories:
- marketing-site
- conference
- name: Twitch Developer Documentation
url: https://dev.twitch.tv/
categories:
- marketing-site
- documentation
- name: Spotify for Developers
url: https://developer.spotify.com
categories:
- marketing-site
- documentation
- software

9
docs/_data/sponsors.yml Normal file
View File

@@ -0,0 +1,9 @@
- name: Forestry.io
image: /img/forestry.svg
url: https://forestry.io/?utm_campaign=jekyllsponsor&utm_medium=banner&utm_source=jekyllrb.com
- name: CloudCannon
image: /img/cloudcannon.svg
url: https://cloudcannon.com
- name: Siteleaf
image: /img/siteleaf.svg
url: https://siteleaf.com

View File

@@ -1,13 +0,0 @@
- title: Tutorials
tutorials:
- home
- video-walkthroughs
- navigation
- orderofinterpretation
- custom-404-page
- convert-site-to-jekyll
- using-jekyll-with-bundler
#- title: Another section
# tutorials:
# - sample

View File

@@ -0,0 +1,9 @@
- title: Tutorials
items:
- link: /tutorials/
- link: /tutorials/video-walkthroughs/
- link: /tutorials/navigation/
- link: /tutorials/order-of-interpretation/
- link: /tutorials/custom-404-page/
- link: /tutorials/convert-site-to-jekyll/
- link: /tutorials/using-jekyll-with-bundler/

View File

@@ -3,10 +3,11 @@ title: Assets
permalink: /docs/assets/
---
Jekyll provides built-in support for Sass and can work with CoffeeScript via
a Ruby gem. In order to use them, you must first create a file with the
proper extension name (one of `.sass`, `.scss`, or `.coffee`) and ***start the
file with two lines of triple dashes***, like this:
Jekyll provides built-in support for [Sass](https://sass-lang.com/)
and can work with [CoffeeScript](https://coffeescript.org/) via a Ruby gem.
In order to use them, you must first create a file with the proper extension
name (one of `.sass`, `.scss`, or `.coffee`) and
***start the file with two lines of triple dashes***, like this:
```sass
---
@@ -23,14 +24,11 @@ have a file named `css/styles.scss` in your site's source folder, Jekyll
will process it and put it in your site's destination folder under
`css/styles.css`.
<div class="note info">
<h5>Jekyll processes all Liquid filters and tags in asset files</h5>
<p>If you are using <a href="https://mustache.github.io">Mustache</a>
or another JavaScript templating language that conflicts with
the <a href="/docs/templates/">Liquid template syntax</a>, you
will need to place <code>{&#37; raw &#37;}</code> and
<code>{&#37; endraw &#37;}</code> tags around your code.</p>
</div>
If you are using [Mustache](https://mustache.github.io)
or another JavaScript templating language that conflicts with
the [Liquid template syntax](/docs/templates/), you
will need to place <code>{&#37; raw &#37;}</code> and
<code>{&#37; endraw &#37;}</code> tags around your code.
## Sass/SCSS
@@ -42,8 +40,7 @@ them to be in the output file, such as `<source>/css`. For an example, take
a look at [this example site using Sass support in Jekyll][example-sass].
If you are using Sass `@import` statements, you'll need to ensure that your
`sass_dir` is set to the base directory that contains your Sass files. You
can do that thusly:
`sass_dir` is set to the base directory that contains your Sass files:
```yaml
sass:
@@ -55,18 +52,12 @@ The Sass converter will default the `sass_dir` configuration option to
[example-sass]: https://github.com/jekyll/jekyll-sass-converter/tree/master/docs
<div class="note info">
<h5>The <code>sass_dir</code> is only used by Sass</h5>
<p>
Note that the <code>sass_dir</code> becomes the load path for Sass imports,
nothing more. This means that Jekyll does not know about these files
directly, so any files here should not contain the YAML Front Matter as
described above nor will they be transformed as described above. This
folder should only contain imports.
</p>
</div>
Note that the `sass_dir` becomes the load path for Sass imports,
nothing more. This means that Jekyll does not know about these files
directly, so any files here should not contain the front matter as
described above nor will they be transformed as described above. This
folder should only contain imports.
{: .warning }
You may also specify the output style with the `style` option in your
`_config.yml` file:
@@ -89,5 +80,5 @@ To enable Coffeescript in Jekyll 3.0 and up you must
```yaml
plugins:
- jekyll-coffeescript
- jekyll-coffeescript
```

View File

@@ -6,50 +6,47 @@ redirect_from: "/conduct/index.html"
editable: false
---
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who
contribute through reporting issues, posting feature requests, updating
documentation, submitting pull requests or patches, and other activities.
## Our Pledge
We are committed to making participation in this project a harassment-free
experience for everyone, regardless of level of experience, gender, gender
identity and expression, sexual orientation, disability, personal appearance,
body size, race, ethnicity, age, religion, or nationality.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing other's private information, such as physical or electronic
addresses, without explicit permission
* Other unethical or unprofessional conduct
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Our Responsibilities
By adopting this Code of Conduct, project maintainers commit themselves to
fairly and consistently applying these principles to every aspect of managing
this project. Project maintainers who do not follow or enforce the Code of
Conduct may be permanently removed from the project team.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting a project maintainer. All complaints
will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. Maintainers are obligated to
maintain confidentiality with regard to the reporter of an incident.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.3.0, available at
[http://contributor-covenant.org/version/1/3/0/][version]
## Enforcement
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/3/0/
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting a project maintainer. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct.html][version]
[homepage]: https://www.contributor-covenant.org/
[version]: https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

View File

@@ -3,71 +3,45 @@ title: Collections
permalink: /docs/collections/
---
Not everything is a post or a page. Maybe you want to document the various
methods in your open source project, members of a team, or talks at a
conference. Collections allow you to define a new type of document that behave
like Pages or Posts do normally, but also have their own unique properties and
namespace.
Collections are a great way to group related content like members of a team or
talks at a conference.
## Using Collections
## Setup
To start using collections, follow these 3 steps:
* [Step 1: Tell Jekyll to read in your collection](#step1)
* [Step 2: Add your content](#step2)
* [Step 3: Optionally render your collection's documents into independent files](#step3)
### Step 1: Tell Jekyll to read in your collection {#step1}
Add the following to your site's `_config.yml` file, replacing `my_collection`
with the name of your collection:
To use a Collection you first need to define it in your `_config.yml`. For
example here's a collection of staff members:
```yaml
collections:
- my_collection
- staff_members
```
You can optionally specify metadata for your collection in the configuration:
```yaml
collections:
my_collection:
foo: bar
staff_members:
people: true
```
Default attributes can also be set for a collection:
## Add content
```yaml
defaults:
- scope:
path: ""
type: my_collection
values:
layout: page
```
<div class="note">
<h5>Gather your collections {%- include docs_version_badge.html version="3.7.0" -%}</h5>
<p>You can optionally specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code>.</p>
<p>Then Jekyll will look in <code>my_collections/_books</code> for the <code>books</code> collection, and
in <code>my_collections/_recipes</code> for the <code>recipes</code> collection.</p>
</div>
<div class="note warning">
<h5>Be sure to move posts into custom collections directory</h5>
<p>If you specify a directory to store all your collections in the same place with <code>collections_dir: my_collections</code>, then you will need to move your <code>_posts</code> directory to <code>my_collections/_posts</code>. Note that, the name of your collections directory cannot start with an underscore (`_`).</p>
</div>
### Step 2: Add your content {#step2}
Create a corresponding folder (e.g. `<source>/_my_collection`) and add
documents. YAML front matter is processed if the front matter exists, and everything
after the front matter is pushed into the document's `content` attribute. If no YAML front
Create a corresponding folder (e.g. `<source>/_staff_members`) and add
documents. Front matter is processed if the front matter exists, and everything
after the front matter is pushed into the document's `content` attribute. If no front
matter is provided, Jekyll will not generate the file in your collection.
For example here's how you would add a staff member to the collection set above.
The filename is `./_staff_members/jane.md` with the following content:
```markdown
---
name: Jane Doe
position: Developer
---
Jane has worked on Jekyll for the past *five years*.
```
<div class="note info">
<h5>Be sure to name your directories correctly</h5>
<p>
@@ -76,190 +50,68 @@ your <code>_config.yml</code> file, with the addition of the preceding <code>_</
</p>
</div>
### Step 3: Optionally render your collection's documents into independent files {#step3}
## Output
If you'd like Jekyll to create a public-facing, rendered version of each
document in your collection, set the `output` key to `true` in your collection
metadata in your `_config.yml`:
```yaml
collections:
my_collection:
output: true
```
This will produce a file for each document in the collection.
For example, if you have `_my_collection/some_subdir/some_doc.md`,
it will be rendered using Liquid and the Markdown converter of your
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
If you wish a specific page to be shown when accessing `/my_collection/`,
simply add `permalink: /my_collection/index.html` to a page.
To list items from the collection, on that page or any other, you can use:
Now you can iterate over `site.staff_members` on a page and output the content
for each staff member. Similar to posts, the body of the document is accessed
using the `content` variable:
{% raw %}
```liquid
{% for item in site.my_collection %}
<h2>{{ item.title }}</h2>
<p>{{ item.description }}</p>
<p><a href="{{ item.url }}">{{ item.title }}</a></p>
{% for staff_member in site.staff_members %}
<h2>{{ staff_member.name }} - {{ staff_member.position }}</h2>
<p>{{ staff_member.content | markdownify }}</p>
{% endfor %}
```
{% endraw %}
<div class="note info">
<h5>Don't forget to add YAML for processing</h5>
<p>
Files in collections that do not have front matter are treated as
<a href="/docs/static-files">static files</a> and simply copied to their
output location without processing.
</p>
</div>
## Configuring permalinks for collections {#permalinks}
If you wish to specify a custom pattern for the URLs where your Collection pages
will reside, you may do so with the [`permalink` property](../permalinks/):
If you'd like Jekyll to create a rendered page for each document in your
collection, you can set the `output` key to `true` in your collection
metadata in `_config.yml`:
```yaml
collections:
my_collection:
staff_members:
output: true
permalink: /:collection/:name
```
### Examples
For a collection with the following source file structure,
You can link to the generated page using the `url` attribute:
{% raw %}
```liquid
{% for staff_member in site.staff_members %}
<h2>
<a href="{{ staff_member.url }}">
{{ staff_member.name }} - {{ staff_member.position }}
</a>
</h2>
<p>{{ staff_member.content | markdownify }}</p>
{% endfor %}
```
_my_collection/
└── some_subdir
└── some_doc.md
```
{% endraw %}
each of the following `permalink` configurations will produce the document structure shown below it.
## Permalinks
* **Default**
Same as `permalink: /:collection/:path`.
There are special [permalink variables for collections](/docs/permalinks/) to
help you control the output url for the entire collection.
```
_site/
├── my_collection
│   └── some_subdir
│   └── some_doc.html
...
```
* `permalink: pretty`
Same as `permalink: /:collection/:path/`.
## Custom Collection directory
You can optionally specify a directory to store all your collections in the same place with `collections_dir: my_collections`.
```
_site/
├── my_collection
│   └── some_subdir
│   └── some_doc
│   └── index.html
...
```
* `permalink: /doc/:path`
Then Jekyll will look in `my_collections/_books` for the `books` collection, and
in `my_collections/_recipes` for the `recipes` collection.
```
_site/
├── doc
│   └── some_subdir
│   └── some_doc.html
...
```
* `permalink: /doc/:name`
The name of your collections directory cannot start with an `_`.
```
_site/
├── doc
│   └── some_doc.html
...
```
* `permalink: /:name`
```
_site/
├── some_doc.html
...
```
### Template Variables
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>:collection</code></p>
</td>
<td>
<p>Label of the containing collection.</p>
</td>
</tr>
<tr>
<td>
<p><code>:path</code></p>
</td>
<td>
<p>Path to the document relative to the collection's directory.</p>
</td>
</tr>
<tr>
<td>
<p><code>:name</code></p>
</td>
<td>
<p>The document's base filename, with every sequence of spaces
and non-alphanumeric characters replaced by a hyphen.</p>
</td>
</tr>
<tr>
<td>
<p><code>:title</code></p>
</td>
<td>
<p>
The <code>:title</code> template variable will take the
<code>slug</code> <a href="/docs/frontmatter/">front matter</a>
variable value if any is present in the document; if none is
defined then <code>:title</code> will be equivalent to
<code>:name</code>, aka the slug generated from the filename.
</p>
</td>
</tr>
<tr>
<td>
<p><code>:output_ext</code></p>
</td>
<td>
<p>Extension of the output file. (Included by default and usually unnecessary.)</p>
</td>
</tr>
</tbody>
</table>
</div>
You will need to move your `_drafts` and `_posts` to your `collection_dir`
{: .warning }
## Liquid Attributes
### Collections
Each collection is accessible as a field on the `site` variable. For example, if
you want to access the `albums` collection found in `_albums`, you'd use
`site.albums`.
Each collection is itself an array of documents (e.g., `site.albums` is an array of documents, much like `site.pages` and
`site.posts`). See the table below for how to access attributes of those documents.
The collections are also available under `site.collections`, with the metadata
Collections are also available under `site.collections`, with the metadata
you specified in your `_config.yml` (if present) and the following information:
<div class="mobile-side-scroller">
@@ -353,7 +205,7 @@ you specified in your `_config.yml` (if present) and the following information:
<p>Except for documents in hard-coded default collection <code>posts</code>, all documents in collections
you create, are accessible via Liquid irrespective of their assigned date, if any, and therefore renderable.
</p>
<p>However documents are attempted to be written to disk only if the concerned collection
<p>Documents are attempted to be written to disk only if the concerned collection
metadata has <code>output: true</code>. Additionally, future-dated documents are only written if
<code>site.future</code> <em>is also true</em>.
</p>
@@ -365,7 +217,7 @@ you specified in your `_config.yml` (if present) and the following information:
### Documents
In addition to any YAML Front Matter provided in the document's corresponding
In addition to any front matter provided in the document's corresponding
file, each document has the following attributes:
<div class="mobile-side-scroller">
@@ -383,9 +235,9 @@ file, each document has the following attributes:
</td>
<td>
<p>
The (unrendered) content of the document. If no YAML Front Matter is
The (unrendered) content of the document. If no front matter is
provided, Jekyll will not generate the file in your collection. If
YAML Front Matter is used, then this is all the contents of the file
front matter is used, then this is all the contents of the file
after the terminating
`---` of the front matter.
</p>
@@ -455,51 +307,3 @@ file, each document has the following attributes:
</tbody>
</table>
</div>
## Accessing Collection Attributes
Attributes from the YAML front matter can be accessed as data anywhere in the
site. Using the above example for configuring a collection as `site.albums`,
you might have front matter in an individual file structured as follows (which
must use a supported markup format, and cannot be saved with a `.yaml`
extension):
```yaml
title: "Josquin: Missa De beata virgine and Missa Ave maris stella"
artist: "The Tallis Scholars"
director: "Peter Phillips"
works:
- title: "Missa De beata virgine"
composer: "Josquin des Prez"
tracks:
- title: "Kyrie"
duration: "4:25"
- title: "Gloria"
duration: "9:53"
- title: "Credo"
duration: "9:09"
- title: "Sanctus & Benedictus"
duration: "7:47"
- title: "Agnus Dei I, II & III"
duration: "6:49"
```
Every album in the collection could be listed on a single page with a template:
```liquid
{% raw %}
{% for album in site.albums %}
<h2>{{ album.title }}</h2>
<p>Performed by {{ album.artist }}{% if album.director %}, directed by {{ album.director }}{% endif %}</p>
{% for work in album.works %}
<h3>{{ work.title }}</h3>
<p>Composed by {{ work.composer }}</p>
<ul>
{% for track in work.tracks %}
<li>{{ track.title }} ({{ track.duration }})</li>
{% endfor %}
</ul>
{% endfor %}
{% endfor %}
{% endraw %}
```

View File

@@ -0,0 +1,8 @@
---
title: Report a bug
permalink: "/docs/community/bug/"
---
If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository &mdash; First [look for the plugin on rubygems](https://rubygems.org/) then click on the `Homepage` link to access the plugin repository.
If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).

View File

@@ -0,0 +1,38 @@
---
title: Community
permalink: /docs/community/
redirect_from: "/help/index.html"
---
## Jekyll Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
[Read the full code of conduct](/docs/conduct/)
## Where to get support
If you're looking for support for Jekyll, there are a lot of options:
* Read [Jekyll Documentation](https://jekyllrb.com/docs/)
* If you have a question about using Jekyll, start a discussion on [the Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll)
* Chat with Jekyllers &mdash; Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll)
There are a bunch of helpful community members on these services that should be willing to point you in the right direction.
**Reminder: Jekyll's issue tracker is not a support forum.**
## Ways to contribute
* [How to Contribute](/docs/contributing/)
* [How to file a bug](/docs/community/bug/)
* [Guide for maintaining Jekyll](/docs/maintaining/)
## Jekyllconf
[Watch videos](/jekyllconf/) from members of the Jekyll community speak about interesting use cases, tricks theyve learned or meta Jekyll topics.
## Jekyll on Twitter
The [official Jekyll Twitter account](https://twitter.com/jekyllrb).

View File

@@ -3,831 +3,16 @@ title: Configuration
permalink: /docs/configuration/
---
Jekyll allows you to concoct your sites in any way you can dream up, and its
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
sites root directory, or can be specified as flags for the `jekyll` executable
in the terminal.
## Configuration Settings
### Global Configuration
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.
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th>
<span class="option">Options</span> and <span class="flag">Flags</span>
</th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Site Source</strong></p>
<p class="description">Change the directory where Jekyll will read files</p>
</td>
<td class="align-center">
<p><code class="option">source: DIR</code></p>
<p><code class="flag">-s, --source DIR</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Site Destination</strong></p>
<p class="description">Change the directory where Jekyll will write files</p>
</td>
<td class="align-center">
<p><code class="option">destination: DIR</code></p>
<p><code class="flag">-d, --destination DIR</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Safe</strong></p>
<p class="description">Disable <a href="../plugins/">custom plugins, and ignore symbolic links</a>.</p>
</td>
<td class="align-center">
<p><code class="option">safe: BOOL</code></p>
<p><code class="flag">--safe</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Exclude</strong></p>
<p class="description">
Exclude directories and/or files from the
conversion. These exclusions are relative to the site's
source directory and cannot be outside the source directory.
</p>
</td>
<td class="align-center">
<p><code class="option">exclude: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Include</strong></p>
<p class="description">
Force inclusion of directories and/or files in the conversion.
<code>.htaccess</code> is a good example since dotfiles are excluded
by default.
</p>
</td>
<td class="align-center">
<p><code class="option">include: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Keep files</strong></p>
<p class="description">
When clobbering the site destination, keep the selected files.
Useful for files that are not generated by jekyll; e.g. files or
assets that are generated by your build tool.
The paths are relative to the <code>destination</code>.
</p>
</td>
<td class="align-center">
<p><code class="option">keep_files: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Time Zone</strong></p>
<p class="description">
Set the time zone for site generation. This sets the <code>TZ</code>
environment variable, which Ruby uses to handle time and date
creation and manipulation. Any entry from the
<a href="https://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
Database</a> is valid, e.g. <code>America/New_York</code>. A list of all
available values can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
here</a>. When serving on a local machine, the default time zone is set by your operating system. But when served on a remote host/server, the default time zone depends on the server's setting or location.
</p>
</td>
<td class="align-center">
<p><code class="option">timezone: TIMEZONE</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Encoding</strong></p>
<p class="description">
Set the encoding of files by name (only available for Ruby
1.9 or later).
The default value is <code>utf-8</code> starting in 2.0.0,
and <code>nil</code> before 2.0.0, which will yield the Ruby
default of <code>ASCII-8BIT</code>.
Available encodings can be shown by the
command <code>ruby -e 'puts Encoding::list.join("\n")'</code>.
</p>
</td>
<td class="align-center">
<p><code class="option">encoding: ENCODING</code></p>
</td>
</tr>
<tr>
<td>
<p class='name'><strong>Defaults</strong></p>
<p class='description'>
Set defaults for <a href="../frontmatter/" title="YAML Front Matter">YAML Front Matter</a>
variables.
</p>
</td>
<td class='align-center'>
<p>see <a href="#front-matter-defaults" title="details">below</a></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note warning">
<h5>Destination folders are cleaned on site builds</h5>
<p>
The contents of <code>&lt;destination&gt;</code> are automatically
cleaned, by default, when the site is built. Files or folders that are not
created by your site will be removed. Some files could be retained
by specifying them within the <code>&lt;keep_files&gt;</code> configuration directive.
</p>
<p>
Do not use an important location for <code>&lt;destination&gt;</code>; instead, use it as
a staging area and copy files from there to your web server.
</p>
</div>
### Build Command Options
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th><span class="option">Options</span> and <span class="flag">Flags</span></th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Regeneration</strong></p>
<p class="description">Enable auto-regeneration of the site when files are modified.</p>
</td>
<td class="align-center">
<p><code class="flag">-w, --[no-]watch</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Configuration</strong></p>
<p class="description">Specify config files instead of using <code>_config.yml</code> automatically. Settings in later files override settings in earlier files.</p>
</td>
<td class="align-center">
<p><code class="flag">--config FILE1[,FILE2,...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Drafts</strong></p>
<p class="description">Process and render draft posts.</p>
</td>
<td class="align-center">
<p><code class="option">show_drafts: BOOL</code></p>
<p><code class="flag">--drafts</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Environment</strong></p>
<p class="description">Use a specific environment value in the build.</p>
</td>
<td class="align-center">
<p><code class="flag">JEKYLL_ENV=production</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Future</strong></p>
<p class="description">Publish posts or collection documents with a future date.</p>
</td>
<td class="align-center">
<p><code class="option">future: BOOL</code></p>
<p><code class="flag">--future</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Unpublished</strong></p>
<p class="description">Render posts that were marked as unpublished.</p>
</td>
<td class="align-center">
<p><code class="option">unpublished: BOOL</code></p>
<p><code class="flag">--unpublished</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>LSI</strong></p>
<p class="description">Produce an index for related posts. Requires the <a href="http://www.classifier-reborn.com/">classifier-reborn</a> plugin.</p>
</td>
<td class="align-center">
<p><code class="option">lsi: BOOL</code></p>
<p><code class="flag">--lsi</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Limit Posts</strong></p>
<p class="description">Limit the number of posts to parse and publish.</p>
</td>
<td class="align-center">
<p><code class="option">limit_posts: NUM</code></p>
<p><code class="flag">--limit_posts NUM</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Force polling</strong></p>
<p class="description">Force watch to use polling.</p>
</td>
<td class="align-center">
<p><code class="flag">--force_polling</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Verbose output</strong></p>
<p class="description">Print verbose output.</p>
</td>
<td class="align-center">
<p><code class="flag">-V, --verbose</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Silence Output</strong></p>
<p class="description">Silence the normal output from Jekyll
during a build</p>
</td>
<td class="align-center">
<p><code class="flag">-q, --quiet</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Incremental build</strong></p>
<p class="description">
Enable the experimental incremental build feature. Incremental build only
re-builds posts and pages that have changed, resulting in significant performance
improvements for large sites, but may also break site generation in certain
cases.
</p>
</td>
<td class="align-center">
<p><code class="option">incremental: BOOL</code></p>
<p><code class="flag">-I, --incremental</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Liquid profiler</strong></p>
<p class="description">
Generate a Liquid rendering profile to help you identify performance bottlenecks.
</p>
</td>
<td class="align-center">
<p><code class="option">profile: BOOL</code></p>
<p><code class="flag">--profile</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Strict Front Matter</strong></p>
<p class="description">
Cause a build to fail if there is a YAML syntax error in a page's front matter.
</p>
</td>
<td class="align-center">
<p><code class="option">strict_front_matter: BOOL</code></p>
<p><code class="flag">--strict_front_matter</code></p>
</td>
</tr>
</tbody>
</table>
</div>
### Serve Command Options
In addition to the options below, the `serve` sub-command can accept any of the options
for the `build` sub-command, which are then applied to the site build which occurs right
before your site is served.
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th><span class="option">Options</span> and <span class="flag">Flags</span></th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Local Server Port</strong></p>
<p class="description">Listen on the given port.</p>
</td>
<td class="align-center">
<p><code class="option">port: PORT</code></p>
<p><code class="flag">--port PORT</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Local Server Hostname</strong></p>
<p class="description">Listen at the given hostname.</p>
</td>
<td class="align-center">
<p><code class="option">host: HOSTNAME</code></p>
<p><code class="flag">--host HOSTNAME</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Base URL</strong></p>
<p class="description">Serve the website from the given base URL</p>
</td>
<td class="align-center">
<p><code class="option">baseurl: URL</code></p>
<p><code class="flag">--baseurl URL</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Detach</strong></p>
<p class="description">Detach the server from the terminal</p>
</td>
<td class="align-center">
<p><code class="option">detach: BOOL</code></p>
<p><code class="flag">-B, --detach</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Skips the initial site build.</strong></p>
<p class="description">Skips the initial site build which occurs before the server is started.</p>
</td>
<td class="align-center">
<p><code class="flag">--skip-initial-build</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>X.509 (SSL) Private Key</strong></p>
<p class="description">SSL Private Key.</p>
</td>
<td class="align-center">
<p><code class="flag">--ssl-key</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>X.509 (SSL) Certificate</strong></p>
<p class="description">SSL Public certificate.</p>
</td>
<td class="align-center">
<p><code class="flag">--ssl-cert</code></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note warning">
<h5>Do not use tabs in configuration files</h5>
<p>
This will either lead to parsing errors, or Jekyll will revert to the
default settings. Use spaces instead.
</p>
</div>
## Custom WEBrick Headers
You can provide custom headers for your site by adding them to `_config.yml`
```yaml
# File: _config.yml
webrick:
headers:
My-Header: My-Value
My-Other-Header: My-Other-Value
```
### Defaults
We provide by default `Content-Type` and `Cache-Control` response headers: one
dynamic in order to specify the nature of the data being served, the other
static in order to disable caching so that you don't have to fight with Chrome's
aggressive caching when you are in development mode.
## Specifying a Jekyll environment at build time
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.
For example, suppose you set this conditional statement in your code:
```liquid
{% raw %}
{% if jekyll.environment == "production" %}
{% include disqus.html %}
{% endif %}
{% endraw %}
```
When you build your Jekyll site, the content inside the `if` statement won't be run unless you also specify a `production` environment in the build command, like this:
```sh
JEKYLL_ENV=production jekyll build
```
Specifying an environment value allows you to make certain content available only within specific environments.
The default value for `JEKYLL_ENV` is `development`. Therefore if you omit `JEKYLL_ENV` from the build arguments, the default value will be `JEKYLL_ENV=development`. Any content inside `{% raw %}{% if jekyll.environment == "development" %}{% endraw %}` tags will automatically appear in the build.
Your environment values can be anything you want (not just `development` or `production`). 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.
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.
## Front Matter defaults
Using [YAML Front Matter](../frontmatter/) 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.
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.
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 `defaults` key in the `_config.yml` file in your project's root directory.
The `defaults` 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.
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 `_config.yml` file:
```yaml
defaults:
-
scope:
path: "" # an empty string here means all files in the project
values:
layout: "default"
```
<div class="note info">
<h5>Please stop and rerun `jekyll serve` command.</h5>
<p>
The <code>_config.yml</code> master configuration file contains global configurations
and variable definitions that are read once at execution time. Changes made to <code>_config.yml</code>
during automatic regeneration are not loaded until the next execution.
</p>
<p>
Note <a href="../datafiles">Data Files</a> are included and reloaded during automatic regeneration.
</p>
</div>
Here, we are scoping the `values` to any file that exists in the path `scope`. Since the path is set as an empty string, it will apply to **all files** 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 `type` value under the `scope` key.
```yaml
defaults:
-
scope:
path: "" # an empty string here means all files in the project
type: "posts" # previously `post` in Jekyll 2.2.
values:
layout: "default"
```
Now, this will only set the layout for files where the type is `posts`.
The different types that are available to you are `pages`, `posts`, `drafts` or any collection in your site. While `type` is optional, you must specify a value for `path` when creating a `scope/values` pair.
As mentioned earlier, you can set multiple scope/values pairs for `defaults`.
```yaml
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "my-site"
-
scope:
path: "projects"
type: "pages" # previously `page` in Jekyll 2.2.
values:
layout: "project" # overrides previous default layout
author: "Mr. Hyde"
```
With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` folder will use the `project` layout, if it exists. Those files will also have the `page.author` [liquid variable](../variables/) set to `Mr. Hyde`.
```yaml
collections:
my_collection:
output: true
defaults:
-
scope:
path: ""
type: "my_collection" # a collection in your site, in plural form
values:
layout: "default"
```
In this example, the `layout` is set to `default` inside the
[collection](../collections/) with the name `my_collection`.
### Glob patterns in Front Matter defaults
It is also possible to use glob patterns (currently limited to patterns that contain `*`) when matching defaults. For example, it is possible to set specific layout for each `special-page.html` in any subfolder of `section` folder. {%- include docs_version_badge.html version="3.7.0" -%}
```yaml
collections:
my_collection:
output: true
defaults:
-
scope:
path: "section/*/special-page.html"
values:
layout: "specific-layout"
```
<div class="note warning">
<h5>Globbing and Performance</h5>
<p>
Please note that globbing a path is known to have a negative effect on
performance and is currently not optimized, especially on Windows.
Globbing a path will increase your build times in proportion to the size
of the associated collection directory.
</p>
</div>
### Precedence
Jekyll will apply all of the configuration settings you specify in the `defaults` section of your `_config.yml` file. However, you can choose to override settings from other scope/values pair by specifying a more specific path for the scope.
You can see that in the second to last example above. First, we set the default page layout to `my-site`. Then, using a more specific path, we set the default layout for pages in the `projects/` path to `project`. This can be done with any value that you would set in the page or post front matter.
Finally, if you set defaults in the site configuration by adding a `defaults` section to your `_config.yml` 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:
```yaml
# In _config.yml
...
defaults:
-
scope:
path: "projects"
type: "pages"
values:
layout: "project"
author: "Mr. Hyde"
category: "project"
...
```
```yaml
# In projects/foo_project.md
---
author: "John Smith"
layout: "foobar"
---
The post text goes here...
```
The `projects/foo_project.md` would have the `layout` set to `foobar` instead
of `project` and the `author` set to `John Smith` instead of `Mr. Hyde` when
the site is built.
## Default Configuration
Jekyll runs with the following configuration options by default. Alternative
settings for these options can be explicitly specified in the configuration
file or on the command-line.
<div class="note warning">
<h5>There are two unsupported kramdown options</h5>
<p>
Please note that both <code>remove_block_html_tags</code> and
<code>remove_span_html_tags</code> are currently unsupported in Jekyll due
to the fact that they are not included within the kramdown HTML converter.
</p>
</div>
```yaml
# Where things are
source: .
destination: ./_site
collections_dir: .
plugins_dir: _plugins
layouts_dir: _layouts
data_dir: _data
includes_dir: _includes
collections:
posts:
output: true
# Handling Reading
safe: false
include: [".htaccess"]
exclude: ["Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
keep_files: [".git", ".svn"]
encoding: "utf-8"
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
strict_front_matter: false
# Filtering Content
show_drafts: null
limit_posts: 0
future: false
unpublished: false
# Plugins
whitelist: []
plugins: []
# Conversion
markdown: kramdown
highlighter: rouge
lsi: false
excerpt_separator: "\n\n"
incremental: false
# Serving
detach: false
port: 4000
host: 127.0.0.1
baseurl: "" # does not include hostname
show_dir_listing: false
# Outputting
permalink: date
paginate_path: /page:num
timezone: null
quiet: false
verbose: false
defaults: []
liquid:
error_mode: warn
strict_filters: false
strict_variables: false
# Markdown Processors
rdiscount:
extensions: []
redcarpet:
extensions: []
kramdown:
auto_ids: true
entity_output: as_char
toc_levels: 1..6
smart_quotes: lsquo,rsquo,ldquo,rdquo
input: GFM
hard_wrap: false
footnote_nr: 1
show_warnings: false
```
## Liquid Options
Liquid's response to errors can be configured by setting `error_mode`. The
options are
- `lax` --- Ignore all errors.
- `warn` --- Output a warning on the console for each error.
- `strict` --- Output an error message and stop the build.
You can also configure Liquid's renderer to catch non-assigned variables and
non-existing filters by setting `strict_variables` and / or `strict_filters`
to `true` respectively. {% include docs_version_badge.html version="3.8.0" %}
Do note that while `error_mode` configures Liquid's parser, the `strict_variables`
and `strict_filters` options configure Liquid's renderer and are consequently,
mutually exclusive.
## Markdown Options
The various Markdown renderers supported by Jekyll sometimes have extra options
available.
### Redcarpet
Redcarpet can be configured by providing an `extensions` sub-setting, whose
value should be an array of strings. Each string should be the name of one of
the `Redcarpet::Markdown` class's extensions; if present in the array, it will
set the corresponding extension to `true`.
Jekyll handles two special Redcarpet extensions:
- `no_fenced_code_blocks` --- By default, Jekyll sets the `fenced_code_blocks`
extension (for delimiting code blocks with triple tildes or triple backticks)
to `true`, probably because GitHub's eager adoption of them is starting to make
them inescapable. Redcarpet's normal `fenced_code_blocks` extension is inert
when used with Jekyll; instead, you can use this inverted version of the
extension for disabling fenced code.
Note that you can also specify a language for highlighting after the first
delimiter:
```ruby
# ...ruby code
```
With both fenced code blocks and highlighter enabled, this will statically
highlight the code; without any syntax highlighter, it will add a
`class="LANGUAGE"` attribute to the `<code>` element, which can be used as a
hint by various JavaScript code highlighting libraries.
- `smart` --- This pseudo-extension turns on SmartyPants, which converts
straight quotes to curly quotes and runs of hyphens to em (`---`) and en (`--`) dashes.
All other extensions retain their usual names from Redcarpet, and no renderer
options aside from `smart` can be specified in Jekyll. [A list of available
extensions can be found in the Redcarpet README file.][redcarpet_extensions]
Make sure you're looking at the README for the right version of
Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
extensions are:
- `tables`
- `no_intra_emphasis`
- `autolink`
[redcarpet_extensions]: https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use
### Custom Markdown Processors
If you're interested in creating a custom markdown processor, you're in luck! Create a new class in the `Jekyll::Converters::Markdown` namespace:
```ruby
class Jekyll::Converters::Markdown::MyCustomProcessor
def initialize(config)
require 'funky_markdown'
@config = config
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install funky_markdown'
raise FatalException.new("Missing dependency: funky_markdown")
end
def convert(content)
::FunkyMarkdown.new(content).convert
end
end
```
Once you've created your class and have it properly set up either as a plugin
in the `_plugins` folder or as a gem, specify it in your `_config.yml`:
```yaml
markdown: MyCustomProcessor
```
## Incremental Regeneration
<div class="note warning">
<h5>Incremental regeneration is still an experimental feature</h5>
<p>
While incremental regeneration will work for the most common cases, it will
not work correctly in every scenario. Please be extremely cautious when
using the feature, and report any problems not listed below by
<a href="https://github.com/jekyll/jekyll/issues/new">opening an issue on GitHub</a>.
</p>
</div>
Incremental regeneration helps shorten build times by only generating documents
and pages that were updated since the previous build. It does this by keeping
track of both file modification times and inter-document dependencies in the
`.jekyll-metadata` file.
Under the current implementation, incremental regeneration will only generate a
document or page if either it, or one of its dependencies, is modified. Currently,
the only types of dependencies tracked are includes (using the
{% raw %}`{% include %}`{% endraw %} tag) and layouts. This means that plain
references to other documents (for example, the common case of iterating over
`site.posts` in a post listings page) will not be detected as a dependency.
To remedy some of these shortfalls, putting `regenerate: true` in the front-matter
of a document will force Jekyll to regenerate it regardless of whether it has been
modified. Note that this will generate the specified document only; references
to other documents' contents will not work since they won't be re-rendered.
Incremental regeneration can be enabled via the `--incremental` flag (`-I` for
short) from the command-line or by setting `incremental: true` in your
configuration file.
Jekyll gives you a lot of flexibility to customize how it builds your site. These
options can either be specified in a `_config.yml` or `_config.toml` file placed
in your sites root directory, or can be specified as flags for the `jekyll`
executable in the terminal.
* [Configuration Options](/docs/configuration/options/)
* [Default Configuration](/docs/configuration/default/)
* [Front Matter Defaults](/docs/configuration/front-matter-defaults/)
* [Environments](/docs/configuration/environments/)
* [Markdown Options](/docs/configuration/markdown/)
* [Liquid Options](/docs/configuration/liquid/)
* [Webrick Options](/docs/configuration/webrick/)
* [Incremental Regeneration](/docs/configuration/incremental-regeneration/)

View File

@@ -0,0 +1,86 @@
---
title: Default Configuration
permalink: "/docs/configuration/default/"
---
Jekyll runs with the following configuration options by default. Alternative
settings for these options can be explicitly specified in the configuration
file or on the command-line.
```yaml
# Where things are
source : .
destination : ./_site
collections_dir : .
plugins_dir : _plugins
layouts_dir : _layouts
data_dir : _data
includes_dir : _includes
collections:
posts:
output : true
# Handling Reading
safe : false
include : [".htaccess"]
exclude : ["Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
keep_files : [".git", ".svn"]
encoding : "utf-8"
markdown_ext : "markdown,mkdown,mkdn,mkd,md"
strict_front_matter : false
# Filtering Content
show_drafts : null
limit_posts : 0
future : false
unpublished : false
# Plugins
whitelist : []
plugins : []
# Conversion
markdown : kramdown
highlighter : rouge
lsi : false
excerpt_separator : "\n\n"
incremental : false
# Serving
detach : false
port : 4000
host : 127.0.0.1
baseurl : "" # does not include hostname
show_dir_listing : false
# Outputting
permalink : date
paginate_path : /page:num
timezone : null
quiet : false
verbose : false
defaults : []
liquid:
error_mode : warn
strict_filters : false
strict_variables : false
# Markdown Processors
rdiscount:
extensions : []
redcarpet:
extensions : []
kramdown:
auto_ids : true
entity_output : as_char
toc_levels : 1..6
smart_quotes : lsquo,rsquo,ldquo,rdquo
input : GFM
hard_wrap : false
footnote_nr : 1
show_warnings : false
```

View File

@@ -0,0 +1,49 @@
---
title: Environments
permalink: "/docs/configuration/environments/"
---
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.
For example, suppose you set this conditional statement in your code:
{% raw %}
```liquid
{% if jekyll.environment == "production" %}
{% include disqus.html %}
{% endif %}
```
{% endraw %}
When you build your Jekyll site, the content inside the `if` statement won't be
run unless you also specify a `production` environment in the build command,
like this:
```sh
JEKYLL_ENV=production jekyll build
```
Specifying an environment value allows you to make certain content available
only within specific environments.
The default value for `JEKYLL_ENV` is `development`. Therefore if you omit
`JEKYLL_ENV` from the build arguments, the default value will be
`JEKYLL_ENV=development`. Any content inside
{% raw %}`{% if jekyll.environment == "development" %}`{% endraw %} tags will
automatically appear in the build.
Your environment values can be anything you want (not just `development` or
`production`). 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.
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.
<div class="note info">
<p>
To switch part of your config settings depending on the environment, use the <a href="/docs/configuration/options/#build-command-options">build command option</a>, for example <code>--config _config.yml,_config_development.yml</code>. Settings in later files override settings in earlier files.
</p>
</div>

View File

@@ -0,0 +1,140 @@
---
title: Front Matter Defaults
permalink: "/docs/configuration/front-matter-defaults/"
---
Using [front matter](/docs/front-matter/) 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.
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.
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 `defaults` key in the `_config.yml` file in your project's root directory.
The `defaults` 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.
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 `_config.yml` file:
```yaml
defaults:
-
scope:
path: "" # an empty string here means all files in the project
values:
layout: "default"
```
`_config.yml` is only read when Jekyll first starts. For changes to take effect you'll need to restart Jekyll.
{: .warning }
Here, we are scoping the `values` to any file that exists in the path `scope`. Since the path is set as an empty string, it will apply to **all files** 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 `type` value under the `scope` key.
```yaml
defaults:
-
scope:
path: "" # an empty string here means all files in the project
type: "posts" # previously `post` in Jekyll 2.2.
values:
layout: "default"
```
Now, this will only set the layout for files where the type is `posts`.
The different types that are available to you are `pages`, `posts`, `drafts` or any collection in your site. While `type` is optional, you must specify a value for `path` when creating a `scope/values` pair.
As mentioned earlier, you can set multiple scope/values pairs for `defaults`.
```yaml
defaults:
-
scope:
path: ""
type: "pages"
values:
layout: "my-site"
-
scope:
path: "projects"
type: "pages" # previously `page` in Jekyll 2.2.
values:
layout: "project" # overrides previous default layout
author: "Mr. Hyde"
```
With these defaults, all pages would use the `my-site` layout. Any html files that exist in the `projects/` folder will use the `project` layout, if it exists. Those files will also have the `page.author` [liquid variable](/docs/variables/) set to `Mr. Hyde`.
```yaml
collections:
my_collection:
output: true
defaults:
-
scope:
path: ""
type: "my_collection" # a collection in your site, in plural form
values:
layout: "default"
```
In this example, the `layout` is set to `default` inside the
[collection](/docs/collections/) with the name `my_collection`.
### Glob patterns in Front Matter defaults
It is also possible to use glob patterns (currently limited to patterns that contain `*`) when matching defaults. For example, it is possible to set specific layout for each `special-page.html` in any subfolder of `section` folder. {%- include docs_version_badge.html version="3.7.0" -%}
```yaml
collections:
my_collection:
output: true
defaults:
-
scope:
path: "section/*/special-page.html"
values:
layout: "specific-layout"
```
Please note that globbing a path is known to have a negative effect on
performance and is currently not optimized, especially on Windows.
Globbing a path will increase your build times in proportion to the size
of the associated collection directory.
{: .warning }
### Precedence
Jekyll will apply all of the configuration settings you specify in the `defaults` section of your `_config.yml` file. You can choose to override settings from other scope/values pair by specifying a more specific path for the scope.
You can see that in the second to last example above. First, we set the default page layout to `my-site`. Then, using a more specific path, we set the default layout for pages in the `projects/` path to `project`. This can be done with any value that you would set in the page or post front matter.
Finally, if you set defaults in the site configuration by adding a `defaults` section to your `_config.yml` 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:
```yaml
# In _config.yml
...
defaults:
-
scope:
path: "projects"
type: "pages"
values:
layout: "project"
author: "Mr. Hyde"
category: "project"
...
```
```yaml
# In projects/foo_project.md
---
author: "John Smith"
layout: "foobar"
---
The post text goes here...
```
The `projects/foo_project.md` would have the `layout` set to `foobar` instead
of `project` and the `author` set to `John Smith` instead of `Mr. Hyde` when
the site is built.

View File

@@ -0,0 +1,34 @@
---
title: Default Configuration
permalink: "/docs/configuration/incremental-regeneration/"
---
## Incremental Regeneration
While incremental regeneration will work for the most common cases, it will
not work correctly in every scenario. Please be extremely cautious when
using the feature, and report any problems not listed below by
[opening an issue on GitHub](https://github.com/jekyll/jekyll/issues/new).
{: .warning }
Incremental regeneration helps shorten build times by only generating documents
and pages that were updated since the previous build. It does this by keeping
track of both file modification times and inter-document dependencies in the
`.jekyll-metadata` file.
Under the current implementation, incremental regeneration will only generate a
document or page if either it, or one of its dependencies, is modified. Currently,
the only types of dependencies tracked are includes (using the
{% raw %}`{% include %}`{% endraw %} tag) and layouts. This means that plain
references to other documents (for example, the common case of iterating over
`site.posts` in a post listings page) will not be detected as a dependency.
To remedy some of these shortfalls, putting `regenerate: true` in the front-matter
of a document will force Jekyll to regenerate it regardless of whether it has been
modified. Note that this will generate the specified document only; references
to other documents' contents will not work since they won't be re-rendered.
Incremental regeneration can be enabled via the `--incremental` flag (`-I` for
short) from the command-line or by setting `incremental: true` in your
configuration file.

View File

@@ -0,0 +1,18 @@
---
title: Liquid Options
permalink: "/docs/configuration/liquid/"
---
Liquid's response to errors can be configured by setting `error_mode`. The
options are
- `lax` --- Ignore all errors.
- `warn` --- Output a warning on the console for each error.
- `strict` --- Output an error message and stop the build.
You can also configure Liquid's renderer to catch non-assigned variables and
non-existing filters by setting `strict_variables` and / or `strict_filters`
to `true` respectively. {% include docs_version_badge.html version="3.8.0" %}
Do note that while `error_mode` configures Liquid's parser, the `strict_variables`
and `strict_filters` options configure Liquid's renderer and are consequently,
mutually exclusive.

View File

@@ -0,0 +1,119 @@
---
title: Markdown Options
permalink: "/docs/configuration/markdown/"
---
The various Markdown renderers supported by Jekyll sometimes have extra options
available.
### Kramdown
Kramdown is the default Markdown renderer for Jekyll. Below is a list of the
currently supported options:
* **auto_id_prefix** - Prefix used for automatically generated header IDs
* **auto_id_stripping** - Strip all formatting from header text for automatic ID generation
* **auto_ids** - Use automatic header ID generation
* **coderay_bold_every** - Defines how often a line number should be made bold
* **coderay_css** - Defines how the highlighted code gets styled
* **coderay_default_lang** - Sets the default language for highlighting code blocks
* **coderay_line_number_start** - The start value for the line numbers
* **coderay_line_numbers** - Defines how and if line numbers should be shown
* **coderay_tab_width** - The tab width used in highlighted code
* **coderay_wrap** - Defines how the highlighted code should be wrapped
* **enable_coderay** - Use coderay for syntax highlighting
* **entity_output** - Defines how entities are output
* **footnote_backlink** - Defines the text that should be used for the footnote backlinks
* **footnote_backlink_inline** - Specifies whether the footnote backlink should always be inline
* **footnote_nr** - The number of the first footnote
* **gfm_quirks** - Enables a set of GFM specific quirks
* **hard_wrap** - Interprets line breaks literally
* **header_offset** - Sets the output offset for headers
* **html_to_native** - Convert HTML elements to native elements
* **line_width** - Defines the line width to be used when outputting a document
* **link_defs** - Pre-defines link definitions
* **math_engine** - Set the math engine
* **math_engine_opts** - Set the math engine options
* **parse_block_html** - Process kramdown syntax in block HTML tags
* **parse_span_html** - Process kramdown syntax in span HTML tags
* **smart_quotes** - Defines the HTML entity names or code points for smart quote output
* **syntax_highlighter** - Set the syntax highlighter
* **syntax_highlighter_opts** - Set the syntax highlighter options
* **toc_levels** - Defines the levels that are used for the table of contents
* **transliterated_header_ids** - Transliterate the header text before generating the ID
* **typographic_symbols** - Defines a mapping from typographical symbol to output characters
Please note that both `remove_block_html_tags` and
`remove_span_html_tags` are currently unsupported in Jekyll due
to the fact that they are not included within the kramdown HTML converter.
{: .warning }
For more details about these options have a look at the [Kramdown configuration documentation](https://kramdown.gettalong.org/options.html).
### Redcarpet
Redcarpet can be configured by providing an `extensions` sub-setting, whose
value should be an array of strings. Each string should be the name of one of
the `Redcarpet::Markdown` class's extensions; if present in the array, it will
set the corresponding extension to `true`.
Jekyll handles two special Redcarpet extensions:
- `no_fenced_code_blocks` --- By default, Jekyll sets the `fenced_code_blocks`
extension (for delimiting code blocks with triple tildes or triple backticks)
to `true`, probably because GitHub's eager adoption of them is starting to make
them inescapable. Redcarpet's normal `fenced_code_blocks` extension is inert
when used with Jekyll; instead, you can use this inverted version of the
extension for disabling fenced code.
Note that you can also specify a language for highlighting after the first
delimiter:
```ruby
# ...ruby code
```
With both fenced code blocks and highlighter enabled, this will statically
highlight the code; without any syntax highlighter, it will add a
`class="LANGUAGE"` attribute to the `<code>` element, which can be used as a
hint by various JavaScript code highlighting libraries.
- `smart` --- This pseudo-extension turns on SmartyPants, which converts
straight quotes to curly quotes and runs of hyphens to em (`---`) and en (`--`) dashes.
All other extensions retain their usual names from Redcarpet, and no renderer
options aside from `smart` can be specified in Jekyll. [A list of available
extensions can be found in the Redcarpet README file.](https://github.com/vmg/redcarpet/blob/v3.2.2/README.markdown#and-its-like-really-simple-to-use)
Make sure you're looking at the README for the right version of
Redcarpet: Jekyll currently uses v3.2.x. The most commonly used
extensions are:
- `tables`
- `no_intra_emphasis`
- `autolink`
### Custom Markdown Processors
If you're interested in creating a custom markdown processor, you're in luck! Create a new class in the `Jekyll::Converters::Markdown` namespace:
```ruby
class Jekyll::Converters::Markdown::MyCustomProcessor
def initialize(config)
require 'funky_markdown'
@config = config
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install funky_markdown'
raise FatalException.new("Missing dependency: funky_markdown")
end
def convert(content)
::FunkyMarkdown.new(content).convert
end
end
```
Once you've created your class and have it properly set up either as a plugin
in the `_plugins` folder or as a gem, specify it in your `_config.yml`:
```yaml
markdown: MyCustomProcessor
```

View File

@@ -0,0 +1,388 @@
---
title: Configuration Options
permalink: "/docs/configuration/options/"
---
The tables below list 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.
Remember, configuration files are YAML so use spaces for indention not tabs.
### Global Configuration
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th>
<span class="option">Options</span> and <span class="flag">Flags</span>
</th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Site Source</strong></p>
<p class="description">Change the directory where Jekyll will read files</p>
</td>
<td class="align-center">
<p><code class="option">source: DIR</code></p>
<p><code class="flag">-s, --source DIR</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Site Destination</strong></p>
<p class="description">Change the directory where Jekyll will write files. Files or folders in this directory that are not created by your site will be removed. Some files could be retained
by specifying them within the <code>&lt;keep_files&gt;</code> configuration directive.</p>
</td>
<td class="align-center">
<p><code class="option">destination: DIR</code></p>
<p><code class="flag">-d, --destination DIR</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Safe</strong></p>
<p class="description">Disable <a href="/docs/plugins/">custom plugins, and ignore symbolic links</a>.</p>
</td>
<td class="align-center">
<p><code class="option">safe: BOOL</code></p>
<p><code class="flag">--safe</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Exclude</strong></p>
<p class="description">
Exclude directories and/or files from the
conversion. These exclusions are relative to the site's
source directory and cannot be outside the source directory.
</p>
</td>
<td class="align-center">
<p><code class="option">exclude: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Include</strong></p>
<p class="description">
Force inclusion of directories and/or files in the conversion.
<code>.htaccess</code> is a good example since dotfiles are excluded
by default.
</p>
</td>
<td class="align-center">
<p><code class="option">include: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Keep files</strong></p>
<p class="description">
When clobbering the site destination, keep the selected files.
Useful for files that are not generated by jekyll; e.g. files or
assets that are generated by your build tool.
The paths are relative to the <code>destination</code>.
</p>
</td>
<td class="align-center">
<p><code class="option">keep_files: [DIR, FILE, ...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Time Zone</strong></p>
<p class="description">
Set the time zone for site generation. This sets the <code>TZ</code>
environment variable, which Ruby uses to handle time and date
creation and manipulation. Any entry from the
<a href="https://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
Database</a> is valid, e.g. <code>America/New_York</code>. A list of all
available values can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
here</a>. When serving on a local machine, the default time zone is set by your operating system. But when served on a remote host/server, the default time zone depends on the server's setting or location.
</p>
</td>
<td class="align-center">
<p><code class="option">timezone: TIMEZONE</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Encoding</strong></p>
<p class="description">
Set the encoding of files by name (only available for Ruby
1.9 or later).
The default value is <code>utf-8</code> starting in 2.0.0,
and <code>nil</code> before 2.0.0, which will yield the Ruby
default of <code>ASCII-8BIT</code>.
</p>
</td>
<td class="align-center">
<p><code class="option">encoding: ENCODING</code></p>
</td>
</tr>
<tr>
<td>
<p class='name'><strong>Defaults</strong></p>
<p class='description'>
Set defaults for <a href="/docs/front-matter/" title="front matter">front matter</a>
variables.
</p>
</td>
<td class='align-center'>
<p>see <a href="/docs/configuration/front-matter-defaults/" title="details">below</a></p>
</td>
</tr>
</tbody>
</table>
</div>
### Build Command Options
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th><span class="option">Options</span> and <span class="flag">Flags</span></th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Regeneration</strong></p>
<p class="description">Enable auto-regeneration of the site when files are modified.</p>
</td>
<td class="align-center">
<p><code class="flag">-w, --[no-]watch</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Configuration</strong></p>
<p class="description">Specify config files instead of using <code>_config.yml</code> automatically. Settings in later files override settings in earlier files.</p>
</td>
<td class="align-center">
<p><code class="flag">--config FILE1[,FILE2,...]</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Drafts</strong></p>
<p class="description">Process and render draft posts.</p>
</td>
<td class="align-center">
<p><code class="option">show_drafts: BOOL</code></p>
<p><code class="flag">--drafts</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Environment</strong></p>
<p class="description">Use a specific environment value in the build.</p>
</td>
<td class="align-center">
<p><code class="flag">JEKYLL_ENV=production</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Future</strong></p>
<p class="description">Publish posts or collection documents with a future date.</p>
</td>
<td class="align-center">
<p><code class="option">future: BOOL</code></p>
<p><code class="flag">--future</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Unpublished</strong></p>
<p class="description">Render posts that were marked as unpublished.</p>
</td>
<td class="align-center">
<p><code class="option">unpublished: BOOL</code></p>
<p><code class="flag">--unpublished</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>LSI</strong></p>
<p class="description">Produce an index for related posts. Requires the <a href="http://www.classifier-reborn.com/">classifier-reborn</a> plugin.</p>
</td>
<td class="align-center">
<p><code class="option">lsi: BOOL</code></p>
<p><code class="flag">--lsi</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Limit Posts</strong></p>
<p class="description">Limit the number of posts to parse and publish.</p>
</td>
<td class="align-center">
<p><code class="option">limit_posts: NUM</code></p>
<p><code class="flag">--limit_posts NUM</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Force polling</strong></p>
<p class="description">Force watch to use polling.</p>
</td>
<td class="align-center">
<p><code class="flag">--force_polling</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Verbose output</strong></p>
<p class="description">Print verbose output.</p>
</td>
<td class="align-center">
<p><code class="flag">-V, --verbose</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Silence Output</strong></p>
<p class="description">Silence the normal output from Jekyll
during a build</p>
</td>
<td class="align-center">
<p><code class="flag">-q, --quiet</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Incremental build</strong></p>
<p class="description">
Enable the experimental incremental build feature. Incremental build only
re-builds posts and pages that have changed, resulting in significant performance
improvements for large sites, but may also break site generation in certain
cases.
</p>
</td>
<td class="align-center">
<p><code class="option">incremental: BOOL</code></p>
<p><code class="flag">-I, --incremental</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Liquid profiler</strong></p>
<p class="description">
Generate a Liquid rendering profile to help you identify performance bottlenecks.
</p>
</td>
<td class="align-center">
<p><code class="option">profile: BOOL</code></p>
<p><code class="flag">--profile</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Strict Front Matter</strong></p>
<p class="description">
Cause a build to fail if there is a YAML syntax error in a page's front matter.
</p>
</td>
<td class="align-center">
<p><code class="option">strict_front_matter: BOOL</code></p>
<p><code class="flag">--strict_front_matter</code></p>
</td>
</tr>
</tbody>
</table>
</div>
### Serve Command Options
In addition to the options below, the `serve` sub-command can accept any of the options
for the `build` sub-command, which are then applied to the site build which occurs right
before your site is served.
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Setting</th>
<th><span class="option">Options</span> and <span class="flag">Flags</span></th>
</tr>
</thead>
<tbody>
<tr class="setting">
<td>
<p class="name"><strong>Local Server Port</strong></p>
<p class="description">Listen on the given port.</p>
</td>
<td class="align-center">
<p><code class="option">port: PORT</code></p>
<p><code class="flag">--port PORT</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Local Server Hostname</strong></p>
<p class="description">Listen at the given hostname.</p>
</td>
<td class="align-center">
<p><code class="option">host: HOSTNAME</code></p>
<p><code class="flag">--host HOSTNAME</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Base URL</strong></p>
<p class="description">Serve the website from the given base URL</p>
</td>
<td class="align-center">
<p><code class="option">baseurl: URL</code></p>
<p><code class="flag">--baseurl URL</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Detach</strong></p>
<p class="description">Detach the server from the terminal</p>
</td>
<td class="align-center">
<p><code class="option">detach: BOOL</code></p>
<p><code class="flag">-B, --detach</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>Skips the initial site build.</strong></p>
<p class="description">Skips the initial site build which occurs before the server is started.</p>
</td>
<td class="align-center">
<p><code class="flag">--skip-initial-build</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>X.509 (SSL) Private Key</strong></p>
<p class="description">SSL Private Key.</p>
</td>
<td class="align-center">
<p><code class="flag">--ssl-key</code></p>
</td>
</tr>
<tr class="setting">
<td>
<p class="name"><strong>X.509 (SSL) Certificate</strong></p>
<p class="description">SSL Public certificate.</p>
</td>
<td class="align-center">
<p><code class="flag">--ssl-cert</code></p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,20 @@
---
title: WEBrick Options
permalink: "/docs/configuration/webrick/"
---
You can provide custom headers for your site by adding them to `_config.yml`
```yaml
# File: _config.yml
webrick:
headers:
My-Header: My-Value
My-Other-Header: My-Other-Value
```
### Defaults
Jekyll provides by default `Content-Type` and `Cache-Control` response
headers: one dynamic in order to specify the nature of the data being served,
the other static in order to disable caching so that you don't have to fight
with Chrome's aggressive caching when you are in development mode.

View File

@@ -21,8 +21,6 @@ title: "Buddy"
Whenever you make a push to the selected branch, the Jekyll action runs `jekyll build` in an isolated [Jekyll Docker image][jekyll-docker-image]. The output is generated to the `/filesystem` directory, and can be further deployed to FTP/SFTP and IaaS services. You can add your own commands, install additional packages, attach services, and run Selenium tests, as well as add other actions down the pipeline, eg. a Slack notification or an SSH script that will restart your server.
![Jekyll Build](https://buddy.works/data/blog/_images/buddyworks-jekyll-small.png)
[jekyll-docker-image]: https://hub.docker.com/r/jekyll/jekyll/
## 3. Using YAML for configuration

View File

@@ -12,7 +12,7 @@ Building, testing, and deploying your Jekyll-generated website can quickly be do
To start building your project on CircleCI, all you need to do is 'follow' your project from CircleCI's website:
1. Visit the 'Add Projects' page: <https://circleci.com/add-projects>
1. Visit the 'Add Projects' page
1. From the GitHub or Bitbucket tab on the left, choose a user or organization.
1. Find your project in the list and click 'Build project' on the right.
1. The first build will start on its own. You can start telling CircleCI how to build your project by creating a [circle.yml][3] file in the root of your repository.
@@ -38,7 +38,7 @@ CircleCI detects when `Gemfile` is present is will automatically run `bundle ins
## 3. Testing
The most basic test that can be run is simply seeing if `jekyll build` actually works. This is a blocker, a dependency if you will, for other tests you might run on the generate site. So we'll run Jekyll, via Bundler, in the `dependencies` phase.
The most basic test that can be run is seeing if `jekyll build` actually works. This is a blocker, a dependency if you will, for other tests you might run on the generate site. So we'll run Jekyll, via Bundler, in the `dependencies` phase.
```yaml
dependencies:
@@ -61,7 +61,7 @@ test:
## Complete Example circle.yml File
When you put it all together, here's an example of what that `circle.yml` file could look like:
When you put it all together, here's an example of what that `circle.yml` file could look like in v1:
```yaml
machine:
@@ -83,6 +83,75 @@ deployment:
- rsync -va --delete ./_site username@my-website:/var/html
```
for CircleCI v2, a Docker-based system which new projects will follow, set the `S3_BUCKET_NAME` environment variable (an example of the required config file is shown below).
```yaml
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
build:
<<: *defaults
docker:
- image: circleci/ruby:2.5
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
- checkout
- restore_cache:
keys:
- rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
- rubygems-v1-fallback
- run:
name: Bundle Install
command: bundle check || bundle install
- run:
name: HTMLProofer tests
command: |
bundle exec htmlproofer ./_site \
--allow-hash-href \
--check-favicon \
--check-html \
--disable-external
- save_cache:
key: rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
paths:
- vendor/bundle
- run:
name: Jekyll build
command: bundle exec jekyll build
- persist_to_workspace:
root: ./
paths:
- _site
deploy:
<<: *defaults
docker:
- image: circleci/python:3.6.3
environment:
S3_BUCKET_NAME: <<YOUR BUCKET NAME HERE>>
steps:
- attach_workspace:
at: ./
- run:
name: Install AWS CLI
command: pip install awscli --upgrade --user
- run:
name: Upload to s3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --delete --acl public-read
workflows:
version: 2
test-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
```
## Questions?
This entire guide is open-source. Go ahead and [edit it][7] if you have a fix or [ask for help][8] if you run into trouble and need some help. CircleCI also has an [online community][9] for help.

View File

@@ -1,10 +0,0 @@
---
title: Continuous Integration
permalink: /docs/continuous-integration/
---
Continuous Integration (CI) enables you to publish your Jekyll generated website with confidence by automating the quality assurance and deployment processes. You can quickly get started using CI with one of the providers below:
* [Travis CI](travis-ci)
* [CircleCI](circleci)
* [Buddy](buddyworks)

View File

@@ -2,7 +2,7 @@
title: "Travis CI"
---
You can easily test your website build against one or more versions of Ruby.
You can test your website build against one or more versions of Ruby.
The following guide will show you how to set up a free build environment on
[Travis][travis], with [GitHub][github] integration for pull requests.
@@ -11,7 +11,7 @@ The following guide will show you how to set up a free build environment on
## 1. Enabling Travis and GitHub
Enabling Travis builds for your GitHub repository is pretty simple:
To enable Travis builds for your GitHub repository:
1. Go to your profile on travis-ci.org: https://travis-ci.org/profile/username
2. Find the repository for which you're interested in enabling builds.
@@ -21,7 +21,7 @@ Enabling Travis builds for your GitHub repository is pretty simple:
## 2. The Test Script
The simplest test script simply runs `jekyll build` and ensures that Jekyll
The simplest test script runs `jekyll build` and ensures that Jekyll
doesn't fail to build the site. It doesn't check the resulting site, but it
does ensure things are built properly.
@@ -76,7 +76,7 @@ with Ruby and requires RubyGems to install, we use the Ruby language build
environment. Below is a sample `.travis.yml` file, followed by
an explanation of each line.
**Note:** You will need a Gemfile as well, [Travis will automatically install](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems:
**Note:** You will need a Gemfile as well, [Travis will automatically install](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems. Here is an example `Gemfile` with two referenced gems, "jekyll" and "html-proofer":
```ruby
source "https://rubygems.org"
@@ -90,7 +90,7 @@ Your `.travis.yml` file should look like this:
```yaml
language: ruby
rvm:
- 2.3.3
- 2.4.1
before_script:
- chmod +x ./script/cibuild # or do this locally and commit
@@ -109,7 +109,18 @@ env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
addons:
apt:
packages:
- libcurl4-openssl-dev
sudo: false # route your build to the container-based infrastructure for a faster build
cache: bundler # caching bundler gem packages will speed up build
# Optional: disable email notifications about the outcome of your builds
notifications:
email: false
```
Ok, now for an explanation of each line:
@@ -123,12 +134,13 @@ access to Bundler, RubyGems, and a Ruby runtime.
```yaml
rvm:
- 2.3.3
- 2.4.1
```
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
directive tells Travis the Ruby version to use when running your test
script.
script. Use a [version which is pre-installed on the Travis build docker][5]
image to speed up the build.
```yaml
before_script:
@@ -210,6 +222,23 @@ does need `sudo` access, modify the line to `sudo: required`.
sudo: false
```
To speed up the build, you should cache the gem packages created by `bundler`.
Travis has a pre-defined [cache strategy for this tool][6] which should have
all the default configs to do exactly that.
```yaml
cache: bundler
```
Optionally, if you are not interested in the build email notifications you
can disable them with this configuration. Travis supports a wide array of
notification services, you may find [another one more useful (e.g. slack)][7].
```yaml
notifications:
email: false
```
### Troubleshooting
**Travis error:** *"You are trying to install in deployment mode after changing
@@ -227,3 +256,6 @@ fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/travis-ci.md
[4]: https://jekyllrb.com/help/
[5]: https://docs.travis-ci.com/user/languages/ruby/#Specifying-Ruby-versions-and-implementations
[6]: https://docs.travis-ci.com/user/caching/#Caching-directories-(Bundler%2C-dependencies)
[7]: https://docs.travis-ci.com/user/notifications/

View File

@@ -29,7 +29,7 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull requests are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.

View File

@@ -18,9 +18,8 @@ Plugins/themes can also leverage Data Files to set configuration variables.
## The Data Folder
As explained on the [directory structure](../structure/) page, the `_data`
folder is where you can store additional data for Jekyll to use when generating
your site. These files must be YAML, JSON, or CSV files (using either
The `_data` folder is where you can store additional data for Jekyll to use when
generating your site. These files must be YAML, JSON, or CSV files (using either
the `.yml`, `.yaml`, `.json` or `.csv` extension), and they will be
accessible via `site.data`.
@@ -70,10 +69,7 @@ You can now render the list of members in a template:
```
{% endraw %}
{: .note .info }
If your Jekyll site has a lot of pages, such as with documentation websites, see the detailed examples in [how to build robust navigation for your site]({% link _tutorials/navigation.md %}).
## Example: Organizations
## Subfolders
Data files can also be placed in sub-folders of the `_data` folder. Each folder
level will be added to a variable's namespace. The example below shows how
@@ -134,7 +130,7 @@ dave:
twitter: DavidSilvaSmith
```
The author can then be specified as a page variable in a post's frontmatter:
The author can then be specified as a page variable in a post's front matter:
{% raw %}
```liquid

View File

@@ -1,216 +0,0 @@
---
title: Deployment methods
permalink: /docs/deployment-methods/
---
Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. A few of the most common deployment techniques are described below.
<div class="note">
<h5>ProTip™: Use GitHub Pages for zero-hassle Jekyll hosting</h5>
<p>GitHub Pages are powered by Jekyll behind the scenes, so if youre looking for a zero-hassle, zero-cost solution, GitHub Pages are a great way to <a href="../github-pages/">host your Jekyll-powered website for free</a>.</p>
</div>
## Netlify
Netlify provides Global CDN, Continuous Deployment, one click HTTPS and [much more](https://www.netlify.com/features/), providing developers the most robust toolset available for modern web projects, without added complexity. Netlify supports custom plugins for Jekyll and has a free plan for open source projects.
Read this [Jekyll step-by-step guide](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/) to setup your Jekyll site on Netlify.
## Aerobatic
[Aerobatic](https://www.aerobatic.com) has custom domains, global CDN distribution, basic auth, CORS proxying, and a growing list of plugins all included.
Automating the deployment of a Jekyll site is simple. See their [Jekyll docs](https://www.aerobatic.com/docs/static-site-generators/#jekyll) for more details. Your built `_site` folder is deployed to their highly-available, globally distributed hosting service.
## Kickster
Use [Kickster](http://kickster.nielsenramon.com/) for easy (automated) deploys to GitHub Pages when using unsupported plugins on GitHub Pages.
Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages.
Setting up Kickster is very easy, just install the gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci).
## Web hosting providers (FTP)
Just about any traditional web hosting provider will let you upload files to their servers over FTP. To upload a Jekyll site to a web host using FTP, simply run the `jekyll build` command and copy the contents of the generated `_site` folder to the root folder of your hosting account. This is most likely to be the `httpdocs` or `public_html` folder on most hosting providers.
## Self-managed web server
If you have direct access to the deployment web server, the process is essentially the same, except you might have other methods available to you (such as `scp`, or even direct filesystem access) for transferring the files. Just remember to make sure the contents of the generated `_site` folder get placed in the appropriate web root directory for your web server.
## Automated methods
There are also a number of ways to easily automate the deployment of a Jekyll site. If youve got another method that isnt listed below, wed love it if you [contributed](../contributing/) so that everyone else can benefit too.
### Git post-update hook
If you store your Jekyll site in [Git](https://git-scm.com/) (you are using
version control, right?), its pretty easy to automate the
deployment process by setting up a post-update hook in your Git
repository, [like
this](http://web.archive.org/web/20091223025644/http://www.taknado.com/en/2009/03/26/deploying-a-jekyll-generated-site/).
### Git post-receive hook
To have a remote server handle the deploy for you every time you push changes using Git, you can create a user account which has all the public keys that are authorized to deploy in its `authorized_keys` file. With that in place, setting up the post-receive hook is done as follows:
```sh
laptop$ ssh deployer@example.com
server$ mkdir myrepo.git
server$ cd myrepo.git
server$ git --bare init
server$ cp hooks/post-receive.sample hooks/post-receive
server$ mkdir /var/www/myrepo
```
Next, add the following lines to hooks/post-receive and be sure Jekyll is
installed on the server:
```bash
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo
GEMFILE=$TMP_GIT_CLONE/Gemfile
PUBLIC_WWW=/var/www/myrepo
git clone $GIT_REPO $TMP_GIT_CLONE
BUNDLE_GEMFILE=$GEMFILE bundle install
BUNDLE_GEMFILE=$GEMFILE bundle exec jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
```
Finally, run the following command on any users laptop that needs to be able to
deploy using this hook:
```sh
laptops$ git remote add deploy deployer@example.com:~/myrepo.git
```
Deploying is now as easy as telling nginx or Apache to look at
`/var/www/myrepo` and running the following:
```sh
laptops$ git push deploy master
```
### Static Publisher
[Static Publisher](https://github.com/static-publisher/static-publisher) is another automated deployment option with a server listening for webhook posts, though it's not tied to GitHub specifically. It has a one-click deploy to Heroku, it can watch multiple projects from one server, it has an easy to user admin interface and can publish to either S3 or to a git repository (e.g. gh-pages).
### Rake
Another way to deploy your Jekyll site is to use [Rake](https://github.com/ruby/rake), [HighLine](https://github.com/JEG2/highline), and
[Net::SSH](https://github.com/net-ssh/net-ssh). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
### scp
Once youve generated the `_site` directory, you can easily scp its content using a
`tasks/deploy` shell script similar to [this deploy script][]. Youd obviously
need to change the values to reflect your sites details. There is even [a
matching TextMate command][] that will help you run this script.
[this deploy script]: https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy
[a matching TextMate command]: https://gist.github.com/henrik/214959
### rsync
Once youve generated the `_site` directory, you can easily rsync its content using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/vitalyrepin/vrepinblog/blob/master/transfer.sh). Youd obviously need to change the values to reflect your sites details.
Certificate-based authorization is another way to simplify the publishing
process. It makes sense to restrict rsync access only to the directory which it is supposed to sync. This can be done using rrsync.
#### Step 1: Install rrsync to your home folder (server-side)
If it is not already installed by your host, you can do it yourself:
- [Download rrsync](https://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
- Place it in the `bin` subdirectory of your home folder (`~/bin`)
- Make it executable (`chmod +x`)
#### Step 2: Set up certificate-based SSH access (server side)
This [process](https://wiki.gentoo.org/wiki/SSH#Passwordless_Authentication) is
described in several places online. What is different from the typical approach
is to put the restriction to certificate-based authorization in
`~/.ssh/authorized_keys`. Then, launch `rrsync` and supply
it with the folder it shall have read-write access to:
```sh
command="$HOME/bin/rrsync <folder>",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa <cert>
```
`<folder>` is the path to your site. E.g., `~/public_html/you.org/blog-html/`.
#### Step 3: Rsync (client-side)
Add the `deploy` script to the site source folder:
```sh
#!/bin/sh
rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded <folder> <user>@<site>:
```
Command line parameters are:
- `--rsh=ssh -p2222` &mdash; The port for SSH access. It is required if
your host uses a different port than the default (e.g, HostGator)
- `<folder>` &mdash; The name of the local output folder (defaults to `_site`)
- `<user>` &mdash; The username for your hosting account
- `<site>` &mdash; Your hosting server
Using this setup, you might run the following command:
```sh
rsync -crvz --rsh='ssh -p2222' --delete-after --delete-excluded _site/ hostuser@example.org:
```
Don't forget the column `:` after server name!
#### Step 4 (Optional): Exclude the transfer script from being copied to the output folder.
This step is recommended if you use these instructions to deploy your site. If
you put the `deploy` script in the root folder of your project, Jekyll will
copy it to the output folder. This behavior can be changed in `_config.yml`.
Just add the following line:
```yaml
# Do not copy these files to the output directory
exclude: ["deploy"]
```
Alternatively, you can use an `rsync-exclude.txt` file to control which files will be transferred to your server.
#### Done!
Now it's possible to publish your website simply by running the `deploy`
script. If your SSH certificate is [passphrase-protected](https://martin.kleppmann.com/2013/05/24/improving-security-of-ssh-private-keys.html), you will be asked to enter it when the
script executes.
## Rack-Jekyll
[Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) is an easy way to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomayko/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme).
Read [this post](http://andycroll.com/ruby/serving-a-jekyll-blog-using-heroku/) on how to deploy to Heroku using Rack-Jekyll.
## Jekyll-Admin for Rails
If you want to maintain Jekyll inside your existing Rails app, [Jekyll-Admin](https://github.com/zkarpinski/Jekyll-Admin) contains drop in code to make this possible. See Jekyll-Admins [README](https://github.com/zkarpinski/Jekyll-Admin/blob/master/README) for more details.
## Amazon S3
If you want to host your site in Amazon S3, you can do so by
using the [s3_website](https://github.com/laurilehmijoki/s3_website)
application. It will push your site to Amazon S3 where it can be served like
any web server,
dynamically scaling to almost unlimited traffic. This approach has the
benefit of being about the cheapest hosting option available for
low-volume blogs as you only pay for what you use.
## OpenShift
If you'd like to deploy your site to an OpenShift gear, there's [a cartridge
for that](https://github.com/openshift-quickstart/jekyll-openshift).

11
docs/_docs/deployment.md Normal file
View File

@@ -0,0 +1,11 @@
---
title: Deployment
permalink: /docs/deployment/
redirect_from: "/docs/deployment-methods/index.html"
---
Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. Here's some of the most common ways:
* [Manually](/docs/deployment/manual/)
* [Automated](/docs/deployment/automated/)
* [Third Party](/docs/deployment/third-party/)

View File

@@ -0,0 +1,63 @@
---
title: Automated Deployment
permalink: /docs/deployment/automated/
---
There are a number of ways to easily automate the deployment of a Jekyll site.
## Continuous Integration Service
One of the easiest ways to set up an automated deployment flow is by using a
CI.
These services run a script when there's a commit on your Git repository.
You might want this script to build the site, run tests over the output then deploy it to the
service of your choice.
We have guides for the following providers:
* [Travis CI](/docs/continuous-integration/travis-ci/)
* [CircleCI](/docs/continuous-integration/circleci/)
* [Buddy](/docs/continuous-integration/buddyworks/)
## Git post-receive hook
To have a remote server handle the deploy for you every time you push changes using Git, you can create a user account which has all the public keys that are authorized to deploy in its `authorized_keys` file. With that in place, setting up the post-receive hook is done as follows:
```sh
laptop$ ssh deployer@example.com
server$ mkdir myrepo.git
server$ cd myrepo.git
server$ git --bare init
server$ cp hooks/post-receive.sample hooks/post-receive
server$ mkdir /var/www/myrepo
```
Next, add the following lines to hooks/post-receive and be sure Jekyll is
installed on the server:
```bash
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo
GEMFILE=$TMP_GIT_CLONE/Gemfile
PUBLIC_WWW=/var/www/myrepo
git clone $GIT_REPO $TMP_GIT_CLONE
BUNDLE_GEMFILE=$GEMFILE bundle install
BUNDLE_GEMFILE=$GEMFILE bundle exec jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
```
Finally, run the following command on any users laptop that needs to be able to
deploy using this hook:
```sh
laptops$ git remote add deploy deployer@example.com:~/myrepo.git
```
Deploying is now as easy as telling nginx or Apache to look at
`/var/www/myrepo` and running the following:
```sh
laptops$ git push deploy master
```

View File

@@ -0,0 +1,37 @@
---
title: Manual Deployment
permalink: /docs/deployment/manual/
---
Jekyll generates your static site to the `_site` directory by default. You can
transfer the contents of this directory to almost any hosting provider to get
your site live. Here are some manual ways of achieving this:
## rsync
Rsync is similar to scp except it can be faster as it will only send changed
parts of files as opposed to the entire file. You can learn more about using
rsync in the [Digital Ocean tutorial](https://www.digitalocean.com/community/tutorials/how-to-use-rsync-to-sync-local-and-remote-directories-on-a-vps).
## Amazon S3
If you want to host your site in Amazon S3, you can do so by
using the [s3_website](https://github.com/laurilehmijoki/s3_website)
application. It will push your site to Amazon S3 where it can be served like
any web server,
dynamically scaling to almost unlimited traffic. This approach has the
benefit of being about the cheapest hosting option available for
low-volume blogs as you only pay for what you use.
## FTP
Most traditional web hosting provider let you upload files to their servers over FTP. To upload a Jekyll site to a web host using FTP, run the `jekyll build` command and copy the contents of the generated `_site` folder to the root folder of your hosting account. This is most likely to be the `httpdocs` or `public_html` folder on most hosting providers.
## scp
If you have direct access to the deployment web server, the process is essentially the same, except you might have other methods available to you (such as `scp`, or even direct filesystem access) for transferring the files. Remember to make sure the contents of the generated `_site` folder get placed in the appropriate web root directory for your web server.
## Rack-Jekyll
[Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) allows you to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomayko/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme).

View File

@@ -0,0 +1,39 @@
---
title: 3rd Party
permalink: /docs/deployment/third-party/
---
## Aerobatic
[Aerobatic](https://www.aerobatic.com) has custom domains, global CDN distribution, basic auth, CORS proxying, and a growing list of plugins all included.
Automating the deployment of a Jekyll site is simple. See their [Jekyll docs](https://www.aerobatic.com/docs/static-site-generators/#jekyll) for more details. Your built `_site` folder is deployed to their highly-available, globally distributed hosting service.
## CloudCannon
[CloudCannon](https://cloudcannon.com) has everything you need to build, host
and update Jekyll websites. Take advantage of our global CDN, automated SSL,
continuous deployment and [more](https://cloudcannon.com/features/).
## GitHub Pages
Sites on GitHub Pages are powered by Jekyll behind the scenes, so if youre looking for a zero-hassle, zero-cost solution, GitHub Pages are a great way to [host your Jekyll-powered website for free](/docs/github-pages/).
## Kickster
Use [Kickster](http://kickster.nielsenramon.com/) for automated deploys to GitHub Pages when using unsupported plugins on GitHub Pages.
Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages.
Install the Kickster gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci).
## Netlify
Netlify provides Global CDN, Continuous Deployment, one click HTTPS and [much more](https://www.netlify.com/features/), providing developers the most robust toolset available for modern web projects, without added complexity. Netlify supports custom plugins for Jekyll and has a free plan for open source projects.
Read this [Jekyll step-by-step guide](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/) to setup your Jekyll site on Netlify.
## Static Publisher
[Static Publisher](https://github.com/static-publisher/static-publisher) is another automated deployment option with a server listening for webhook posts, though it's not tied to GitHub specifically. It has a one-click deploy to Heroku, it can watch multiple projects from one server, it has an easy to user admin interface and can publish to either S3 or to a git repository (e.g. gh-pages).

View File

@@ -1,19 +0,0 @@
---
title: Working with drafts
permalink: /docs/drafts/
---
Drafts are posts without a date. They're posts you're still working on and
don't want to publish yet. To get up and running with drafts, create a
`_drafts` folder in your site's root (as described in the [site structure](/docs/structure/) section) and create your
first draft:
```text
|-- _drafts/
| |-- a-draft-post.md
```
To preview your site with drafts, simply run `jekyll serve` or `jekyll build`
with the `--drafts` switch. Each will be assigned the value modification time
of the draft file for its date, and thus you will see currently edited drafts
as the latest posts.

View File

@@ -1,31 +0,0 @@
---
title: Extras
permalink: /docs/extras/
---
There are a number of (optional) extra features that Jekyll supports that you
may want to install, depending on how you plan to use Jekyll.
## Web Highlights and Commenting
Register your site with [txtpen](https://txtpen.com). Then append
```html
<script src="https://txtpen.com/embed.js?site=<your site name>"></script>
```
to your template files in `/_layout` folder.
## Math Support
Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](https://www.mathjax.org) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details. MathJax requires you to include JavaScript or CSS to render the LaTeX, e.g.
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
```
For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/visually-enforced/opinion/2014/02/16/Mathjax-with-jekyll/).
## Alternative Markdown Processors
See the Markdown section on the [configuration page](/docs/configuration/#markdown-options) for instructions on how to use and configure alternative Markdown processors, as well as how to create [custom processors](/docs/configuration/#custom-markdown-processors).

View File

@@ -1,13 +1,13 @@
---
title: Front Matter
permalink: /docs/frontmatter/
permalink: /docs/front-matter/
redirect_from: /docs/frontmatter/index.html
---
The front matter is where Jekyll starts to get really cool. Any file that
contains a [YAML](http://yaml.org/) front matter block will be processed by
Jekyll as a special file. The front matter must be the first thing in the file
and must take the form of valid YAML set between triple-dashed lines. Here is a
basic example:
Any file that contains a [YAML](http://yaml.org/) front matter block will be
processed by Jekyll as a special file. The front matter must be the first thing
in the file and must take the form of valid YAML set between triple-dashed
lines. Here is a basic example:
```yaml
---
@@ -22,25 +22,16 @@ then be available to you to access using Liquid tags both further down in the
file and also in any layouts or includes that the page or post in question
relies on.
<div class="note warning">
<h5>UTF-8 Character Encoding Warning</h5>
<p>
If you use UTF-8 encoding, make sure that no <code>BOM</code> header
characters exist in your files or very, very bad things will happen to
Jekyll. This is especially relevant if youre running
<a href="../windows/">Jekyll on Windows</a>.
</p>
</div>
If you want to use [Liquid tags and variables](/docs/variables/)
but dont need anything in your front matter, just leave it empty. The set
of triple-dashed lines with nothing in between will still get Jekyll to
process your file. (This is useful for things like CSS and RSS feeds)
If you use UTF-8 encoding, make sure that no `BOM` header
characters exist in your files or very, very bad things will happen to
Jekyll. This is especially relevant if youre running
<a href="">[Jekyll on Windows](/docs/installation/windows/).
<div class="note">
<h5>ProTip™: Front Matter Variables Are Optional</h5>
<p>
If you want to use <a href="../variables/">Liquid tags and variables</a>
but dont need anything in your front matter, just leave it empty! The set
of triple-dashed lines with nothing in between will still get Jekyll to
process your file. (This is useful for things like CSS and RSS feeds!)
</p>
</div>
## Predefined Global Variables
@@ -71,14 +62,14 @@ front matter of a page or post.
<ul>
<li>
Using <code>null</code> will produce a file without using a layout
file. However this is overridden if the file is a post/document and has a
layout defined in the <a href="../configuration/#front-matter-defaults">
frontmatter defaults</a>.
file. This is overridden if the file is a post/document and has a
layout defined in the <a href="/docs/configuration/front-matter-defaults/">
front matter defaults</a>.
</li>
<li>
Starting from version 3.5.0, using <code>none</code> in a post/document will
produce a file without using a layout file regardless of frontmatter defaults.
Using <code>none</code> in a page, however, will cause Jekyll to attempt to
produce a file without using a layout file regardless of front matter defaults.
Using <code>none</code> in a page will cause Jekyll to attempt to
use a layout named "none".
</li>
</ul>
@@ -105,7 +96,8 @@ front matter of a page or post.
<td>
<p>
Set to false if you dont want a specific post to show up when the
site is generated.
site is generated. To preview unpublished pages, run `jekyll serve`
or `jekyll build` with the `--unpublished` switch.
</p>
</td>
</tr>
@@ -113,31 +105,20 @@ front matter of a page or post.
</table>
</div>
<div class="note">
<h5>ProTip™: Render Posts Marked As Unpublished</h5>
<p>
To preview unpublished pages, simply run `jekyll serve` or `jekyll build`
with the `--unpublished` switch. Jekyll also has a handy <a href="../drafts/">drafts</a>
feature tailored specifically for blog posts.
</p>
</div>
## Custom Variables
Any variables in the front matter that are not predefined are mixed into the
data that is sent to the Liquid templating engine during the conversion. For
instance, if you set a title, you can use that in your layout to set the page
title:
You can also set your own front matter variables you can access in Liquid. For
instance, if you set a variable called `food`, you can use that in your page:
{% raw %}
```liquid
<!DOCTYPE HTML>
<html>
<head>
<title>{% raw %}{{ page.title }}{% endraw %}</title>
</head>
<body>
---
food: Pizza
---
<h1>{{ page.food }}</h1>
```
{% endraw %}
## Predefined Variables for Posts
@@ -202,12 +183,6 @@ These are available out-of-the-box to be used in the front matter for a post.
</table>
</div>
<div class="note">
<h5>ProTip™: Don't repeat yourself</h5>
<p>
If you don't want to repeat your frequently used front matter variables
over and over, just define <a href="../configuration/#front-matter-defaults" title="Front Matter defaults">defaults</a>
for them and only override them where necessary (or not at all). This works
both for predefined and custom variables.
</p>
</div>
## Defaults
[Front matter defaults](/docs/configuration/front-matter-defaults/) help you to reduce repetition for things like `layouts` which is often the same across multiple pages.

View File

@@ -11,7 +11,7 @@ website for free.
Your site is automatically generated by GitHub Pages when you push your source
files. Note that GitHub Pages works equally well for regular HTML content,
simply because Jekyll treats files without YAML front matter as static assets.
simply because Jekyll treats files without front matter as static assets.
So if you only need to push generated HTML, you're good to go without any
further setup.
@@ -56,9 +56,9 @@ Be sure to run `bundle update` often.
### Project Page URL Structure
Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
branch to GitHub. The subdirectory-like URL structure GitHub uses for
Project Pages complicates the proper resolution of URLs. In order to assure your
site builds properly, use the handy [URL filters](../templates/#filters):
site builds properly, use the handy [URL filters](/docs/liquid/filters/):
{% raw %}
```liquid
@@ -122,7 +122,7 @@ to see more detailed examples.
<h5>Source files must be in the root directory</h5>
<p>
GitHub Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a>
the <a href="/docs/configuration/#global-configuration">“Site Source”</a>
the <a href="/docs/configuration/>“Site Source”</a>
configuration value, so if you locate your files anywhere other than the
root directory, your site may not build correctly.
</p>
@@ -135,6 +135,6 @@ to see more detailed examples.
While Windows is not officially supported, it is possible
to install the <code>github-pages</code> gem on Windows.
Special instructions can be found on our
<a href="../windows/#installation">Windows-specific docs page</a>.
<a href="/docs/installation/windows/">Windows-specific docs page</a>.
</p>
</div>

View File

@@ -4,13 +4,22 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 3.8.5 / 2018-11-04
{: #v3-8-5}
### Bug Fixes
{: #bug-fixes-v3-8-5}
- Re-implement handling Liquid blocks in excerpts ([#7250]({{ site.repository }}/issues/7250))
## 3.8.4 / 2018-09-18
{: #v3-8-4}
### Bug Fixes
{: #bug-fixes-v3-8-4}
- security: fix `include` bypass of `EntryFilter#filter` symlink check ([#7228]({{ site.repository }}/issues/7228))
- 3.8.x: security: fix `include` bypass of `EntryFilter#filter` symlink check ([#7228]({{ site.repository }}/issues/7228))
## 3.8.3 / 2018-06-05
@@ -146,6 +155,15 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Allow front matter defaults to be applied properly to documents gathered under custom `collections_dir` ([#6885]({{ site.repository }}/issues/6885))
## 3.7.4 / 2018-09-07
{: #v3-7-4}
### Bug Fixes
{: #bug-fixes-v3-7-4}
- Security: fix `include` bypass of EntryFilter#filter symlink check ([#7224]({{ site.repository }}/issues/7224))
## 3.7.3 / 2018-02-25
{: #v3-7-3}
@@ -327,6 +345,15 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Fix permalink icon markup in news-item layout ([#6639]({{ site.repository }}/issues/6639))
## 3.6.3 / 2018-09-18
{: #v3-6-3}
### Bug Fixes
{: #bug-fixes-v3-6-3}
- 3.6.x: security: fix `include` bypass of `EntryFilter#filter` symlink check ([#7229]({{ site.repository }}/issues/7229))
## 3.6.2 / 2017-10-21
{: #v3-6-2}
@@ -409,7 +436,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- add SUPPORT file for GitHub ([#6324]({{ site.repository }}/issues/6324))
- Rename CODE_OF_CONDUCT to show in banner ([#6325]({{ site.repository }}/issues/6325))
- Docs : illustrate page.id for a collection&#39;s document ([#6329]({{ site.repository }}/issues/6329))
- Docs: post&#39;s date can be overriden in YAML front matter ([#6334]({{ site.repository }}/issues/6334))
- Docs: post&#39;s date can be overriden in front matter ([#6334]({{ site.repository }}/issues/6334))
- Docs: `site.url` behavior on development and production environments ([#6270]({{ site.repository }}/issues/6270))
- Fix typo in site.url section of variables.md :-[ ([#6337]({{ site.repository }}/issues/6337))
- Docs: updates ([#6343]({{ site.repository }}/issues/6343))
@@ -1131,7 +1158,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Fix typo on Chocolatey name in Windows documentation ([#4686]({{ site.repository }}/issues/4686))
- Use the correct URL, Fixes [#4698]({{ site.repository }}/issues/4698) ([#4699]({{ site.repository }}/issues/4699))
- Add jekyll-paspagon plugin ([#4700]({{ site.repository }}/issues/4700))
- Bold-italicize note in assets documentation about needing yaml front matter ([#4706]({{ site.repository }}/issues/4706))
- Bold-italicize note in assets documentation about needing front matter ([#4706]({{ site.repository }}/issues/4706))
- Highlight the `script/` calls in the Contributing documentation ([#4712]({{ site.repository }}/issues/4712))
- Add Hawkins to the list of third-party plugins ([#4755]({{ site.repository }}/issues/4755))
- Fix a typo in pagination doc ([#4763]({{ site.repository }}/issues/4763))
@@ -1324,7 +1351,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Drop: fix hash setter precedence ([#4312]({{ site.repository }}/issues/4312))
- utils: `has_yaml_header?` should accept files with extraneous spaces ([#4290]({{ site.repository }}/issues/4290))
- Escape html from site.title and page.title in site template ([#4307]({{ site.repository }}/issues/4307))
- Allow custom file extensions if defined in `permalink` YAML front matter ([#4314]({{ site.repository }}/issues/4314))
- Allow custom file extensions if defined in `permalink` front matter ([#4314]({{ site.repository }}/issues/4314))
- Fix deep_merge_hashes! handling of drops and hashes ([#4359]({{ site.repository }}/issues/4359))
- Page should respect output extension of its permalink ([#4373]({{ site.repository }}/issues/4373))
- Disable auto-regeneration when running server detached ([#4376]({{ site.repository }}/issues/4376))
@@ -1548,7 +1575,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Internal: trigger hooks by owner symbol ([#3871]({{ site.repository }}/issues/3871))
- Update MIME types from mime-db ([#3933]({{ site.repository }}/issues/3933))
- Add header to site template `_config.yml` for clarity & direction ([#3997]({{ site.repository }}/issues/3997))
- Site template: add timezone offset to post date frontmatter ([#4001]({{ site.repository }}/issues/4001))
- Site template: add timezone offset to post date front matter ([#4001]({{ site.repository }}/issues/4001))
- Make a constant for the regex to find hidden files ([#4032]({{ site.repository }}/issues/4032))
- Site template: refactor github & twitter icons into includes ([#4049]({{ site.repository }}/issues/4049))
- Site template: add background to Kramdown Rouge-ified backtick code blocks ([#4053]({{ site.repository }}/issues/4053))
@@ -1566,7 +1593,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Fix nav items alignment when on multiple rows ([#3264]({{ site.repository }}/issues/3264))
- Highlight: Only Strip Newlines/Carriage Returns, not Spaces ([#3278]({{ site.repository }}/issues/3278))
- Find variables in front matter defaults by searching with relative file path. ([#2774]({{ site.repository }}/issues/2774))
- Allow variables (e.g `:categories`) in YAML front matter permalinks ([#3320]({{ site.repository }}/issues/3320))
- Allow variables (e.g `:categories`) in front matter permalinks ([#3320]({{ site.repository }}/issues/3320))
- Handle nil URL placeholders in permalinks ([#3325]({{ site.repository }}/issues/3325))
- Template: Fix nav items alignment when in "burger" mode ([#3329]({{ site.repository }}/issues/3329))
- Template: Remove `!important` from nav SCSS introduced in [#3329]({{ site.repository }}/issues/3329) ([#3375]({{ site.repository }}/issues/3375))
@@ -1583,7 +1610,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Add WOFF2 font MIME type to Jekyll server MIME types ([#3647]({{ site.repository }}/issues/3647))
- Be smarter about extracting the extname in `StaticFile` ([#3632]({{ site.repository }}/issues/3632))
- Process metadata for all dependencies ([#3608]({{ site.repository }}/issues/3608))
- Show error message if the YAML front matter on a page/post is invalid. ([#3643]({{ site.repository }}/issues/3643))
- Show error message if the front matter on a page/post is invalid. ([#3643]({{ site.repository }}/issues/3643))
- Upgrade redcarpet to 3.2 (Security fix: OSVDB-120415) ([#3652]({{ site.repository }}/issues/3652))
- Create #mock_expects that goes directly to RSpec Mocks. ([#3658]({{ site.repository }}/issues/3658))
- Open `.jekyll-metadata` in binary mode to read binary Marshal data ([#3713]({{ site.repository }}/issues/3713))
@@ -1663,7 +1690,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Add a Resources link to tutorial on building dynamic navbars ([#3185]({{ site.repository }}/issues/3185))
- Semantic structure improvements to the post and page layouts ([#3251]({{ site.repository }}/issues/3251))
- Add new AsciiDoc plugin to list of third-party plugins. ([#3277]({{ site.repository }}/issues/3277))
- Specify that all transformable collection documents must contain YAML front matter ([#3271]({{ site.repository }}/issues/3271))
- Specify that all transformable collection documents must contain front matter ([#3271]({{ site.repository }}/issues/3271))
- Assorted accessibility fixes ([#3256]({{ site.repository }}/issues/3256))
- Update configuration docs to mention `keep_files` for `destination` ([#3288]({{ site.repository }}/issues/3288), [#3296]({{ site.repository }}/issues/3296))
- Break when we successfully generate nav link to save CPU cycles. ([#3291]({{ site.repository }}/issues/3291))
@@ -1691,7 +1718,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Add a link on all the docs pages to "Improve this page". ([#3510]({{ site.repository }}/issues/3510))
- Add jekyll-auto-image generator to the list of third-party plugins ([#3489]({{ site.repository }}/issues/3489))
- Replace link to the proposed `picture` element spec ([#3530]({{ site.repository }}/issues/3530))
- Add frontmatter date formatting information ([#3469]({{ site.repository }}/issues/3469))
- Add front matter date formatting information ([#3469]({{ site.repository }}/issues/3469))
- Improve consistency and clarity of plugins options note ([#3546]({{ site.repository }}/issues/3546))
- Add permalink warning to pagination docs ([#3551]({{ site.repository }}/issues/3551))
- Fix grammar in Collections docs API stability warning ([#3560]({{ site.repository }}/issues/3560))
@@ -2263,7 +2290,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Clean up the `<head>` in the site template ([#2186]({{ site.repository }}/issues/2186))
- Permit YAML blocks to end with three dots to better conform with the YAML spec ([#2110]({{ site.repository }}/issues/2110))
- Use `File.exist?` instead of deprecated `File.exists?` ([#2214]({{ site.repository }}/issues/2214))
- Require newline after start of YAML Front Matter header ([#2211]({{ site.repository }}/issues/2211))
- Require newline after start of front matter header ([#2211]({{ site.repository }}/issues/2211))
- Add the ability for pages to be marked as `published: false` ([#1492]({{ site.repository }}/issues/1492))
- Add `Jekyll::LiquidExtensions` with `.lookup_variable` method for easy looking up of variable values in a Liquid context. ([#2253]({{ site.repository }}/issues/2253))
- Remove literal lang name from class ([#2292]({{ site.repository }}/issues/2292))
@@ -3031,7 +3058,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Bullet-proof `limit_posts` option ([#1004]({{ site.repository }}/issues/1004))
- Read in YAML as UTF-8 to accept non-ASCII chars ([#836]({{ site.repository }}/issues/836))
- Fix the CLI option `--plugins` to actually accept dirs and files ([#993]({{ site.repository }}/issues/993))
- Allow 'excerpt' in YAML front matter to override the extracted excerpt ([#946]({{ site.repository }}/issues/946))
- Allow 'excerpt' in front matter to override the extracted excerpt ([#946]({{ site.repository }}/issues/946))
- Fix cascade problem with site.baseurl, site.port and site.host. ([#935]({{ site.repository }}/issues/935))
- Filter out directories with valid post names ([#875]({{ site.repository }}/issues/875))
- Fix symlinked static files not being correctly built in unsafe mode ([#909]({{ site.repository }}/issues/909))
@@ -3043,7 +3070,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Patch for multibyte URI problem with `jekyll serve` ([#723]({{ site.repository }}/issues/723))
- Order plugin execution by priority ([#864]({{ site.repository }}/issues/864))
- Fixed Page#dir and Page#url for edge cases ([#536]({{ site.repository }}/issues/536))
- Fix broken `post_url` with posts with a time in their YAML front matter ([#831]({{ site.repository }}/issues/831))
- Fix broken `post_url` with posts with a time in their front matter ([#831]({{ site.repository }}/issues/831))
- Look for plugins under the source directory ([#654]({{ site.repository }}/issues/654))
- Tumblr Migrator: finds `_posts` dir correctly, fixes truncation of long post names ([#775]({{ site.repository }}/issues/775))
- Force Categories to be Strings ([#767]({{ site.repository }}/issues/767))
@@ -3274,7 +3301,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Bug Fixes
- Require redcloth >= 4.2.1 in tests ([#92]({{ site.repository }}/issues/92))
- Don't break on triple dashes in yaml front matter ([#93]({{ site.repository }}/issues/93))
- Don't break on triple dashes in front matter ([#93]({{ site.repository }}/issues/93))
### Minor Enhancements
{: #minor-enhancements-v0-5-6}
@@ -3315,7 +3342,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Added --paginate option to the executable along with a paginator object for the payload (@calavera)
- Upgraded RedCloth to 4.2.1, which makes `<notextile>` tags work once again.
- Configuration options set in config.yml are now available through the site payload (@vilcans)
- Posts can now have an empty YAML front matter or none at all (@ bahuvrihi)
- Posts can now have an empty front matter or none at all (@ bahuvrihi)
- Bug Fixes
- Fixing Ruby 1.9 issue that requires `#to_s` on the err object (@Chrononaut)
- Fixes for pagination and ordering posts on the same day (@ujh)
@@ -3323,7 +3350,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Index.html file should always have index.html permalink (@eugenebolshakov)
- Added trailing slash to pretty permalink style so Apache is happy (@eugenebolshakov)
- Bad markdown processor in config fails sooner and with better message (@ gcnovus)
- Allow CRLFs in yaml front matter (@juretta)
- Allow CRLFs in front matter (@juretta)
- Added Date#xmlschema for Ruby versions < 1.9
@@ -3418,7 +3445,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Added post categories based on directories containing `_posts` (@mreid)
- Added post topics based on directories underneath `_posts`
- Added new date filter that shows the full month name (@mreid)
- Merge Post's YAML front matter into its to_liquid payload (@remi)
- Merge Post's front matter into its to_liquid payload (@remi)
- Restrict includes to regular files underneath `_includes`
- Bug Fixes
- Change YAML delimiter matcher so as to not chew up 2nd level markdown headers (@mreid)

View File

@@ -13,7 +13,44 @@ The `include` tag allows you to include the content from another file stored in
Jekyll will look for the referenced file (in this case, `footer.html`) in the `_includes` directory at the root of your source directory and insert its contents.
### Including files relative to another file
## Parameters
Includes can take parameters which is especially useful for reducing repetition across your Jekyll site.
To use parameters you pass a list of key/values to the include:
{% raw %}
```liquid
{% include note.html style="big" content="This is my sample note." %}
```
{% endraw %}
The parameters are available in the include under the `include` variable:
{% raw %}
```liquid
<div class="my-note {{ include.style }}">
{{ include.content }}
</div>
```
{% endraw %}
To safeguard situations where users don't supply a value for the parameter, you can use [Liquid's default filter](https://shopify.github.io/liquid/filters/default/).
If you need to modify a variable before sending it to the include, you can save it to an intermediate variable. For example this is one way to prepend a string to variable used in an include:
{% raw %}
```liquid
{% capture download_note %}
The latest version of {{ site.product_name }} is now available.
{% endcapture %}
{% include note.html style="big" content=download_note %}
```
{% endraw %}
## Including files relative to another file
You can choose to include file fragments relative to the current file by using the `include_relative` tag:
@@ -33,7 +70,7 @@ Note that you cannot use the `../` syntax to specify an include location that re
All the other capabilities of the `include` tag are available to the `include_relative` tag,
such as variables.
### Using variables names for the include file
## Include file by variable
The name of the file you want to embed can be specified as a variable instead of an actual file name. For example, suppose you defined a variable in your page's front matter like this:
@@ -53,138 +90,3 @@ You could then reference that variable in your include:
{% endraw %}
In this example, the include would insert the file `footer_company_a.html` from the `_includes/footer_company_a.html` directory.
### Passing parameters to includes
You can also pass parameters to an include. For example, suppose you have a file called `note.html` in your `_includes` folder that contains this formatting:
{% raw %}
```liquid
<div markdown="span" class="alert alert-info" role="alert">
<i class="fa fa-info-circle"></i> <b>Note:</b>
{{ include.content }}
</div>
```
{% endraw %}
The `{% raw %}{{ include.content }}{% endraw %}` is a parameter that gets populated when you call the include and specify a value for that parameter, like this:
{% raw %}
```liquid
{% include note.html content="This is my sample note." %}
```
{% endraw %}
The value of `content` (which is `This is my sample note`) will be inserted into the {% raw %}`{{ include.content }}`{% endraw %} parameter.
Passing parameters to includes is especially helpful when you want to hide away complex formatting from your Markdown content.
For example, suppose you have a special image syntax with complex formatting, and you don't want your authors to remember the complex formatting. As a result, you decide to simplify the formatting by using an include with parameters. Here's an example of the special image syntax you might want to populate with an include:
```html
<figure>
<a href="http://jekyllrb.com">
<img src="logo.png" style="max-width: 200px;"
alt="Jekyll logo" />
<figcaption>This is the Jekyll logo</figcaption>
</figure>
```
You could templatize this content in your include and make each value available as a parameter, like this:
{% raw %}
```liquid
<figure>
<a href="{{ include.url }}">
<img src="{{ include.file }}" style="max-width: {{ include.max-width }};"
alt="{{ include.alt }}"/>
<figcaption>{{ include.caption }}</figcaption>
</figure>
```
{% endraw %}
This include contains 5 parameters:
* `url`
* `max-width`
* `file`
* `alt`
* `caption`
Here's an example that passes all the parameters to this include (the include file is named `image.html`):
{% raw %}
```liquid
{% include image.html url="http://jekyllrb.com"
max-width="200px" file="logo.png" alt="Jekyll logo"
caption="This is the Jekyll logo." %}
```
{% endraw %}
The result is the original HTML code shown earlier.
To safeguard situations where users don't supply a value for the parameter, you can use [Liquid's default filter](https://shopify.github.io/liquid/filters/default/).
Overall, you can create includes that act as templates for a variety of uses &mdash; inserting audio or video clips, alerts, special formatting, and more. However, note that you should avoid using too many includes, as this will slow down the build time of your site. For example, don't use includes every time you insert an image. (The above technique shows a use case for special images.)
### Passing parameter variables to includes
Suppose the parameter you want to pass to the include is a variable rather than a string. For example, you might be using {% raw %}`{{ site.product_name }}`{% endraw %} to refer to every instance of your product rather than the actual hard-coded name. (In this case, your `_config.yml` file would have a key called `product_name` with a value of your product's name.)
The string you pass to your include parameter can't contain curly braces. For example, you can't pass a parameter that contains this: {% raw %}`"The latest version of {{ site.product_name }} is now available."`{% endraw %}
If you want to include this variable in your parameter that you pass to an include, you need to store the entire parameter as a variable before passing it to the include. You can use `capture` tags to create the variable:
{% raw %}
```liquid
{% capture download_note %}
The latest version of {{ site.product_name }} is now available.
{% endcapture %}
```
{% endraw %}
Then pass this captured variable into the parameter for the include. Omit the quotation marks around the parameter content because it's no longer a string (it's a variable):
{% raw %}
```liquid
{% include note.html content=download_note %}
```
{% endraw %}
### Passing references to YAML files as parameter values
Instead of passing string variables to the include, you can pass a reference to a YAML data file stored in the `_data` folder.
Here's an example. In the `_data` folder, suppose you have a YAML file called `profiles.yml`. Its content looks like this:
```yaml
- name: John Doe
login_age: old
image: johndoe.jpg
- name: Jane Doe
login_age: new
image: janedoe.jpg
```
In the `_includes` folder, assume you have a file called `spotlight.html` with this code:
{% raw %}
```liquid
{% for person in include.participants %}
{% if person.login_age == "new" %}
{{ person.name }}
{% endif %}
{% endfor %}
```
{% endraw %}
Now when you insert the `spotlight.html` include file, you can submit the YAML file as a parameter:
{% raw %}
```liquid
{% include spotlight.html participants=site.data.profiles %}
```
{% endraw %}
In this instance, `site.data.profiles` gets inserted in place of {% raw %}`include.participants`{% endraw %} in the include file, and the Liquid logic processes. The result will be `Jane Doe`.

View File

@@ -1,41 +1,38 @@
---
title: Welcome
permalink: /docs/home/
redirect_from: /docs/index.html
title: Quickstart
permalink: /docs/
redirect_from:
- /docs/home/
- /docs/quickstart/
- /docs/extras/
---
Jekyll is a simple, extendable, static site generator. You give it text written
in your favorite markup language and it churns through layouts to create a
static website. Throughout that process you can tweak how you want the site URLs
to look, what data gets displayed in the layout, and more.
This site aims to be a comprehensive guide to Jekyll. Well cover topics such as getting your site up and running, creating and managing content, customizing your build, and deploying.
## Instructions
## What is Jekyll, exactly?
1. Install a full [Ruby development environment](/docs/installation/)
2. Install Jekyll and [bundler](/docs/ruby-101/#bundler) [gems](/docs/ruby-101/#gems)
```
gem install jekyll bundler
```
3. Create a new Jekyll site at `./myblog`
```
jekyll new myblog
```
4. Change into your new directory
```
cd myblog
```
5. Build the site and make it available on a local server
```
bundle exec jekyll serve
```
6. Now browse to [http://localhost:4000](http://localhost:4000){:target="_blank"}
Jekyll is a simple, blog-aware, static site generator.
You create your content as text files ([Markdown](https://daringfireball.net/projects/markdown/)), and organize them into folders. Then, you build the shell of your site using [Liquid](https://shopify.github.io/liquid/)-enhanced HTML templates. Jekyll automatically stitches the content and templates together, generating a website made entirely of static assets, suitable for uploading to any server.
Jekyll happens to be the engine behind [GitHub Pages](https://pages.github.com), so you can host your projects Jekyll page/blog/website on GitHubs servers **for free**.
## Navigating the Guide
Throughout this guide, you'll see these special sections that help you get the most out of Jekyll:
<div class="note">
<h5>ProTips™</h5>
<p>Tips and tricks that'll make you a Jekyll wizard!</p>
</div>
<div class="note info">
<h5>Notes</h5>
<p>Extra tidbits that are sometimes necessary to understand Jekyll.</p>
</div>
<div class="note warning">
<h5>Warnings</h5>
<p>Common pitfalls to avoid.</p>
</div>
<div class="note unreleased">
<h5>Unreleased</h5>
<p>Features planned for future versions of Jekyll, but not available yet.</p>
</div>
If you find anything we havent covered, or would like to share a tip that others might find handy, please [file an issue]({{ site.repository }}/issues/new) and well see about adding it to the guide.
If you encounter any unexpected errors during the above, please refer to the
[troubleshooting](/docs/troubleshooting/#configuration-problems) page or the
already-mentioned [requirements](/docs/installation/#requirements) page, as
you might be missing development headers or other prerequisites.

View File

@@ -4,168 +4,19 @@ description: Official guide to install Jekyll on macOS, GNU/Linux or Windows.
permalink: /docs/installation/
---
- [Requirements](#requirements)
- [Install on macOS](#macOS)
- [Install on Windows](../windows/)
- [Upgrade Jekyll](#upgrade-jekyll)
Installing Jekyll should be straight-forward if your system meets the requirements.
Jekyll is a [Ruby Gem](/docs/ruby-101/#gems) that can be installed on most systems.
## Requirements
Before you start, make sure your system has the following:
* [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.2.5 or above, including all development headers (ruby version can be checked by running `ruby -v`)
* [RubyGems](https://rubygems.org/pages/download) (which you can check by running `gem -v`)
* [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (in case your system doesn't have them installed, which you can check by running `gcc -v`,`g++ -v` and `make -v` in your system's command line interface)
- [Ruby](https://www.ruby-lang.org/en/downloads/) version 2.2.5 or above, including all development headers (ruby installation can be checked by running `ruby -v`)
- [RubyGems](https://rubygems.org/pages/download) (which you can check by running `gem -v`)
- [GCC](https://gcc.gnu.org/install/) and [Make](https://www.gnu.org/software/make/) (in case your system doesn't have them installed, which you can check by running `gcc -v`,`g++ -v` and `make -v` in your system's command line interface)
## Guides
## Install on macOS {#macOS}
For detailed install instructions have a look at the guide for your operating system.
We only cover macOS High Sierra 10.13 here, which comes with Ruby 2.3.3, older systems will need to [install a more recent Ruby version via Homebrew](#homebrew).
First, you need to install the command-line tools to be able to compile native extensions, open a terminal and run:
```sh
xcode-select --install
```
### Set up Ruby included with the OS
Check your Ruby version meet our requirements:
```sh
ruby -v
2.3.3
```
Great, let's install Jekyll. We also need [Bundler](https://bundler.io/) to help us handle [plugins](../plugins) and [themes](../themes):
```sh
gem install bundler jekyll
```
That's it, you're ready to go, either by installing our [default minimal blog theme](https://github.com/jekyll/minima) with `jekyll new jekyll-website` or by starting from scratch:
```sh
mkdir jekyll-website
cd jekyll-website
# Create a Gemfile
bundle init
# Add Jekyll
bundle add jekyll
# Install gems
bundle install
```
Great, from there you can now either use a [theme](../themes/) or [create your own layouts](../templates/).
### Install a newer Ruby version via Homebrew {#homebrew}
If you wish to install the latest version of Ruby and get faster builds, we recommend to do it via [Homebrew](https://brew.sh) a handy package manager for macOS.
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ruby
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
Yay! Now you have a shiny Ruby on your system!
### Install multiple Ruby versions with rbenv {#rbenv}
Developers often use [rbenv](https://github.com/rbenv/rbenv) to manage multiple Ruby versions. This can be useful if you want to run the same Ruby version used by [GitHub Pages](https://pages.github.com/versions/) or [Netlify](https://www.netlify.com/docs/#ruby) for instance.
```sh
# Install rbenv and ruby-build
brew install rbenv
# Setup rbenv integration to your shell
rbenv init
# Check your install
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
```
Restart your terminal for changes to take effect.
Now we can install the Ruby version of our choice, let's go with Ruby 2.5.1 here:
```sh
rbenv install 2.5.1
rbenv global 2.5.1
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects.
<div class="note info" markdown="1">
##### Problems installing Jekyll?
Check out the [troubleshooting](../troubleshooting/) page or
[ask for help on our forum](https://talk.jekyllrb.com).
</div>
## Upgrade Jekyll
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find the currently installed version of Jekyll, run one of these commands:
```sh
jekyll --version
gem list jekyll
```
You can use RubyGems to find [the current version of Jekyll](https://rubygems.org/gems/jekyll). Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
```sh
bundle update jekyll
```
Alternatively, if you don't have Bundler installed run:
```sh
gem update jekyll
```
To upgrade to latest Rubygems, run:
```
gem update --system
```
Refer to our [upgrading section](../upgrading/) to upgrade from Jekyll 2.x or 1.x.
## Pre-releases
In order to install a pre-release, make sure you have all the requirements
installed properly and run:
```sh
gem install jekyll --pre
```
This will install the latest pre-release. If you want a particular pre-release,
use the `-v` switch to indicate the version you'd like to install:
```sh
gem install jekyll -v '2.0.0.alpha.1'
```
If you'd like to install a development version of Jekyll, the process is a bit
more involved. This gives you the advantage of having the latest and greatest,
but may be unstable.
```sh
git clone git://github.com/jekyll/jekyll.git
cd jekyll
script/bootstrap
bundle exec rake build
ls pkg/*.gem | head -n 1 | xargs gem install -l
```
Now that youve got everything up-to-date and installed, lets get to work!
* [macOS](/docs/installation/macos/)
* [Ubuntu Linux](/docs/installation/ubuntu/)
* [Other Linux distros](/docs/installation/other-linux)
* [Windows](/docs/installation/windows/)

View File

@@ -0,0 +1,69 @@
---
title: Jekyll on macOS
permalink: /docs/installation/macos/
---
First, you need to install the command-line tools to be able to compile native extensions, open a terminal and run:
```sh
xcode-select --install
```
## Set up Ruby included with the OS
Check your Ruby version meets our requirements. Jekyll requires Ruby 2.2.5 or above. If you're running an older version you'll need to [install a more recent Ruby version via Homebrew](#homebrew).
```sh
ruby -v
2.3.3
```
Now install Jekyll and [Bundler](/docs/ruby-101/#bundler).
```sh
gem install bundler jekyll
```
### Install a newer Ruby version via Homebrew {#homebrew}
If you wish to install the latest version of Ruby and get faster builds, we recommend doing it via [Homebrew](https://brew.sh) a handy package manager for macOS.
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install ruby
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
### Install multiple Ruby versions with rbenv {#rbenv}
Developers often use [rbenv](https://github.com/rbenv/rbenv) to manage multiple
Ruby versions. This can be useful if you want to run the same Ruby version used
by your colleagues/collaborators.
```sh
# Install rbenv and ruby-build
brew install rbenv
# Setup rbenv integration to your shell
rbenv init
# Check your install
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
```
Restart your terminal for changes to take effect.
Now we can install the Ruby version of our choice, let's go with Ruby 2.5.1 here:
```sh
rbenv install 2.5.1
rbenv global 2.5.1
ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
```
That's it! Head over [rbenv command references](https://github.com/rbenv/rbenv#command-reference) to learn how to use different versions of Ruby in your projects.
### Problems?
Check out the [troubleshooting](/docs/troubleshooting/) page or [ask for help on our forum](https://talk.jekyllrb.com).

View File

@@ -0,0 +1,19 @@
---
title: Jekyll on Linux
permalink: /docs/installation/other-linux/
---
Installation on other Linux distributions works similarly as on [Ubuntu](../ubuntu/).
On Fedora, the dependencies can be installed as follows:
```sh
sudo dnf install ruby ruby-devel @development-tools
```
On Debian:
```sh
sudo apt-get install ruby-full build-essential
```
The rest works the same as on [Ubuntu](../ubuntu/).

View File

@@ -0,0 +1,30 @@
---
title: Jekyll on Ubuntu
permalink: /docs/installation/ubuntu/
---
Before we install Jekyll, we need to make sure we have all the required
dependencies.
```sh
sudo apt-get install ruby ruby-dev build-essential
```
It is best to avoid installing Ruby Gems as the root user. Therefore, we need to
set up a gem installation directory for your user account. The following
commands will add environment variables to your `~/.bashrc` file to configure
the gem installation path. Run them now:
```sh
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
```
Finally, install Jekyll:
```sh
gem install jekyll bundler
```
That's it! You're ready to start using Jekyll.

View File

@@ -0,0 +1,122 @@
---
title: Jekyll on Windows
permalink: /docs/installation/windows/
redirect_from:
- /docs/windows/
---
While Windows is not an officially-supported platform, it can be used to run Jekyll with the proper tweaks. This page aims to collect some of the general knowledge and lessons that have been unearthed by Windows users.
## Installing Jekyll
The easiest way to run Jekyll is by using the [RubyInstaller](https://rubyinstaller.org/) for Windows.
### Installation via RubyInstaller
[RubyInstaller](https://rubyinstaller.org/) is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
We only cover RubyInstaller-2.4 and newer here, older versions need to [install the Devkit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) manually.
1. Download and Install a **Ruby+Devkit** version from [RubyInstaller Downloads](https://rubyinstaller.org/downloads/).
Use default options for installation.
2. Open a new command prompt window from the start menu, so that changes to the `PATH` environment variable becomes effective.
Install Jekyll and Bundler via: `gem install jekyll bundler`
3. Check if Jekyll installed properly: `jekyll -v`
That's it, you're ready to use Jekyll!
### Encoding
If you use UTF-8 encoding, make sure that no `BOM` header characters exist in your files or very, very bad things will happen to
Jekyll. This is especially relevant when you're running Jekyll on Windows.
Additionally, you might need to change the code page of the console window to UTF-8 in case you get a "Liquid Exception: Incompatible character encoding" error during the site generation process. It can be done with the following command:
```sh
chcp 65001
```
### Time-Zone Management
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their `Gemfile` by default, existing sites *will* have to update their `Gemfile` (and installed) to enable development on Windows:
```ruby
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
### Auto Regeneration
Jekyll uses the `listen` gem to watch for changes when the `--watch` switch is specified during a build or serve. While `listen` has built-in support for UNIX systems, it may require an extra gem for compatibility with Windows.
Add the following to the `Gemfile` for your site if you have issues with auto-regeneration on Windows alone:
```ruby
gem 'wdm', '~> 0.1.1' if Gem.win_platform?
```
You have to use a [Ruby+Devkit](https://rubyinstaller.org/downloads/) version of the RubyInstaller.
## Installation via Bash on Windows 10
If you are using Windows 10 version 1607 or later, another option to run Jekyll is by [installing](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) the Windows Subsystem for Linux.
*Note:* You must have [Windows Subsystem for Linux](https://msdn.microsoft.com/en-us/commandline/wsl/about) enabled.
First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following:
```sh
bash
```
Your Command Prompt instance should now be a Bash instance. Now we must update our repo lists and packages.
```sh
sudo apt-get update -y && sudo apt-get upgrade -y
```
Now we can install Ruby. To do this we will use a repository from [BrightBox](https://www.brightbox.com/docs/ruby/ubuntu/), which hosts optimized versions of Ruby for Ubuntu.
```sh
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.5 ruby2.5-dev build-essential dh-autoreconf
```
Next let's update our Ruby gems:
```sh
sudo gem update
```
Now all that is left to do is install Jekyll.
```sh
sudo gem install jekyll bundler
```
Check if Jekyll installed properly by running:
```sh
jekyll -v
```
Configure the bundler/gem path so bundle doesn't prompt for sudo
```sh
bundle config path vendor/bundle
```
**And that's it!**
You can make sure time management is working properly by inspecting your `_posts` folder. You should see a markdown file with the current date in the filename.
<div class="note info">
<h5>Non-superuser account issues</h5>
<p>If the `jekyll new` command prints the error "Your user account isn't allowed to install to the system RubyGems", see the "Running Jekyll as Non-Superuser" instructions in <a href="/docs/troubleshooting/#no-sudo">Troubleshooting</a>.</p>
</div>
**Note:** Bash on Ubuntu on Windows is still under development, so you may run into issues.

131
docs/_docs/layouts.md Normal file
View File

@@ -0,0 +1,131 @@
---
title: Layouts
description: placeholder
permalink: /docs/layouts/
---
Layouts are templates that wrap around your content. They allow you to have the
source code for your template in one place so you don't have to repeat things
like your navigation and footer on every page.
Layouts live in the `_layouts` directory. The convention is to have a base
template called `default.html` and have other layouts [inherit](#inheritance)
from this as needed.
## Usage
The first step is to put the template source code in `default.html`. `content`
is a special variable, the value is the rendered content of the post or page
being wrapped.
{% raw %}
```
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/blog/">Blog</a>
</nav>
<h1>{{ page.title }}</h1>
<section>
{{ content }}
</section>
<footer>
&copy; to me
</footer>
</body>
</html>
```
{% endraw %}
You have full access to the front matter of the origin. In the
example above, `page.title` comes from the page front matter.
Next you need to specify what layout you're using in your page's front matter.
You can also use
[front matter defaults](/docs/configuration/front-matter-defaults/) to save you
from having to set this on every page.
```
---
title: My First Page
layout: default
---
This is the content of my page
```
The rendered output of this page is:
```
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My First Page</title>
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<nav>
<a href="/">Home</a>
<a href="/blog/">Blog</a>
</nav>
<h1>My First Page</h1>
<section>
This is the content of my page
</section>
<footer>
&copy; to me
</footer>
</body>
</html>
```
## Inheritance
Layout inheritance is useful when you want to add something to an existing
layout for a portion of documents on your site. A common example of this is
blog posts, you might want a post to display the date and author but otherwise
be identical to your base layout.
To achieve this you need to create another layout which specifies your original
layout in front matter. For example this layout will live at
`_layouts/post.html`:
{% raw %}
```
---
layout: default
---
<p>{{ page.date }} - Written by {{ page.author }}</p>
{{ content }}
```
{% endraw %}
Now posts can use this layout while the rest of the pages use the default.
## Variables
You can set front matter in layouts, the only difference is when you're
using in Liquid, you need to use the `layout` variable instead of `page`. For
example:
{% raw %}
```
---
city: San Francisco
---
<p>{{ layout.city }}</p>
{{ content }}
```
{% endraw %}

19
docs/_docs/liquid.md Normal file
View File

@@ -0,0 +1,19 @@
---
title: Liquid
permalink: /docs/liquid/
redirect_from: "/docs/templates/"
---
Jekyll uses the [Liquid](https://shopify.github.io/liquid/) templating language
to process templates.
Generally in Liquid you output content using two curly braces e.g.
{% raw %}`{{ variable }}`{% endraw %} and perform logic statements by
surrounding them in a curly brace percentage sign e.g.
{% raw %}`{% if statement %}`{% endraw %}. To learn more about Liquid, check
out the [official Liquid Documentation](https://shopify.github.io/liquid/).
Jekyll provides a number of useful Liquid additions to help you build your site:
* [Filters](/docs/liquid/filters/)
* [Tags](/docs/liquid/tags/)

View File

@@ -0,0 +1,113 @@
---
title: Liquid Filters
permalink: "/docs/liquid/filters/"
shopify_filter_url: https://shopify.github.io/liquid/filters/
shopify_filters:
- abs
- append
- at_least
- at_most
- capitalize
- ceil
- compact
- concat
- date
- default
- divided_by
- downcase
- escape
- escape_once
- first
- floor
- join
- last
- lstrip
- map
- minus
- modulo
- newline_to_br
- plus
- prepend
- remove
- remove_first
- replace
- replace_first
- reverse
- round
- rstrip
- size
- slice
- sort
- sort_natural
- split
- strip
- strip_html
- strip_newlines
- times
- truncate
- truncatewords
- uniq
- upcase
- url_decode
- url_encode
---
All of the standard Liquid [filters](#standard-liquid-filters) are supported (see below).
To make common tasks easier, Jekyll even adds a few handy filters of its own,
all of which you can find on this page. You can also create your own filters
using [plugins](/docs/plugins/).
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Description</th>
<th><span class="filter">Filter</span> and <span class="output">Output</span></th>
</tr>
</thead>
<tbody>
{% for filter in site.data.jekyll_filters %}
<tr>
<td>
<p class="name"><strong>{{ filter.name }}</strong></p>
<p>
{{- filter.description -}}
{%- if filter.version_badge %}
<span class="version-badge" title="This filter is available from version {{ filter.version_badge }}">
{{- filter.version_badge -}}
</span>
{% endif -%}
</p>
</td>
<td class="align-center">
{%- for example in filter.examples %}
<p><code class="filter">{{ example.input }}</code></p>
{% if example.output %}<p><code class="output">{{ example.output }}</code></p>{% endif %}
{% endfor -%}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
### Options for the `slugify` filter
The `slugify` filter accepts an option, each specifying what to filter.
The default is `default`. They are as follows (with what they filter):
- `none`: no characters
- `raw`: spaces
- `default`: spaces and non-alphanumeric characters
- `pretty`: spaces and non-alphanumeric characters except for `._~!$&'()+,;=@`
- `ascii`: spaces, non-alphanumeric, and non-ASCII characters
- `latin`: like `default`, except Latin characters are first transliterated (e.g. `àèïòü` to `aeiou`) {%- include docs_version_badge.html version="3.7.0" -%}.
### Standard Liquid Filters
For your convenience, here is the list of all [Liquid filters]({{ page.shopify_filter_url }}) with links to examples in the official Liquid documentation.
{% for filter in page.shopify_filters %}
- [{{ filter }}]({{ filter | prepend: page.shopify_filter_url | append: '/' }})
{% endfor %}

147
docs/_docs/liquid/tags.md Normal file
View File

@@ -0,0 +1,147 @@
---
title: Tags Filters
permalink: "/docs/liquid/tags/"
---
All of the standard Liquid
[tags](https://shopify.github.io/liquid/tags/control-flow/) are supported.
Jekyll has a few built in tags to help you build your site. You can also create
your own tags using [plugins](/docs/plugins/).
## Includes
If you have page snippets that you use repeatedly across your site, an
[include](/docs/includes/) is the perfect way to make this more maintainable.
## Code snippet highlighting
Jekyll has built in support for syntax highlighting of over 100 languages
thanks to [Rouge](http://rouge.jneen.net). Rouge is the default highlighter
in Jekyll 3 and above. To use it in Jekyll 2, set `highlighter` to `rouge`
and ensure the `rouge` gem is installed properly.
Alternatively, you can use [Pygments](http://pygments.org) to highlight your
code snippets in Jekyll 3.x and below. To use Pygments, you must have Python
installed on your system, have the `pygments.rb` gem installed and set
`highlighter` to `pygments` in your site's configuration file. Pygments
supports [over 100 languages](http://pygments.org/languages/)
<div class="note info">
<p>Using Pygments has been deprecated and will not be officially supported in
Jekyll 4, meaning that the configuration setting <code>highlighter: pygments</code>
will automatically fall back to using <em>Rouge</em> which is written in Ruby
and 100% compatible with stylesheets for Pygments.</p>
</div>
To render a code block with syntax highlighting, surround your code as follows:
{% raw %}
```liquid
{% highlight ruby %}
def foo
puts 'foo'
end
{% endhighlight %}
```
{% endraw %}
The argument to the `highlight` tag (`ruby` in the example above) is the
language identifier. To find the appropriate identifier to use for the language
you want to highlight, look for the “short name” on the [Rouge
wiki](https://github.com/jayferd/rouge/wiki/List-of-supported-languages-and-lexers)
or the [Pygments' Lexers page](http://pygments.org/docs/lexers/).
### Raw
Surround a block of code in <code>{&#37; raw &#37;}</code> will ignore Liquid until
<code>{&#37; endraw &#37;}</code>. This is useful if you're using a language that
contains curly braces or you're documenting Liquid.
### Line numbers
There is a second argument to `highlight` called `linenos` that is optional.
Including the `linenos` argument will force the highlighted code to include line
numbers. For instance, the following code block would include line numbers next
to each line:
{% raw %}
```liquid
{% highlight ruby linenos %}
def foo
puts 'foo'
end
{% endhighlight %}
```
{% endraw %}
### Stylesheets for syntax highlighting
In order for the highlighting to show up, youll need to include a highlighting
stylesheet. For Pygments or Rouge you can use a stylesheet for Pygments, you
can find an example gallery [here](http://help.farbox.com/pygments.html).
## Links
### Linking to pages {#link}
To link to a post, a page, collection item, or file, the `link` tag will generate the correct permalink URL for the path you specify. For example, if you use the `link` tag to link to `mypage.html`, even if you change your permalink style to include the file extension or omit it, the URL formed by the `link` tag will always be valid.
You must include the file's original extension when using the `link` tag. Here are some examples:
{% raw %}
```liquid
{{ site.baseurl }}{% link _collection/name-of-document.md %}
{{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %}
{{ site.baseurl }}{% link news/index.html %}
{{ site.baseurl }}{% link /assets/files/doc.pdf %}
```
{% endraw %}
You can also use the `link` tag to create a link in Markdown as follows:
{% raw %}
```liquid
[Link to a document]({{ site.baseurl }}{% link _collection/name-of-document.md %})
[Link to a post]({{ site.baseurl }}{% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({{ site.baseurl }}{% link news/index.html %})
[Link to a file]({{ site.baseurl }}{% link /assets/files/doc.pdf %})
```
{% endraw %}
(Including `{% raw %}{{ site.baseurl }}{% endraw %}` is optional &mdash; it depends on whether you want to preface the page URL with the `baseurl` value.)
The path to the post, page, or collection is defined as the path relative to the root directory (where your config file is) to the file, not the path from your existing page to the other page.
For example, suppose you're creating a link in `page_a.md` (stored in `pages/folder1/folder2`) to `page_b.md` (stored in `pages/folder1`). Your path in the link would not be `../page_b.html`. Instead, it would be `/pages/folder1/page_b.md`.
If you're unsure of the path, add `{% raw %}{{ page.path }}{% endraw %}` to the page and it will display the path.
One major benefit of using the `link` or `post_url` tag is link validation. If the link doesn't exist, Jekyll won't build your site. This is a good thing, as it will alert you to a broken link so you can fix it (rather than allowing you to build and deploy a site with broken links).
Note you cannot add filters to `link` tags. For example, you cannot append a string using Liquid filters, such as `{% raw %}{% link mypage.html | append: "#section1" %}{% endraw %}`. To link to sections on a page, you will need to use regular HTML or Markdown linking techniques.
### Linking to posts
If you want to include a link to a post on your site, the `post_url` tag will generate the correct permalink URL for the post you specify.
{% raw %}
```liquid
{{ site.baseurl }}{% post_url 2010-07-21-name-of-post %}
```
{% endraw %}
If you organize your posts in subdirectories, you need to include subdirectory path to the post:
{% raw %}
```liquid
{{ site.baseurl }}{% post_url /subdir/2010-07-21-name-of-post %}
```
{% endraw %}
There is no need to include the file extension when using the `post_url` tag.
You can also use this tag to create a link to a post in Markdown as follows:
{% raw %}
```liquid
[Name of Link]({{ site.baseurl }}{% post_url 2010-07-21-name-of-post %})
```
{% endraw %}

View File

@@ -17,11 +17,11 @@ Each affinity team has a few captains who manage the issues and pull requests fo
Just ask! Feel free to open an issue on `jekyll/jekyll` and add `/cc @jekyll/core`. We can add you. :smile:
Alternatively, you can email or otherwise reach out to [@parkr](https://github.com/parkr) directly if you prefer the more private route.
Alternatively, you can email or otherwise reach out to [@oe](https://github.com/oe) directly if you prefer the more private route.
## Ugh, I'm tired and don't have time to be a captain anymore. What now?
No sweat at all! Email [@parkr](https://github.com/parkr) and ask to be removed. Alternatively, you should be able to go to your team's page on GitHub.com (go to https://github.com/jekyll, click "Teams", click the link to your team) and change your status to either "member" or leave the team.
No sweat at all! Email [@oe](https://github.com/oe) and ask to be removed. Alternatively, you should be able to go to your team's page on GitHub.com (go to https://github.com/jekyll, click "Teams", click the link to your team) and change your status to either "member" or leave the team.
We realize that being a captain is no easy feat so we want to make it a great experience. As always, communicate as much as you can with us about what is working, and what isn't. Thanks for dedicating some time to Jekyll! :sparkles:

View File

@@ -5,21 +5,21 @@ title: "Avoiding Burnout"
**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but its definitely not for everyone.
{: .note .info }
# 1. Use Jekyll
## 1. Use Jekyll
Maintainers of Jekyll should be using it regularly. This is partly because you won't be a good maintainer unless you can put yourself in the shoes of our users, but also because you may at some point decide to stop using Jekyll, and at that point you should also decide to stop being a maintainer and find other things to work on.
# 2. No Guilt About Leaving
## 2. No Guilt About Leaving
All maintainers can stop working on Jekyll at any time without any guilt or explanation (like at a job). We may still ask for your help with questions after you leave but you are under no obligation to answer them. If you create a big mess and then leave you still have no obligations but we may think less of you (or, realistically, probably just revert the problematic work). Also, you should probably take a break from Jekyll at least a few times a year.
This also means contributors should be consumers. If a maintainer finds they are not using a project in the real-world, they should reconsider their involvement with the project.
# 3. Prioritise Maintainers Over Users
## 3. Prioritise Maintainers Over Users
It's important to be user-focused but ultimately, as long as you follow #1 above, Jekyll's minimum number of users will be the number of maintainers. However, if Jekyll has no maintainers it will quickly become useless to all users and the project will die. As a result, no user complaint, behaviour or need takes priority over the burnout of maintainers. If users do not like the direction of the project, the easiest way to influence it is to make significant, high-quality code contributions and become a maintainer.
# 4. Learn To Say No
## 4. Learn To Say No
Jekyll gets a lot of feature requests, non-reproducible bug reports, usage questions and PRs we won't accept. These should be closed out as soon as we realise that they aren't going to be resolved or merged. This is kinder than deciding this after a long period of review. Our issue tracker should reflect work to be done.

View File

@@ -7,7 +7,7 @@ title: "Merging a Pull Request"
## Code Review
All pull requests should be subject to code review. Code review is a [foundational value](https://blog.fullstory.com/what-we-learned-from-google-code-reviews-arent-just-for-catching-bugs-b125a13aa292) of good engineering teams. Besides providing validation of correctness, it promotes a sense of community and gives other maintainers understanding of all parts of the code base. In short, code review is crucial to a healthy open source project.
All pull requests should be subject to code review. Code review is a [foundational value](https://blog.fullstory.com/what-we-learned-from-google-code-reviews-arent-just-for-catching-bugs/) of good engineering teams. Besides providing validation of correctness, it promotes a sense of community and gives other maintainers understanding of all parts of the code base. In short, code review is crucial to a healthy open source project.
**Read our guide for [Reviewing a pull request](../reviewing-a-pull-request) before merging.** Notably, the change must have tests if for code, and at least two maintainers must give it an OK.

View File

@@ -69,6 +69,14 @@ And then, you're done! :tada: Feel free to celebrate!
If you have access to the [@jekyllrb](https://twitter.com/jekyllrb) Twitter account, you should tweet the release post from there. If not, just ask another maintainer to do it or to give you access.
### Build the docs
We package our documentation as a :gem: Gem for offline use.
This is done with the
[**jekyll-docs**](https://github.com/jekyll/jekyll-docs#building) repository,
and more detailed instructions are provided there.
## For non-core gems
If you're not a maintainer for `jekyll/jekyll`, the procedure is much simpler in a lot of cases. Generally, the procedure still looks like this:

View File

@@ -51,4 +51,4 @@ Is what they wanted to get something we want to happen? Sometimes a bug report i
### Staleness and automatic closure
@jekyllbot will automatically mark issues as `stale` if no activity occurs for at least one month. @jekyllbot leaves a comment asking for information about reproducibility in current versions. If no one responds after another month, the issue is automatically closed. This behaviour can be suppressed by setting the [`pinned` label](../maintaining/special-labels.md/#pinned).
@jekyllbot will automatically mark issues as `stale` if no activity occurs for at least one month. @jekyllbot leaves a comment asking for information about reproducibility in current versions. If no one responds after another month, the issue is automatically closed. This behavior can be suppressed by setting the [`pinned` label](/docs/maintaining/special-labels/#pinned).

View File

@@ -0,0 +1,6 @@
---
title: Markdown 101
permalink: /docs/markdown-101/
---
# TO WRITE

View File

@@ -1,5 +1,5 @@
---
title: Blog migrations
title: Blog Migrations
permalink: /docs/migrations/
---

View File

@@ -1,74 +1,27 @@
---
title: Creating pages
title: Pages
permalink: /docs/pages/
---
In addition to [writing posts](../posts/), you might also want to add static pages (content that isn't date-based) to your Jekyll site. By taking advantage of the way Jekyll copies files and directories, this is easy to do.
Pages are the most basic building block for content. They're useful for standalone
content (content which is not date based or is not a group of content such as staff
members or recipes).
## Homepage
Just about every web server configuration you come across will look for an HTML
file called `index.html` (by convention) in the site's root folder and display
that as the homepage. Unless the web server youre using is configured to look
for some different filename as the default, this file will turn into the
homepage of your Jekyll-generated site.
<div class="note">
<h5>ProTip™: Use layouts on your homepage</h5>
<p>
Any HTML file on your site can use layouts and/or includes, even the
homepage. Common content, like headers and footers, make excellent
candidates for extraction into a layout.
</p>
</div>
## Where additional pages live
Where you put HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for pages depends on how you want the pages to work. There are two main ways of creating pages:
- Place named HTML or [Markdown](https://daringfireball.net/projects/markdown/)
files for each page in your site's root folder.
- Place pages inside folders and subfolders named whatever you want.
Both methods work fine (and can be used in conjunction with each other),
with the only real difference being the resulting URLs. By default, pages retain the same folder structure in `_site` as they do in the source directory.
### Named HTML files
The simplest way of adding a page is just to add an HTML file in the root
directory with a suitable name for the page you want to create. For a site with
The simplest way of adding a page is to add an HTML file in the root
directory with a suitable filename. You can also write a page in Markdown using
a `.md` extension which converts to HTML on build. For a site with
a homepage, an about page, and a contact page, heres what the root directory
and associated URLs might look like:
```sh
.
|-- _config.yml
|-- _includes/
|-- _layouts/
|-- _posts/
|-- _site/
|-- about.html # => http://example.com/about.html
|-- about.md # => http://example.com/about.html
|-- index.html # => http://example.com/
|-- other.md # => http://example.com/other.html
└── contact.html # => http://example.com/contact.html
```
If you have a lot of pages, you can organize those pages into subfolders. The same subfolders that are used to group your pages in our project's source will exist in the `_site` folder when your site builds.
If you have a lot of pages, you can organize them into subfolders. The same subfolders that are used to group your pages in our project's source will exist in the `_site` folder when your site builds.
## Flattening pages from subfolders into the root directory
## Changing the output URL
If you have pages organized into subfolders in your source folder and want to flatten them in the root folder on build, you must add the [permalink]({% link _docs/permalinks.md %}) property directly in your page's front matter like this:
```yaml
---
title: My page
permalink: mypageurl.html
---
```
### Named folders containing index HTML files
If you don't want file extensions (`.html`) to appear in your page URLs (file extensions are the default), you can choose a [permalink style](../permalinks/#builtinpermalinkstyles) that has a trailing slash instead of a file extension.
Note if you want to view your site offline *without the Jekyll preview server*, your browser will need the file extension to display the page, and all assets will need to be relative links that function without the server baseurl.
You might want to have a particular folder structure for your source files that changes for the built site. With [permalinks](/docs/permalinks) you have full control of the output URL.

View File

@@ -11,16 +11,12 @@ generate the appropriate files and folders you need for paginated listings.
For Jekyll 3, include the `jekyll-paginate` plugin in your Gemfile and in
your `_config.yml` under `plugins`. For Jekyll 2, this is standard.
<div class="note info">
<h5>Pagination only works within HTML files</h5>
<p>
Pagination does not work from within Markdown or Textile files from
your Jekyll site. Pagination works when called from within the HTML
file, named <code>index.html</code>, which optionally may reside in and
produce pagination from within a subdirectory, via the
<code>paginate_path</code> configuration value.
</p>
</div>
Pagination does not work from within Markdown files from
your Jekyll site. Pagination works when called from within the HTML
file, named `index.html`, which optionally may reside in and
produce pagination from within a subdirectory, via the
`paginate_path` configuration value.
{: .warning }
## Enable pagination
@@ -42,115 +38,37 @@ paginate_path: "/blog/page:num/"
This will read in `blog/index.html`, send it each pagination page in Liquid as
`paginator` and write the output to `blog/page:num/`, where `:num` is the
pagination page number, starting with `2`. If a site has 12 posts and specifies
`paginate: 5`, Jekyll will write `blog/index.html` with the first 5 posts, `blog/page2/index.html` with the next 5 posts
and `blog/page3/index.html` with the last 2 posts into the destination
directory.
pagination page number, starting with `2`. <br/>
If a site has 12 posts and specifies `paginate: 5`, Jekyll will write `blog/index.html`
with the first 5 posts, `blog/page2/index.html` with the next 5 posts and
`blog/page3/index.html` with the last 2 posts into the destination directory.
<div class="note warning">
<h5>Don't set a permalink</h5>
<p>
Setting a permalink in the front matter of your blog page will cause
pagination to break. Just omit the permalink.
</p>
</div>
<div class="note info">
<h5>Pagination for categories, tags and collections</h5>
<p>
The more recent <a href="https://github.com/sverrirs/jekyll-paginate-v2">jekyll-paginate-v2</a> plugin supports more features. See the <a href="https://github.com/sverrirs/jekyll-paginate-v2/tree/master/examples">pagination examples</a> in the repository.
<strong>This plugin is not supported by GitHub Pages</strong>.
</p>
</div>
Setting a permalink in the front matter of your blog page will cause pagination to break. Just omit the permalink.
{: .warning }
## Liquid Attributes Available
The pagination plugin exposes the `paginator` liquid object with the following
attributes:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><p><code>page</code></p></td>
<td><p>current page number</p></td>
</tr>
<tr>
<td><p><code>per_page</code></p></td>
<td><p>number of posts per page</p></td>
</tr>
<tr>
<td><p><code>posts</code></p></td>
<td><p>a list of posts for the current page</p></td>
</tr>
<tr>
<td><p><code>total_posts</code></p></td>
<td><p>total number of posts in the site</p></td>
</tr>
<tr>
<td><p><code>total_pages</code></p></td>
<td><p>number of pagination pages</p></td>
</tr>
<tr>
<td><p><code>previous_page</code></p></td>
<td>
<p>
page number of the previous pagination page,
or <code>nil</code> if no previous page exists
</p>
</td>
</tr>
<tr>
<td><p><code>previous_page_path</code></p></td>
<td>
<p>
path of previous pagination page,
or <code>nil</code> if no previous page exists
</p>
</td>
</tr>
<tr>
<td><p><code>next_page</code></p></td>
<td>
<p>
page number of the next pagination page,
or <code>nil</code> if no subsequent page exists
</p>
</td>
</tr>
<tr>
<td><p><code>next_page_path</code></p></td>
<td>
<p>
path of next pagination page,
or <code>nil</code> if no subsequent page exists
</p>
</td>
</tr>
</tbody>
</table>
</div>
{% include docs_variables_table.html scope=site.data.jekyll_variables.paginator %}
<div class="note info">
<h5>Pagination does not support tags or categories</h5>
<p>Pagination pages through every post in the <code>posts</code>
variable unless a post has <code>hidden: true</code> in its YAML Front Matter.
It does not currently allow paging over groups of posts linked
by a common tag or category. It cannot include any collection of
documents because it is restricted to posts.</p>
</div>
## Tags and Categories
Pagination pages through every post in the `posts`
variable unless a post has `hidden: true` in its front matter.
It does not currently allow paging over groups of posts linked
by a common tag or category. It cannot include any collection of documents because it is restricted to posts.
[jekyll-paginate-v2](https://github.com/sverrirs/jekyll-paginate-v2) is an unofficial successor of jekyll-paginate which supports more features.
## Render the paginated Posts
The next thing you need to do is to actually display your posts in a list using
the `paginator` variable that will now be available to you. Youll probably
want to do this in one of the main pages of your site. Heres one example of a
want to do this in one of the main pages of your site.
Heres one example of a
simple way of rendering paginated Posts in a HTML file:
{% raw %}
@@ -174,11 +92,15 @@ title: My Blog
<!-- Pagination links -->
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
<a href="{{ paginator.previous_page_path }}" class="previous">
Previous
</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
<span class="page_number ">
Page: {{ paginator.page }} of {{ paginator.total_pages }}
</span>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
{% else %}
@@ -188,24 +110,19 @@ title: My Blog
```
{% endraw %}
<div class="note warning">
<h5>Beware the page one edge-case</h5>
<p>
Jekyll does not generate a page1 folder, so the above code will not work
when a <code>/page1</code> link is produced. See below for a way to handle
this if its a problem for you.
</p>
</div>
The following HTML snippet should handle page one, and render a list of each
page with links to all but the current page.
Jekyll does not generate a `page1` folder, so the above code will not work
when a `/page1` link is produced. See below for a way to handle
this if its a problem for you:
{% raw %}
```liquid
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo; Prev</a>
<a href="{{ paginator.previous_page_path | relative_url }}">
&laquo; Prev
</a>
{% else %}
<span>&laquo; Prev</span>
{% endif %}
@@ -214,14 +131,20 @@ page with links to all but the current page.
{% if page == paginator.page %}
<em>{{ page }}</em>
{% elsif page == 1 %}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
<a href="{{ paginator.previous_page_path | relative_url }}">
{{ page }}
</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
<a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">
{{ page }}
</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Next &raquo;</a>
<a href="{{ paginator.next_page_path | relative_url }}">
Next &raquo;
</a>
{% else %}
<span>Next &raquo;</span>
{% endif %}

View File

@@ -3,54 +3,48 @@ title: Permalinks
permalink: /docs/permalinks/
---
Permalinks refer to the URLs (excluding the domain name or directory folder) for your pages, posts, or collections.
Jekyll supports a flexible way to build permalinks, allowing you to leverage various template variables or choose built-in permalink styles (such as `date`) that automatically use a template-variable pattern.
Permalinks are the output path for your pages, posts, or collections. They
allow you to structure the directories of your source code different from the
directories in your output.
You construct permalinks by creating a template URL where dynamic elements are represented by colon-prefixed keywords. The default template permalink is `/:categories/:year/:month/:day/:title:output_ext`. Each of the colon-prefixed keywords is a template variable.
## Front Matter
## Where to configure permalinks
The simplest way to set a permalink is using front matter. You set the
`permalink` variable in front matter to the output path you'd like.
You can configure your site's permalinks through the [Configuration]({% link _docs/configuration.md %}) file or in the [Front Matter]({% link _docs/frontmatter.md %}) for each post, page, or collection.
For example, you might have a page on your site located at
`/my_pages/about-me.html` and you want the output url to be `/about/`. In
front matter the page you would set:
Setting permalink styles in your configuration file applies the setting globally in your project. You configure permalinks in your `_config.yml` file like this:
```
---
permalink: /about/
---
```
## Global
Setting a permalink in front matter for every page on your site is no fun.
Luckily, Jekyll let's you set in globally in your `_config.yml`.
To set a global permalink, you use the `permalink` variable in `_config.yml`.
You can use placeholders to your desired output. For example:
```yaml
permalink: /:categories/:year/:month/:day/:title:output_ext
```
If you don't specify any permalink setting, Jekyll uses the above pattern as the default.
Note that pages and collections don't have time or categories, these aspects of
the permalink style are ignored for the output.
The permalink can also be set using a built-in permalink style:
For example, a permalink style of
`/:categories/:year/:month/:day/:title:output_ext` for posts becomes
`/:title.html` for pages and collections.
```yaml
permalink: date
```
### Placeholders
`date` is the same as `:categories/:year/:month/:day/:title:output_ext`, the default. See [Built-in Permalink Styles](#builtinpermalinkstyles) below for more options.
Here's the full list of placeholders available:
Setting the permalink in your post, page, or collection's front matter overrides any global settings. Here's an example:
```yaml
---
title: My page title
permalink: /mypageurl/
---
```
Even if your configuration file specifies the `date` style, the URL for this page would be `http://somedomain.com/mypageurl/`.
When you use permalinks that omit the `.html` file extension (called "pretty URLs") Jekyll builds the file as index.html placed inside a folder with the page's name. For example:
```
├── mypageurl
│   └── index.html
```
With a URL such as `/mypageurl/`, servers automatically load the index.html file inside the folder, so users can simply navigate to `http://somedomain.com/mypageurl/` to get to `mypageurl/index.html`.
## Template variables for permalinks {#template-variables}
The following table lists the template variables available for permalinks. You can use these variables in the `permalink` property in your config file.
<div class="mobile-side-scroller">
<table>
@@ -68,7 +62,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Year from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
<code>date</code> front matter
</p>
</td>
</tr>
@@ -79,7 +73,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Month from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
<code>date</code> front matter
</p>
</td>
</tr>
@@ -90,7 +84,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Month without leading zeros from the post's filename. May be
overridden via the documents <code>date</code> YAML front matter
overridden via the documents <code>date</code> front matter
</p>
</td>
</tr>
@@ -101,7 +95,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Day from the post's filename. May be overridden via the documents
<code>date</code> YAML front matter
<code>date</code> front matter
</p>
</td>
</tr>
@@ -112,14 +106,14 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Day without leading zeros from the post's filename. May be overridden
via the documents <code>date</code> YAML front matter
via the documents <code>date</code> front matter
</p>
</td>
</tr>
<tr>
<td>
<p><code>y_day</code></p>
</td>_
</td>
<td>
<p>Day of the year from the post's filename, with leading zeros.</p>
</td>
@@ -131,7 +125,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Year without the century from the post's filename. May be overridden
via the documents <code>date</code> YAML front matter
via the documents <code>date</code> front matter
</p>
</td>
</tr>
@@ -173,7 +167,7 @@ The following table lists the template variables available for permalinks. You c
<td>
<p>
Title from the documents filename. May be overridden via
the documents <code>slug</code> YAML front matter.
the documents <code>slug</code> front matter.
</p>
</td>
</tr>
@@ -185,7 +179,7 @@ The following table lists the template variables available for permalinks. You c
<p>
Slugified title from the documents filename (any character
except numbers and letters is replaced as hyphen). May be
overridden via the documents <code>slug</code> YAML front matter.
overridden via the documents <code>slug</code> front matter.
</p>
</td>
</tr>
@@ -206,11 +200,9 @@ The following table lists the template variables available for permalinks. You c
</table>
</div>
Note that all template variables relating to time or categories are available to posts only.
### Built-in formats
## Built-in permalink styles {#builtinpermalinkstyles}
Although you can specify a custom permalink pattern using [template variables](#template-variables), Jekyll also provides the following built-in styles for convenience.
For posts, Jekyll also provides the following built-in styles for convenience. Note, these aren't recognized when setting the permalink in front matter.
<div class="mobile-side-scroller">
<table>
@@ -257,138 +249,76 @@ Although you can specify a custom permalink pattern using [template variables](#
</table>
</div>
Rather than typing `permalink: /:categories/:year/:month/:day/:title/`, you can just type `permalink: pretty`.
### Collections
<div class="note info">
<h5>Specifying permalinks through the YAML Front Matter</h5>
<p>Built-in permalink styles are not recognized in YAML Front Matter. As a result, <code>permalink: pretty</code> will not work.</p>
</div>
For collections, you have the option to override the global permalink in the
collection configuration in `_config.yml`:
## Permalink style examples with posts {#permalink-style-examples}
```yaml
collections:
my_collection:
output: true
permalink: /:collection/:name
```
Here are a few examples to clarify how permalink styles get applied with posts.
Given a post named: `/2009-04-29-slap-chop.md`
Collections have the following placeholders available:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>URL Template</th>
<th>Resulting Permalink URL</th>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p>None specified, or <code>permalink: date</code></p>
<p><code>:collection</code></p>
</td>
<td>
<p><code>/2009/04/29/slap-chop.html</code></p>
<p>Label of the containing collection.</p>
</td>
</tr>
<tr>
<td>
<p><code>pretty</code></p>
<p><code>:path</code></p>
</td>
<td>
<p><code>/2009/04/29/slap-chop/</code></p>
<p>Path to the document relative to the collection's directory.</p>
</td>
</tr>
<tr>
<td>
<p><code>/:month-:day-:year/:title:output_ext</code></p>
<p><code>:name</code></p>
</td>
<td>
<p><code>/04-29-2009/slap-chop.html</code></p>
<p>The document's base filename, with every sequence of spaces
and non-alphanumeric characters replaced by a hyphen.</p>
</td>
</tr>
<tr>
<td>
<p><code>/blog/:year/:month/:day/:title/</code></p>
<p><code>:title</code></p>
</td>
<td>
<p><code>/blog/2009/04/29/slap-chop/</code></p>
<p>
The <code>:title</code> template variable will take the
<code>slug</code> <a href="/docs/front-matter/">front matter</a>
variable value if any is present in the document; if none is
defined then <code>:title</code> will be equivalent to
<code>:name</code>, aka the slug generated from the filename.
</p>
</td>
</tr>
<tr>
<td>
<p><code>/:year/:month/:title</code></p>
<p>See <a href="#extensionless-permalinks">Extensionless permalinks with no trailing slashes</a> for details.</p>
<p><code>:output_ext</code></p>
</td>
<td>
<p><code>/2009/04/slap-chop</code></p>
<p>Extension of the output file. (Included by default and usually unnecessary.)</p>
</td>
</tr>
</tbody>
</table>
</div>
## Permalink settings for pages and collections {#pages-and-collections}
The permalink setting in your configuration file specifies the permalink style used for posts, pages, and collections. However, because pages and collections don't have time or categories, these aspects of the permalink style are ignored with pages and collections.
For example:
* A permalink style of `/:categories/:year/:month/:day/:title:output_ext` for posts becomes `/:title.html` for pages and collections.
* A permalink style of `pretty` (or `/:categories/:year/:month/:day/:title/`), which omits the file extension and contains a trailing slash, will update page and collection permalinks to also omit the file extension and contain a trailing slash: `/:title/`.
* A permalink style of `date`, which contains a trailing file extension, will update page permalinks to also contain a trailing file extension: `/:title.html`. But no time or category information will be included.
## Permalinks and default paths
The path to the post or page in the built site differs for posts, pages, and collections:
### Posts
The subfolders into which you may have organized your posts inside the `_posts` directory will not be part of the permalink.
If you use a permalink style that omits the `.html` file extension, each post is rendered as an `index.html` file inside a folder with the post's name (for example, `categoryname/2016/12/01/mypostname/index.html`).
### Pages
Unlike posts, pages by default mimic the source directory structure exactly. (The only exception is if your page has a `permalink` declared its front matter &mdash; in that case, the structure honors the permalink setting instead of the source folder structure.)
As with posts, if you use a permalink style that omits the `.html` file extension, each page is rendered as an `index.html` file inserted inside a folder with the page's name (for example, `mypage/index.html`).
### Collections
By default, collections follow a similar structure in the `_site` folder as pages, except that the path is prefaced by the collection name. For example: `collectionname/mypage.html`. For permalink settings that omit the file extension, the path would be `collection_name/mypage/index.html`.
Collections have their own way of setting permalinks. Additionally, collections have unique template variables available (such as `path` and `output_ext`). See the [Configuring permalinks for collections](../collections/#permalinks) in Collections for more information.
## Flattening pages in \_site on build
If you want to flatten your pages (pull them out of subfolders) in the `_site` directory when your site builds (similar to posts), add the `permalink` property to the front matter of each page, with no path specified:
```yaml
---
title: My page
permalink: mypageurl.html
---
```
## Extensionless permalinks with no trailing slashes {#extensionless-permalinks}
Jekyll supports permalinks that contain neither a trailing slash nor a file extension, but this requires additional support from the web server to properly serve. When using these types of permalinks, output files written to disk will still have the proper file extension (typically `.html`), so the web server must be able to map requests without file extensions to these files.
Both [GitHub Pages](../github-pages/) and the Jekyll's built-in WEBrick server handle these requests properly without any additional work.
### Apache
The Apache web server has extensive support for content negotiation and can handle extensionless URLs by setting the [multiviews](https://httpd.apache.org/docs/current/content-negotiation.html#multiviews) option in your `httpd.conf` or `.htaccess` file:
{% highlight apache %}
Options +MultiViews
{% endhighlight %}
### Nginx
The [try_files](http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files) directive allows you to specify a list of files to search for to process a request. The following configuration will instruct nginx to search for a file with an `.html` extension if an exact match for the requested URI is not found.
{% highlight nginx %}
try_files $uri $uri.html $uri/ =404;
{% endhighlight %}
## Linking without regard to permalink styles
You can create links in your topics to other posts, pages, or collection items in a way that is valid no matter what permalink configuration you choose. By using the `link` tag, if you change your permalinks, your links won't break. See [Linking to pages](../templates#link) in Templates for more details.

View File

@@ -7,939 +7,11 @@ Jekyll has a plugin system with hooks that allow you to create custom generated
content specific to your site. You can run custom code for your site without
having to modify the Jekyll source itself.
<div class="note info">
<h5>Plugins on GitHub Pages</h5>
<p>
<a href="https://pages.github.com/">GitHub Pages</a> is powered by Jekyll.
However, all Pages sites are generated using the <code>--safe</code> option
to disable custom plugins for security reasons. Unfortunately, this means
your plugins wont work if youre deploying to GitHub Pages.<br><br>
You can still use GitHub Pages to publish your site, but youll need to
convert the site locally and push the generated static files to your GitHub
repository instead of the Jekyll source files.
</p>
</div>
## Installing a plugin
You have 3 options for installing plugins:
1. In your site source root, make a `_plugins` directory. Place your plugins
here. Any file ending in `*.rb` inside this directory will be loaded before
Jekyll generates your site.
2. In your `_config.yml` file, add a new array with the key `plugins` (or `gems` for Jekyll < `3.5.0`) and the
values of the gem names of the plugins you'd like to use. An example:
```yaml
# This will require each of these plugins automatically.
plugins:
- jekyll-gist
- jekyll-coffeescript
- jekyll-assets
- another-jekyll-plugin
```
Then install your plugins using `gem install jekyll-gist jekyll-coffeescript jekyll-assets another-jekyll-plugin`
3. Add the relevant plugins to a Bundler group in your `Gemfile`. An
example:
```ruby
group :jekyll_plugins do
gem "jekyll-gist"
gem "jekyll-coffeescript"
gem "jekyll-assets"
gem "another-jekyll-plugin"
end
```
Now you need to install all plugins from your Bundler group by running single command `bundle install`.
<div class="note info">
<h5>
<code>_plugins</code>, <code>_config.yml</code> and <code>Gemfile</code>
can be used simultaneously
</h5>
<p>
You may use any of the aforementioned plugin options simultaneously in the
same site if you so choose. Use of one does not restrict the use of the
others.
</p>
</div>
### The jekyll_plugins group
Jekyll gives this particular group of gems in your `Gemfile` a different
treatment. Any gem included in this group is loaded before Jekyll starts
processing the rest of your source directory.
A gem included here will be activated even if its not explicitly listed under
the `plugins:` key in your site's config file.
<div class="note warning">
<p>
Gems included in the <code>:jekyll-plugins</code> group are activated
regardless of the <code>--safe</code> mode setting. Be aware of what
gems are included under this group!
</p>
</div>
In general, plugins you make will fall broadly into one of five categories:
1. [Generators](#generators)
2. [Converters](#converters)
3. [Commands](#commands)
4. [Tags](#tags)
5. [Hooks](#hooks)
See the bottom of the page for a [list of available plugins](#available-plugins).
For further information on how to develop your own plugins, check out the [Liquid documentation](https://github.com/Shopify/liquid/wiki/Liquid-for-Programmers) as well.
If you never developed a Jekyll plugin [check this useful wrap-up](https://ayastreb.me/writing-a-jekyll-plugin/) by @ayastreb to get started.
## Generators
You can create a generator when you need Jekyll to create additional content
based on your own rules.
A generator is a subclass of `Jekyll::Generator` that defines a `generate`
method, which receives an instance of
[`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb). The
return value of `generate` is ignored.
Generators run after Jekyll has made an inventory of the existing content, and
before the site is generated. Pages with YAML Front Matters are stored as
instances of
[`Jekyll::Page`]({{ site.repository }}/blob/master/lib/jekyll/page.rb)
and are available via `site.pages`. Static files become instances of
[`Jekyll::StaticFile`]({{ site.repository }}/blob/master/lib/jekyll/static_file.rb)
and are available via `site.static_files`. See
[the Variables documentation page](/docs/variables/) and
[`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb)
for more details.
For instance, a generator can inject values computed at build time for template
variables. In the following example the template `reading.html` has two
variables `ongoing` and `done` that we fill in the generator:
```ruby
module Reading
class Generator < Jekyll::Generator
def generate(site)
ongoing, done = Book.all.partition(&:ongoing?)
reading = site.pages.detect {|page| page.name == 'reading.html'}
reading.data['ongoing'] = ongoing
reading.data['done'] = done
end
end
end
```
This is a more complex generator that generates new pages:
```ruby
module Jekyll
class CategoryPage < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
self.data['category'] = category
category_title_prefix = site.config['category_title_prefix'] || 'Category: '
self.data['title'] = "#{category_title_prefix}#{category}"
end
end
class CategoryPageGenerator < Generator
safe true
def generate(site)
if site.layouts.key? 'category_index'
dir = site.config['category_dir'] || 'categories'
site.categories.each_key do |category|
site.pages << CategoryPage.new(site, site.source, File.join(dir, category), category)
end
end
end
end
end
```
In this example, our generator will create a series of files under the
`categories` directory for each category, listing the posts in each category
using the `category_index.html` layout.
Generators are only required to implement one method:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>generate</code></p>
</td>
<td>
<p>Generates content as a side-effect.</p>
</td>
</tr>
</tbody>
</table>
</div>
## Converters
If you have a new markup language youd like to use with your site, you can
include it by implementing your own converter. Both the Markdown and
[Textile](https://github.com/jekyll/jekyll-textile-converter) markup
languages are implemented using this method.
<div class="note info">
<h5>Remember your YAML Front Matter</h5>
<p>
Jekyll will only convert files that have a YAML header at the top, even for
converters you add using a plugin.
</p>
</div>
Below is a converter that will take all posts ending in `.upcase` and process
them using the `UpcaseConverter`:
```ruby
module Jekyll
class UpcaseConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /^\.upcase$/i
end
def output_ext(ext)
".html"
end
def convert(content)
content.upcase
end
end
end
```
Converters should implement at a minimum 3 methods:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>matches</code></p>
</td>
<td><p>
Does the given extension match this converters list of acceptable
extensions? Takes one argument: the files extension (including the
dot). Must return <code>true</code> if it matches, <code>false</code>
otherwise.
</p></td>
</tr>
<tr>
<td>
<p><code>output_ext</code></p>
</td>
<td><p>
The extension to be given to the output file (including the dot).
Usually this will be <code>".html"</code>.
</p></td>
</tr>
<tr>
<td>
<p><code>convert</code></p>
</td>
<td><p>
Logic to do the content conversion. Takes one argument: the raw content
of the file (without YAML Front Matter). Must return a String.
</p></td>
</tr>
</tbody>
</table>
</div>
In our example, `UpcaseConverter#matches` checks if our filename extension is
`.upcase`, and will render using the converter if it is. It will call
`UpcaseConverter#convert` to process the content. In our simple converter were
simply uppercasing the entire content string. Finally, when it saves the page,
it will do so with a `.html` extension.
## Commands
As of version 2.5.0, Jekyll can be extended with plugins which provide
subcommands for the `jekyll` executable. This is possible by including the
relevant plugins in a `Gemfile` group called `:jekyll_plugins`:
```ruby
group :jekyll_plugins do
gem "my_fancy_jekyll_plugin"
end
```
Each `Command` must be a subclass of the `Jekyll::Command` class and must
contain one class method: `init_with_program`. An example:
```ruby
class MyNewCommand < Jekyll::Command
class << self
def init_with_program(prog)
prog.command(:new) do |c|
c.syntax "new [options]"
c.description 'Create a new Jekyll site.'
c.option 'dest', '-d DEST', 'Where the site should go.'
c.action do |args, options|
Jekyll::Site.new_site_at(options['dest'])
end
end
end
end
end
```
Commands should implement this single class method:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>init_with_program</code></p>
</td>
<td><p>
This method accepts one parameter, the
<code><a href="https://github.com/jekyll/mercenary#readme">Mercenary::Program</a></code>
instance, which is the Jekyll program itself. Upon the program,
commands may be created using the above syntax. For more details,
visit the Mercenary repository on GitHub.com.
</p></td>
</tr>
</tbody>
</table>
</div>
## Tags
If youd like to include custom liquid tags in your site, you can do so by
hooking into the tagging system. Built-in examples added by Jekyll include the
`highlight` and `include` tags. Below is an example of a custom liquid tag that
will output the time the page was rendered:
```ruby
module Jekyll
class RenderTimeTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
end
def render(context)
"#{@text} #{Time.now}"
end
end
end
Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
```
At a minimum, liquid tags must implement:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>render</code></p>
</td>
<td>
<p>Outputs the content of the tag.</p>
</td>
</tr>
</tbody>
</table>
</div>
You must also register the custom tag with the Liquid template engine as
follows:
```ruby
Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
```
In the example above, we can place the following tag anywhere in one of our
pages:
{% raw %}
```ruby
<p>{% render_time page rendered at: %}</p>
```
{% endraw %}
And we would get something like this on the page:
```html
<p>page rendered at: Tue June 22 23:38:47 0500 2010</p>
```
### Liquid filters
You can add your own filters to the Liquid template system much like you can
add tags above. Filters are simply modules that export their methods to liquid.
All methods will have to take at least one parameter which represents the input
of the filter. The return value will be the output of the filter.
```ruby
module Jekyll
module AssetFilter
def asset_url(input)
"http://www.example.com/#{input}?#{Time.now.to_i}"
end
end
end
Liquid::Template.register_filter(Jekyll::AssetFilter)
```
<div class="note">
<h5>ProTip™: Access the site object using Liquid</h5>
<p>
Jekyll lets you access the <code>site</code> object through the
<code>context.registers</code> feature of Liquid at <code>context.registers[:site]</code>. For example, you can
access the global configuration file <code>_config.yml</code> using
<code>context.registers[:site].config</code>.
</p>
</div>
### Flags
There are two flags to be aware of when writing a plugin:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>safe</code></p>
</td>
<td>
<p>
A boolean flag that informs Jekyll whether this plugin may be safely
executed in an environment where arbitrary code execution is not
allowed. This is used by GitHub Pages to determine which core plugins
may be used, and which are unsafe to run. If your plugin does not
allow for arbitrary code execution, set this to <code>true</code>.
GitHub Pages still wont load your plugin, but if you submit it for
inclusion in core, its best for this to be correct!
</p>
</td>
</tr>
<tr>
<td>
<p><code>priority</code></p>
</td>
<td>
<p>
This flag determines what order the plugin is loaded in. Valid values
are: <code>:lowest</code>, <code>:low</code>, <code>:normal</code>,
<code>:high</code>, and <code>:highest</code>. Highest priority
matches are applied first, lowest priority are applied last.
</p>
</td>
</tr>
</tbody>
</table>
</div>
To use one of the example plugins above as an illustration, here is how youd
specify these two flags:
```ruby
module Jekyll
class UpcaseConverter < Converter
safe true
priority :low
...
end
end
```
## Hooks
Using hooks, your plugin can exercise fine-grained control over various aspects
of the build process. If your plugin defines any hooks, Jekyll will call them
at pre-defined points.
Hooks are registered to a container and an event name. To register one, you
call Jekyll::Hooks.register, and pass the container, event name, and code to
call whenever the hook is triggered. For example, if you want to execute some
custom functionality every time Jekyll renders a post, you could register a
hook like this:
```ruby
Jekyll::Hooks.register :posts, :post_render do |post|
# code to call after Jekyll renders a post
end
```
Jekyll provides hooks for <code>:site</code>, <code>:pages</code>,
<code>:posts</code>, and <code>:documents</code>. In all cases, Jekyll calls
your hooks with the container object as the first callback parameter. However,
all `:pre_render` hooks and the`:site, :post_render` hook will also provide a
payload hash as a second parameter. In the case of `:pre_render`, the payload
gives you full control over the variables that are available while rendering.
In the case of `:site, :post_render`, the payload contains final values after
rendering all the site (useful for sitemaps, feeds, etc).
The complete list of available hooks is below:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Container</th>
<th>Event</th>
<th>Called</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:after_init</code></p>
</td>
<td>
<p>Just after the site initializes, but before setup & render. Good
for modifying the configuration of the site.</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:after_reset</code></p>
</td>
<td>
<p>Just after site reset</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_read</code></p>
</td>
<td>
<p>After site data has been read and loaded from disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering the whole site</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering the whole site, but before writing any files</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing the whole site to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a page is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a page</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a page, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a page to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a post is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a post</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a post, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a post to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a document is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a document</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a document, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a document to disk</p>
</td>
</tr>
</tbody>
</table>
</div>
## Available Plugins
You can find a few useful plugins at the following locations:
#### Generators
- [Sitemap.xml Generator by Michael Levin](https://github.com/kinnetica/jekyll-plugins): Generates a sitemap.xml file by traversing all of the available posts and pages.
- [Full-text search by Pascal Widdershoven](https://github.com/PascalW/jekyll_indextank): Adds full-text search to your Jekyll site with a plugin and a bit of JavaScript.
- [AliasGenerator by Thomas Mango](https://github.com/tsmango/jekyll_alias_generator): Generates redirect pages for posts when an alias is specified in the YAML Front Matter.
- [Pageless Redirect Generator by Nick Quinlan](https://github.com/nquinlan/jekyll-pageless-redirects): Generates redirects based on files in the Jekyll root, with support for htaccess style redirects.
- [RssGenerator by Assaf Gelber](https://github.com/agelber/jekyll-rss): Automatically creates an RSS 2.0 feed from your posts.
- [Monthly archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-monthly-archive-plugin): Generator and template which renders monthly archive like MovableType style, based on the work by Ilkka Laukkanen and others above.
- [Category archive generator by Shigeya Suzuki](https://github.com/shigeya/jekyll-category-archive-plugin): Generator and template which renders category archive like MovableType style, based on Monthly archive generator.
- [Emoji for Jekyll](https://github.com/yihangho/emoji-for-jekyll): Seamlessly enable emoji for all posts and pages.
- [Compass integration for Jekyll](https://github.com/mscharley/jekyll-compass): Easily integrate Compass and Sass with your Jekyll website.
- [Pages Directory by Ben Baker-Smith](https://github.com/bbakersmith/jekyll-pages-directory): Defines a `_pages` directory for page files which routes its output relative to the project root.
- [Page Collections by Jeff Kolesky](https://github.com/jeffkole/jekyll-page-collections): Generates collections of pages with functionality that resembles posts.
- [Windows 8.1 Live Tile Generation by Matt Sheehan](https://github.com/sheehamj13/jekyll-live-tiles): Generates Internet Explorer 11 config.xml file and Tile Templates for pinning your site to Windows 8.1.
- [Typescript Generator by Matt Sheehan](https://github.com/sheehamj13/jekyll_ts): Generate Javascript on build from your Typescript.
- [Jekyll::AutolinkEmail by Ivan Tse](https://github.com/ivantsepp/jekyll-autolink_email): Autolink your emails.
- [Jekyll::GitMetadata by Ivan Tse](https://github.com/ivantsepp/jekyll-git_metadata): Expose Git metadata for your templates.
- [Jekyll Auto Image by Merlos](https://github.com/merlos/jekyll-auto-image): Gets the first image of a post. Useful to list your posts with images or to add [twitter cards](https://dev.twitter.com/cards/overview) to your site.
- [Jekyll Portfolio Generator by Shannon Babincsak](https://github.com/codeinpink/jekyll-portfolio-generator): Generates project pages and computes related projects out of project data files.
- [Jekyll-Umlauts by Arne Gockeln](https://github.com/webchef/jekyll-umlauts): This generator replaces all german umlauts (äöüß) case sensitive with html.
- [Jekyll Flickr Plugin](https://github.com/lawmurray/indii-jekyll-flickr) by [Lawrence Murray](http://www.indii.org): Generates posts for photos uploaded to a Flickr photostream.
- [Jekyll::Paginate::Category](https://github.com/midnightSuyama/jekyll-paginate-category): Pagination Generator for Jekyll Category.
- [AMP-Jekyll by Juuso Mikkonen](https://github.com/juusaw/amp-jekyll): Generate [Accelerated Mobile Pages](https://www.ampproject.org) of Jekyll posts.
- [Jekyll Art Gallery plugin](https://github.com/alexivkin/Jekyll-Art-Gallery-Plugin): An advanced art/photo gallery generation plugin for creating galleries from a set of image folders. Supports image tagging, thumbnails, sorting, image rotation, post-processing (remove EXIF, add watermark), multiple collections and much more.
- [jekyll-ga](https://github.com/developmentseed/jekyll-ga): A Jekyll plugin that downloads Google Analytics data and adds it to posts. Useful for making a site that lists "most popular" content. [Read the introduction](https://developmentseed.org/blog/google-analytics-jekyll-plugin/) post on the developmentSEED blog.
- [jekyll-multi-paginate](https://github.com/fadhilnapis/jekyll-multi-paginate): Simple Jekyll paginator for multiple page. Ease you to make pagination on multiple page especially like multiple language.
- [jekyll-category-pages](https://github.com/field-theory/jekyll-category-pages): Easy-to-use category index pages with and without pagination. Supports non-URL-safe category keywords and has extensive documentation and test coverage.
- [Tweetsert](https://github.com/ibrado/jekyll-tweetsert): Imports tweets (Twitter statuses) as new posts. Features multiple timeline support, hashtag import, filtering, automatic category and/or tags, optional retweets and replies.
- [Stickyposts](https://github.com/ibrado/jekyll-stickyposts): Moves or copies (pins) posts marked `sticky: true` to the top of the list. Perfect for keeping important announcements on the home page, or giving collections a descriptive entry. Paginator friendly.
- [Jekyll::Paginate::Content](https://github.com/ibrado/jekyll-paginate-content): Content paginator in the style of jekyll-paginator-v2 that splits pages, posts, and collection entries into several pages. Specify a separator or use HTML &lt;h1&gt; etc. headers. Automatic splitting, single-page view, pager/trail, self-adjusting links, multipage TOC, SEO support.
- [Premonition](https://github.com/amedia/premonition): Adds block-styled side content to your page. For example summary, notes, hints or warning boxes.
- [jekyll-fontello](https://github.com/ericcornelissen/jekyll-fontello): A Jekyll plugin that automatically downloads your webfont from Fontello.
#### Converters
- [Pug plugin by Doug Beney](http://jekyll-pug.dougie.io): Use the popular Pug (previously Jade) templating language in Jekyll. Complete with caching, includes support, and much more.
- [Textile converter](https://github.com/jekyll/jekyll-textile-converter): Convert `.textile` files into HTML. Also includes the `textilize` Liquid filter.
- [Slim plugin](https://github.com/slim-template/jekyll-slim): Slim converter and includes for Jekyll with support for Liquid tags.
- [Markdown References by Olov Lassus](https://github.com/olov/jekyll-references): Keep all your markdown reference-style link definitions in one \_references.md file.
- [ReStructuredText Converter](https://github.com/xdissent/jekyll-rst): Converts ReST documents to HTML with Pygments syntax highlighting.
- [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandocs markdown extensions.
- [Customized Kramdown Converter](https://github.com/mvdbos/kramdown-with-pygments): Enable Pygments syntax highlighting for Kramdown-parsed fenced code blocks.
- [Bigfootnotes Plugin](https://github.com/TheFox/jekyll-bigfootnotes): Enables big footnotes for Kramdown.
- [AsciiDoc Plugin](https://github.com/asciidoctor/jekyll-asciidoc): AsciiDoc convertor for Jekyll using [Asciidoctor](http://asciidoctor.org/).
- [Lazy Tweet Embedding](https://github.com/takuti/jekyll-lazy-tweet-embedding): Automatically convert tweet urls into twitter cards.
- [jekyll-commonmark](https://github.com/pathawks/jekyll-commonmark): Markdown converter that uses [libcmark](https://github.com/jgm/CommonMark), the reference parser for CommonMark.
#### Filters
- [Truncate HTML](https://github.com/MattHall/truncatehtml) by [Matt Hall](https://codebeef.com/): A Jekyll filter that truncates HTML while preserving markup structure.
- [Domain Name Filter by Lawrence Woodman](https://github.com/LawrenceWoodman/domain_name-liquid_filter): Filters the input text so that just the domain name is left.
- [Smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics.
- [Jekyll-timeago](https://github.com/markets/jekyll-timeago): Converts a time value to the time ago in words.
- [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a grammatically-correct amount like “1 minute” or “2 minute**s**”.
- [reading_time](https://github.com/bdesham/reading_time): Count words and estimate reading time for a piece of text, ignoring HTML elements that are unlikely to contain running text.
- [Table of Content Generator](https://github.com/dafi/jekyll-toc-generator): Generate the HTML code containing a table of content (TOC), the TOC can be customized in many way, for example you can decide which pages can be without TOC.
- [jekyll-toc](https://github.com/toshimaru/jekyll-toc): A liquid filter plugin for Jekyll which generates a table of contents.
- [jekyll-humanize](https://github.com/23maverick23/jekyll-humanize): This is a port of the Django app humanize which adds a "human touch" to data. Each method represents a Fluid type filter that can be used in your Jekyll site templates. Given that Jekyll produces static sites, some of the original methods do not make logical sense to port (e.g. naturaltime).
- [Jekyll-Ordinal](https://github.com/PatrickC8t/Jekyll-Ordinal): Jekyll liquid filter to output a date ordinal such as "st", "nd", "rd", or "th".
- [Deprecated articles keeper](https://github.com/kzykbys/JekyllPlugins) by [Kazuya Kobayashi](http://blog.kazuya.co/): A simple Jekyll filter which monitor how old an article is.
- [Jekyll-jalali](https://github.com/mehdisadeghi/jekyll-jalali) by [Mehdi Sadeghi](http://mehdix.ir): A simple Gregorian to Jalali date converter filter.
- [Jekyll Thumbnail Filter](https://github.com/matallo/jekyll-thumbnail-filter): Related posts thumbnail filter.
- [liquid-md5](https://github.com/pathawks/liquid-md5): Returns an MD5 hash. Helpful for generating Gravatars in templates.
- [jekyll-roman](https://github.com/paulrobertlloyd/jekyll-roman): A liquid filter for Jekyll that converts numbers into Roman numerals.
- [jekyll-typogrify](https://github.com/myles/jekyll-typogrify): A Jekyll plugin that brings the functions of [typogruby](http://avdgaag.github.io/typogruby/).
- [Jekyll Email Protect](https://github.com/vwochnik/jekyll-email-protect): Email protection liquid filter for Jekyll
- [Jekyll Uglify Filter](https://github.com/mattg/jekyll-uglify-filter): A Liquid filter that runs your JavaScript through UglifyJS.
- [match_regex](https://github.com/sparanoid/match_regex): A Liquid filter to perform regex match.
- [replace_regex](https://github.com/sparanoid/replace_regex): A Liquid filter to perform regex replace.
- [Jekyll Money](https://rubygems.org/gems/jekyll-money): A Jekyll plugin for dealing with money. Because we all have to at some point.
- [jekyll-random](https://github.com/codecalm/jekyll-random) by [codecalm](https://nodecalm.net): A Jekyll plugin that generates pseudo-random data. Very useful when you want to generate a large amount of random data.
#### Tags
You can find a few useful plugins at the following locations:
- [Jekyll-gist](https://github.com/jekyll/jekyll-gist): Use the `gist` tag to easily embed a GitHub Gist onto your site. This works with public or secret gists.
- [Asset Path Tag](https://github.com/samrayner/jekyll-asset-path-plugin) by [Sam Rayner](http://www.samrayner.com/): Allows organisation of assets into subdirectories by outputting a path for a given file relative to the current post or page.
- [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
- [Embed.ly client by Robert Böhnke](https://github.com/robb/jekyll-embedly-client): Autogenerate embeds from URLs using oEmbed.
- [FlickrSetTag by Thomas Mango](https://github.com/tsmango/jekyll_flickr_set_tag): Generates image galleries from Flickr sets.
- [Tweet Tag by Scott W. Bradley](https://github.com/scottwb/jekyll-tweet-tag): Liquid tag for [Embedded Tweets](https://dev.twitter.com/docs/embedded-tweets) using Twitters shortcodes.
- [Jekyll Twitter Plugin](https://github.com/rob-murray/jekyll-twitter-plugin): A Liquid tag plugin that renders Tweets from Twitter API. Currently supports the [oEmbed](https://dev.twitter.com/rest/reference/get/statuses/oembed) API.
- [Jekyll-contentblocks](https://github.com/rustygeldmacher/jekyll-contentblocks): Lets you use Rails-like content_for tags in your templates, for passing content from your posts up to your layouts.
- [Jekyll-beastiepress](https://github.com/okeeblow/jekyll-beastiepress): FreeBSD utility tags for Jekyll sites.
- [Bibjekyll](https://github.com/pablooliveira/bibjekyll): Render BibTeX-formatted bibliographies/citations included in posts and pages using bibtex2html.
- [Jekyll-citation](https://github.com/archome/jekyll-citation): Render BibTeX-formatted bibliographies/citations included in posts and pages (pure Ruby).
- [Jekyll Dribbble Set Tag](https://github.com/ericdfields/Jekyll-Dribbble-Set-Tag): Builds Dribbble image galleries from any user.
- [JekyllGalleryTag](https://github.com/redwallhp/JekyllGalleryTag) by [redwallhp](https://github.com/redwallhp): Generates thumbnails from a directory of images and displays them in a grid.
- [Jekyll-swfobject](https://github.com/sectore/jekyll-swfobject): Liquid plugin for embedding Adobe Flash files (.swf) using [SWFObject](https://github.com/swfobject/swfobject).
- [Jekyll Picture Tag](https://github.com/robwierzbowski/jekyll-picture-tag): Easy responsive images for Jekyll. Based on the proposed [`<picture>`](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element) element, polyfilled with Scott Jehls [Picturefill](https://github.com/scottjehl/picturefill).
- [Jekyll Image Tag](https://github.com/robwierzbowski/jekyll-image-tag): Better images for Jekyll. Save image presets, generate resized images, and add classes, alt text, and other attributes.
- [Jekyll Responsive Image](https://github.com/wildlyinaccurate/jekyll-responsive-image): Responsive images for Jekyll. Automatically resizes images, supports all responsive methods (`<picture>`, `srcset`, Imager.js, etc), super-flexible configuration.
- [Ditaa Tag](https://github.com/matze/jekyll-ditaa) by [matze](https://github.com/matze): Renders ASCII diagram art into PNG images and inserts a figure tag.
- [Jekyll Suggested Tweet](https://github.com/davidensinger/jekyll-suggested-tweet) by [David Ensinger](https://github.com/davidensinger/): A Liquid tag for Jekyll that allows for the embedding of suggested tweets via Twitters Web Intents API.
- [Jekyll Date Chart](https://github.com/GSI/jekyll_date_chart) by [GSI](https://github.com/GSI): Block that renders date line charts based on textile-formatted tables.
- [Jekyll Image Encode](https://github.com/GSI/jekyll_image_encode) by [GSI](https://github.com/GSI): Tag that renders base64 codes of images fetched from the web.
- [Jekyll Quick Man](https://github.com/GSI/jekyll_quick_man) by [GSI](https://github.com/GSI): Tag that renders pretty links to man page sources on the internet.
- [Image Set/Gallery Tag](https://github.com/callmeed/jekyll-image-set) by [callmeed](https://github.com/callmeed): Renders HTML for an image gallery from a folder in your Jekyll site. Just pass it a folder name and class/tag options.
- [jekyll_figure](https://github.com/lmullen/jekyll_figure): Generate figures and captions with links to the figure in a variety of formats
- [Jekyll GitHub Sample Tag](https://github.com/bwillis/jekyll-github-sample): A liquid tag to include a sample of a github repo file in your Jekyll site.
- [Jekyll Project Version Tag](https://github.com/rob-murray/jekyll-version-plugin): A Liquid tag plugin that renders a version identifier for your Jekyll site sourced from the git repository containing your code.
- [Piwigo Gallery](https://github.com/AlessandroLorenzi/piwigo_gallery) by [Alessandro Lorenzi](http://blog.alorenzi.eu/): Jekyll plugin to generate thumbnails from a Piwigo gallery and display them with a Liquid tag
- [mathml.rb](https://github.com/tmthrgd/jekyll-plugins) by Tom Thorogood: A plugin to convert TeX mathematics into MathML for display.
- [webmention_io.rb](https://github.com/aarongustafson/jekyll-webmention_io) by [Aaron Gustafson](http://aaron-gustafson.com/): A plugin to enable [webmention](https://indieweb.org/webmention) integration using [Webmention.io](https://webmention.io/). Includes an optional JavaScript for updating webmentions automatically between publishes and, if available, in realtime using WebSockets.
- [Jekyll 500px Embed](https://github.com/lkorth/jekyll-500px-embed) by Luke Korth. A Liquid tag plugin that embeds [500px](https://500px.com/) photos.
- [inline\_highlight](https://github.com/bdesham/inline_highlight): A tag for inline syntax highlighting.
- [jekyll-mermaid](https://github.com/jasonbellamy/jekyll-mermaid): Simplify the creation of mermaid diagrams and flowcharts in your posts and pages.
- [twa](https://github.com/Ezmyrelda/twa): Twemoji Awesome plugin for Jekyll. Liquid tag allowing you to use twitter emoji in your jekyll pages.
- [Fetch remote file content](https://github.com/dimitri-koenig/jekyll-plugins) by [Dimitri König](https://www.dimitrikoenig.net/): Using `remote_file_content` tag you can fetch the content of a remote file and include it as if you would put the content right into your markdown file yourself. Very useful for including code from github repo's to always have a current repo version.
- [jekyll-asciinema](https://github.com/mnuessler/jekyll-asciinema): A tag for embedding asciicasts recorded with [asciinema](https://asciinema.org) in your Jekyll pages.
- [Jekyll-Youtube](https://github.com/dommmel/jekyll-youtube) A Liquid tag that embeds Youtube videos. The default emded markup is responsive but you can also specify your own by using an include/partial.
- [Jekyll Flickr Plugin](https://github.com/lawmurray/indii-jekyll-flickr) by [Lawrence Murray](http://www.indii.org): Embeds Flickr photosets (albums) as a gallery of thumbnails, with lightbox links to larger images.
- [jekyll-figure](https://github.com/paulrobertlloyd/jekyll-figure): A liquid tag for Jekyll that generates `<figure>` elements.
- [Jekyll Video Embed](https://github.com/eug/jekyll-video-embed): It provides several tags to easily embed videos (e.g. Youtube, Vimeo, UStream and Ted Talks)
- [jekyll-i18n_tags](https://github.com/KrzysiekJ/jekyll-i18n_tags): Translate your templates.
- [Jekyll Ideal Image Slider](https://github.com/jekylltools/jekyll-ideal-image-slider): Liquid tag plugin to create image sliders using [Ideal Image Slider](https://github.com/gilbitron/Ideal-Image-Slider).
- [Jekyll Tags List Plugin](https://github.com/crispgm/jekyll-tags-list-plugin): A Liquid tag plugin that creates tags list in specific order.
- [Jekyll Maps](https://github.com/ayastreb/jekyll-maps) by [Anatoliy Yastreb](https://github.com/ayastreb): A Jekyll plugin to easily embed maps with filterable locations.
- [Jekyll Cloudinary](https://nhoizey.github.io/jekyll-cloudinary/) by [Nicolas Hoizey](https://nicolas-hoizey.com/): a Jekyll plugin adding a Liquid tag to ease the use of Cloudinary for responsive images in your Markdown/Kramdown posts.
- [jekyll-include-absolute-plugin](https://github.com/tnhu/jekyll-include-absolute-plugin) by [Tan Nhu](https://github.com/tnhu): A Jekyll plugin to include a file from its path relative to Jekyll's source folder.
- [Jekyll Download Tag](https://github.com/mattg/jekyll-download-tag): A Liquid tag that acts like `include`, but for external resources.
- [Jekyll Brand Social Wall](https://github.com/MediaComem/jekyll-brand-social-wall): A jekyll plugin to generate a social wall with your favorite social networks
- [Jekyll If File Exists](https://github.com/k-funk/jekyll-if-file-exists): A Jekyll Plugin that checks if a file exists with an if/else block.
- [BibSonomy](https://github.com/rjoberon/bibsonomy-jekyll): Jekyll
plugin to generate publication lists from [BibSonomy](https://www.bibsonomy.org/).
- [github-cards](https://github.com/edward-shen/github-cards): Creates styleable Github cards for your Github projects.
- [disqus-for-jekyll](https://github.com/kacperduras/disqus-for-jekyll): A Jekyll plugin to view the comments powered by Disqus.
- [jekyll-html](https://github.com/kacperduras/jekyll-html): A Jekyll plugin to use HTML tags in Jekyll pages, posts and collections.
- [jekyll-onebox](https://github.com/rriemann/jekyll-onebox): Liquid tag for displaying HTML previews (embeds) for links to popular domains. Plugin is based on [Onebox](https://github.com/discourse/onebox) that powers link previews in [Discourse](http://github.com/discourse/discourse) forums.
- [jekyll-w2m](https://github.com/kacperduras/jekyll-w2m): A Jekyll plugin to liberate content from Microsoft Word documents (powered by [word-to-markdown](https://github.com/benbalter/word-to-markdown)).
#### Collections
- [Jekyll Plugins by Recursive Design](https://github.com/recurser/jekyll-plugins): Plugins to generate Project pages from GitHub readmes, a Category page, and a Sitemap generator.
- [Company website and blog plugins](https://github.com/flatterline/jekyll-plugins) by Flatterline, a Ruby on Rails development company: Portfolio/project page generator, team/individual page generator, an author bio liquid tag for use on posts, and a few other smaller plugins.
- [Jekyll plugins by Aucor](https://github.com/aucor/jekyll-plugins): Plugins for trimming unwanted newlines/whitespace and sorting pages by weight attribute.
#### Other
- [Analytics for Jekyll](https://github.com/hendrikschneider/jekyll-analytics) by Hendrik Schneider: An effortless way to add various trackers like Google Analytics, Matomo (formerly Piwik), mPulse, etc. to your site.
- [ditaa-ditaa](https://github.com/tmthrgd/ditaa-ditaa) by Tom Thorogood: a drastic revision of jekyll-ditaa that renders diagrams drawn using ASCII art into PNG images.
- [Pygments Cache Path by Raimonds Simanovskis](https://github.com/rsim/blog.rayapps.com/blob/master/_plugins/pygments_cache_patch.rb): Plugin to cache syntax-highlighted code from Pygments.
- [Related Posts by Lawrence Woodman](https://github.com/LawrenceWoodman/related_posts-jekyll_plugin): Overrides `site.related_posts` to use categories to assess relationship.
- [jekyll-tagging-related_posts](https://github.com/toshimaru/jekyll-tagging-related_posts): Jekyll related_posts function based on tags (works on Jekyll3).
- [Jekyll-localization](https://github.com/blackwinter/jekyll-localization): Jekyll plugin that adds localization features to the rendering engine.
- [Jekyll-rendering](https://github.com/blackwinter/jekyll-rendering): Jekyll plugin to provide alternative rendering engines.
- [Jekyll-pagination](https://github.com/blackwinter/jekyll-pagination): Jekyll plugin to extend the pagination generator.
- [Jekyll-tagging](https://github.com/pattex/jekyll-tagging): Jekyll plugin to automatically generate a tag cloud and tag pages.
- [Jekyll-scholar](https://github.com/inukshuk/jekyll-scholar): Jekyll extensions for the blogging scholar.
- [Jekyll-assets](http://jekyll.github.io/jekyll-assets/) by [ixti](https://github.com/ixti): Rails-alike assets pipeline (write assets in CoffeeScript, Sass, LESS etc; specify dependencies for automatic bundling using simple declarative comments in assets; minify and compress; use JST templates; cache bust; and many-many more).
- [JAPR](https://github.com/kitsched/japr): Jekyll Asset Pipeline Reborn - Powerful asset pipeline for Jekyll that collects, converts and compresses JavaScript and CSS assets.
- [Jekyll-minibundle](https://github.com/tkareine/jekyll-minibundle): Asset bundling and cache busting using external minification tool of your choice. No gem dependencies.
- [Singlepage-jekyll](https://github.com/JCB-K/singlepage-jekyll) by [JCB-K](https://github.com/JCB-K): Turns Jekyll into a dynamic one-page website.
- [generator-jekyllrb](https://github.com/robwierzbowski/generator-jekyllrb): A generator that wraps Jekyll in [Yeoman](http://yeoman.io/), a tool collection and workflow for building modern web apps.
- [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll): A straightforward [Grunt](http://gruntjs.com/) plugin for Jekyll.
- [jekyll-postfiles](https://github.com/indirect/jekyll-postfiles): Add `_postfiles` directory and {% raw %}`{{ postfile }}`{% endraw %} tag so the files a post refers to will always be right there inside your repo.
- [A layout that compresses HTML](http://jch.penibelst.de/): GitHub Pages compatible, configurable way to compress HTML files on site build.
- [Jekyll CO₂](https://github.com/wdenton/jekyll-co2): Generates HTML showing the monthly change in atmospheric CO₂ at the Mauna Loa observatory in Hawaii.
- [remote-include](http://www.northfieldx.co.uk/remote-include/): Includes files using remote URLs
- [jekyll-minifier](https://github.com/digitalsparky/jekyll-minifier): Minifies HTML, XML, CSS, and Javascript both inline and as separate files utilising yui-compressor and htmlcompressor.
- [Jekyll views router](https://bitbucket.org/nyufac/jekyll-views-router): Simple router between generator plugins and templates.
- [Jekyll Language Plugin](https://github.com/vwochnik/jekyll-language-plugin): Jekyll 3.0-compatible multi-language plugin for posts, pages and includes.
- [Jekyll Deploy](https://github.com/vwochnik/jekyll-deploy): Adds a `deploy` sub-command to Jekyll.
- [Official Contentful Jekyll Plugin](https://github.com/contentful/jekyll-contentful-data-import): Adds a `contentful` sub-command to Jekyll to import data from Contentful.
- [jekyll-paspagon](https://github.com/KrzysiekJ/jekyll-paspagon): Sell your posts in various formats for cryptocurrencies.
- [Hawkins](https://github.com/awood/hawkins): Adds a `liveserve` sub-command to Jekyll that incorporates [LiveReload](http://livereload.com/) into your pages while you preview them. No more hitting the refresh button in your browser!
- [Jekyll Autoprefixer](https://github.com/vwochnik/jekyll-autoprefixer): Autoprefixer integration for Jekyll
- [Jekyll-breadcrumbs](https://github.com/git-no/jekyll-breadcrumbs): Creates breadcrumbs for Jekyll 3.x, includes features like SEO optimization, optional breadcrumb item translation and more.
- [generator-jekyllized](https://github.com/sondr3/generator-jekyllized): A Yeoman generator for rapidly developing sites with Gulp. Live reload your site, automatically minify and optimize your assets and much more.
- [Jekyll-Spotify](https://github.com/MertcanGokgoz/Jekyll-Spotify): Easily output Spotify Embed Player for jekyll
- [jekyll-menus](https://github.com/forestryio/jekyll-menus): Hugo style menus for your Jekyll site... recursive menus included.
- [jekyll-data](https://github.com/ashmaroli/jekyll-data): Read data files within Jekyll Theme Gems.
- [jekyll-pinboard](https://github.com/snaptortoise/jekyll-pinboard-plugin): Access your Pinboard bookmarks within your Jekyll theme.
- [jekyll-migrate-permalink](https://github.com/mpchadwick/jekyll-migrate-permalink): Adds a `migrate-permalink` sub-command to help deal with side effects of changing your permalink.
- [Jekyll-Post](https://github.com/robcrocombe/jekyll-post): A CLI tool to easily draft, edit, and publish Jekyll posts.
- [jekyll-numbered-headings](https://github.com/muratayusuke/jekyll-numbered-headings): Adds ordered number to headings.
- [jekyll-pre-commit](https://github.com/mpchadwick/jekyll-pre-commit): A framework for running checks against your posts using a git pre-commit hook before you publish them.
- [jekyll-pwa-plugin](https://github.com/lavas-project/jekyll-pwa): A plugin provides PWA support for Jekyll. It generates a service worker in Jekyll build process and makes precache and runtime cache available in the runtime with Google Workbox.
- [jekyll-algolia](https://community.algolia.com/jekyll-algolia/): Add fast and relevant search to your Jekyll site through the Algolia API.
<div class="note info">
<h5>Submit your gem plugins</h5>
<p>
You're encouraged to add your Jekyll gem plugins to this list, <a href="../contributing/">read the contributing page</a> to find
out how to make that happen.
</p>
</div>
* [Installation](/docs/plugins/installation/) - How to install plugins
* [Your first plugin](/docs/plugins/your-first-plugin/) - How to write plugins
* [Generators](/docs/plugins/generators/) - Create additional content on your site
* [Converters](/docs/plugins/converters/) - Change a markup language into another format
* [Commands](/docs/plugins/commands/) - Extend the `jekyll` executable with subcommands
* [Tags](/docs/plugins/tags) - Create custom Liquid tags
* [Filters](/docs/plugins/filters/) - Create custom Liquid filters
* [Hooks](/docs/plugins/hooks/) - Fine-grained control to extend the build process

View File

@@ -0,0 +1,62 @@
---
title: Commands
permalink: /docs/plugins/commands/
---
Jekyll can be extended with plugins which provide
subcommands for the `jekyll` executable. This is possible by including the
relevant plugins in a `Gemfile` group called `:jekyll_plugins`:
```ruby
group :jekyll_plugins do
gem "my_fancy_jekyll_plugin"
end
```
Each `Command` must be a subclass of the `Jekyll::Command` class and must
contain one class method: `init_with_program`. An example:
```ruby
class MyNewCommand < Jekyll::Command
class << self
def init_with_program(prog)
prog.command(:new) do |c|
c.syntax "new [options]"
c.description 'Create a new Jekyll site.'
c.option 'dest', '-d DEST', 'Where the site should go.'
c.action do |args, options|
Jekyll::Site.new_site_at(options['dest'])
end
end
end
end
end
```
Commands should implement this single class method:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>init_with_program</code></p>
</td>
<td><p>
This method accepts one parameter, the
<code><a href="https://github.com/jekyll/mercenary#readme">Mercenary::Program</a></code>
instance, which is the Jekyll program itself. Upon the program,
commands may be created using the above syntax. For more details,
visit the Mercenary repository on GitHub.com.
</p></td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,91 @@
---
title: Converters
permalink: /docs/plugins/converters/
---
If you have a new markup language youd like to use with your site, you can
include it by implementing your own converter. Both the Markdown and
[Textile](https://github.com/jekyll/jekyll-textile-converter) markup
languages are implemented using this method.
<div class="note info">
<h5>Remember your Front Matter</h5>
<p>
Jekyll will only convert files that have a YAML header at the top, even for
converters you add using a plugin.
</p>
</div>
Below is a converter that will take all posts ending in `.upcase` and process
them using the `UpcaseConverter`:
```ruby
module Jekyll
class UpcaseConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /^\.upcase$/i
end
def output_ext(ext)
".html"
end
def convert(content)
content.upcase
end
end
end
```
Converters should implement at a minimum 3 methods:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>matches</code></p>
</td>
<td><p>
Does the given extension match this converters list of acceptable
extensions? Takes one argument: the files extension (including the
dot). Must return <code>true</code> if it matches, <code>false</code>
otherwise.
</p></td>
</tr>
<tr>
<td>
<p><code>output_ext</code></p>
</td>
<td><p>
The extension to be given to the output file (including the dot).
Usually this will be <code>".html"</code>.
</p></td>
</tr>
<tr>
<td>
<p><code>convert</code></p>
</td>
<td><p>
Logic to do the content conversion. Takes one argument: the raw content
of the file (without front matter). Must return a String.
</p></td>
</tr>
</tbody>
</table>
</div>
In our example, `UpcaseConverter#matches` checks if our filename extension is
`.upcase`, and will render using the converter if it is. It will call
`UpcaseConverter#convert` to process the content. In our simple converter were
simply uppercasing the entire content string. Finally, when it saves the page,
it will do so with a `.html` extension.

View File

@@ -0,0 +1,27 @@
---
title: Filters
permalink: /docs/plugins/filters/
---
Filters are modules that export their methods to liquid.
All methods will have to take at least one parameter which represents the input
of the filter. The return value will be the output of the filter.
```ruby
module Jekyll
module AssetFilter
def asset_url(input)
"http://www.example.com/#{input}?#{Time.now.to_i}"
end
end
end
Liquid::Template.register_filter(Jekyll::AssetFilter)
```
## Access the site object in Liquid
Jekyll lets you access the `site` object through the
`context.registers` feature of Liquid at `context.registers[:site]`. For example, you can
access the global configuration file `_config.yml` using
`context.registers[:site].config`.

View File

@@ -0,0 +1,103 @@
---
title: Generators
permalink: /docs/plugins/generators/
---
You can create a generator when you need Jekyll to create additional content
based on your own rules.
A generator is a subclass of `Jekyll::Generator` that defines a `generate`
method, which receives an instance of
[`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb). The
return value of `generate` is ignored.
Generators run after Jekyll has made an inventory of the existing content, and
before the site is generated. Pages with front matter are stored as
instances of
[`Jekyll::Page`]({{ site.repository }}/blob/master/lib/jekyll/page.rb)
and are available via `site.pages`. Static files become instances of
[`Jekyll::StaticFile`]({{ site.repository }}/blob/master/lib/jekyll/static_file.rb)
and are available via `site.static_files`. See
[the Variables documentation page](/docs/variables/) and
[`Jekyll::Site`]({{ site.repository }}/blob/master/lib/jekyll/site.rb)
for more details.
For instance, a generator can inject values computed at build time for template
variables. In the following example the template `reading.html` has two
variables `ongoing` and `done` that we fill in the generator:
```ruby
module Reading
class Generator < Jekyll::Generator
def generate(site)
ongoing, done = Book.all.partition(&:ongoing?)
reading = site.pages.detect {|page| page.name == 'reading.html'}
reading.data['ongoing'] = ongoing
reading.data['done'] = done
end
end
end
```
This is a more complex generator that generates new pages:
```ruby
module Jekyll
class CategoryPage < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
self.data['category'] = category
category_title_prefix = site.config['category_title_prefix'] || 'Category: '
self.data['title'] = "#{category_title_prefix}#{category}"
end
end
class CategoryPageGenerator < Generator
safe true
def generate(site)
if site.layouts.key? 'category_index'
dir = site.config['category_dir'] || 'categories'
site.categories.each_key do |category|
site.pages << CategoryPage.new(site, site.source, File.join(dir, category), category)
end
end
end
end
end
```
In this example, our generator will create a series of files under the
`categories` directory for each category, listing the posts in each category
using the `category_index.html` layout.
Generators are only required to implement one method:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>generate</code></p>
</td>
<td>
<p>Generates content as a side-effect.</p>
</td>
</tr>
</tbody>
</table>
</div>

244
docs/_docs/plugins/hooks.md Normal file
View File

@@ -0,0 +1,244 @@
---
title: Hooks
permalink: /docs/plugins/hooks/
---
Using hooks, your plugin can exercise fine-grained control over various aspects
of the build process. If your plugin defines any hooks, Jekyll will call them
at pre-defined points.
Hooks are registered to a container and an event name. To register one, you
call Jekyll::Hooks.register, and pass the container, event name, and code to
call whenever the hook is triggered. For example, if you want to execute some
custom functionality every time Jekyll renders a post, you could register a
hook like this:
```ruby
Jekyll::Hooks.register :posts, :post_render do |post|
# code to call after Jekyll renders a post
end
```
Jekyll provides hooks for <code>:site</code>, <code>:pages</code>,
<code>:posts</code>, and <code>:documents</code>. In all cases, Jekyll calls
your hooks with the container object as the first callback parameter.
All `:pre_render` hooks and the`:site, :post_render` hook will also provide a
payload hash as a second parameter. In the case of `:pre_render`, the payload
gives you full control over the variables that are available while rendering.
In the case of `:site, :post_render`, the payload contains final values after
rendering all the site (useful for sitemaps, feeds, etc).
The complete list of available hooks is below:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Container</th>
<th>Event</th>
<th>Called</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:after_init</code></p>
</td>
<td>
<p>Just after the site initializes, but before setup & render. Good
for modifying the configuration of the site.</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:after_reset</code></p>
</td>
<td>
<p>Just after site reset</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_read</code></p>
</td>
<td>
<p>After site data has been read and loaded from disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering the whole site</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering the whole site, but before writing any files</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing the whole site to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a page is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a page</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a page, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:pages</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a page to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a post is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a post</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a post, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:posts</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a post to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_init</code></p>
</td>
<td>
<p>Whenever a document is initialized</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:pre_render</code></p>
</td>
<td>
<p>Just before rendering a document</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_render</code></p>
</td>
<td>
<p>After rendering a document, but before writing it to disk</p>
</td>
</tr>
<tr>
<td>
<p><code>:documents</code></p>
</td>
<td>
<p><code>:post_write</code></p>
</td>
<td>
<p>After writing a document to disk</p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -0,0 +1,66 @@
---
title: Plugins
permalink: /docs/plugins/installation/
---
There are three options for installing plugins:
1. In your site source root, make a `_plugins` directory. Place your plugins
here. Any file ending in `*.rb` inside this directory will be loaded before
Jekyll generates your site.
2. In your `_config.yml` file, add a new array with the key `plugins` (or `gems` for Jekyll < `3.5.0`) and the
values of the gem names of the plugins you'd like to use. An example:
```yaml
# This will require each of these plugins automatically.
plugins:
- jekyll-gist
- jekyll-coffeescript
- jekyll-assets
- another-jekyll-plugin
```
Then install your plugins using `gem install jekyll-gist jekyll-coffeescript jekyll-assets another-jekyll-plugin`
3. Add the relevant plugins to a Bundler group in your `Gemfile`. An
example:
```ruby
group :jekyll_plugins do
gem "jekyll-gist"
gem "jekyll-coffeescript"
gem "jekyll-assets"
gem "another-jekyll-plugin"
end
```
Now you need to install all plugins from your Bundler group by running single command `bundle install`.
## Plugins on GitHub Pages
[GitHub Pages](https://pages.github.com/) is powered by Jekyll.
All Pages sites are generated using the `--safe` option
to disable plugins (with the exception of some
[whitelisted plugins](https://pages.github.com/versions)) for
security reasons. Unfortunately, this means
your plugins wont work if youre deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but youll need to
convert the site locally and push the generated static files to your GitHub
repository instead of the Jekyll source files.
## jekyll_plugins group
Jekyll gives this particular group of gems in your `Gemfile` a different
treatment. Any gem included in this group is loaded before Jekyll starts
processing the rest of your source directory.
A gem included here will be activated even if its not explicitly listed under
the `plugins:` key in your site's config file.
Gems included in the `:jekyll-plugins` group are activated
regardless of the `--safe` mode setting. Be aware of what
gems are included under this group!
{: .warning }

View File

@@ -0,0 +1,72 @@
---
title: Tags
permalink: /docs/plugins/tags/
---
If youd like to include custom liquid tags in your site, you can do so by
hooking into the tagging system. Built-in examples added by Jekyll include the
`highlight` and `include` tags. Below is an example of a custom liquid tag that
will output the time the page was rendered:
```ruby
module Jekyll
class RenderTimeTag < Liquid::Tag
def initialize(tag_name, text, tokens)
super
@text = text
end
def render(context)
"#{@text} #{Time.now}"
end
end
end
Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
```
At a minimum, liquid tags must implement:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Method</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>render</code></p>
</td>
<td>
<p>Outputs the content of the tag.</p>
</td>
</tr>
</tbody>
</table>
</div>
You must also register the custom tag with the Liquid template engine as
follows:
```ruby
Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
```
In the example above, we can place the following tag anywhere in one of our
pages:
{% raw %}
```ruby
<p>{% render_time page rendered at: %}</p>
```
{% endraw %}
And we would get something like this on the page:
```html
<p>page rendered at: Tue June 22 23:38:47 0500 2010</p>
```

View File

@@ -0,0 +1,137 @@
---
title: Your first plugin
permalink: /docs/plugins/your-first-plugin/
---
Plugins allow you to extend Jekyll's behavior to fit your needs. There are six
types of plugins in Jekyll.
## Generators
[Generators](/docs/plugins/generators/) create content on your site.
For example:
* [jekyll-feed](https://github.com/jekyll/jekyll-feed) creates an Atom feed of
blog posts.
* [jekyll-archives](https://github.com/jekyll/jekyll-archives) creates archive
pages for blog categories and tags.
* [jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap) creates a sitemap.
## Converters
[Converters](/docs/plugins/converters/) change a markup language into another
format. For example:
* [jekyll-textile-converter](https://github.com/jekyll/jekyll-textile-converter)
converts textile to HTML.
* [jekyll-coffeescript](https://github.com/jekyll/jekyll-coffeescript) converts
Coffeescript to JavaScript.
* [jekyll-opal](https://github.com/jekyll/jekyll-opal) converts Ruby to
JavaScript.
## Commands
[Commands](/docs/plugins/commands/) extend the `jekyll` executable with
subcommands. For example:
* [jekyll-compose](https://github.com/jekyll/jekyll-compose) adds subcommands
for creating a post, page or draft.
## Tags
[Tags](/docs/plugins/tags/) create custom Liquid tags. For example:
* [jekyll-youtube](https://github.com/dommmel/jekyll-youtube) embeds a YouTube
video.
* [jekyll-asset-path-plugin](https://github.com/samrayner/jekyll-asset-path-plugin)
outputs a relative URL for assets.
* [jekyll-swfobject](https://github.com/sectore/jekyll-swfobject) embeds a SWF
object.
## Filters
[Filters](/docs/plugins/filters/) create custom Liquid filters. For example:
* [jekyll-time-ago](https://github.com/markets/jekyll-timeago) - The distance
between two dates in words.
* [jekyll-toc](https://github.com/toshimaru/jekyll-toc) - Generates a table of
content.
* [jekyll-email-protect](https://github.com/vwochnik/jekyll-email-protect) -
Obfuscates emails to protect them from spam bots.
## Hooks
[Hooks](/docs/plugins/hooks/) give fine-grained control to extend the build
process.
## Flags
There are two flags to be aware of when writing a plugin:
<div class="mobile-side-scroller">
<table>
<thead>
<tr>
<th>Flag</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>safe</code></p>
</td>
<td>
<p>
A boolean flag that informs Jekyll whether this plugin may be safely
executed in an environment where arbitrary code execution is not
allowed. This is used by GitHub Pages to determine which core plugins
may be used, and which are unsafe to run. If your plugin does not
allow for arbitrary code execution, set this to <code>true</code>.
GitHub Pages still wont load your plugin, but if you submit it for
inclusion in core, its best for this to be correct!
</p>
</td>
</tr>
<tr>
<td>
<p><code>priority</code></p>
</td>
<td>
<p>
This flag determines what order the plugin is loaded in. Valid values
are: <code>:lowest</code>, <code>:low</code>, <code>:normal</code>,
<code>:high</code>, and <code>:highest</code>. Highest priority
matches are applied first, lowest priority are applied last.
</p>
</td>
</tr>
</tbody>
</table>
</div>
To use one of the example plugins above as an illustration, here is how youd
specify these two flags:
```ruby
module Jekyll
class UpcaseConverter < Converter
safe true
priority :low
...
end
end
```
## Best Practices
The guides help you with the specifics of creating plugins. We also have some
recommended best practices to help structure your plugin.
We recommend using a [gem](/docs/ruby-101/#gems) for your plugin. This will
help you manage dependencies, keep separation from your site source code and
allow you to share functionality across multiple projects. For tips on creating
a gem take a look a the
[Ruby gems guide](https://guides.rubygems.org/make-your-own-gem/) or look
through the source code of an existing plugin such as
[jekyll-feed](https://github.com/jekyll/jekyll-feed).

View File

@@ -1,30 +1,23 @@
---
title: Writing posts
title: Posts
permalink: /docs/posts/
redirect_from:
- /docs/drafts/
---
One of Jekylls best aspects is that it is “blog aware”. What does this mean,
exactly? Well, simply put, it means that blogging is baked into Jekylls
functionality. If you write articles and publish them online, you can publish
and maintain a blog simply by managing a folder of text-files on your computer.
Compared to the hassle of configuring and maintaining databases and web-based
CMS systems, this will be a welcome change!
Blogging is baked into Jekyll. You write blog posts as text files and Jekyll
provides everything you need to turn it into a blog.
## The Posts Folder
As explained on the [directory structure](../structure/) page, the `_posts`
folder is where your blog posts will live. These files are generally
[Markdown](https://daringfireball.net/projects/markdown/) or HTML, but can
be other formats with the proper converter installed.
All posts must have [YAML Front Matter](../frontmatter/), and they will be
converted from their source format into an HTML page that is part of your
static site.
The `_posts` folder is where your blog posts live. You typically write posts
in [Markdown](https://daringfireball.net/projects/markdown/), HTML is
also supported.
### Creating Post Files
## Creating Posts
To create a new post, all you need to do is create a file in the `_posts`
directory. How you name files in this folder is important. Jekyll requires blog
post files to be named according to the following format:
To create a post, add a file to your `_posts` directory with the following
format:
```
YEAR-MONTH-DAY-title.MARKUP
@@ -39,25 +32,33 @@ file. For example, the following are examples of valid post filenames:
2012-09-12-how-to-write-a-blog.md
```
All blog post files must begin with [front matter](/docs/front-matter/) which is
typically used to set a [layout](/docs/layouts/) or other meta data. For a simple
example this can just be empty:
```markdown
---
layout: post
title: "Welcome to Jekyll!"
---
# Welcome
**Hello world**, this is my first Jekyll blog post.
I hope you like it!
```
<div class="note">
<h5>ProTip™: Link to other posts</h5>
<p>
Use the <a href="../templates/#linking-to-posts"><code>post_url</code></a>
Use the <a href="/docs/liquid/tags/#linking-to-posts"><code>post_url</code></a>
tag to link to other posts without having to worry about the URLs
breaking when the site permalink style changes.
</p>
</div>
### Content Formats
All blog post files must begin with [YAML Front Matter](../frontmatter/). After
that, it's simply a matter of deciding which format you prefer. Jekyll supports
[Markdown](https://daringfireball.net/projects/markdown/) out of the box,
and has [myriad extensions for other formats as well](/docs/plugins/#converters-1),
including the popular [Textile](http://redcloth.org/textile) format. These
formats each have their own way of marking up different types of content
within a post, so you should familiarize yourself with these formats and
decide which one best suits your needs.
<div class="note info">
<h5>Be aware of character sets</h5>
@@ -73,67 +74,32 @@ decide which one best suits your needs.
## Including images and resources
Chances are, at some point, you'll want to include images, downloads, or other
digital assets along with your text content. While the syntax for linking to
these resources differs between Markdown and Textile, the problem of working
out where to store these files in your site is something everyone will face.
There are a number of ways to include digital assets in Jekyll.
One common solution is to create a folder in the root of the project directory
called something like `assets`, into which any images, files
or other resources are placed. Then, from within any post, they can be linked
to using the sites root as the path for the asset to include. Again, this will
depend on the way your sites (sub)domain and path are configured, but here are
some examples in Markdown of how you could do this using the `absolute_url`
filter in a post.
At some point, you'll want to include images, downloads, or other
digital assets along with your text content. One common solution is to create
a folder in the root of the project directory called something like `assets`,
into which any images, files or other resources are placed. Then, from within
any post, they can be linked to using the sites root as the path for the asset
to include. The best way to do this depends on the way your sites (sub)domain
and path are configured, but here are some simple examples in Markdown:
Including an image asset in a post:
{% raw %}
```markdown
... which is shown in the screenshot below:
![My helpful screenshot]({{ "/assets/screenshot.jpg" | absolute_url }})
![My helpful screenshot](/assets/screenshot.jpg)
```
{% endraw %}
Linking to a PDF for readers to download:
{% raw %}
```markdown
... you can [get the PDF]({{ "/assets/mydoc.pdf" | absolute_url }}) directly.
... you can [get the PDF](/assets/mydoc.pdf) directly.
```
{% endraw %}
<div class="info">
</div>
## A typical post
Jekyll can handle many different iterations of the idea you might associate with a "post," however a standard blog style post, including a Title, Layout, Publishing Date, and Categories might look like this:
```markdown
---
layout: post
title: "Welcome to Jekyll!"
date: 2015-11-17 16:16:01 -0600
categories: jekyll update
---
Youll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
```
Everything in between the first and second `---` are part of the YAML Front Matter, and everything after the second `---` will be rendered with Markdown and show up as "Content".
## Displaying an index of posts
Its all well and good to have posts in a folder, but a blog is no use unless
you have a list of posts somewhere. Creating an index of posts on another page
(or in a [template](../templates/)) is easy, thanks to the [Liquid template
language](https://docs.shopify.com/themes/liquid/basics) and its tags. Heres a
basic example of how to create a list of links to your blog posts:
Creating an index of posts on another page should be easy thanks to
[Liquid](https://docs.shopify.com/themes/liquid/basics) and its tags. Heres a
simple example of how to create a list of links to your blog posts:
{% raw %}
```html
@@ -147,95 +113,72 @@ basic example of how to create a list of links to your blog posts:
```
{% endraw %}
Of course, you have full control over how (and where) you display your posts,
You have full control over how (and where) you display your posts,
and how you structure your site. You should read more about [how templates
work](../templates/) with Jekyll if you want to know more.
work](/docs/templates/) with Jekyll if you want to know more.
Note that the `post` variable only exists inside the `for` loop above. If
you wish to access the currently-rendering page/posts's variables (the
variables of the post/page that has the `for` loop in it), use the `page`
variable instead.
## Displaying post categories or tags
## Categories and Tags
Hey, that's pretty neat, but what about showing just some of your posts that are
related to each other? For that you can use any of the [variables definable in
Front Matter](https://jekyllrb.com/docs/frontmatter/). In the "typical post"
section you can see how to define categories. Simply add the categories to your
Front Matter as a [yaml
list](https://en.wikipedia.org/wiki/YAML#Basic_components).
Jekyll has first class support for categories and tags in blog posts. The difference
between categories and tags is a category can be part of the URL for a post
whereas a tag cannot.
Now that your posts have a category or multiple categories, you can make a page
or a template displaying just the posts in those categories you specify. Here's
a basic example of how to create a list of posts from a specific category.
To use these, first set your categories and tags in front matter:
First, in the `_layouts` directory create a new file called `category.html` - in
that file put (at least) the following:
```yaml
---
layout: post
title: A Trip
categories: [blog, travel]
tags: [hot, summer]
---
```
Jekyll makes the categories available to us at `site.categories`. Iterating over
`site.categories` on a page gives as another array with two items, the first
item is the name of the category and the second item is an array of posts in that
category.
{% raw %}
```liquid
---
layout: page
---
{% for post in site.categories[page.category] %}
<a href="{{ post.url | absolute_url }}">
{{ post.title }}
</a>
{% for category in site.categories %}
<h3>{{ category[0] }}</h3>
<ul>
{% for post in category[1] %}
<li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
```
{% endraw %}
Next, in the root directory of your Jekyll install, create a new directory
called `category` and then create a file for each category you want to list. For
example, if you have a category `blog` then create a file in the new directory
called `blog.html` with at least
```yaml
---
layout: category
title: Blog
category: blog
---
```
In this case, the listing pages will be accessible at `{baseurl}/category/blog.html`
Although categories and tags are very similar, they are used to group posts,
there are a few differences between them. Categories and sub-categories create
hierarchies that, by default, are reflected in the directory structure of your
site. A post with the following header
```yaml
---
layout: post
title: A Trip
category: [ blog, travel ]
---
```
will be accessible at `{baseurl}/blog/travel/year/month/day/A-Trip.html`. On
the other hand, a tagged post
```yaml
---
layout: post
title: A Trip
tags: [ blog, travel ]
---
```
will be saved as `{baseurl}/year/month/day/A-Trip.html`. It is up to you to
create `{baseurl}/tag/blog.html` and `{baseurl}/tag/travel.html` the same way as
described above for categories.
While this example is done with tags and categories, you can easily extend your
lists to filter by any other variable created with extensions.
For tags it's exactly the same except the variable is `site.tags`.
## Post excerpts
Each post automatically takes the first block of text, from the beginning of
the content to the first occurrence of `excerpt_separator`, and sets it in the
post's data hash.
Take the above example of an index of posts. Perhaps you want to include
a little hint about the post's content by adding the first paragraph of each of
your posts:
You can access a snippet of a posts's content by using `excerpt` variable on a
post. By default this is the first paragraph of content in the post, however it
can be customized by setting a `excerpt_separator` variable in front matter or
`_config.yml`.
```yaml
---
excerpt_separator: <!--more-->
---
Excerpt with multiple paragraphs
Here's another paragraph in the excerpt.
<!--more-->
Out-of-excerpt
```
Here's an example of outputting a list of blog posts with an excerpt:
{% raw %}
```liquid
@@ -250,85 +193,18 @@ your posts:
```
{% endraw %}
Because Jekyll grabs the first paragraph you will not need to wrap the excerpt
in `p` tags, which is already done for you. These tags can be removed with the
following if you'd prefer:
## Drafts
{% raw %}
```liquid
{{ post.excerpt | remove: '<p>' | remove: '</p>' }}
```
{% endraw %}
Drafts are posts without a date in the filename. They're posts you're still
working on and don't want to publish yet. To get up and running with drafts,
create a `_drafts` folder in your site's root and create your first draft:
If you don't like the automatically-generated post excerpt, it can be
explicitly overridden by adding an `excerpt` value to your post's YAML
Front Matter. Alternatively, you can choose to define a custom
`excerpt_separator` in the post's YAML front matter:
```yaml
---
excerpt_separator: <!--more-->
---
Excerpt
<!--more-->
Out-of-excerpt
```text
|-- _drafts/
| |-- a-draft-post.md
```
You can also set the `excerpt_separator` globally in your `_config.yml`
configuration file.
Completely disable excerpts by setting your `excerpt_separator` to `""`.
Also, as with any output generated by Liquid tags, you can pass the
`| strip_html` filter to remove any html tags in the output. This is
particularly helpful if you wish to output a post excerpt as a
`meta="description"` tag within the post `head`, or anywhere else having
html tags along with the content is not desirable.
## Highlighting code snippets
Jekyll also has built-in support for syntax highlighting of code snippets using
either Pygments or Rouge, and including a code snippet in any post is easy.
Just use the dedicated Liquid tag as follows:
{% raw %}
```liquid
{% highlight ruby %}
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
{% endhighlight %}
```
{% endraw %}
And the output will look like this:
```ruby
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
```
<div class="note">
<h5>ProTip™: Show line numbers</h5>
<p>
You can make code snippets include line-numbers by adding the word
<code>linenos</code> to the end of the opening highlight tag like this:
<code>{% raw %}{% highlight ruby linenos %}{% endraw %}</code>.
</p>
</div>
These basics should be enough to get you started writing your first posts. When
youre ready to dig into what else is possible, you might be interested in
doing things like [customizing post permalinks](../permalinks/) or
using [custom variables](../variables/) in your posts and elsewhere on your
site.
To preview your site with drafts, run `jekyll serve` or `jekyll build`
with the `--drafts` switch. Each will be assigned the value modification time
of the draft file for its date, and thus you will see currently edited drafts
as the latest posts.

View File

@@ -1,51 +0,0 @@
---
title: Quick-start guide
permalink: /docs/quickstart/
---
If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements)), you can create a new Jekyll site by doing the following:
```sh
# Install Jekyll and Bundler gems through RubyGems
gem install jekyll bundler
# Create a new Jekyll site at ./myblog
jekyll new myblog
# Change into your new directory
cd myblog
# Build the site on the preview server
bundle exec jekyll serve
# Now browse to http://localhost:4000
```
If you encounter any unexpected errors during the above, please refer to the [troubleshooting](/docs/troubleshooting/#configuration-problems) page or the already-mentioned [requirements](/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites.
## About Bundler
`gem install jekyll bundler` installs the [jekyll](https://rubygems.org/gems/jekyll/) and [bundler](https://rubygems.org/gems/bundler) gems through [RubyGems](https://rubygems.org/). You need only to install the gems one time &mdash; not every time you create a new Jekyll project. Here are some additional details:
* `bundler` is a gem that manages other Ruby gems. It makes sure your gems and gem versions are compatible, and that you have all necessary dependencies each gem requires.
* The `Gemfile` and `Gemfile.lock` files inform Bundler about the gem requirements in your site. If your site doesn't have these Gemfiles, you can omit `bundle exec` and just run `jekyll serve`.
* When you run `bundle exec jekyll serve`, Bundler uses the gems and versions as specified in `Gemfile.lock` to ensure your Jekyll site builds with no compatibility or dependency conflicts.
## Options for creating a new site with Jekyll
`jekyll new <PATH>` installs a new Jekyll site at the path specified (relative to current directory). In this case, Jekyll will be installed in a directory called `myblog`. Here are some additional details:
* To install the Jekyll site into the directory you're currently in, run `jekyll new .` If the existing directory isn't empty, you can pass the `--force` option with `jekyll new . --force`.
* `jekyll new` automatically initiates `bundle install` to install the dependencies required. (If you don't want Bundler to install the gems, use `jekyll new myblog --skip-bundle`.)
* By default, the Jekyll site installed by `jekyll new` uses a gem-based theme called [Minima](https://github.com/jekyll/minima). With [gem-based themes](../themes), some of the directories and files are stored in the theme-gem, hidden from your immediate view.
* We recommend setting up Jekyll with a gem-based theme but if you want to start with a blank slate, use `jekyll new myblog --blank`
* To learn about other parameters you can include with `jekyll new`, type `jekyll new --help`.
When in doubt, use the <code>help</code> command to remind you of all available options and usage, it also works with the <code>new</code>, <code>build</code> and <code>serve</code> subcommands, e.g. <code>jekyll help new</code> or <code>jekyll help build</code>.
{: .note .info }
## Next steps
Building a Jekyll site with the default theme is just the first step. The real magic happens when you start creating blog posts, using the front matter to control templates and layouts, and taking advantage of all the awesome configuration options Jekyll makes available.

View File

@@ -25,7 +25,7 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
## Integrations
- Use a saas service as a backend for forms (contact forms, hiring forms, etc.)
- Use a SaaS service as a backend for forms (contact forms, hiring forms, etc.)
- [Formspree (open source)](https://formspree.io/)
- [FormKeep](https://formkeep.com/guides/contact-form-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)
@@ -56,7 +56,5 @@ Jekyll's growing use is producing a wide variety of tutorials, frameworks, exten
> "Jekyll is everything that I ever wanted in a blogging engine. Really. It isn't perfect, but what's excellent about it is that if there's something wrong, I know exactly how it works and how to fix it. It runs on the your machine only, and is essentially an added"build" step between you and the browser. I coded this entire site in TextMate using standard HTML5 and CSS3, and then at the end I added just a few little variables to the markup. Presto-chango, my site is built and I am at peace with the world."
- [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/) A guide to implementing a tag cloud and per-tag content pages using Jekyll.
- A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
- [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)

45
docs/_docs/ruby-101.md Normal file
View File

@@ -0,0 +1,45 @@
---
title: Ruby 101
permalink: /docs/ruby-101/
---
Jekyll is written in Ruby. If you're new to Ruby, this page is to help you get
up to speed with some of the terminology.
## Gems
A gem is code you can include in Ruby projects. It allows you to package up functionality and share it across other projects or with other people. Gems can perform functionality such as:
* Converting a Ruby object to JSON
* Pagination
* Interacting with APIs such as Github
* Jekyll itself is a gem as well as many Jekyll plugins including
[jekyll-feed](https://github.com/jekyll/jekyll-feed),
[jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag) and
[jekyll-archives](https://github.com/jekyll/jekyll-archives).
## Gemfile
A `Gemfile` is a list of gems required for your site. For a simple Jekyll site it might look something like this:
```ruby
source 'https://rubygems.org'
gem 'jekyll'
group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-seo-tag'
end
```
## Bundler
Bundler installs the gems in your `Gemfile`. It's not a requirement for you to use a `Gemfile` and `bundler` however it's highly recommended as it ensures you're running the same version of Jekyll and Jekyll plugins across different environments.
`gem install bundler` installs [Bundler](https://rubygems.org/gems/bundler). You only need to install it once &mdash; not every time you create a new Jekyll project. Here are some additional details:
If you're using a `Gemfile` you would first run `bundle install` to install the gems, then `bundle exec jekyll serve` to build your site. This guarantees you're using the gem versions set in the `Gemfile`. If you're not using a `Gemfile` you can just run `jekyll serve`.
For more information about how to use Bundler in your Jekyll project, this [tutorial](/tutorials/using-jekyll-with-bundler/) should provide answers to the most common questions and explain how to get up and running quickly.

View File

@@ -1,22 +0,0 @@
---
title: Sites using Jekyll
permalink: /docs/sites/
---
Its interesting to see what designs and features others have come up
with. Below are some Jekyll-powered blogs which were hand-picked for
learning purposes.
- [Tom Preston-Werner](http://tom.preston-werner.com/)
([source](https://github.com/mojombo/mojombo.github.io))
- [GitHub Official Teaching Materials](https://services.github.com/training/)
([source](https://github.com/github/training-kit))
- [Rasmus Andersson](https://rsms.me/)
([source](https://github.com/rsms/rsms.github.com))
- [MvvmCross](https://mvvmcross.github.io/MvvmCross/)
([source](https://github.com/MvvmCross/MvvmCross/tree/master/docs))
If you would like to explore more examples, you can find a list of sites
and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites].
[jekyll-sites]: {{ site.repository }}/wiki/Sites

View File

@@ -2,11 +2,7 @@
title: Static Files
permalink: /docs/static-files/
---
In addition to renderable and convertible content, we also have **static
files**.
A static file is a file that does not contain any YAML front matter. These
A static file is a file that does not contain any front matter. These
include images, PDFs, and other un-rendered content.
They're accessible in Liquid via `site.static_files` and contain the
@@ -66,11 +62,11 @@ following metadata:
</table>
</div>
Note that in the above table, `file` can be anything. It's simply an arbitrarily set variable used in your own logic (such as in a for loop). It isn't a global site or page variable.
Note that in the above table, `file` can be anything. It's an arbitrarily set variable used in your own logic (such as in a for loop). It isn't a global site or page variable.
## Add front matter to static files
Although you can't directly add front matter values to static files, you can set front matter values through the [defaults property](../configuration/#front-matter-defaults) in your configuration file. When Jekyll builds the site, it will use the front matter values you set.
Although you can't directly add front matter values to static files, you can set front matter values through the [defaults property](/docs/configuration/front-matter-defaults/) in your configuration file. When Jekyll builds the site, it will use the front matter values you set.
Here's an example:

View File

@@ -0,0 +1,74 @@
---
layout: step
title: Setup
menu_name: Step by Step Tutorial
position: 1
---
Welcome to Jekyll's step-by-step tutorial. The goal of this tutorial is to take
you from having some front end web development experience to building your
first Jekyll site from scratch — not relying on the default gem-based theme.
Let's get into it!
## Installation
Jekyll is a Ruby program so you need to install Ruby on your machine to begin
with. Head over to the [install guide](/docs/installation/) and follow the
instructions for your operating system.
With Ruby setup you can install Jekyll by running the following in your
terminal:
```
gem install jekyll bundler
```
## Create a site
It's time to create a site! Create a new directory for your site, you can name
it whatever you'd like. Through the rest of this tutorial we'll refer to this
directory as “root”.
If you're feeling adventurous, you can also initialize a Git repository here.
One of the great things about Jekyll is there's no database. All content and
site structure are files which a Git repository can version. Using a repository
is completely optional but it's a great habit to get into. You can learn more
about using Git by reading through the
[Git Handbook](https://guides.github.com/introduction/git-handbook/).
Let's add your first file. Create `index.html` in the root with the following
content:
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Home</title>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
```
## Build
Jekyll is a static site generator so we need Jekyll to build the site
before we can view it. There's two commands you can run in the root of your site
to build it:
* `jekyll build` - Builds the site and outputs a static site to a directory
called `_site`.
* `jekyll serve` - Does the same thing except it rebuilds any time you make
a change and runs a local web server at `http://localhost:4000`.
When you're developing a site you'll use `jekyll serve` as it updates with any
changes you make.
Run `jekyll serve` and go to
<a href="http://localhost:4000" target="_blank" data-proofer-ignore>http://localhost:4000</a> in
your browser. You should see "Hello World!".
Well, you might be thinking what's the point in this? Jekyll just copied an
HTML file from one place to another. Well patience young grasshopper, there's
still much to learn!

View File

@@ -0,0 +1,74 @@
---
layout: step
title: Liquid
position: 2
---
Liquid is where Jekyll starts to get more interesting. Liquid is a templating
language which has three main parts: [objects](#objects), [tags](#tags) and
[filters](#filters).
## Objects
Objects tell Liquid where to output content. They're denoted by double curly
braces: {% raw %}`{{`{% endraw %} and {% raw %}`}}`{% endraw %}. For example:
{% raw %}
```liquid
{{ page.title }}
```
{% endraw %}
Outputs a variable called `page.title` on the page.
## Tags
Tags create the logic and control flow for templates. They are denoted by curly
braces and percent signs: {% raw %}`{%`{% endraw %} and
{% raw %}`%}`{% endraw %}. For example:
{% raw %}
```liquid
{% if page.show_sidebar %}
<div class="sidebar">
sidebar content
</div>
{% endif %}
```
{% endraw %}
Outputs the sidebar if `page.show_sidebar` is true. You can learn more about the
tags available to Jekyll [here](/docs/liquid/tags/).
## Filters
Filters change the output of a Liquid object. They are used within an output
and are separated by a `|`. For example:
{% raw %}
```liquid
{{ "hi" | capitalize }}
```
{% endraw %}
Outputs `Hi`. You can learn more about the filters available to Jekyll
[here](/docs/liquid/filters/).
## Use Liquid
Now it's your turn, change the Hello World! on your page to output as lowercase:
{% raw %}
```liquid
...
<h1>{{ "Hello World!" | downcase }}</h1>
...
```
{% endraw %}
It may not seem like it now, but much of Jekyll's power comes from combining
Liquid with other features.
In order to see the changes from `downcase` Liquid filter, we will need to add front matter.
That's next. Let's keep going.

View File

@@ -0,0 +1,49 @@
---
layout: step
title: Front Matter
position: 3
---
Front matter is a snippet of [YAML](http://yaml.org/) which sits between two
triple-dashed lines at the top of a file. Front matter is used to set variables
for the page, for example:
```liquid
---
my_number: 5
---
```
Front matter variables are available in Liquid under the `page` variable. For
example to output the variable above you would use:
{% raw %}
```liquid
{{ page.my_number }}
```
{% endraw %}
## Use front matter
Let's change the `<title>` on your site to populate using front matter:
{% raw %}
```html
---
title: Home
---
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
</head>
<body>
<h1>{{ "Hello World!" | downcase }}</h1>
</body>
</html>
```
{% endraw %}
You may still be wondering why you'd output it this way as it takes
more source code than raw HTML. In this next step, you'll see why we've
been doing this.

View File

@@ -0,0 +1,89 @@
---
layout: step
title: Layouts
position: 4
---
Websites typically have more than one page and this website is no different.
Jekyll supports [Markdown](https://daringfireball.net/projects/markdown/syntax)
as well as HTML for pages. Markdown is a great choice for pages with a simple
content structure (just paragraphs, headings and images), as it's less verbose
than raw HTML. Let's try it out on the next page.
Create `about.md` in the root.
For the structure you could copy `index.html` and modify it for the about page.
The problem with doing this is duplicate code. Let's say you wanted to add a
stylesheet to your site, you would have to go to each page and add it to the
`<head>`. It might not sound so bad for a two page site, imagine doing it
for 100 pages. Even simple changes will take a long time to make.
## Creating a layout
Using a layout is a much better choice. Layouts are templates that wrap around
your content. They live in a directory called `_layouts`.
Create your first layout at `_layouts/default.html` with the following content:
{% raw %}
```liquid
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
</head>
<body>
{{ content }}
</body>
</html>
```
{% endraw %}
You'll notice this is almost identical to `index.html` except there's
no front matter and the content of the page is replaced with a `content`
variable. `content` is a special variable which has the value of the rendered
content of the page its called on.
To have `index.html` use this layout, you can set a `layout` variable in front
matter. The layout wraps around the content of the page so all you need in
`index.html` is:
{% raw %}
```html
---
layout: default
title: Home
---
<h1>{{ "Hello World!" | downcase }}</h1>
```
{% endraw %}
After doing this, the output will be exactly the same as before. Note that you
can access the `page` front matter from the layout. In this case `title` is
set in the index page's front matter but is output in the layout.
## About page
Back to the about page, instead of copying from `index.html`, you can use the
layout.
Add the following to `about.md`:
{% raw %}
```html
---
layout: default
title: About
---
# About page
This page tells you a little bit about me.
```
{% endraw %}
Open <a href="http://localhost:4000/about.html" target="_blank" data-proofer-ignore>http://localhost:4000/about.html</a>
in your browser and view your new page.
Congratulations, you now have a two page website! But how do you
navigate from one page to another? Keep reading to find out.

View File

@@ -0,0 +1,83 @@
---
layout: step
title: Includes
position: 5
---
The site is coming together however, there's no way to navigate between
pages. Let's fix that.
Navigation should be on every page so adding it to your layout is the correct
place to do this. Instead of adding it directly to the layout, let's use this
as an opportunity to learn about includes.
## Include tag
The `include` tag allows you to include content from another file stored
in an `_includes` folder. Includes are useful for having a single source for
source code that repeats around the site or for improving the readability.
Navigation source code can get complex so sometimes it's nice to move it into an
include.
## Include usage
Create a file for the navigation at `_includes/navigation.html` with the
following content:
```liquid
<nav>
<a href="/">Home</a>
<a href="/about.html">About</a>
</nav>
```
Try using the include tag to add the navigation to `_layouts/default.html`:
{% raw %}
```liquid
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{{ page.title }}</title>
</head>
<body>
{% include navigation.html %}
{{ content }}
</body>
</html>
```
{% endraw %}
Open <a href="http://localhost:4000" target="_blank" data-proofer-ignore>http://localhost:4000</a>
in your browser and try switching between the pages.
## Current page highlighting
Let's take this a step further and highlight the current page in the navigation.
`_includes/navigation.html` needs to know the URL of the page it's inserted into
so it can add styling. Jekyll has useful [variables](/docs/variables/) available
one of which is `page.url`.
Using `page.url` you can check if each link is the current page and color it red
if true:
{% raw %}
```liquid
<nav>
<a href="/" {% if page.url == "/" %}style="color: red;"{% endif %}>
Home
</a>
<a href="/about.html" {% if page.url == "/about.html" %}style="color: red;"{% endif %}>
About
</a>
</nav>
```
{% endraw %}
Take a look at <a href="http://localhost:4000" target="_blank" data-proofer-ignore>http://localhost:4000</a>
and see your red link for the current page.
There's still a lot of repetition here if you wanted to add a new item to the
navigation or change the highlight color. In the next step we'll address this.

View File

@@ -0,0 +1,48 @@
---
layout: step
title: Data Files
position: 6
---
Jekyll supports loading data from YAML, JSON, and CSV files located in a `_data`
directory. Data files are a great way to separate content from source code to
make the site easier to maintain.
In this step you'll store the contents of the navigation in a data file
and then iterate over it in the navigation include.
## Data file usage
[YAML](http://yaml.org/) is a format that's common in the Ruby ecosystem. You'll
use it to store an array of navigation items each with a name and link.
Create a data file for the navigation at `_data/navigation.yml` with the
following:
```yaml
- name: Home
link: /
- name: About
link: /about.html
```
Jekyll makes this data file available to you at `site.data.navigation`. Instead
of outputting each link in `_includes/navigation.html`, now you can iterate over
the data file instead:
{% raw %}
```liquid
<nav>
{% for item in site.data.navigation %}
<a href="{{ item.link }}" {% if page.url == item.link %}style="color: red;"{% endif %}>
{{ item.name }}
</a>
{% endfor %}
</nav>
```
{% endraw %}
The output will be exactly the same. The difference is youve made it easier to
add new navigation items and change the HTML structure.
What good is a site without CSS, JS and images? Lets look at how to handle
assets in Jekyll.

Some files were not shown because too many files have changed in this diff Show More