Compare commits

...

1288 Commits

Author SHA1 Message Date
Parker Moore
1c5399b947 Benchmark cached includes.
Calculating -------------------------------------
              cached       634 i/100ms
            uncached       543 i/100ms
-------------------------------------------------
              cached     6570.6 (±3.0%) i/s -      32968 in   5.022063s
            uncached     5613.0 (±2.1%) i/s -      28236 in   5.032667s
2015-01-08 11:30:24 -08:00
Parker Moore
0d6064b1a1 add benchmark-ips to BENCHMARK gemfile 2015-01-08 11:22:35 -08:00
Parker Moore
32ff033f9f Add a cache for the includes.
https://github.com/jekyll/jekyll/issues/3202
2015-01-08 11:13:18 -08:00
Parker Moore
d47b882af2 Update history to reflect merge of #3264 [ci skip] 2015-01-07 14:27:17 -08:00
Parker Moore
2f4e5fa28b Merge pull request #3264 from tkrotoff/fix-nav-items-gaps 2015-01-07 14:25:59 -08:00
Tanguy Krotoff
c4d617e6aa Fix nav items alignment when on multiple lines 2015-01-07 12:30:48 +01:00
Parker Moore
f95d0ba840 Update history to reflect merge of #3172 [ci skip] 2015-01-05 23:19:47 -08:00
Parker Moore
502fd94f2c Merge pull request #3172 from alfredxing/docs-output-overrides 2015-01-05 23:19:12 -08:00
Alfred Xing
c58ac78a5e Expose Publisher in Site 2015-01-05 16:13:04 -08:00
Alfred Xing
7655b533c9 Allow documents to set published in front matter 2015-01-05 16:11:02 -08:00
Parker Moore
620115a986 Update history to reflect merge of #3261 [ci skip] 2015-01-05 00:08:08 -08:00
Parker Moore
1ca06e70d3 Merge branch 'master' of github.com:jekyll/jekyll
* 'master' of github.com:jekyll/jekyll:
  Use FileList instead of Dir.glob
2015-01-05 00:07:39 -08:00
Parker Moore
919d37fb37 Merge pull request #3261 from flyinprogrammer/master 2015-01-05 00:07:35 -08:00
Parker Moore
f7dafb1f04 Update history to reflect merge of #3255 [ci skip] 2015-01-05 00:06:51 -08:00
Parker Moore
6504645c60 Merge pull request #3255 from XhmikosR/readme-badges 2015-01-05 00:06:01 -08:00
Alan Scherger
fc0ea20a85 Use FileList instead of Dir.glob 2015-01-04 20:46:43 -08:00
XhmikosR
b20a175c27 Switch to shields.io for the README badges.
This way we have consistent badges.

[ci skip]
2015-01-04 13:13:16 +02:00
Parker Moore
2f06f4aad7 Update history to reflect merge of #3254 [ci skip] 2015-01-03 23:06:17 -08:00
Parker Moore
ff3fa84b8a Merge pull request #3254 from flyinprogrammer/master 2015-01-03 23:05:57 -08:00
Alan Scherger
7f370cb82f Update rake task site:publish to fix minor bugs.
*  Automate creating gh-pages directory
*  Ensure gh-pages dir always has correct branch checked out
*  Purge gh-pages of files so that a sync of site truly occurs
*  Ensure dot files are synced
*  Be exact with our exclusions to eliminate guess work
2015-01-03 19:50:33 -08:00
Matt Rogers
51951c43e8 Update history to reflect merge of #3253 [ci skip] 2015-01-03 09:49:54 -06:00
Matt Rogers
a88f2567f7 Merge pull request #3253 from SuriyaaKudoIsc/master 2015-01-03 09:49:51 -06:00
Suriyaa Kudo
d159684f87 Update LICENSE 2015-01-03 11:59:24 +01:00
Matt Rogers
d29dd11ae3 Update history to reflect merge of #3233 [ci skip] 2015-01-02 13:39:01 -06:00
Matt Rogers
8d968ebae0 Merge pull request #3233 from jessepinho/punctuation-fixes 2015-01-02 13:38:58 -06:00
Matt Rogers
86f7196ef5 Update history to reflect merge of #3251 [ci skip] 2015-01-02 13:27:10 -06:00
Matt Rogers
064d6de48d Merge pull request #3251 from nternetinspired/article-semantics 2015-01-02 13:27:07 -06:00
Seth Warburton
21bd3e6c5a [imp] Semantic structure improvements 2015-01-02 12:14:58 +00:00
Jesse Pinho
07bd3a3759 Clarify paragraph on the return value of generate 2015-01-01 23:58:40 -06:00
Parker Moore
e40e12fabd Update history to reflect merge of #3234 [ci skip] 2014-12-29 20:49:25 -05:00
Parker Moore
a098dc80cd Merge pull request #3234 from jekyll/ruby-2-2 2014-12-29 20:49:04 -05:00
Parker Moore
419aaba07c Update history to reflect merge of #3244 [ci skip] 2014-12-29 20:48:31 -05:00
Parker Moore
7cd5847826 Merge pull request #3244 from jekyll/store-messages 2014-12-29 20:48:23 -05:00
Parker Moore
9109da32f9 Update test for the date() Liquid filter. 2014-12-29 20:44:10 -05:00
Parker Moore
7bcf8d689e Always call Time#localtime to translate to TZ'd time. 2014-12-29 20:12:35 -05:00
Parker Moore
f66862c508 Install rake if the lib isn't there; upgrade to cucumber 1.3.18 2014-12-29 18:40:53 -05:00
Parker Moore
cb95a72f5a Update history to reflect merge of #2924 [ci skip] 2014-12-29 18:00:54 -05:00
Parker Moore
9b81f29625 Merge pull request #2924 from nitoyon/unescape-document 2014-12-29 18:00:44 -05:00
nitoyon
5e10958faa Unescape Document output path
Document#destination wasn't unescaped properly.

For example, when we have a document named '_langs/c#.md',
we expect its url to be '/langs/c#.html',
but it was actually '/langs/c%23.html'.

We now unecape URL at Document#destination like Post#destination and
Page#destination.
2014-12-29 22:38:50 +09:00
Parker Moore
7f034f51e3 Improvments to script/stackprof. [ci skip] 2014-12-29 02:16:04 -05:00
Parker Moore
1fc99bdd97 Test LogAdapter#messages 2014-12-29 01:21:01 -05:00
Parker Moore
7fc47bfc43 Initialize @messages at instantiation time. 2014-12-29 01:14:16 -05:00
Parker Moore
b2146e8659 Store log messages in an array of messages. 2014-12-29 01:14:16 -05:00
Parker Moore
e0a011c917 Update history to reflect merge of #3185 [ci skip] 2014-12-29 00:52:47 -05:00
Parker Moore
63ec07a062 Merge pr #3185.
add link to tutorial on building dynamic navbars

Conflicts:
	site/_docs/resources.md
2014-12-29 00:51:47 -05:00
Parker Moore
5f03314d85 Update history to reflect merge of #3186 [ci skip] 2014-12-29 00:50:57 -05:00
Parker Moore
442deb6a7e Merge pull request #3186 from eduardoboucas/master 2014-12-29 00:50:24 -05:00
Parker Moore
d7d7d924f7 Update history to reflect merge of #3189 [ci skip] 2014-12-29 00:50:12 -05:00
Parker Moore
35a5af783a Merge pull request #3189 from robschia/patch-1 2014-12-29 00:49:40 -05:00
Parker Moore
a6781bda30 Always, always rebuild (by default) in tests. 2014-12-29 00:37:16 -05:00
Parker Moore
bab7ef4b1d Use backticks here. [ci skip]. 2014-12-29 00:32:14 -05:00
Parker Moore
6f7ea381b3 Update history to reflect merge of #3047 [ci skip] 2014-12-29 00:31:53 -05:00
Parker Moore
612eb737a5 Merge pull request #3047 from karouf/slugify-non-latin 2014-12-29 00:31:34 -05:00
Parker Moore
191c2279d2 Update history to reflect merge of #2908 [ci skip] 2014-12-29 00:26:58 -05:00
Parker Moore
e39dfa3f0b Merge pull request #2908 from alfredxing/document-path 2014-12-29 00:26:35 -05:00
Parker Moore
5af7694f3b Update history to reflect merge of #2790 [ci skip] 2014-12-29 00:23:57 -05:00
Parker Moore
6e5850c6ab Merge PR #2790.
Add jekyll-thumbnail-filter to plugins list
2014-12-29 00:22:55 -05:00
Parker Moore
be23e18555 Say 'since 2.0' 2014-12-28 23:54:03 -05:00
Parker Moore
928be16fab Add Ruby 2.2 to Travis build matrix. 2014-12-28 23:40:32 -05:00
Parker Moore
eac3ac095f Update history to reflect merge of #3240 [ci skip] 2014-12-28 23:36:37 -05:00
Parker Moore
aa4beda868 Merge pull request #3240 from jekyll/snake_case 2014-12-28 23:36:08 -05:00
Parker Moore
1fad3a074f Update history to reflect merge of #3241 [ci skip] 2014-12-28 23:35:54 -05:00
Parker Moore
0fe2094dd2 Merge pull request #3241 from jekyll/separate-jekyll-docs 2014-12-28 23:35:36 -05:00
Parker Moore
c576d23908 Use External instead of Deprecator for requiring gracefully 2014-12-28 14:37:49 -05:00
Parker Moore
8c19a6f430 Print an error message in bin/jekyll with no arguments 2014-12-28 14:37:14 -05:00
Parker Moore
ac41312c5d Separate jekyll-docs out into a separate gem & bless it 2014-12-28 14:37:02 -05:00
Parker Moore
232a58d5b4 Fix test use of Site#getConverterImpl. 2014-12-28 14:14:24 -05:00
Parker Moore
0c0aea3ad7 Improve Site#getConverterImpl and call it Site#find_converter_instance 2014-12-28 14:12:09 -05:00
Parker Moore
657b16519e Update history to reflect merge of #3204 [ci skip] 2014-12-26 23:10:21 -05:00
Parker Moore
f81601ee53 Merge pull request #3204 from jekyll/sort-static-files-once 2014-12-26 23:05:04 -05:00
Parker Moore
b6641be8ef Call it site_payload instead of payload. 2014-12-26 22:40:18 -05:00
Parker Moore
a8ec9cd507 Put the development dependencies in the Gemfile directly. 2014-12-26 22:37:56 -05:00
Parker Moore
2f8248a6f1 Only call #site_payload once for all collection work. 2014-12-26 22:24:18 -05:00
Parker Moore
0eb2796a66 Sort static files just once.
Ref: #2075.
2014-12-26 22:23:45 -05:00
Parker Moore
e120c255ff Update history to reflect merge of #3237 [ci skip] 2014-12-26 22:22:36 -05:00
Parker Moore
990a9e6e6d Merge pull request #3237 from jekyll/enable_coderay 2014-12-26 22:22:15 -05:00
Parker Moore
c24c6b7f3d Use 'enable_coderay' in the tests. 2014-12-26 22:17:33 -05:00
Parker Moore
039c521e8c Update the documentation. 2014-12-26 22:17:07 -05:00
Parker Moore
d35af9c1f3 Read 'enable_coderay' in the Kramdown parser 2014-12-26 22:16:57 -05:00
Parker Moore
f6bff6fb61 Have a deprecation fallback for 'use_coderay' 2014-12-26 22:16:47 -05:00
Parker Moore
a103898980 Set 'use_coderay' to 'enable_coderay' 2014-12-26 22:16:33 -05:00
Parker Moore
3957efac15 Update history to reflect merge of #3002 [ci skip] 2014-12-26 22:00:45 -05:00
Parker Moore
38309569c4 Merge pull request #3002 from jekyll/liquid-3 2014-12-26 22:00:33 -05:00
Parker Moore
8bfc696569 liquid-c 0.0.3 2014-12-26 21:53:56 -05:00
Parker Moore
b68dd3a5cb Add liquid c if it's available. 2014-12-26 21:53:56 -05:00
Parker Moore
3940e1e9df Bump to Liquid 3.0 2014-12-26 21:53:56 -05:00
Parker Moore
70a331d854 Set the error mode to :strict 2014-12-26 21:53:56 -05:00
Parker Moore
5bf1596414 Refactor Highlight tag tests to use a helper method to create the tag. 2014-12-26 21:53:56 -05:00
Parker Moore
3234041510 Update history to reflect merge of #3235 [ci skip] 2014-12-26 16:46:57 -05:00
Parker Moore
37631eefac Merge pull request #3235 from jekyll/drop-ruby-1-9 2014-12-26 16:46:38 -05:00
Parker Moore
82b1ad0552 Update history to reflect merge of #3236 [ci skip] 2014-12-26 16:35:56 -05:00
Parker Moore
2c2347fac1 Merge pull request #3236 from tkrotoff/remove-end-tag 2014-12-26 16:35:33 -05:00
Tanguy Krotoff
0aa61f66a8 Remove unneeded end tag 2014-12-26 12:10:03 +01:00
Jesse Pinho
b1a517ccb6 Remove unnecessary 'where' 2014-12-25 18:29:50 -06:00
Jesse Pinho
4070143d5b Tweak sentence structure 2014-12-25 15:17:21 -06:00
Parker Moore
6e4e290ab0 Requires >= 2.0.0 2014-12-25 16:11:14 -05:00
Parker Moore
d6995d347a Drop support for Ruby 1.9.3. 2014-12-25 16:00:59 -05:00
Jesse Pinho
52085d2e34 Fix a few punctuation errors 2014-12-24 17:01:51 -06:00
Parker Moore
f3a274377a Update history to reflect merge of #3229 [ci skip] 2014-12-23 16:49:43 -05:00
Parker Moore
0fcba080c3 Merge pull request #3229 from megalomono/master 2014-12-23 16:49:25 -05:00
Fonso
922ba5d0ea Fixing the default host on docs 2014-12-23 13:26:08 +01:00
Parker Moore
cb2eea0e41 Release 💎 2.5.3 2014-12-22 09:16:40 -05:00
Parker Moore
8284714d8a Release 💎 2.5.3 2014-12-22 09:15:57 -05:00
Parker Moore
aaf6f28fde Update history to reflect merge of #3116 [ci skip] 2014-12-22 08:58:29 -05:00
Parker Moore
7227ad4ebb Merge pull request #3116 from alfredxing/incremental 2014-12-22 08:57:50 -05:00
Parker Moore
c3e47437a3 Update history to reflect merge of #3222 [ci skip] 2014-12-20 10:45:15 -08:00
Parker Moore
76301722e9 Merge pull request #3222 from jasonbellamy/jekyll-mermaid-plugin 2014-12-20 10:44:47 -08:00
Jason Bellamy
d05df326b9 Add jekyll-mermaid to the list of plugins. 2014-12-19 22:55:40 -05:00
Parker Moore
dc12bd3023 Update history to reflect merge of #3218 [ci skip] 2014-12-18 23:03:27 -08:00
Parker Moore
878c689f76 Merge pull request #3218 from jekyll/alfredxing 2014-12-18 23:02:48 -08:00
Parker Moore
68a7ebf2ee Add @alfredxing to the @jekyll/core team. 2014-12-18 23:01:16 -08:00
Parker Moore
63ed335463 Update history to reflect merge of #3212 [ci skip] 2014-12-17 19:00:57 -08:00
Parker Moore
fe14434f8d Merge pull request #3212 from bdesham/add-inline-highlight-plugin 2014-12-17 18:59:22 -08:00
Benjamin Esham
a069ad77c0 Add link to inline_highlight plugin 2014-12-14 15:36:59 -05:00
Parker Moore
5343fc3b54 Update history to reflect merge of #3196 [ci skip] 2014-12-09 18:10:02 -08:00
Parker Moore
2dad0d3304 Merge pull request #3196 from jekyll/site-troubleshooting-updates 2014-12-09 18:09:16 -08:00
Joel Glovier
f789168522 use rake instructions instead 2014-12-09 20:45:01 -05:00
Parker Moore
7656b9d295 Update history to reflect merge of #3198 [ci skip] 2014-12-09 10:55:08 -08:00
Parker Moore
176dc3cef7 Merge pull request #3198 from mehdisadeghi/master 2014-12-09 10:54:19 -08:00
Parker Moore
360412364e Update history to reflect merge of #3158 [ci skip] 2014-12-09 10:51:11 -08:00
Parker Moore
49115dbdab Merge pull request #3158 from afeld/as-liquid-refactor 2014-12-09 10:50:42 -08:00
Aidan Feldman
383a0d0aa7 modify as_liquid to use case statement 2014-12-09 07:42:14 -05:00
Mehdi Sadeghi
b735170ceb Jekyll-jalali plugin added to the plugins list. 2014-12-09 12:44:50 +01:00
robschia
59acdaab9a Fixed itemprop="author name"
You are right, I tried to oversimplify it. Also, {{ page.date | %Y-%m-%d }} doesn't output what I expected. I think it's fixed now, I tried the code with a couple of validators and everything seems fine.
2014-12-08 19:46:49 +01:00
Joel Glovier
12651c19e5 further clarify local dev steps 2014-12-08 10:15:25 -05:00
Joel Glovier
1694f8609c update site dir readme
Add some helpful info to the readme.
2014-12-08 10:08:54 -05:00
Joel Glovier
e80469b7b0 add in page nav to troubleshooting file 2014-12-08 10:08:13 -05:00
Parker Moore
032139bd2f Ensure only one converter is found for .Rmd in the tests. Ref: #3147. 2014-12-07 16:08:16 -08:00
Parker Moore
6deed4c66b Update history to reflect merge of #3180 [ci skip] 2014-12-07 15:38:45 -08:00
Parker Moore
253bcc2faf Merge pull request #3180 from jekyll/fix-coverage-reporting 2014-12-07 15:38:03 -08:00
Alfred Xing
43a28aed96 Fix indentation 2014-12-05 19:38:43 -08:00
Alfred Xing
5d9662f80f Always regenerate asset files 2014-12-05 19:07:18 -08:00
robschia
ed9cc80ff9 Update post.html 2014-12-06 00:49:04 +01:00
robschia
9b6eeba81e Added basic microdata 2014-12-06 00:32:05 +01:00
Eduardo Boucas
40e4c031e3 Add site to Resources page 2014-12-05 12:36:34 +00:00
Jordan Thornquest
f80dc07f82 add link to tutorial on building dynamic navbars 2014-12-04 21:54:02 -07:00
Alfred Xing
52f0b36558 Add incremental rebuild info to build command output 2014-12-04 20:09:49 -08:00
Matt Rogers
f8af94431d Fix coverage reporting for built-in bundles 2014-12-02 20:50:39 -06:00
Parker Moore
89bdd47ebc Update history to reflect merge of #3176 [ci skip] 2014-12-02 14:23:45 -08:00
Parker Moore
2c85f4ef24 Merge pull request #3176 from rud/bugfix/site-feed-is-rss 2014-12-02 14:23:02 -08:00
Laust Rud Jacobsen
c8fc567c8d Site /feed.xml is RSS 2.0, fix auto-discovery header
Refs #2996
2014-12-02 22:40:22 +01:00
Parker Moore
460dd81fe1 Update history to reflect merge of #3177 [ci skip] 2014-12-01 14:41:42 -08:00
Parker Moore
7c8c41f0d7 Merge pull request #3177 from rpherbig/master 2014-12-01 14:41:14 -08:00
Robert Herbig
3b57879e71 Simplified platform detection for Windows 2014-12-01 05:40:07 -06:00
Parker Moore
19527b47ab Update history to reflect merge of #3170 [ci skip] 2014-11-30 15:17:43 -08:00
Parker Moore
8298733e67 Merge pull request #3170 from tkrotoff/fix-viewport 2014-11-30 15:16:51 -08:00
Tanguy Krotoff
64b0102686 Fix viewport meta tag 2014-11-29 12:30:43 +01:00
Parker Moore
bfab00a65a Update history to reflect merge of #3163 [ci skip] 2014-11-28 21:38:49 -08:00
Parker Moore
fea79dcbab Merge pull request #3163 from lkorth/patch-1 2014-11-28 21:38:27 -08:00
Parker Moore
b4bc3b0aa0 Update history to reflect merge of #3161 [ci skip] 2014-11-28 21:38:15 -08:00
Parker Moore
ac7f592839 Merge pull request #3161 from dnozay/patch-3 2014-11-28 21:32:23 -08:00
Parker Moore
4ccf9ea683 Update history to reflect merge of #3162 [ci skip] 2014-11-28 21:27:32 -08:00
Parker Moore
7de9433fbc Merge pull request #3162 from dnozay/patch-4 2014-11-28 21:27:07 -08:00
Parker Moore
9c8acdd3ea Update history to reflect merge of #3165 [ci skip] 2014-11-28 21:22:58 -08:00
Parker Moore
e9904fd44b Merge pull request #3165 from fabschurt/fix-doc-typos 2014-11-28 21:22:32 -08:00
Damien Nozay
ba9a309572 Update configuration.md
`keep_files` is a very useful option when using tools such as `grunt-build-control`, `grunt`, `gulp` or `yeoman`.
2014-11-28 21:09:08 -08:00
Alfred Xing
d0e12d69bc Last few revisions 2014-11-28 14:05:40 -08:00
Fabien Schurter
75cf2d73f6 Fix erroneous 'next_section' value
According to /site/_data/docs.yml, the document next to
'deployment-methods' is 'continuous-integration', not 'troubleshooting'
(the 'prev_section' value in 'troubleshooting' is correctly set to
'deployment-methods' though).
2014-11-28 04:26:22 +01:00
Fabien Schurter
974fab6c9c Fix a typo
Replaced "capaibilities" with correct spelling: "capabilities".
2014-11-28 04:14:26 +01:00
Luke Korth
2a37f459d4 Add jekyll-500px-embed to tag plugins 2014-11-27 16:35:23 -08:00
Damien Nozay
5a554572e3 Update configuration.md
repeat warning about `destination` that is found in <http://jekyllrb.com/docs/usage/>
(see also pull request #3159)
2014-11-27 15:11:28 -08:00
Alfred Xing
a701e59c07 Add lots more unit tests 2014-11-27 10:40:31 -08:00
Alfred Xing
b6d81c58df Perform less expensive operation first 2014-11-27 10:00:29 -08:00
Aidan Feldman
4776b27ff3 reduce nesting of #as_liquid 2014-11-27 04:20:05 -06:00
Aidan Feldman
87d08ec827 refactor #as_liquid 2014-11-27 04:16:29 -06:00
Aidan Feldman
229303bbc8 compare resulting data in jsonify test 2014-11-27 04:01:31 -06:00
Parker Moore
8603738a89 Update history to reflect merge of #3154 [ci skip] 2014-11-27 01:14:35 -08:00
Parker Moore
932cd3b575 Merge pull request #3154 from afeld/jsonify-bool 2014-11-27 01:14:04 -08:00
Alfred Xing
02f281eef3 Add unit and cucumber tests 2014-11-26 21:15:53 -08:00
Alfred Xing
8a257aca6b Implement more suggestions 2014-11-26 20:15:42 -08:00
Parker Moore
588f21f5cd Compress SCSS when pushing to jekyllrb.com.
Fixes #3153.
Rel: #3145.
Since d26202936e.
2014-11-26 11:32:09 -08:00
Aidan Feldman
0662d31bf6 fix jsonify filter when used with boolean values 2014-11-26 02:40:41 -06:00
Matt Rogers
a6f8b6c7d6 Update history to reflect merge of #3149 [ci skip] 2014-11-25 12:34:38 -06:00
Matt Rogers
e51f94a038 Merge pull request #3149 from jekyll/document-build-serve-quiet-option 2014-11-25 12:34:34 -06:00
Parker Moore
1aa5c7a820 Update history to reflect merge of #3147 [ci skip] 2014-11-25 10:21:03 -08:00
Parker Moore
37af23b5d7 Merge pull request #3147 from blbradley/markdown-file-ext-regexp 2014-11-25 10:20:27 -08:00
Matt Rogers
df87a51ade Expand the description for the -q option. 2014-11-25 08:40:37 -06:00
Ruslan Korolev
2a138e4ca9 jekyll build/serve -q option to docs 2014-11-25 08:21:08 -06:00
Brandon Bradley
e546eb3e9f force markdown regexp to match the full extension 2014-11-24 20:08:31 -06:00
Brandon Bradley
d250efccb9 add test for broken markdown regexp 2014-11-24 19:56:26 -06:00
Alfred Xing
dc30114605 Use site.in_source_dir 2014-11-23 16:16:19 -08:00
Alfred Xing
2a5cf11ee2 Add --no-metadata option 2014-11-23 15:38:00 -08:00
Parker Moore
e23a74aad9 Release 💎 2.5.2 2014-11-23 15:02:08 -08:00
Parker Moore
5b77d02e3b Merge pull request #3141 from jekyll/bundle-require-is-borking-pygments
Fix Bundler-integration Plugin Manager
2014-11-23 14:18:06 -08:00
Parker Moore
c2b24e82e5 Refactor the case statement in highlighter for better readability. [ci skip] 2014-11-23 14:17:21 -08:00
Parker Moore
10030ae8cd Put that Bundle.require statement back. 2014-11-23 14:13:47 -08:00
Alfred Xing
75c5c16297 Handle path overrides 2014-11-23 14:06:29 -08:00
Parker Moore
ef53e677a4 Better tests for plugin manager. 2014-11-23 13:14:51 -08:00
Parker Moore
03d9396b85 Capture the output of Jekyll::Commands::New when looking for an error. 2014-11-23 12:53:36 -08:00
Alfred Xing
4acf343fea Add clean command 2014-11-23 12:51:19 -08:00
Parker Moore
665178d210 Merge pull request #3117 from jekyll/release-2-5-2 2014-11-23 12:39:58 -08:00
Parker Moore
b1bba1945a Prepare for a v2.5.2 release. 2014-11-22 15:37:07 -08:00
Parker Moore
8ed6c7b077 Update history to reflect merge of #3119 [ci skip] 2014-11-22 14:27:06 -08:00
Parker Moore
9a94829bcb Merge pull request #3119 from jekyll/fix-bundle-require 2014-11-22 14:25:07 -08:00
Parker Moore
d17b80bf2a Keep track of the required gems. 2014-11-22 12:38:36 -08:00
Alfred Xing
ac03af3229 Implement @mattr-'s suggestions 2014-11-21 22:12:21 -08:00
Alfred Xing
fe6bfc6f1b Fix failing tests 2014-11-21 22:12:21 -08:00
Alfred Xing
d438362971 Add regenerate front-matter variable 2014-11-21 22:12:21 -08:00
Alfred Xing
842470b0c4 Refinements 2014-11-21 22:12:21 -08:00
Alfred Xing
11917645f2 Incremental regeneration 2014-11-21 22:12:20 -08:00
Parker Moore
cb8a4b4d62 Update history to reflect merge of #3136 [ci skip] 2014-11-21 10:09:54 -08:00
Parker Moore
a75ed0b33d Merge pull request #3136 from knorthfield/patch-1 2014-11-21 10:09:10 -08:00
Kris Northfield
58511822e6 Add remote-include plugin to list 2014-11-21 17:37:54 +00:00
Parker Moore
876253edce Add Slack build notifications. 2014-11-20 20:50:47 -08:00
Parker Moore
0f669ba9b1 Update history to reflect merge of #3132 [ci skip] 2014-11-20 12:37:27 -08:00
Parker Moore
a9a21e6572 Merge pull request #3132 from XhmikosR/gridism 2014-11-20 12:37:06 -08:00
Parker Moore
3b05b0d867 Update history to reflect merge of #3133 [ci skip] 2014-11-20 12:36:33 -08:00
Parker Moore
b16d47a444 Merge pull request #3133 from XhmikosR/patch-11 2014-11-20 12:36:08 -08:00
XhmikosR
d2d3087d3b Slightly compress jekyll-sticker.jpg. 2014-11-20 22:18:02 +02:00
XhmikosR
b9a4cf0485 Update gridism. 2014-11-20 22:11:50 +02:00
Parker Moore
848e402937 Update history to reflect merge of #2904 [ci skip] 2014-11-20 10:36:10 -08:00
Parker Moore
c0951b0a19 Merge pull request #2904 from XhmikosR/mixins 2014-11-20 10:35:27 -08:00
Parker Moore
3592284969 Update history to reflect merge of #3127 [ci skip] 2014-11-18 12:50:28 -08:00
Parker Moore
0f458edf2b Merge pull request #3127 from aarongustafson/master 2014-11-18 12:50:07 -08:00
Aaron Gustafson
1adf8974bf Adding Webmentions in the right place this time :-) 2014-11-18 15:06:24 -05:00
XhmikosR
da443039e1 Move custom code from _font-awesome.scss to _style.scss.
Also change the order of includes so that _style.scss is last for precedence reasons.
2014-11-18 08:15:53 +02:00
XhmikosR
4aee950418 Add Sass mixins and use them.
Reduces code duplication and makes things cleaner.
2014-11-18 08:15:53 +02:00
Parker Moore
9e454d24a0 Update history to reflect merge of #3123 [ci skip] 2014-11-17 13:06:29 -08:00
Parker Moore
5185c8d72b Merge pull request #3123 from jekyll/site-sass-improvements 2014-11-17 13:05:57 -08:00
Joel Glovier
6f9d28f398 use sass selector nesting in pygments 2014-11-17 14:55:32 -05:00
Joel Glovier
2195e5e469 use sass selector nesting for styles 2014-11-17 14:48:34 -05:00
Parker Moore
60202782ea Only try bundler if the Gemfile is there. 2014-11-16 21:21:50 -08:00
Parker Moore
32b14d6402 First, setup Bundler. Then, require it.
Per a conversation in
https://github.com/bundler/bundler/issues/3252#issuecomment-63208769
2014-11-16 21:18:23 -08:00
Parker Moore
22275e571d Add note about page vs post. [ci skip]
Closes #3056.
2014-11-16 20:40:23 -08:00
Parker Moore
4142630614 Use the text lexer instead of the non-existant CSV one. [ci skip]
Ref #3101.
2014-11-16 20:29:17 -08:00
Parker Moore
3d8368fa4f Update history to reflect merge of #3058 [ci skip] 2014-11-16 20:21:09 -08:00
Parker Moore
687b9cdf19 Merge pull request #3058 from alfredxing/fix-post-url-equality 2014-11-16 20:19:37 -08:00
Parker Moore
ecca3accdc Update history to reflect merge of #3094 [ci skip] 2014-11-16 20:17:27 -08:00
Parker Moore
5aa747e99a Merge branch 'master' of github.com:jekyll/jekyll
* 'master' of github.com:jekyll/jekyll:
  Get rid of noifniof
2014-11-16 20:16:48 -08:00
Parker Moore
b5a32a6d46 Merge pull request #3094 from alfredxing/no-noifniof 2014-11-16 20:16:45 -08:00
Parker Moore
426f2a79fc Update history to reflect merge of #3091 [ci skip] 2014-11-16 20:15:13 -08:00
Parker Moore
d9cdc7992a Merge pull request #3091 from rovrov/master 2014-11-16 20:14:50 -08:00
Matt Rogers
829133cf98 Update history to reflect merge of #3101 [ci skip] 2014-11-13 21:34:48 -06:00
Matt Rogers
27362a1984 Merge pull request #3101 from ndarville/patch-1 2014-11-13 21:34:31 -06:00
Niclas Darville
3014fbd344 Added CSV example for data-file docs 2014-11-13 16:04:28 +01:00
Niclas Darville
596b9e0785 Mentioned CSV extension in docs for data files
Since CSV files are supported as collections.
2014-11-13 10:30:00 +01:00
Parker Moore
39c9fb120f Update history to reflect merge of #3089 [ci skip] 2014-11-12 18:47:03 -08:00
Parker Moore
314fb875b5 Merge pull request #3089 from jekyll/remove-duplication-in-regexp 2014-11-12 18:46:44 -08:00
Parker Moore
3b40d964fb Update history to reflect merge of #3093 [ci skip] 2014-11-11 18:22:37 -08:00
Parker Moore
a48379a715 Merge pull request #3093 from shinnn/ga 2014-11-11 18:22:14 -08:00
Alfred Xing
d4c15efff9 Cache name matching regex 2014-11-11 17:35:09 -08:00
Alfred Xing
2a41945014 Get rid of noifniof 2014-11-11 15:14:24 -08:00
Shinnosuke Watanabe
dc248345a9 Change variables of Google Analytics script
`i` `s` `o` `g` `r` `a` `m` -> `j` `e` `k` `y` `l` `L`

Generated by isogram
https://github.com/shinnn/isogram
2014-11-11 18:42:54 +09:00
rovrov
b6f3adb6e3 Add trailing slash to paginate_path example.
https://github.com/jekyll/jekyll-paginate/issues/15#issuecomment-62322554
2014-11-10 16:02:52 -05:00
Parker Moore
472c18e409 Update history to reflect merge of #3090 [ci skip] 2014-11-10 12:02:26 -08:00
Parker Moore
e42f5ac2dc Merge pull request #3090 from alfredxing/fix-error-output 2014-11-10 12:01:46 -08:00
Alfred Xing
06750b8502 Print error message in renderer 2014-11-10 11:45:56 -08:00
Parker Moore
bd907c5be6 Remove duplicate regexp phrase: ^\A.
Addresses @mastahyeti's comment in #3077: https://github.com/jekyll/jekyll/pull/3077#discussion_r20077150
2014-11-10 11:36:05 -08:00
Parker Moore
c79fe1125c Update history to reflect merge of #3088 [ci skip] 2014-11-10 10:51:01 -08:00
Parker Moore
20f0940455 Merge pull request #3088 from alfredxing/fix-error-output 2014-11-10 10:50:32 -08:00
Alfred Xing
84cef2202d Remove duplicate 'Conversion error:' message 2014-11-10 09:12:51 -08:00
Alfred Xing
eaa132c65b Fall back to old method with deprecation warning 2014-11-09 11:55:47 -08:00
Parker Moore
2d31d07602 Update site history page with v2.5.1 2014-11-09 10:39:18 -08:00
Parker Moore
d99814baa5 v2.5.1 was released on Nov 9, not Nov 8. 2014-11-09 09:48:21 -08:00
Parker Moore
ab05a2cd4f Release 💎 2.5.1 2014-11-09 09:45:05 -08:00
Parker Moore
db8163b6e8 Merge pull request #3080 from jekyll/release-2-5-1
Release v2.5.1
2014-11-09 09:42:31 -08:00
Parker Moore
22d11bef2d Prepare a 💎 v2.5.1 release. 2014-11-08 22:29:47 -08:00
Parker Moore
70159ac8cb Use paginator.(next|previous)_page_path instead of just the number.
Closes #3074
2014-11-08 22:25:05 -08:00
Parker Moore
5eb300043f Update history to reflect merge of #3077 [ci skip] 2014-11-08 22:10:03 -08:00
Parker Moore
95b62e564b Merge pull request #3077 from jekyll/fix-windows-path-sanitation 2014-11-08 22:07:52 -08:00
Parker Moore
ad745702ca New title for new times. 2014-11-08 22:05:02 -08:00
Parker Moore
4b0089712e Add the contributors to the v2.5.0 release post.
I'm such a doofus for forgetting!!!!
2014-11-08 22:03:54 -08:00
Parker Moore
264caac94c Update history to reflect merge of #3075 [ci skip] 2014-11-08 21:15:13 -08:00
Parker Moore
58180b1ac1 Merge pull request #3075 from joshk/patch-1 2014-11-08 21:14:46 -08:00
Parker Moore
067f8b6be7 Strip the drive name from both paths when checking the prefix. 2014-11-08 13:10:28 -08:00
Parker Moore
4df73ced0d Add benchmark for Jekyll.sanitized_path 2014-11-08 12:54:02 -08:00
Josh Kalderimis
c7603f3ebf use built in travis caching
also run bundle update to make sure the cache is not too old
2014-11-08 16:12:03 +13:00
Parker Moore
ae7f10b922 Something about a Travis Beta Build that @joshk mentioned 2014-11-06 18:17:28 -08:00
Parker Moore
023e4e6ceb Update history to reflect merge of #3064 [ci skip] 2014-11-06 13:19:00 -08:00
Parker Moore
742893410c Merge pull request #3064 from ribbons/cygwin-env 2014-11-06 13:18:38 -08:00
Parker Moore
c1aba46a1e Release 💎 2.5.0 2014-11-06 12:59:52 -08:00
Parker Moore
23712cf4dc Update site with 2 new v2.5.0 PR's. 2014-11-06 12:07:21 -08:00
Parker Moore
21de59a90e Update history to reflect merge of #3067 [ci skip] 2014-11-06 12:05:28 -08:00
Parker Moore
e11fb4d427 Merge pull request #3067 from jekyll/specify-log-level 2014-11-06 12:05:07 -08:00
Parker Moore
328fbd83d4 Update history to reflect merge of #3066 [ci skip] 2014-11-06 12:04:31 -08:00
Parker Moore
ffe7860625 Merge pull request #3066 from jekyll/catch-no-gemfile 2014-11-06 12:03:35 -08:00
Parker Moore
5b54f78875 Allow users to specify the log level via JEKYLL_LOG_LEVEL. 2014-11-06 12:03:07 -08:00
Parker Moore
989c70fe4a In the case that a Gemfile does not exist, ensure Jekyll doesn't fail. 2014-11-06 10:48:09 -08:00
Parker Moore
2f4448eab6 Merge pull request #3062 from jekyll/release-2-5-0
Release v2.5.0
2014-11-06 10:35:51 -08:00
Matt Robinson
90bdcaddb7 Add development dependencies for Cygwin
In the Cygwin environment, minitest and test-unit aren't bundled with
Ruby.  Add these as explicit development dependencies when running under
Cygwin.
2014-11-06 09:28:52 +00:00
Parker Moore
a0afa19e9a Release 💎 v2.5.0 2014-11-05 22:07:23 -08:00
Parker Moore
7918dad26f Update history to reflect merge of #2865 [ci skip] 2014-11-05 22:03:06 -08:00
Parker Moore
13bb7360c0 Merge pull request #2865 from jekyll/some-kind-of-bundler-thingy 2014-11-05 22:01:37 -08:00
Parker Moore
5d23760280 Documentation for Bundler group. 2014-11-05 21:53:48 -08:00
Parker Moore
5a350788e7 Test JEKYLL_NO_BUNDLER_REQUIRE. 2014-11-05 21:04:34 -08:00
Parker Moore
e543fedf3f Update history to reflect merge of #3065 [ci skip] 2014-11-05 20:49:27 -08:00
Parker Moore
b02a5ba76a Merge pull request #3065 from cllns/master 2014-11-05 20:49:05 -08:00
Sean Collins
5a288e7de4 Add 'b' and 's' aliases for build and serve, respectively 2014-11-05 23:13:08 -05:00
Parker Moore
8ee1b2a1fd Finish up the plugin manager
And so it shall be.
2014-11-05 19:29:54 -08:00
Parker Moore
b0a7f9c8c9 Require plugins from Gemfile :jekyll_plugins group. 2014-11-05 18:50:38 -08:00
Parker Moore
519b60d012 Fix 2 syntax errors. 2014-11-05 18:39:54 -08:00
Parker Moore
0ad2c338c4 Reorganize tests for plugins. 2014-11-05 18:39:54 -08:00
Parker Moore
34de676713 Require gems in :jekyll_plugins group in a Gemfile in unsafe mode.
Replaces #1658. /cc @imathis
2014-11-05 18:39:54 -08:00
Parker Moore
01b11d098e Update history to reflect merge of #3063 [ci skip] 2014-11-05 18:38:27 -08:00
Parker Moore
1b68a29f29 Merge pull request #3063 from jekyll/jsonify-on-hashes 2014-11-05 18:37:26 -08:00
Parker Moore
18930b01f6 Fix up the assertions. 2014-11-05 11:39:15 -08:00
Parker Moore
b29fd6d380 Add tests.
Need to fix up the assertions to match the output.
2014-11-05 11:37:51 -08:00
Parker Moore
9a15a09028 Add {{ | jsonify }} support for hashes. 2014-11-05 11:37:34 -08:00
Parker Moore
774c65a869 Add a rake site:generate command and use Ruby instead of a subprocess. 2014-11-05 11:13:04 -08:00
Parker Moore
a822219086 Update history to reflect merge of #2882 [ci skip] 2014-11-05 10:22:28 -08:00
Parker Moore
2ec1dc1831 Merge pull request #2882 from jekyll/security/centralize-path-sanitation 2014-11-05 10:21:57 -08:00
Alfred Xing
50d0fc3c85 Match post.name instead of slugs and dates 2014-11-04 16:13:04 -08:00
Parker Moore
90cddade53 Commit the paths one by one to Jekyll.sanitized_path with the proper initial base.
Prevents errors like these:

[39/78] TestPost#test_: A Post processing posts should not be writable outside of destination. /Users/parker/jekyll/jekyll/test/dest
/Users/parker/jekyll/jekyll/test/dest/Users/parker/jekyll/baddie.html
 = 0.01 s
  1) Failure:
TestPost#test_: A Post processing posts should not be writable outside of destination.  [/Users/parker/jekyll/jekyll/test/test_post.rb:152]:
Failed assertion, no message given.
2014-11-03 22:27:55 -08:00
Parker Moore
2ee8d690c4 More conversion of Jekyll.sanitized_path ~> site.in_(source|dest)_dir 2014-11-03 22:16:48 -08:00
Parker Moore
ca40c771d0 Only allow CWD _layouts outside of safe mode. 2014-11-03 22:16:48 -08:00
Parker Moore
0c6137b2d3 Fix site tests. 2014-11-03 22:16:48 -08:00
Parker Moore
4bccbdead4 If no overrides are passed in, just default to a Hash. 2014-11-03 22:16:48 -08:00
Parker Moore
8d02c5cd94 Allow override of destination in site_configuration in tests 2014-11-03 22:16:48 -08:00
Parker Moore
68e9c84a18 Flatten paths sent into #in_dest_dir 2014-11-03 22:16:48 -08:00
Parker Moore
f7b1782294 Fix post.rb permalink stuff in light of merge of #2925. 2014-11-03 22:16:48 -08:00
Parker Moore
2690c045ec Fix the tests so they are *PERFECT*. 2014-11-03 22:16:48 -08:00
Parker Moore
656e772388 Cache the related posts most_recent_posts
/cc @mattr- is this safe to do, you think? it only happens at render
time...
2014-11-03 22:16:47 -08:00
Parker Moore
817f6cb658 Fix problem where entries weren't stripped of their trailing slashes. 2014-11-03 22:16:47 -08:00
Parker Moore
179b5ab193 Use site.in_source_dir as @mastahyeti suggested 2014-11-03 22:16:47 -08:00
Parker Moore
b4a2788626 Just swallow it if there is no content for the excerpt to parse. 2014-11-03 22:16:47 -08:00
Parker Moore
3762878381 Correctly access the StaticFile's site variable. 2014-11-03 22:16:47 -08:00
Parker Moore
9cbc24fce5 More safety. 🔒 2014-11-03 22:16:47 -08:00
Parker Moore
4078bde3ba More passing tests. 2014-11-03 22:15:41 -08:00
Parker Moore
3b634134a0 Another test passing. 😄 2014-11-03 22:15:41 -08:00
Parker Moore
461e16f8bc More tests are passing. Hooray. 2014-11-03 22:15:40 -08:00
Parker Moore
0bc88975c8 More removal of File.join 2014-11-03 22:15:40 -08:00
Parker Moore
98182aab4a Use site.in_source_dir in Collection. 2014-11-03 22:15:40 -08:00
Parker Moore
3a3be7e5a7 Add Site#in_dest_dir 2014-11-03 22:15:40 -08:00
Parker Moore
7e1cc4b684 Add Site#in_source_dir 2014-11-03 22:15:40 -08:00
Parker Moore
0f2a3a606b Append the site to Jekyll.sites upon creation 2014-11-03 22:15:40 -08:00
Parker Moore
314dce62cf Make Site.source and Site.dest "immutable" 2014-11-03 22:15:40 -08:00
Parker Moore
bd72265e74 Reformat the Jekyll module's static methods. 2014-11-03 22:15:40 -08:00
Parker Moore
ab8441259e Update history to reflect merge of #3053 [ci skip] 2014-11-03 12:10:18 -08:00
Parker Moore
ccd1941378 Merge pull request #3053 from alfredxing/fix-serve-host 2014-11-03 12:09:34 -08:00
Parker Moore
4272537f69 Update history to reflect merge of #3052 [ci skip] 2014-11-03 12:01:02 -08:00
Parker Moore
23f4c5804c Merge pull request #3052 from vlajos/typofixes20141102 2014-11-03 12:00:02 -08:00
Alfred Xing
a16dfef840 Use 127.0.0.1 as host instead of 0.0.0.0 2014-11-02 15:31:23 -08:00
Veres Lajos
e1f7139b9c typo fixes 2014-11-02 23:00:09 +00:00
Renaud Martinet
f9e249ae20 Generalize Utils#slugify for any scripts
It replaces any non alphanumeric glyphs by an hyphen.
2014-10-31 15:56:03 +01:00
Parker Moore
81f4abdbcd Update history to reflect merge of #3040 [ci skip] 2014-10-30 09:37:24 -07:00
Parker Moore
9a82b474aa Merge pull request #3040 from mitaa/master 2014-10-30 09:35:47 -07:00
mitaa
57ca3a04d5 Update continuous-integration.md
Fix miswording
2014-10-30 10:05:19 +01:00
Parker Moore
257f852b96 Update history to reflect merge of #3031 [ci skip] 2014-10-29 15:13:51 -07:00
Parker Moore
8dcf7a6680 Merge pull request #3031 from alfredxing/frontmatter-permalinks 2014-10-29 15:13:12 -07:00
Alfred Xing
02e53fb6ff Implement @parkr's suggestions 2014-10-27 22:59:15 -07:00
Parker Moore
485f7634bd Update history to reflect merge of #3032 [ci skip] 2014-10-27 17:40:30 -07:00
Parker Moore
0fc256dbef Merge pull request #3032 from jekyll/jsonify-deeply 2014-10-27 17:40:05 -07:00
Parker Moore
3fb1356593 The jsonify filter should deep-convert to Liquid when given an Array.
Fixes https://github.com/github/choosealicense.com/issues/225
2014-10-27 15:58:42 -07:00
Alfred Xing
cd9d38c5ea Remove duplicate code 2014-10-26 21:38:19 -07:00
Alfred Xing
0fe1d0686a Allow placeholders in permalinks 2014-10-26 18:23:58 -07:00
Parker Moore
4e8ebd999a Update history to reflect merge of #3022 [ci skip] 2014-10-24 11:35:22 -07:00
Parker Moore
578f38748d Merge pull request #3022 from jekyll/perf 2014-10-24 11:34:41 -07:00
Parker Moore
ae01b1d5df 😦 2014-10-22 02:16:50 -07:00
Parker Moore
5cb0aee251 Have to go back on all these... 2014-10-22 02:10:21 -07:00
Parker Moore
2eb318a929 Replace costly Hash#fetch with arity=2 with arity=1 + block. 2014-10-22 01:43:46 -07:00
Parker Moore
ab3f27e674 Add benchmark for sequential assignment.
Calculating -------------------------------------
 parallel assignment    126425 i/100ms
multi-line assignment
                        136492 i/100ms
-------------------------------------------------
 parallel assignment  6382145.2 (±10.1%) i/s -   31606250 in   5.006184s
multi-line assignment
                      9281041.8 (±11.7%) i/s -   45724820 in   5.001599s
2014-10-22 01:40:55 -07:00
Parker Moore
e028d50b3f Add benchmark around string replacement.
Calculating -------------------------------------
                 #tr     62416 i/100ms
               #gsub     33750 i/100ms
              #gsub!     29695 i/100ms
                #sub     60774 i/100ms
               #sub!     64955 i/100ms
-------------------------------------------------
                 #tr   989348.8 (±5.0%) i/s -    4993280 in   5.060836s
               #gsub   422892.9 (±4.3%) i/s -    2126250 in   5.037741s
              #gsub!   364115.6 (±4.0%) i/s -    1841090 in   5.064496s
                #sub   964336.6 (±4.4%) i/s -    4861920 in   5.051775s
               #sub!  1016598.5 (±4.7%) i/s -    5131445 in   5.058987s
2014-10-22 01:36:43 -07:00
Parker Moore
a30498ba42 Add benchmark for #flat_map
Calculating -------------------------------------
.map.flatten with nested arrays
                          4718 i/100ms
.flat_map with nested arrays
                          6048 i/100ms
.map.flatten with no nested arrays
                          9804 i/100ms
.flat_map with no nested arrays
                          9302 i/100ms
-------------------------------------------------
.map.flatten with nested arrays
                        48118.3 (±4.8%) i/s -     240618 in   5.011942s
.flat_map with nested arrays
                        63838.6 (±5.1%) i/s -     320544 in   5.034864s
.map.flatten with no nested arrays
                       104879.3 (±4.4%) i/s -     529416 in   5.057802s
.flat_map with no nested arrays
                        99935.3 (±6.6%) i/s -     502308 in   5.049506s
2014-10-22 01:27:45 -07:00
Parker Moore
7c05312d5c Add benchmark for yield vs proc.call
Calculating -------------------------------------
               yield     70018 i/100ms
          block.call     42809 i/100ms
-------------------------------------------------
               yield  1099624.2 (±7.3%) i/s -    5531422 in   5.056107s
          block.call   604006.1 (±7.1%) i/s -    3039439 in   5.058794s
2014-10-22 01:18:09 -07:00
Parker Moore
7e37892bbd Add a benchmark for symbol-to-proc
Calculating -------------------------------------
               block      5403 i/100ms
              &:to_s      6094 i/100ms
-------------------------------------------------
               block    60023.4 (±5.3%) i/s -     302568 in   5.055537s
              &:to_s    59047.0 (±4.9%) i/s -     298606 in   5.068991s
2014-10-22 01:17:22 -07:00
Parker Moore
4e07dfef1f Add benchmark for hash-fetch
Calculating -------------------------------------
 fetch with no block     66979 i/100ms
  fetch with a block    138257 i/100ms
 brackets with an ||    145792 i/100ms
-------------------------------------------------
 fetch with no block  1255521.2 (±5.2%) i/s -    6296026 in   5.028856s
  fetch with a block  6402972.5 (±8.1%) i/s -   31799110 in   5.002554s
 brackets with an ||  8536511.4 (±8.1%) i/s -   42425472 in   5.005831s
2014-10-22 01:11:34 -07:00
Parker Moore
0511ece2f5 Use String#<< instead of String#+=
I just couldn’t believe this but look:

~/jekyll/jekyll#master$ ruby benchmark/string-concat
Calculating -------------------------------------
                  +=      6367 i/100ms
                  <<    128697 i/100ms
-------------------------------------------------
                  +=     1704.3 (±0.6%) i/s -      12734 in   7.472170s
                  <<  4381212.4 (±6.3%) i/s -   21878490 in   5.014899s

WOW.
2014-10-22 00:58:20 -07:00
Parker Moore
1395d5686b Optimize more URL#sanitize_url 2014-10-22 00:57:53 -07:00
Parker Moore
3227c4ecea Use #tr instead of #gsub 2014-10-22 00:57:25 -07:00
Parker Moore
b9c4fc93d7 Use flat_map instead of map.flatten 2014-10-22 00:57:06 -07:00
Parker Moore
95e96a0f83 Add a benchmarking script for string-concat 2014-10-22 00:56:54 -07:00
Parker Moore
c92ad3b595 Update history to reflect merge of #3018 [ci skip] 2014-10-20 21:29:31 -07:00
Parker Moore
3285aebd4f Merge pull request #3018 from jekyll/webrick-fancy-indexing 2014-10-20 21:28:35 -07:00
Parker Moore
9cc3085dd0 Turn on FancyIndexing. 2014-10-20 21:23:30 -07:00
Parker Moore
5b37ad57cc If --verbose is given, debug the sh*t out of that. 2014-10-20 21:23:22 -07:00
Parker Moore
3dedcbf894 Sort webrick_options 2014-10-20 21:23:00 -07:00
Parker Moore
2ca2990f6b Update history to reflect merge of #2997 [ci skip] 2014-10-20 20:11:26 -07:00
Parker Moore
7fd9f102c0 Merge pull request #2997 from jekyll/utils-slugify 2014-10-20 20:11:04 -07:00
Parker Moore
cc3a31e363 Update history to reflect merge of #2986 [ci skip] 2014-10-20 20:09:39 -07:00
Parker Moore
5ed4638400 Merge pull request #2986 from tamagokun/where_filters_enumerable 2014-10-20 20:09:21 -07:00
Parker Moore
a64e7e8814 Update history to reflect merge of #3011 [ci skip] 2014-10-20 20:08:04 -07:00
Parker Moore
6723db8157 Merge pull request #3011 from fhemberger/master 2014-10-20 20:07:09 -07:00
Parker Moore
996db6912d Update history to reflect merge of #3017 [ci skip] 2014-10-20 09:57:50 -07:00
Parker Moore
c77d06446d Merge pull request #3017 from glaucocustodio/master 2014-10-20 09:57:04 -07:00
Glauco Custódio
68c0e8f847 Hash#each_key instead of Hash#keys.each. Faster code. 2014-10-20 10:10:29 -02:00
Parker Moore
4b4a46579a Update history to reflect merge of #3013 [ci skip] 2014-10-18 12:30:42 -07:00
Parker Moore
c95f4c0f5b Merge pull request #3013 from jekyll/revert-2921-post-dest 2014-10-18 12:21:28 -07:00
Parker Moore
078b2785e4 Revert "Make permalink parsing consistent with pages" 2014-10-18 12:07:44 -07:00
Frederic Hemberger
1d726a87b9 Docs: Clarify behavior of 'categories' in permalinks 2014-10-18 08:29:26 +02:00
Parker Moore
90b6723288 Update history to reflect merge of #3010 [ci skip] 2014-10-17 12:30:47 -07:00
Parker Moore
a9d7031e7c Merge pull request #3010 from croaky/master 2014-10-17 12:25:22 -07:00
Dan Croak
db220a9de6 Add FormKeep to resources as Jekyll form backend
Launched by [thoughtbot] today.
Intended to be Jekyll-friendly with
no iframes, JavaScript embeds, or CSS overrides.
It just generates a URL to use as your form's `action` endpoint.

It has a very simple webhook system, which means
it can automatically forward all submissions to a webhook of your choosing.
We've been using [Zapier] to handle the heavy lifting of
sending form data along from FormKeep to MailChimp, Trello, etc.

[thoughtbot]: https://thoughtbot.com
[Zapier]: http://zapier.com
2014-10-17 11:00:44 -07:00
Parker Moore
9f5835871b Utils.slugify: Don't create new objects when gsubbing 2014-10-12 16:18:40 -07:00
Parker Moore
b62415019b Update history to reflect merge of #2994 [ci skip] 2014-10-12 15:49:51 -07:00
Parker Moore
00d29e7e77 Merge pull request #2994 from jekyll/fixes-from-benchmarking 2014-10-12 15:49:20 -07:00
Parker Moore
5b5a25a03a Install with multiple jobs. [ci skip] 2014-10-12 15:47:01 -07:00
Parker Moore
be3d723d73 Update history to reflect merge of #2996 [ci skip] 2014-10-12 15:19:29 -07:00
Parker Moore
7cad48a3ee Merge pull request #2996 from hickford/link-feed-from-head 2014-10-12 15:18:12 -07:00
Parker Moore
b564214535 Pass the context on to IncludeRelativeTag#page_path 2014-10-12 15:16:38 -07:00
Matt Hickford
63a6d595c4 Fix feed link to respect baseurl 2014-10-12 23:14:41 +01:00
Parker Moore
22cc393cd4 Ignore the stackprof tmp files. 2014-10-12 15:12:30 -07:00
Parker Moore
0400ffe377 Only re-run the stackprof if I delete the prof output file. 2014-10-12 15:11:53 -07:00
Parker Moore
b07cbcecbd Don't print the location of the stackprof executable 2014-10-12 15:11:44 -07:00
Parker Moore
626706c8c5 Cache the @includes_dir in each instance so the method isn't called all the time 2014-10-12 15:11:28 -07:00
Parker Moore
a7c0fffcec Only run script/bootstrap in stackprof if stackprof executable isn't there 2014-10-12 14:39:04 -07:00
Parker Moore
73ca205a5c Add test for Document#basename_without_ext 2014-10-12 14:33:13 -07:00
Parker Moore
4942b2947b Only compile the Converter#matches regexp when asked for 2014-10-12 14:31:49 -07:00
Parker Moore
fbe98df488 Cache variables that won't change through the life of an object 2014-10-12 14:06:17 -07:00
Parker Moore
44c9f81921 Cache the extname regexp in Converters::Markdown and Textile 2014-10-12 14:06:16 -07:00
Parker Moore
681d71ac04 Move script/benchmark to script/stackprof. [ci skip] 2014-10-12 14:05:55 -07:00
Parker Moore
3902e373d8 Update history to reflect merge of #2993 [ci skip] 2014-10-12 14:05:34 -07:00
Parker Moore
ce8d8d929c Merge pull request #2993 from jekyll/benchmarking 2014-10-12 14:04:03 -07:00
Matt Hickford
3994d9116d Link atom feed from html head
This makes it possible for browsers to autodiscover the feed. Fixes https://github.com/jekyll/jekyll/issues/2995
2014-10-12 20:09:14 +01:00
Parker Moore
c2caaeaf11 Add rbtrace and stackprof and a script/benchmark script. 2014-10-12 02:02:42 -07:00
Mike Kruk
56ac50c568 where filter - test return value when filtering a Hash 2014-10-08 17:02:36 -04:00
Parker Moore
25d77cb05a Update history to reflect merge of #2982 [ci skip] 2014-10-08 13:57:51 -07:00
Parker Moore
70174e8831 Merge pull request #2982 from XhmikosR/page-description 2014-10-08 13:57:19 -07:00
Mike Kruk
f6ea8b4d50 Allow Enumerables to be used with "where" filter. 2014-10-08 16:19:55 -04:00
Parker Moore
9083511de3 Remove reverted #2980 from History. 2014-10-08 12:48:36 -07:00
Parker Moore
8cc07231df Merge pull request #2985 from jekyll/revert-2980-patch-1
Revert "Allow Enumerables to be used with "where" filter"
2014-10-08 12:47:25 -07:00
Parker Moore
94a1330d61 Revert "Allow Enumerables to be used with "where" filter" 2014-10-08 12:47:17 -07:00
Parker Moore
13919b4f3c Update history to reflect merge of #2980 [ci skip] 2014-10-08 12:46:32 -07:00
Parker Moore
8fe9c76d08 Merge pull request #2980 from tamagokun/patch-1 2014-10-08 12:45:50 -07:00
Parker Moore
d674305092 Update history to reflect merge of #2984 [ci skip] 2014-10-08 11:51:32 -07:00
Parker Moore
ac1d1a4053 Merge pull request #2984 from kevgathuku/patch-1 2014-10-08 11:51:08 -07:00
Parker Moore
66578b0c90 Update history to reflect merge of #2981 [ci skip] 2014-10-08 11:50:37 -07:00
Parker Moore
a84af462d4 Merge pull request #2981 from XhmikosR/normalize 2014-10-08 11:50:21 -07:00
Parker Moore
ceaa2eb267 Fix site:update_normalize_css so it works with new integrated Sass workflow. [ci skip]
Ref: #2981
2014-10-08 11:50:07 -07:00
Kevin Ndung'u
ec0e1dcb14 Update continuous-integration.md
Fix minor typo
2014-10-08 21:44:57 +03:00
Parker Moore
fb435c2c7e Update history to reflect merge of #2979 [ci skip] 2014-10-08 11:43:16 -07:00
Parker Moore
ba31c5c387 Merge pull request #2979 from rob-murray/add-twitter-tag-plugin 2014-10-08 11:42:41 -07:00
XhmikosR
5ea3286b09 Update normalize.css to v3.0.2. 2014-10-08 10:37:44 +03:00
XhmikosR
b0c0fbd70b site_template/feed.xml: Remove unneeded space. 2014-10-08 10:37:01 +03:00
XhmikosR
28bb15d4ee site_template/_includes/head.html: Minor refactoring.
Remove unneeded end tag, and also strip newlines.
Move `X-UA-Compatible` just after `meta charset`.
2014-10-08 10:33:39 +03:00
Mike Kruk
1db62cca9e allow Enumerables to be used with "where" filter
Enumerable module responds to `select` so this shouldn't be a problem here. Typical use case would be an object from a plugin being passed through a where filter.
2014-10-07 23:05:23 -04:00
Rob Murray
ad9a656d8d Add Tag plugin link for 'Jekyll Twitter Plugin'; A Liquid tag plugin that renders Tweets from Twitter API. 2014-10-07 13:12:08 +01:00
Parker Moore
cae5958362 Update history to reflect merge of #2972 [ci skip] 2014-10-05 20:02:16 -07:00
Parker Moore
f0e22be32b Merge pull request #2972 from tkrotoff/wrapper-width-hardcoded 2014-10-05 19:23:49 -07:00
Parker Moore
6657e374b2 Update history to reflect merge of #2973 [ci skip] 2014-10-05 10:47:57 -07:00
Parker Moore
b965d44b5f Merge pull request #2973 from tkrotoff/indent-head.html 2014-10-05 10:47:28 -07:00
Tanguy Krotoff
1ccd2156c5 Fix head.html indentation 2014-10-05 18:53:53 +02:00
Tanguy Krotoff
8e481cdf8e New Sass variable $content-width instead of hardcoded value 2014-10-05 18:49:39 +02:00
Parker Moore
7aa43f37fb Update history to reflect merging of #2948
Closes #2948

See 10c8184942 for more
2014-10-04 19:56:18 -07:00
Ruslan Korolev
2a83bdccd5 jekyll build/serve -V option to docs 2014-10-04 19:55:22 -07:00
Parker Moore
97ed8622c7 Update history to reflect merge of #2964 [ci skip] 2014-10-04 19:52:57 -07:00
Parker Moore
7a2f7a569b Merge pull request #2964 from nternetinspired/meta-description 2014-10-04 19:51:32 -07:00
Parker Moore
aed5554a1b Update history to reflect merge of #2967 [ci skip] 2014-10-04 19:48:12 -07:00
Parker Moore
961a3504ba Merge pull request #2967 from tmthrgd/master 2014-10-04 19:47:39 -07:00
Parker Moore
592cee9596 Update history to reflect merge of #2969 [ci skip] 2014-10-03 10:27:32 -07:00
tmthrgd
7869586e43 Add my ditaa-ditaa plugin under Other
ditaa-ditaa is a drastic revision of jekyll-ditaa that renders diagrams drawn using ASCII art into PNG images.

It is not immediately clear where ditaa-ditaa would belong as it provides both generator functionality, tag functionality and other functionality.
2014-10-03 01:34:30 +09:30
Seth Warburton
42a8dba642 Page specific descriptions 2014-09-30 22:17:49 +01:00
Parker Moore
98b5ff0d17 Update history to reflect merge of #2959 [ci skip] 2014-09-28 20:40:33 -07:00
Parker Moore
dd25ca30d4 Update history to reflect merge of #2949 [ci skip] 2014-09-27 11:31:25 -07:00
Parker Moore
d57d248152 Merge pull request #2949 from rusikf/patch-10 2014-09-27 11:30:29 -07:00
Parker Moore
314f476d11 Update history to reflect merge of #2953 [ci skip] 2014-09-27 11:29:51 -07:00
Parker Moore
0e6dc41db5 Merge pull request #2953 from vasinov/master 2014-09-27 11:29:20 -07:00
Parker Moore
1b923fb504 Update history to reflect merge of #2954 [ci skip] 2014-09-27 11:29:04 -07:00
Parker Moore
7539e2109b Merge pull request #2954 from chrisfinazzo/remove-explicit-serve-from-docs 2014-09-27 11:28:31 -07:00
chrisfinazzo
4a5f70b315 Clarify instructions 2014-09-27 13:06:45 -04:00
chrisfinazzo
bec32b14cb Add a note about the separate commands, show an example without the watcher 2014-09-27 12:54:47 -04:00
Parker Moore
a041d50681 Update history to reflect merge of #2957 [ci skip] 2014-09-26 17:09:16 -07:00
Parker Moore
0553dc2f85 Merge pull request #2957 from walpurgisriot/master 2014-09-26 17:08:42 -07:00
feivel
0701fa7b16 Update outdated comment
incorrect as of 6 Aug 2014.
2014-09-26 19:49:58 -04:00
chrisfinazzo
f80d82cfcc Remove references to the watch command in the sample 2014-09-26 12:46:41 -04:00
Vasily Vasinov
aaf813902a Update README.markdown
Someone added Jekyll to Hakiri for monitoring gems' security. I'm adding a security shield to README.markdown in this commit.
2014-09-26 08:45:12 -06:00
Parker Moore
e3c74d5365 Update history to reflect merge of #2921 [ci skip] 2014-09-24 23:46:10 -07:00
Parker Moore
1f2250e7a4 Merge pull request #2921 from alfredxing/post-dest 2014-09-24 23:45:44 -07:00
Ruslan Korolev
6dbe112f79 Merge remote-tracking branch 'upstream/master' into patch-10 2014-09-25 10:40:10 +04:00
Alfred Xing
ccef84a803 Update Cucumber tests to match new permalink parsing 2014-09-24 22:08:25 -07:00
Alfred Xing
3a96d01e4a Make permalink parsing consistent with pages
Require permalink to end in a slash to write an index file.
Addresses #2920.
2014-09-24 22:08:25 -07:00
Parker Moore
95644a844f Update history to reflect merge of #2925 [ci skip] 2014-09-24 17:08:21 -07:00
Parker Moore
bd0eebdb05 Merge pull request #2925 from pathawks/htm-extension 2014-09-24 17:08:02 -07:00
Parker Moore
3319c0ab56 Update history to reflect merge of #2946 [ci skip] 2014-09-24 17:07:10 -07:00
Parker Moore
dc0add15af Merge pull request #2946 from kleinfreund/patch-1 2014-09-24 17:06:53 -07:00
Parker Moore
6f585e5da5 Update history to reflect merge of #2951 [ci skip] 2014-09-24 17:06:30 -07:00
Parker Moore
0c32f389bc Merge pull request #2951 from jekyll/fix-rouge 2014-09-24 17:06:00 -07:00
Parker Moore
8990d7199e Latest version of Rouge so we know the API is right. 2014-09-22 23:04:51 -07:00
Parker Moore
e6f89074d4 Rouge's Redcarpet plugin now has a different API
See for more:
- 18ec938e9c
- https://github.com/jneen/rouge/issues/182
2014-09-22 23:03:49 -07:00
Parker Moore
633c9be95c Update history to reflect merge of #2939 [ci skip] 2014-09-22 22:53:46 -07:00
Parker Moore
14c58213c7 Merge pull request #2939 from jekyll/ghp-gem 2014-09-22 22:53:25 -07:00
Parker Moore
f2689ddf8f Merge branch 'ghp-gem' of github.com:jekyll/jekyll into ghp-gem
* 'ghp-gem' of github.com:jekyll/jekyll:
  Move it down a little
2014-09-22 22:52:36 -07:00
Parker Moore
a5a8be97de Make it a little nicer. 2014-09-22 22:52:23 -07:00
Ruslan Korolev
1a88178fbf jekyll serve --skip-initial-build to docs 2014-09-22 19:16:23 +04:00
Philipp Rudloff
e013c16ba9 Fix code example for media query mixin
It was using an old variable name (`$palm`) instead of the current one (`$on-paln`).
2014-09-22 08:18:14 +02:00
Parker Moore
52c76b5d93 Update history to reflect merge of #2906 [ci skip] 2014-09-21 13:37:18 -07:00
Parker Moore
e68a584a27 Merge pull request #2906 from pathawks/escape-css-characters 2014-09-21 13:36:57 -07:00
Parker Moore
bc9699e420 Update history to reflect merge of #2943 [ci skip] 2014-09-21 13:34:11 -07:00
Parker Moore
951fa8981f Merge pull request #2943 from rusikf/patch-7 2014-09-21 13:32:58 -07:00
Ruslan Korolev
6a06a627f8 jekyll build/serve --force_polling option to docs 2014-09-21 14:52:19 +04:00
Parker Moore
a7eeeda99f Move it down a little 2014-09-19 19:58:45 -07:00
Parker Moore
0f008c02d8 Add note about using the github-pages gem properly 2014-09-19 19:56:36 -07:00
Parker Moore
3086ea3036 Update history to reflect merge of #2937 [ci skip] 2014-09-19 00:32:54 -07:00
Parker Moore
2efe14d656 Merge pull request #2937 from tmthrgd/patch-1 2014-09-19 00:32:29 -07:00
Tom Thorogood
c03dadbe2c Include my mathml.rb plugin under Tags.
mathml.rb is a plugin to convert TeX mathematics into MathML.
2014-09-19 14:29:48 +09:30
Parker Moore
9efb68f957 Update history to reflect merge of #2922 [ci skip] 2014-09-17 12:22:56 -07:00
Parker Moore
2c9f6b0bd5 Merge pull request #2922 from igas/patch-1 2014-09-17 12:22:16 -07:00
Parker Moore
84ce5c3589 Update history to reflect merge of #2911 [ci skip] 2014-09-17 12:18:32 -07:00
Parker Moore
bfe83cdec2 Merge pull request #2911 from charlesbaynham/minor-grammatical-error 2014-09-17 12:17:47 -07:00
Parker Moore
51ebd69162 Update history to reflect merge of #2931 [ci skip] 2014-09-16 16:36:06 -07:00
Parker Moore
c11edf5272 Merge pull request #2931 from snrbrnjna/master 2014-09-16 16:35:16 -07:00
snrbrnjna
a3f8336571 Jekyll Http Basic Auth Plugin added 2014-09-17 00:09:29 +02:00
Parker Moore
36baf435b5 Put #2929 History entry in the right place.
Not enough  yet today. 💤
2014-09-16 09:47:24 -07:00
Parker Moore
1416e0e0ce Update history to reflect merge of #2929 [ci skip] 2014-09-16 09:46:49 -07:00
Parker Moore
c789a93bc8 Merge pull request #2929 from rusikf/patch-5 2014-09-16 09:46:14 -07:00
Ruslan Korolev
121a06a9eb unit test for jekyll new --force 2014-09-16 16:42:33 +04:00
Parker Moore
24d13fcc55 Update history to reflect merge of #2887 [ci skip] 2014-09-14 14:54:38 -07:00
Parker Moore
bf1a2320e2 Merge pull request #2887 from pathawks/Update-Liquid-Links 2014-09-14 14:54:17 -07:00
Pat Hawks
fdf58c5ce2 Allow per post permalinks to end in .htm
Fixes #2920
2014-09-14 11:58:16 -07:00
Pat Hawks
5445a1bead Add test for Use per-post permalinks ending in .htm 2014-09-14 11:36:26 -07:00
Igor Kapkov
566eb6ef3b remove watch since it default in 2.4.0 2014-09-14 11:28:29 +08:00
Parker Moore
19b2d2eeb6 Update history to reflect merge of #2917 [ci skip] 2014-09-13 12:24:26 -07:00
Parker Moore
c08a7f3fbd Merge pull request #2917 from nitoyon/fix-template-doc 2014-09-13 12:24:05 -07:00
Parker Moore
a0d46942b9 Update history to reflect merge of #2919 [ci skip] 2014-09-13 12:23:10 -07:00
Parker Moore
7cf64b6ab5 Merge pull request #2919 from bcomnes/singular-docs 2014-09-13 12:22:16 -07:00
Parker Moore
a34dbd45cf Update latest_version.txt file on the site. 2014-09-13 12:22:00 -07:00
Bret Comnes
44506bf376 Removed github-pages warning about singular types now that gh-pages is running 2.3.0 2014-09-13 12:03:25 -07:00
nitoyon
86af9952ce Fix quote character typo in site documentation for templates 2014-09-13 23:55:17 +09:00
Parker Moore
12046270a6 Update history to reflect merge of #2913 [ci skip] 2014-09-12 09:59:38 -07:00
Parker Moore
f7ef16ba06 Merge pull request #2913 from rusikf/patch-3 2014-09-12 09:59:04 -07:00
Parker Moore
65bcf2adb2 Update history to reflect merge of #2916 [ci skip] 2014-09-12 09:58:29 -07:00
Parker Moore
7790b42f8c Merge pull request #2916 from TheFox/bigfootnotes 2014-09-12 09:58:02 -07:00
Christian Mayer
6ed54bd31a Bigfootnotes Plugin added. 2014-09-12 18:13:44 +02:00
Ruslan Korolev
d9e5fdde5b test for jekyll new --blank 2014-09-12 18:30:06 +04:00
Alfred Xing
c3ec158f2d Keep backwards compatibility
Re-add `relative_path` Liquid variable too keep compatibility
2014-09-11 18:25:21 -07:00
Charles Baynham
bf8cc236ee Correction of grammatical error and also consistent formatting/correct filename of _config.yml 2014-09-12 00:08:46 +01:00
Alfred Xing
6c0e791236 Use relative path for path Liquid variable in Documents 2014-09-10 21:04:40 -07:00
Pat Hawks
960a918330 Escape unicode characters
Fixes #2905
2014-09-10 12:28:45 -07:00
Parker Moore
671b435b3b Update history to reflect merge of #2899 [ci skip] 2014-09-10 10:21:30 -07:00
Parker Moore
219a52e37b Merge pull request #2899 from XhmikosR/master 2014-09-10 10:20:56 -07:00
Parker Moore
a4f0f0dd0c Update history to reflect merge of #2898 [ci skip] 2014-09-10 10:07:49 -07:00
Parker Moore
838753cc96 Merge pull request #2898 from XhmikosR/font-awesome 2014-09-10 10:05:19 -07:00
XhmikosR
8f41d3db61 Fix transition property.
http://caniuse.com/#feat=css-transitions
2014-09-10 13:23:01 +03:00
XhmikosR
928e5e1c07 Remove the unused fontawesome-webfont.eot. 2014-09-10 13:22:02 +03:00
XhmikosR
b99ec48407 Update Font Awesome to v4.2.0. 2014-09-10 13:21:47 +03:00
XhmikosR
7c128bc7a2 Fix link to #2895. 2014-09-10 13:18:46 +03:00
Pat Hawks
99b5569ffa Point Liquid links to Liquid’s Github wiki
Provide a more helpful resource for questions like #2883
2014-09-09 23:20:40 -07:00
Parker Moore
1c2f7cb182 Update site history. 2014-09-09 22:24:38 -07:00
Parker Moore
e72f8cf5b1 Release 💎 2.4.0 2014-09-09 22:24:09 -07:00
Parker Moore
39783a6f46 Release 💎 2.3.0 2014-09-09 22:23:46 -07:00
Parker Moore
88244ff71d Add #2895 to release post.
#2896.
2014-09-09 22:23:39 -07:00
Parker Moore
1cb1cbba50 Merge pull request #2896 from jekyll/release-2-4
Release Jekyll 💎 v2.4.0
2014-09-09 22:21:46 -07:00
Parker Moore
87f72f0c63 Update history to reflect merge of #2895 [ci skip] 2014-09-09 22:21:13 -07:00
Parker Moore
c776a657af Merge pull request #2895 from jekyll/array-filters 2014-09-09 22:20:15 -07:00
Parker Moore
568a0b0e08 Release Jekyll 💎 v2.4.0 2014-09-09 21:34:37 -07:00
Parker Moore
196a56e3ec Add push, pop, shift, and unshift Liquid filters.
Fixes #2892.
2014-09-09 21:29:23 -07:00
Parker Moore
80106f1b67 Allow use of script/cibuild outside Travis. [ci skip] 2014-09-09 21:10:17 -07:00
Parker Moore
3994faaeaa Give script/proof the ability to be force-run. [ci skip] 2014-09-09 20:54:27 -07:00
Parker Moore
95dd0dc479 Update history to reflect merge of #2884 [ci skip] 2014-09-09 00:22:04 -07:00
Parker Moore
4fb6e1cde9 Merge pull request #2884 from gjtorikian/improve-docs-for-include-relative 2014-09-09 00:21:42 -07:00
Parker Moore
cab4333f70 Update history to reflect merge of #2889 [ci skip] 2014-09-09 00:12:31 -07:00
Parker Moore
d786e81f46 Merge pull request #2889 from pdehaan/patch-1 2014-09-09 00:12:03 -07:00
Peter deHaan
06c9b1b33c Fixing "vertycal" typo
s/vertycal/vertical

Unless, like, "vertycal" was on purpose or something.
2014-09-08 22:48:23 -07:00
Garen Torikian
deb4e0d24a Set tag name as ivar
This lets us use just one syntax_example method for both classes.
2014-09-08 14:27:51 -07:00
Garen Torikian
5fe73a6671 Add some more docs on include_relative 2014-09-07 21:24:05 -07:00
Garen Torikian
0675f2a423 Update include_relative tests
This verifies you can’t go “up” in the include
2014-09-07 21:23:45 -07:00
Parker Moore
41a6037a11 Update history to reflect merge of #2870 [ci skip] 2014-09-07 13:06:13 -07:00
Parker Moore
6644c77d23 Merge pull request #2870 from gjtorikian/support-relative-include 2014-09-07 13:05:38 -07:00
Garen Torikian
a569799ffc Sanitize the resolved includes path 2014-09-07 12:18:54 -07:00
Garen Torikian
3668437c96 Rename method to resolved_includes_dir 2014-09-07 12:18:35 -07:00
Garen Torikian
afd30b0a9b Add documentation on the include_relative tag 2014-09-07 12:14:19 -07:00
Garen Torikian
4da07bb2c3 Add tests around nasty include attempts 2014-09-07 12:00:37 -07:00
Garen Torikian
e7c8bbf5df Test that includes relative to self are included 2014-09-07 11:24:44 -07:00
Garen Torikian
934c37b578 Separate include_relative test out into its own context 2014-09-07 11:21:50 -07:00
Garen Torikian
0e4549013d Define methods for shared vars between include & include_relative 2014-09-07 11:21:40 -07:00
Parker Moore
39172e53bf Update history to reflect merge of #2881 [ci skip] 2014-09-07 10:41:36 -07:00
Parker Moore
0422c5fde6 Merge pull request #2881 from penibelst/patch-1 2014-09-07 10:41:11 -07:00
Parker Moore
192e5b9188 Update history to reflect merge of #2880 [ci skip] 2014-09-07 10:40:33 -07:00
Parker Moore
c3dc5cceee Merge pull request #2880 from kansaichris/slugify-liquid-filter 2014-09-07 10:40:01 -07:00
Anatol Broder
1a11a994ea Remove Good Include
The plugin is deprecated.
2014-09-07 14:01:53 +02:00
Chris Frederick
a2fedfc615 Document the slugify Liquid filter 2014-09-07 17:01:53 +09:00
Chris Frederick
77297744ce Add a test for the slugify Liquid filter 2014-09-07 16:49:14 +09:00
Chris Frederick
394eab4a3a Add the slugify Liquid filter 2014-09-07 16:48:57 +09:00
Parker Moore
2d3ca08d91 Update history to reflect merge of #2877 [ci skip] 2014-09-07 00:38:40 -07:00
Parker Moore
d950680bbe Merge pull request #2877 from nitoyon/fix-variables-doc 2014-09-07 00:37:59 -07:00
Garen Torikian
9f558d1cec Rename tag to include_relative 2014-09-06 21:48:15 -07:00
Garen Torikian
787bb582da Trash the subclass 2014-09-06 21:48:00 -07:00
Parker Moore
b5020bc590 Update history to reflect merge of #2879 [ci skip] 2014-09-06 11:52:43 -07:00
Parker Moore
64b2e11106 Merge pull request #2879 from SpectrumPixel/patch-1 2014-09-06 11:52:25 -07:00
TJ
7215c44146 Fixed "bellow" typo
Changed "bellow" to "below"
2014-09-06 13:53:49 -04:00
nitoyon
4435bcb1f8 Fix typo in site documentation for variables 2014-09-06 17:25:13 +09:00
Parker Moore
fa86afb336 Update history to reflect merge of #2864 [ci skip] 2014-09-05 10:05:13 -07:00
Parker Moore
58a76911bb Merge pull request #2864 from kansaichris/add-title-to-collection-urls 2014-09-05 10:04:38 -07:00
Garen Torikian
aa97f1025d Support a new relative_include tag 2014-09-03 15:43:51 -07:00
Chris Frederick
62a3961739 Add tests for Utils#slugify 2014-09-02 14:33:03 +09:00
Chris Frederick
4adc35aaf3 Revise Utils#slugify with inspiration from Rails 2014-09-02 14:32:14 +09:00
Chris Frederick
702b39dec5 Replace the 'name' parameter with 'string' 2014-09-02 13:34:44 +09:00
Chris Frederick
3ca1245027 Move Document#sluggify to Utils#slugify 2014-09-02 13:29:28 +09:00
Parker Moore
5674226b68 Update history to reflect merge of #2867 [ci skip] 2014-09-01 17:32:27 -07:00
Parker Moore
6928adf501 Merge pull request #2867 from chibicode/add-inspect-filter 2014-09-01 17:32:05 -07:00
Shu Uesugi
cfd17b2e7d Add inspect filter 2014-09-01 14:51:09 -07:00
Parker Moore
e4975836f4 Update history to reflect merge of #2862 [ci skip] 2014-09-01 11:48:11 -07:00
Parker Moore
820d6b3543 Merge pull request #2862 from mischah/fix-orientation-bugs 2014-09-01 11:47:44 -07:00
Chris Frederick
05d65f0341 Rename 'slug' to 'sluggify' and clean up code 2014-09-01 16:25:42 +09:00
Chris Frederick
be2b16507e Test documents without a title 2014-09-01 13:32:31 +09:00
Chris Frederick
a5e51cfdbe Properly handle titles with trailing punctuation 2014-09-01 13:25:38 +09:00
Chris Frederick
93f63df172 Document the :title variable 2014-09-01 13:16:14 +09:00
Chris Frederick
4dec3c8c6b Test titles in document permalinks 2014-09-01 13:04:54 +09:00
Chris Frederick
cca9c50c26 Add 'title' to url_placeholders 2014-09-01 12:53:31 +09:00
Chris Frederick
bcb6798838 Pass the filename as an argument to Document#slug 2014-09-01 12:45:41 +09:00
Michael Kühnel
9e9f4f1c53 Fix orientation bugs
Maintain fontsize and and adapt width when switching to landscape mode.
2014-08-31 15:27:51 +02:00
Parker Moore
18eb8e6fb7 Update history to reflect merge of #2829 [ci skip] 2014-08-31 00:09:22 -07:00
Parker Moore
8993cbe445 Merge pull request #2829 from kansaichris/collections-permalink-docs 2014-08-31 00:07:08 -07:00
Parker Moore
5b6b558c5a Update history to reflect merge of #2858 [ci skip] 2014-08-31 00:05:57 -07:00
Parker Moore
081e34a5ab Merge pull request #2858 from jekyll/auto-enable-watch 2014-08-31 00:05:42 -07:00
Parker Moore
8f46e23aa1 Update history to reflect merge of #2849 [ci skip] 2014-08-30 23:59:42 -07:00
Parker Moore
27d3126d54 Merge pull request #2849 from jekyll/maybe-secure-doc-reading 2014-08-30 23:58:33 -07:00
Parker Moore
b5dbc36975 Use Jekyll.sanitized_path when adding static files to Collections.
h/t @benbalter https://github.com/jekyll/jekyll/pull/2737#discussion_r16713423
Not sure if the previous code can be exploited, but being super safe is never a bad thing.
2014-08-30 23:09:47 -07:00
Parker Moore
6cee2a87cc Auto-enable watch on 'serve'.
Addresses @kneath's and @chibicode's comments in #2695.
2014-08-30 22:52:41 -07:00
Parker Moore
7de681ef58 Update history to reflect merge of #2856 [ci skip] 2014-08-30 22:50:36 -07:00
Parker Moore
ba05d00ac4 Merge pull request #2856 from jekyll/fix-liquid-in-sas 2014-08-30 22:50:07 -07:00
Parker Moore
943dc27e78 Add a space because regexp. 2014-08-30 22:40:32 -07:00
Parker Moore
eea5921856 Fix test for Liquid rendering in Sass. 2014-08-30 21:54:50 -07:00
Parker Moore
ca2e291306 prettier exceptions for cucumber. [ci skip] 2014-08-30 19:42:15 -07:00
Parker Moore
7baa56e1b2 Update history to reflect merge of #2859 [ci skip] 2014-08-30 19:34:52 -07:00
Parker Moore
7ff5505e97 Merge pull request #2859 from jekyll/parallelize-tests 2014-08-30 19:34:25 -07:00
Parker Moore
106148280d Use POSIX::Spawn instead of system to launch Jekyll 2014-08-30 19:29:01 -07:00
Parker Moore
f9bc50e010 Fix the custom Cucumber output. 2014-08-30 19:28:37 -07:00
Parker Moore
efd2c17eba Don't print out docstrings. 2014-08-30 18:37:00 -07:00
Parker Moore
f90d8db827 Run the scripts properly. 2014-08-30 18:27:42 -07:00
Parker Moore
2d485ab6fe It's a matrix env. 2014-08-30 17:16:03 -07:00
Parker Moore
30d1f90b44 Allow Travis to 'parallelize' our tests. 2014-08-30 17:14:47 -07:00
Parker Moore
cd50388781 Update history to reflect merge of #2830 [ci skip] 2014-08-28 19:40:49 -07:00
Parker Moore
190ab7f6b8 Merge pull request #2830 from kansaichris/render-liquid-in-coffeescript 2014-08-28 19:35:44 -07:00
Parker Moore
0c42174917 Merge pull request #2845 from farukaydin/where_filter
refactored where filter comment
2014-08-28 14:19:02 -07:00
Faruk AYDIN
d395183ee2 refactored where filter comment 2014-08-28 22:46:53 +03:00
Parker Moore
5330980c5f Update history to reflect merge of #2839 [ci skip] 2014-08-27 14:07:19 -07:00
Parker Moore
5475c64d89 Merge pull request #2839 from jglovier/patch-1 2014-08-27 14:05:34 -07:00
Joel Glovier
41311841f4 Adds info about installing jekyll in current dir
Closes #2838
2014-08-27 16:42:24 -04:00
Chris Frederick
98ed3b1c8f Might as well hard-wrap this to be consistent 2014-08-27 22:58:31 +09:00
Chris Frederick
d84b801fec Add a note about Liquid and template languages 2014-08-27 22:22:24 +09:00
Chris Frederick
1238ccefcc Fix Cucumber scenario 2014-08-26 22:24:18 +09:00
Chris Frederick
55de135467 Test Liquid syntax in CoffeeScript files 2014-08-26 17:24:27 +09:00
Chris Frederick
79992fc3c8 Fix inaccurate comments 2014-08-26 17:17:13 +09:00
Chris Frederick
71b10e2d4a Make render_with_liquid? true for CoffeeScript 2014-08-26 17:14:33 +09:00
Chris Frederick
927edfc078 Mention :name for collections in the documentation 2014-08-26 16:23:15 +09:00
Parker Moore
568464bc0e Add note to datafiles docs around CSV's.
Ref: #2761
2014-08-25 23:18:03 -07:00
Parker Moore
37db35dc10 Update history to reflect merge of #2799 [ci skip] 2014-08-25 23:16:32 -07:00
Parker Moore
56cd73eb35 Merge pull request #2799 from kansaichris/add-title-to-collection-permalinks 2014-08-25 23:15:23 -07:00
Chris Frederick
a72706ace6 Add Document#slug 2014-08-26 11:46:01 +09:00
Chris Frederick
cc4a0d1704 Change :title to :name 2014-08-26 11:26:19 +09:00
Parker Moore
67422e42c6 Update history to reflect merge of #2817 [ci skip] 2014-08-25 10:37:27 -07:00
Parker Moore
ac1f2e2049 Merge pull request #2817 from rusikf/patch-2 2014-08-25 10:36:53 -07:00
Ruslan Korolev
d9da7cbd76 add class << self idiom to new command 2014-08-25 10:59:58 +04:00
Chris Frederick
e8b00fb6f2 Add the 'title' variable to collection permalinks 2014-08-23 14:50:55 +09:00
Parker Moore
069805c6f7 Add note about GitHub Pages using Jekyll 2.2.0 and thus singular types for FMD.
Closes #2796.
2014-08-22 15:02:43 -07:00
Parker Moore
caec5339e8 Update history to reflect merge of #2791 [ci skip] 2014-08-21 12:54:30 -07:00
Parker Moore
9560429ac3 Merge pull request #2791 from gjtorikian/patch-2 2014-08-21 12:53:28 -07:00
Garen Torikian
ca1e6071e3 Make this phrase use HTML 2014-08-21 12:28:19 -07:00
Carlos Matallín
1aa9d6255e Add jekyll-thumbnail-filter to plugins list 2014-08-20 22:34:43 +02:00
Parker Moore
00c898b2e9 Update history to reflect merge of #2771 [ci skip] 2014-08-19 17:53:49 -04:00
Parker Moore
25f5bb2795 Merge pull request #2771 from ghprince/minor-tweaks-to-site-template 2014-08-19 17:53:24 -04:00
Gordon Gao
9df020f7e9 add .sass-cache to .gitignore and fix main.scss fileformat 2014-08-19 17:39:22 +08:00
Parker Moore
9b5f766333 Update history to reflect merge of #2768 [ci skip] 2014-08-18 01:42:05 -04:00
Parker Moore
11f629b00e Merge pull request #2768 from jekyll/remove-docs 2014-08-18 01:41:52 -04:00
Parker Moore
a90a7b2fba Remove docs/ directory.
Japanese docs available at http://jekyllrb-ja.github.io
2014-08-18 01:41:26 -04:00
Parker Moore
c54fb1aa20 Update history to reflect merge of #2761 [ci skip] 2014-08-18 01:39:46 -04:00
Parker Moore
c4a2ac2c4b Merge pull request #2761 from theodi/csv-data 2014-08-18 01:39:40 -04:00
Parker Moore
e8f2272918 Update history to reflect merge of #2765 [ci skip] 2014-08-17 14:39:09 -04:00
Parker Moore
be74029960 Merge pull request #2765 from alfredxing/fix-site-plugins-typo 2014-08-17 14:38:56 -04:00
Alfred Xing
74c812b565 Fix minor typo on plugins docs page 2014-08-17 11:35:29 -07:00
Parker Moore
8959ec448d Update history to reflect merge of #2764 [ci skip] 2014-08-17 14:09:13 -04:00
Parker Moore
034b3e94a5 Merge pull request #2764 from MinnSoe/doc-typo 2014-08-17 14:08:55 -04:00
Parker Moore
ce37de30a5 Update history to reflect merge of #2763 [ci skip] 2014-08-17 13:58:03 -04:00
Parker Moore
f7a4cdbf2b Merge pull request #2763 from zhuochun/master 2014-08-17 13:57:42 -04:00
Minn Soe
133463235a Fix typo in site documentation for collections. 2014-08-17 18:42:05 +02:00
Zhuochun
5d67438612 add markdown-writer package
add markdown-writer package for Atom editor
2014-08-17 18:22:25 +08:00
James Smith
cccfda7de8 hashrockets in CSV loading 2014-08-17 08:34:38 +01:00
Parker Moore
4fb022ce33 Update history to reflect merge of #2751 [ci skip] 2014-08-16 22:13:57 -04:00
Parker Moore
9d4c3fbbdf Merge pull request #2751 from pathawks/kill-redundant-plugins 2014-08-16 22:13:43 -04:00
Parker Moore
5931b80ef3 Update history to reflect merge of #2748 [ci skip] 2014-08-16 20:34:25 -04:00
Parker Moore
7b09a80dc7 Merge pull request #2748 from rusikf/hack 2014-08-16 20:34:05 -04:00
James Smith
866935dadf map with proc for CSV loading 2014-08-16 20:26:29 +01:00
James Smith
3a89923142 link issue number 2014-08-16 14:55:37 +01:00
James Smith
687176e22c Autoload csv files from data directory 2014-08-16 14:54:14 +01:00
Pat Hawks
166298e3f5 Remove tag plugins that are built in to Jekyll 2014-08-14 10:41:22 -07:00
Ruslan Korolev
f2b9154fa9 update simplecov gem to 0.9 2014-08-14 18:17:50 +04:00
Parker Moore
59b6cafef7 Update history to reflect merge of #2742 [ci skip] 2014-08-13 18:01:13 -04:00
Parker Moore
f4726d0ebc Merge pull request #2742 from fhemberger/patch-1 2014-08-13 18:00:49 -04:00
Parker Moore
1591557bc4 Nix that newline. [ci skip] 2014-08-13 18:00:36 -04:00
Frederic Hemberger
20f1cce6a5 Remove deprecated plugin 'jekyll-projectlist'
My plugin 'jekyll-projectlist' has been replaced by the data file feature in Jekyll 2.0 and thus became obsolete.
2014-08-13 09:35:38 +02:00
Parker Moore
7f6b1dd458 Release 💎 2.3.0 2014-08-13 01:49:46 -04:00
Parker Moore
bc954683cb Add mention of Parker Moore (@parkr) in README.
By now, I have almost entirely rewritten Jekyll with the help of our awesome
contributors. Taking a look at the contributions graphs GitHub provides,
I have to date pushed 1,452 commits to master with 24,991 additions and
17,330 deletions. In contrast, Tom Preston-Werner has pushed 295 commits
and 13,461 additions and 6,806 deletions. I don't need to have my name all
over it, but I think I have worked hard enough over the last 21 months
to deserve to put my name alongside Tom's and Nick's.

The lovely thing about version control is that changes can always be reverted.

Thanks for launching this great product, @mojombo and @qrush. I hope I haven't
let you down.
2014-08-13 01:46:37 -04:00
Parker Moore
1f877fde1e Make the intro text on the site template post a bit nicer. 2014-08-13 01:27:36 -04:00
Parker Moore
d70f9d4a29 Layout for site template feed.xml should be 'null'. 2014-08-13 01:23:19 -04:00
Parker Moore
17a4d15d3b Update site history. [ci skip] 2014-08-13 01:19:36 -04:00
Parker Moore
135c5f313b Update history to reflect merge of #2740 [ci skip] 2014-08-13 01:19:19 -04:00
Parker Moore
72cfee7ea6 Merge pull request #2740 from jekyll/latest-version 2014-08-13 01:18:56 -04:00
Parker Moore
7c266e0fb9 Add latest_version.txt file to the site. 2014-08-13 01:18:12 -04:00
Parker Moore
a97659a4a1 Add docs for https://github.com/jekyll/jekyll/issues/2691 2014-08-13 01:09:44 -04:00
Parker Moore
4e7dd8a563 Add emoji to the release commit message. 2014-08-13 01:09:37 -04:00
Parker Moore
038baa12c7 Update history to reflect merge of #2721 [ci skip] 2014-08-13 00:59:41 -04:00
Parker Moore
e5306284ff Merge pull request #2721 from jekyll/fork-classifier 2014-08-13 00:59:19 -04:00
Parker Moore
c4abe6ec8f Add linke to https://github.com/jekyll/jekyll/issues/2676 in Jekyll 2.3.0 release post. 2014-08-13 00:31:59 -04:00
Parker Moore
4d8e335da1 The mighty classifier --- reborn!!!!!
Use classifier-reborn v2.0 in place of classifier 1.3.
Code at https://github.com/jekyll/classifier-reborn
2014-08-13 00:29:40 -04:00
Parker Moore
f84cd4e4ed Update 2.3.0 release post. [ci skip] 2014-08-13 00:07:20 -04:00
Parker Moore
adb6d4d2d7 Update site history. 2014-08-13 00:04:47 -04:00
Parker Moore
9738ea452f Merge pull request #2723 from jekyll/release-2-3-0 2014-08-13 00:04:15 -04:00
Parker Moore
839501e012 Add some minimal docs for scssify and sassify filters. #2739 [ci skip] 2014-08-13 00:03:57 -04:00
Parker Moore
59b32626a8 Update history to reflect merge of #2739 [ci skip] 2014-08-12 23:54:50 -04:00
Parker Moore
fac5a2eb02 Merge pull request #2739 from DynamicDyno/sassify-filters 2014-08-12 23:54:17 -04:00
Kevin
566d3718b0 added sassify and scssify filters fot converting sass and scss strings to css 2014-08-12 21:24:04 -06:00
Parker Moore
2b81e5ed19 Update history to reflect merge of #2737 [ci skip] 2014-08-12 21:05:08 -04:00
Parker Moore
315cc386e5 Merge pull request #2737 from jekyll/fix-reading-imgs 2014-08-12 21:04:50 -04:00
Parker Moore
10cc45fc45 Add StaticFile#destination_rel_dir 2014-08-12 18:07:13 -04:00
Parker Moore
141ce32382 Custom formatter. 2014-08-12 18:06:47 -04:00
Parker Moore
56b9238af5 Fix up script/cucumber and script/test 2014-08-12 16:38:39 -04:00
Parker Moore
5031dfa3b9 Update history to reflect merge of #2735 [ci skip] 2014-08-12 16:07:58 -04:00
Parker Moore
c0df4b1047 Merge pull request #2735 from jekyll/multitask-defaut 2014-08-12 16:07:40 -04:00
Parker Moore
530e049d2d Read in static files info collection.files as StaticFiles. 2014-08-12 15:59:45 -04:00
Parker Moore
f16a5cbae1 Add Utils.has_yaml_header? so we can check the front matter existence in one place 2014-08-12 15:58:02 -04:00
Parker Moore
bcc539999b Allow for parallel test execution. 2014-08-12 15:56:56 -04:00
Parker Moore
7b1763a124 Release 💎 v2.3.0 2014-08-12 14:39:21 -04:00
Parker Moore
b0e144065c Update history to reflect merge of #2733 [ci skip] 2014-08-12 14:36:32 -04:00
Parker Moore
eabde41267 Merge pull request #2733 from jekyll/sass-in-liquid 2014-08-12 14:36:15 -04:00
Parker Moore
14b73667b8 Make default rake task a multitask so tests run in parallel. 2014-08-12 14:34:17 -04:00
Parker Moore
707278f099 Use the proper extname getter. 2014-08-12 14:11:27 -04:00
Parker Moore
a330bb0801 Update history to reflect merge of #2731 [ci skip] 2014-08-12 13:49:26 -04:00
Parker Moore
5c9eb324e8 Update history to reflect merge of #2731 [ci skip] 2014-08-12 13:47:45 -04:00
Parker Moore
ba63a2c6d1 Merge pull request #2731 from jekyll/doc-to_s 2014-08-12 13:47:32 -04:00
Parker Moore
8ff9074ce5 Allow Sass files to be rendered, but never place them in layouts.
Fixes #2573.
2014-08-12 13:38:53 -04:00
Parker Moore
db34c48927 Just like for Convertible, place the un-layouted content in document.content. 2014-08-12 12:52:38 -04:00
Parker Moore
5367bc3416 Update history to reflect merge of #2732 [ci skip] 2014-08-12 12:48:09 -04:00
Parker Moore
871e425fa0 Merge pull request #2732 from jekyll/type-should-be-similar-in-number 2014-08-12 12:46:42 -04:00
Parker Moore
90ec93373b Ensure the new type works. 2014-08-12 12:24:28 -04:00
Parker Moore
2fd155615f Forgot a question mark == broken tests. 2014-08-12 12:22:48 -04:00
Parker Moore
e36d433100 FrontmatterDefaults#update_deprecated_types deals with a set, not a scope 2014-08-12 12:22:39 -04:00
Parker Moore
9c090c862f Ask about 'Draft' before asking about 'Post'
`Draft`s are a subclass of `Post` so `draft.is_a?(Post)` will return
`true`, thus making all `Draft`s `Post`s, which is not desired. If
asking about `Draft` first, then we avoid this problem.

Fixes #2726
2014-08-12 11:52:16 -04:00
Parker Moore
60c29561f2 Use plural 'type' in front matter defaults for pages/posts/drafts
Fixes #2657
2014-08-12 11:50:02 -04:00
Parker Moore
d57c4f1c01 Document#to_s should produce just the content of the document.
Fixes #2655
2014-08-12 11:25:28 -04:00
Parker Moore
f190a960a1 Update history to reflect merge of #2722 [ci skip] 2014-08-12 11:20:20 -04:00
Parker Moore
1dcf241677 Merge pull request #2722 from jekyll/don-t-concat-extnames 2014-08-12 11:19:53 -04:00
Parker Moore
1de1ab9303 Update history to reflect merge of #2729 [ci skip] 2014-08-12 11:19:02 -04:00
Parker Moore
7b9d392d6f Merge pull request #2729 from jekyll/to_liquid_before_jsonify 2014-08-12 11:18:30 -04:00
Parker Moore
1666bbc52e Call #to_liquid before calling #to_json in jsonify filter. 2014-08-11 20:16:42 -04:00
Parker Moore
ebb4a4c1b6 Specify Ruby Dev Headers on Installation docs page.
Closes #2728
2014-08-11 17:55:21 -04:00
Parker Moore
fd2d7df9b7 Don't concat extnames in output for multiple converters 2014-08-10 20:32:29 -04:00
Parker Moore
8c0cd10b07 Update history to reflect merge of #2704 [ci skip] 2014-08-10 20:30:07 -04:00
Parker Moore
6f8b8816f5 Merge pull request #2704 from jekyll/mult-converters 2014-08-10 20:29:37 -04:00
Parker Moore
6470804a51 Update history to reflect merge of #2716 [ci skip] 2014-08-10 20:28:49 -04:00
Parker Moore
47b38cf9ee Merge pull request #2716 from jekyll/reform-watch 2014-08-10 20:28:38 -04:00
Parker Moore
e4b829da3b Update history to reflect merge of #2708 [ci skip] 2014-08-10 17:06:29 -04:00
Parker Moore
3ad202429c Merge pull request #2708 from felixkiss/patch-1 2014-08-10 17:05:58 -04:00
Parker Moore
fb02ce1e33 Update history to reflect merge of #2720 [ci skip] 2014-08-10 16:45:42 -04:00
Parker Moore
11373acb15 Merge pull request #2720 from jekyll/read-in-utf8 2014-08-10 16:45:11 -04:00
Parker Moore
9b3ccee3dd Pass in options to File.open in Document. 2014-08-10 16:23:33 -04:00
Parker Moore
f0e91b3667 Update history to reflect merge of #2719 [ci skip] 2014-08-10 16:19:19 -04:00
Parker Moore
966b22488c Merge pull request #2719 from pathawks/null-not-nil 2014-08-10 16:18:56 -04:00
Parker Moore
67da09e5e0 Update history to reflect merge of #2718 [ci skip] 2014-08-10 16:18:17 -04:00
Parker Moore
e5463b41f2 Merge pull request #2718 from jekyll/case-insensitive-extnames 2014-08-10 16:17:45 -04:00
Parker Moore
68fb130fd0 Add magic comments for UTF-8 2014-08-10 16:16:48 -04:00
Parker Moore
45a347c022 Read in every Document's content as UTF-8 2014-08-10 16:16:41 -04:00
Pat Hawks
b2eae2e676 Use null in YAML instead of nil 2014-08-10 13:05:23 -07:00
Parker Moore
29254150b1 Update history to reflect merge of #2717 [ci skip] 2014-08-10 16:00:23 -04:00
Parker Moore
d74b179ecd Merge pull request #2717 from hockeybuggy/fenced-paragraphs 2014-08-10 15:59:56 -04:00
Parker Moore
69cc414c1b Don't need to capture the group. 2014-08-10 15:44:36 -04:00
Parker Moore
533ed6eb38 Remove tests for the Command.ignored_paths method which now lives in jekyll-watch. 2014-08-10 14:46:06 -04:00
Parker Moore
3264766762 Use case-insensitive checking for the file extensions when loading config files. 2014-08-10 14:37:41 -04:00
Parker Moore
c7c1eddd47 It's called Jekyll::Watcher 2014-08-10 14:33:11 -04:00
Douglas Anderson
d0d8759c10 Removing indentation that was causing some paragraphs to be interpreted as code blocks 2014-08-10 13:51:42 -04:00
Parker Moore
1261c1cd66 Bump jekyll-watch version to 1.1. 2014-08-09 00:15:20 -04:00
Parker Moore
5a0c066845 Update history to reflect merge of #2707 [ci skip] 2014-08-09 00:13:59 -04:00
Parker Moore
d4fbf5c056 Merge pull request #2707 from jekyll/jekyll-help 2014-08-09 00:13:29 -04:00
Parker Moore
a2dfd6eddc Refactor based on jekyll-watch clean-up.
https://github.com/jekyll/jekyll-watch/pull/5
2014-08-09 00:13:18 -04:00
Felix Kiss
d452fa65ba Update continuous-integration.md
Fix typo
2014-08-07 03:26:42 -04:00
Parker Moore
939c67222a Check to make sure the command is valid. 2014-08-06 21:28:21 -04:00
Parker Moore
23515acc31 Slim down help command. 2014-08-06 21:20:39 -04:00
Parker Moore
a0f449d613 Add 'jekyll help' command.
Ref: #2695
2014-08-06 21:17:44 -04:00
Parker Moore
565bbada08 Update history to reflect merge of #2705 [ci skip] 2014-08-06 20:15:25 -04:00
Parker Moore
a0b30a9cc7 Merge pull request #2705 from bcomnes/dont_read_categories_from_path 2014-08-06 20:14:43 -04:00
Bret Comnes
311f3be63b Fixed ignore subir test. 2014-08-06 16:45:34 -07:00
Bret Comnes
f29884593b Reverted deleted test and modified ensure subdirs are ignored. 2014-08-06 16:05:53 -07:00
Bret Comnes
d0ac4915cb Reverts 18c033dc5c
The merge that is reverted assigned categories to posts
based on the subfolders in the _posts directory and 
was merged under the understanding that it was fixing a bug.

Subfolders in the _posts directory should not assign 
metadata information to posts at this point in time and 
was not a bug.
2014-08-06 14:20:03 -07:00
Parker Moore
d004bc4ea5 Allow Convertibles to be converted by >= 1 converters. 2014-08-06 16:20:24 -04:00
Parker Moore
b00c5e9587 Update history to reflect closing of #2456. [ci skip] 2014-08-06 16:02:22 -04:00
Parker Moore
229cedfc50 Reorganize and update default configuration settings. #2456. 2014-08-06 16:01:47 -04:00
Parker Moore
5796690827 Update history to reflect merge of #2682 [ci skip] 2014-08-06 15:31:20 -04:00
Parker Moore
cb671acd0c Merge pull request #2682 from alfredxing/date-parser-util 2014-08-06 15:30:02 -04:00
Parker Moore
85bd3836d0 Update history to reflect merge of #2688 [ci skip] 2014-08-06 15:29:43 -04:00
Parker Moore
a959c06e44 Merge pull request #2688 from barryclark/add_smashing_mag_tutorial_to_resources_page 2014-08-06 15:29:19 -04:00
Parker Moore
99a48499c7 Update history to reflect merge of #2693 [ci skip] 2014-08-06 15:28:32 -04:00
Parker Moore
21b6a01980 Merge pull request #2693 from ivantsepp/2142_partial_liquid_output_tag_in_include_tag 2014-08-06 15:28:07 -04:00
Parker Moore
df91299550 Update history to reflect merge of #2696 [ci skip] 2014-08-06 15:27:26 -04:00
Parker Moore
5eacc9e831 Merge pull request #2696 from jekyll/jekyll-autogeneration-disabled 2014-08-06 15:27:16 -04:00
Parker Moore
9e679e7d4a Update history to reflect merge of #2687 [ci skip] 2014-08-06 15:24:16 -04:00
Parker Moore
f0105158bf Merge pull request #2687 from kleinfreund/sassify_site_template 2014-08-06 15:24:01 -04:00
kleinfreund
8999df2f46 Adding markdown setting back to _config.yml 2014-08-06 21:12:36 +02:00
kleinfreund
441a2496b8 Usind 3 instead of 7 SCSS files now 2014-08-06 19:20:06 +02:00
kleinfreund
e5a7f842be Add sentence about jekyll-help repo 2014-08-06 19:11:36 +02:00
kleinfreund
7f92e7ce00 Reverting back to using content box and calc 2014-08-06 11:08:28 +02:00
Parker Moore
b3069c0802 Update history to reflect merge of #2697 [ci skip] 2014-08-05 17:02:03 -04:00
Parker Moore
f39c2610ee Merge pull request #2697 from jekyll/classifier-fix 2014-08-05 17:01:50 -04:00
Parker Moore
4c4f803df2 Remove preemptive loading of the 'classifier' gem. 2014-08-05 16:47:30 -04:00
Parker Moore
a27313b1d0 Use helper method #deprecation_message in Deprecator.no_subcommand. 2014-08-05 16:43:38 -04:00
Parker Moore
9fd872e7b8 Notify the user when auto-regeneration is disabled. 2014-08-05 15:55:43 -04:00
Parker Moore
6ca8baa572 Update history to reflect merge of #2694 [ci skip] 2014-08-05 15:02:24 -04:00
Parker Moore
018390cf64 Merge pull request #2694 from MartinSeeler/patch-1 2014-08-05 15:01:53 -04:00
Martin Seeler
13425266eb Fixed Typo in error message 2014-08-05 15:37:09 +02:00
kleinfreund
738dd502b4 Adding fill attribute to SVG's as fallback 2014-08-05 09:46:39 +02:00
Ivan Tse
0594adb8fd Allow VARIABLE_SYNTAX to collect partial variables 2014-08-05 01:04:36 -04:00
Ivan Tse
83f726f503 Add tests for include tag with partial variables 2014-08-05 01:04:20 -04:00
Parker Moore
36006fa68a Update history to reflect merge of #2689 [ci skip] 2014-08-04 22:05:38 -04:00
Parker Moore
a49244f4dd Merge pull request #2689 from minad/patch-1 2014-08-04 22:05:04 -04:00
kleinfreund
020f684093 Adjusting heading hierarchy to reflect site-title change 2014-08-04 09:42:46 +02:00
kleinfreund
101d614351 Removing h1 from site-title 2014-08-04 09:35:18 +02:00
Barry Clark
af1cc06184 blockquote needs spaces before it 2014-08-03 19:14:39 -04:00
Barry Clark
d1b9dfc6c9 Adds Smashing Magazine tutorial to resources page 2014-08-03 18:51:36 -04:00
kleinfreund
d8c330b215 Removing unused column class 2014-08-03 23:15:22 +02:00
kleinfreund
e4029426de Adding and using media-query mixin 2014-08-03 23:07:47 +02:00
kleinfreund
7d865269fd Replacing CSS comments with Sass comments 2014-08-03 23:06:59 +02:00
kleinfreund
b24b870ec6 Update welcome post to clarify front matter usage 2014-08-03 23:06:14 +02:00
kleinfreund
74974979ba Reworking site template to utilize Sass 2014-08-03 19:35:43 +02:00
Daniel Mendler
4336e8e4b9 Link to jekyll-slim
Link to https://github.com/slim-template/jekyll-slim
2014-08-03 02:03:14 +02:00
Alfred Xing
c7f8c70935 Add tests for Utils.parse_date method 2014-08-02 15:03:31 -07:00
Alfred Xing
4cfbdb07bb Show input in error message
Show date input in error message to make it easier for user
to find infringing date/file
2014-08-02 11:51:04 -07:00
Parker Moore
3e98860241 Update history to reflect merge of #2615 [ci skip] 2014-08-02 14:45:01 -04:00
Parker Moore
81807cb5af Merge pull request #2615 from alfredxing/collections-static-files 2014-08-02 14:44:45 -04:00
Alfred Xing
d5322a73bf Move instances of Time.parse into a Utils method 2014-08-02 09:38:50 -07:00
Alfred Xing
bd59fa14f3 Add tests for static files in collections 2014-08-02 09:00:03 -07:00
Alfred Xing
5fdf637c6a Cache information about document YAML header existence 2014-08-01 22:03:29 -07:00
Parker Moore
9a6dc7b520 Update history to reflect merge of #2649 [ci skip] 2014-08-02 00:09:18 -04:00
Parker Moore
e75dc74bb1 Merge pull request #2649 from alfredxing/friendly-date-error 2014-08-02 00:06:20 -04:00
Parker Moore
ea7e8951d8 Update history to reflect merge of #2680 [ci skip] 2014-08-02 00:05:26 -04:00
Parker Moore
b906bff832 Merge pull request #2680 from jekyll/no-pretty 2014-08-02 00:05:03 -04:00
Parker Moore
e44cfe29a8 No longer set "permalink: pretty" in the _config.yml for the site template
This causes unintuitive behaviour that doesn’t align with the
documentation.

Fixes #2399.
2014-08-02 00:01:59 -04:00
Alfred Xing
989d5d357b Use relative_path in error message instead of path 2014-08-01 21:00:17 -07:00
Alfred Xing
f8c19df79a Add friendly error message for invalid dates
Catch the `ArgumentError` when parsing dates from the YAML front
matter
2014-08-01 21:00:17 -07:00
Parker Moore
02b60d6d00 Add helpful comments to site template _config.yml 2014-08-01 23:59:57 -04:00
Parker Moore
cfe9983741 Update history to reflect merge of #2664 [ci skip] 2014-08-01 23:28:22 -04:00
Parker Moore
4ca3fe5137 Merge pull request #2664 from alfredxing/replace-deprecated-methods 2014-08-01 23:27:58 -04:00
Parker Moore
8db8b19ea0 Update history to reflect merge of #2673 [ci skip] 2014-08-01 23:27:42 -04:00
Parker Moore
503e54779a Merge pull request #2673 from lucianosousa/patch-1 2014-08-01 23:27:13 -04:00
Parker Moore
fd0c1f2273 Update history to reflect merge of #2679 [ci skip] 2014-08-01 23:18:42 -04:00
Parker Moore
36996107e1 Merge pull request #2679 from budparr/master 2014-08-01 23:18:00 -04:00
Bud Parr
cf2fe606a6 fix quote 2014-08-01 22:50:14 -04:00
Bud Parr
27f2d75d88 change links from Markdown to HTML 2014-08-01 22:44:38 -04:00
Alfred Xing
a902fefed5 Add blank frontmatter to feature test 2014-08-01 13:24:27 -07:00
Alfred Xing
274c6d3667 Allow static files in collections
Allow Documents to be static files so static files can exist in collections
2014-08-01 13:24:27 -07:00
Parker Moore
99f99169a4 Add quick troubleshooting docs for 'Could not find a JavaScript runtime.'
Fixes #2327.
2014-08-01 14:20:29 -04:00
Parker Moore
1c8ae63ec3 Update site history. 2014-08-01 14:19:48 -04:00
Parker Moore
da98869327 Update history to reflect merge of #2669 [ci skip] 2014-08-01 14:16:12 -04:00
Parker Moore
cf44052b0f Merge pull request #2669 from budparr/master 2014-08-01 14:15:50 -04:00
Parker Moore
febf2ea3cf Explain where Main files go and whereone can find an example site. 2014-08-01 14:13:44 -04:00
Parker Moore
df9c2f8371 Update history to reflect merge of #2674 [ci skip] 2014-08-01 13:48:31 -04:00
Parker Moore
b63d113fe0 Merge pull request #2674 from kleinfreund/master 2014-08-01 13:48:18 -04:00
Parker Moore
7f5e04980c Update history to reflect merge of #2659 [ci skip] 2014-08-01 13:47:54 -04:00
Parker Moore
bc3b82850d Merge pull request #2659 from alfredxing/front-matter-defaults-defaults 2014-08-01 13:47:42 -04:00
Alfred Xing
89e45afcc1 Add tests for front matter defaults 2014-08-01 10:28:53 -07:00
Parker Moore
7e2298b8d0 Update history to reflect merge of #2667 [ci skip] 2014-08-01 13:17:36 -04:00
Parker Moore
96b1778434 Merge pull request #2667 from jekyll/use-page 2014-08-01 13:17:17 -04:00
Parker Moore
5fc3361720 Update history to reflect merge of #2672 [ci skip] 2014-08-01 13:12:48 -04:00
Parker Moore
d8bb7f7ad7 Merge pull request #2672 from alfredxing/fix-ci-git-diff 2014-08-01 13:12:27 -04:00
Alfred Xing
ff14d7b853 Fix git diff command in CI script 2014-08-01 09:08:20 -07:00
kleinfreund
650d78c2cf Fixing anchor references to #front-matter-defaults 2014-08-01 10:54:23 +02:00
kleinfreund
0ed02e9c1e Replacing front-matter/frontmatter with front matter 2014-08-01 10:07:09 +02:00
Luciano Sousa
33cd956e4e improving strftime call
set non padded config to avoid parse string type twice
2014-08-01 00:02:41 -03:00
Parker Moore
413e22ce2b Don't include test_files in gemspec. #2671. 2014-07-31 20:22:38 -04:00
Parker Moore
579a18c93b Update history to reflect merge of #2671 [ci skip] 2014-07-31 20:13:28 -04:00
Parker Moore
f6682de390 Merge pull request #2671 from gjtorikian/patch-1 2014-07-31 20:13:16 -04:00
Garen Torikian
470d3a2a23 Update to a better, more gitty way 2014-07-31 16:04:55 -07:00
Bud Parr
1d669ed34b add back info class 2014-07-31 19:00:56 -04:00
Garen Torikian
8dd54b9ec3 Only include lib files in the gem
Resolves https://github.com/jekyll/jekyll/issues/2670
2014-07-31 16:00:11 -07:00
Bud Parr
cf94820e1a fix warning flag (move from wrong note) 2014-07-31 18:37:50 -04:00
Parker Moore
3f6b8468f2 Update history to reflect closing of #2522. 2014-07-31 18:29:34 -04:00
Parker Moore
d050fd11b5 Be more ambiguous about 'page.content'. But more transparent.
Fixes #2522.
2014-07-31 18:29:03 -04:00
Parker Moore
9ccbfa0bae Fix broken links now that docs is a collection in site. 2014-07-31 18:21:43 -04:00
Parker Moore
f57f1c7eef Use .scss for site_template styles. 2014-07-31 17:59:27 -04:00
Bud Parr
d8a7d770b4 add warning flag to note 2014-07-31 17:54:56 -04:00
Alfred Xing
6d62dbbafc Replace deprecated Ruby methods
Replace `Hash#has_key?` and `File.exists?` with `Hash#key?`
and `File.exist?`
2014-07-31 12:50:20 -07:00
Alfred Xing
9437a7abcd Don't require the scope key in front matter defaults
Set defaults for `scope` in front matter defaults as per #2656
2014-07-31 11:17:35 -07:00
Parker Moore
2642bd7415 chdir into site/_docs to update history. [ci skip] 2014-07-31 04:50:30 -04:00
Parker Moore
30da34358b Update history to reflect merge of #2651 [ci skip] 2014-07-31 04:48:22 -04:00
Parker Moore
ab4b05127e Merge pull request #2651 from jekyll/site-on-2-0 2014-07-31 04:48:00 -04:00
Parker Moore
2953a7c663 Rearrange _config.yml 2014-07-31 04:43:33 -04:00
Parker Moore
b53b4a5e5a Move to Sass. 2014-07-31 04:40:07 -04:00
Parker Moore
e57cd0031d Use site.docs instead of site.pages. 2014-07-31 04:34:38 -04:00
Parker Moore
03bca72af6 Release 2.2.0 2014-07-29 19:23:00 -04:00
Parker Moore
2d3d65a930 Always run the full test suite. 2014-07-29 19:08:40 -04:00
Parker Moore
5767346e9d Merge pull request #2643 from jekyll/v2-2-0-release 2014-07-29 19:06:19 -04:00
Parker Moore
dc894e41af Prep for v2.2.0 release. 2014-07-29 19:02:51 -04:00
Parker Moore
5f828c6c2e Fix spelling error. [ci skip] 2014-07-29 17:34:51 -04:00
Parker Moore
2045984cee Update history to reflect merge of #2642 [ci skip] 2014-07-29 17:34:32 -04:00
Parker Moore
4df274f96d Merge pull request #2642 from jekyll/pygments-opts-sanitize 2014-07-29 17:33:34 -04:00
Parker Moore
ee5828b2f7 Try to clarify the way sass imports happen.
/cc @mrzool
https://github.com/jekyll/jekyll-help/issues/104
2014-07-29 17:32:36 -04:00
Parker Moore
3cb2e74b5c Add further testing for Highlight#sanitized_opts 2014-07-29 16:30:44 -04:00
Parker Moore
a4c9925e99 Whitelist three Pygments options.
- startinline
- hl_lines
- linenos
2014-07-29 14:20:49 -04:00
Parker Moore
502f7991ad Update history to reflect merge of #2620 [ci skip] 2014-07-29 00:12:00 -04:00
Parker Moore
592afc270e Merge pull request #2620 from alfredxing/warn-on-layout-nonexistent 2014-07-29 00:11:41 -04:00
Alfred Xing
2785d702e2 Remove 'none' as a valid layout 2014-07-28 18:35:47 -07:00
Parker Moore
0fbdc69440 Update history to reflect merge of #2639 [ci skip] 2014-07-28 16:21:09 -04:00
Parker Moore
c99af68967 Merge pull request #2639 from wdenton/add-co2-plugin-to-docs 2014-07-28 16:20:38 -04:00
William Denton
56a82b1e8a Move to "other" section 2014-07-28 12:21:01 -04:00
William Denton
e9ae079fc3 Add jekyll-co2 plugin to list 2014-07-28 12:18:35 -04:00
Parker Moore
fab2b1d3a0 Update history to reflect merge of #2633 [ci skip] 2014-07-26 22:15:28 -04:00
Parker Moore
18c033dc5c Merge pull request #2633 from redox/read_categories_from_path 2014-07-26 22:14:40 -04:00
Sylvain UTARD
592630d48c Do not forget to downcase the categories here as well 2014-07-27 00:29:31 +02:00
Parker Moore
d2aa8dcc43 Actually print properly. 2014-07-25 15:18:55 -04:00
Parker Moore
9b107a129a gcnovus and bahuvrihi no longer exist on GitHub. 2014-07-24 15:21:36 -04:00
Parker Moore
10d6dcc4a9 Fix link to Jekyll v1.0.0 release post.
What are timezones.
2014-07-24 15:18:25 -04:00
Sylvain UTARD
16dbe54560 When using subdirs to reflect categories, the underlying categories attribute was not set 2014-07-24 18:59:26 +02:00
Parker Moore
812c0e9281 Fix post_url in 2.0.0 release post. [ci skip] 2014-07-23 17:20:37 -04:00
Parker Moore
7c021657e1 Try removing the timezone altogether. [ci skip] 2014-07-23 17:13:42 -04:00
Parker Moore
5dff30d90c Go back to UTC. 2014-07-23 17:12:29 -04:00
Parker Moore
3cc1b56810 Add jekyll-hook to deployment methods.
Port of #2617 to the master branch.
2014-07-23 16:58:34 -04:00
Parker Moore
fea4af0e63 Update history to reflect merge of #2625 [ci skip] 2014-07-22 17:23:44 -04:00
Parker Moore
a776fdabb9 Merge pull request #2625 from fw42/remove_unnecessary_blank_method 2014-07-22 17:23:16 -04:00
Florian Weingarten
2eb57279fe Remove unnecessary Jekyll::Tags::IncludeTag#blank? method 2014-07-22 21:06:43 +00:00
Parker Moore
863ae5652f Update history to reflect merge of #2622 [ci skip] 2014-07-22 10:40:22 -04:00
Parker Moore
d0faba12a3 Merge pull request #2622 from alfredxing/fix-markdown-docs 2014-07-22 10:39:50 -04:00
Parker Moore
63991822e7 Update history to reflect merge of #2623 [ci skip] 2014-07-22 10:33:36 -04:00
Parker Moore
1404e041e8 Merge pull request #2623 from mvdbos/master 2014-07-22 10:33:10 -04:00
Parker Moore
55d78f3c9f Update the history I guess. 2014-07-22 10:32:57 -04:00
Matthijs van den Bos
e9f427c75b Added kramdown-with-pygments plugin
This plugin enables Pygments syntax highlighting for Kramdown-parsed fenced code blocks
2014-07-22 12:23:35 +02:00
Alfred Xing
a661cd8295 Remove resolved RedCloth issue from troubleshooting 2014-07-21 11:38:04 -07:00
Alfred Xing
1be83e4e33 Fix URL
Copy & paste error introduced a `.dev` local domain; change
to a relative path instead
2014-07-21 11:12:57 -07:00
Alfred Xing
9109495894 Update outdated "Extras" page and remove duplicate documentation 2014-07-21 10:58:57 -07:00
Alfred Xing
7586538432 Use is_a? instead of class 2014-07-21 09:23:21 -07:00
Alfred Xing
4bd5614f4c Exclude excerpts from layout checks 2014-07-20 12:57:40 -07:00
Alfred Xing
c8e0fcfcdf Fix up errors in CI build 2014-07-20 12:56:54 -07:00
Alfred Xing
7fa30c0dec Add path of file requesting nonexistent layout 2014-07-20 12:17:04 -07:00
Alfred Xing
a0d679439f Move layout validity logic to separate method 2014-07-20 10:01:09 -07:00
Alfred Xing
072ddb799f Do the same for documents 2014-07-20 09:18:35 -07:00
Alfred Xing
ac744a6313 Give a build warning if a layout does not exist
Throw a warning if a non-"none" layout is specified but the corresponding
layout file does not exist.
2014-07-20 09:17:19 -07:00
Parker Moore
c8b22a19ad Update history to reflect merge of #2617 [ci skip] 2014-07-18 14:12:59 -04:00
Parker Moore
a262ea02d9 THOSE LINKS THO 2014-07-17 02:18:41 -04:00
Parker Moore
de9c591ffc Run travis tests if TRAVIS_PULL_REQUEST is set and set to a number. 2014-07-16 19:46:25 -04:00
Parker Moore
70e535bee3 Update history to reflect merge of #2611 [ci skip] 2014-07-16 18:59:00 -04:00
Parker Moore
749def2ef5 Merge pull request #2611 from alfredxing/delete-rubyforge-links 2014-07-16 18:58:27 -04:00
Alfred Xing
c0750c1a3f Fix rest of broken links 2014-07-16 14:43:43 -07:00
Alfred Xing
475e08bba3 Replace all RubyForge links with new residences 2014-07-16 13:43:09 -07:00
Parker Moore
2a1e7cb5c9 Update history to reflect merge of #2610 [ci skip] 2014-07-16 16:14:29 -04:00
Parker Moore
c4ae4aee2b Merge pull request #2610 from alfredxing/proof-use-bundle-exec 2014-07-16 16:14:14 -04:00
Alfred Xing
8e3ad082e2 Add set -e to top of proof and cibuild
Exit immediately on any non-zero exit code
2014-07-16 13:13:45 -07:00
Alfred Xing
b48123c1e1 We need to use bundle exec jekyll in script/proof 2014-07-16 13:08:27 -07:00
Parker Moore
aa3b001a04 Update history to reflect merge of #2608 [ci skip] 2014-07-16 15:24:43 -04:00
Parker Moore
c0707844e6 Merge pull request #2608 from alfredxing/fix-proof-grep 2014-07-16 15:24:18 -04:00
Alfred Xing
bf465cd904 Fix grep pattern in script/test as well 2014-07-16 11:17:19 -07:00
Alfred Xing
d8140f4142 Fix up grep pattern
Change from `^/site` to `^site/`
2014-07-16 11:03:26 -07:00
Parker Moore
e6698fc65a Run bundle exec rake tho. 2014-07-15 21:57:33 -04:00
Parker Moore
ab66326f97 Cleaning up the cibuild stuff. 2014-07-15 21:53:50 -04:00
Parker Moore
9d07a97945 Update history to reflect merge of #2605 [ci skip] 2014-07-15 21:44:02 -04:00
Parker Moore
86cbffbae0 Merge pull request #2605 from alfredxing/proof-site 2014-07-15 21:43:17 -04:00
Alfred Xing
10d4e023c8 Simpler way to install nokogiri with system extensions 2014-07-15 17:05:59 -07:00
Alfred Xing
51c7757543 Uncomment the exit 2014-07-15 17:02:11 -07:00
Alfred Xing
27f307b428 Proof site with html-proofer
Proof site with html-proofer when the site directory is changed
2014-07-15 17:01:36 -07:00
Alfred Xing
a92fe17ae0 Add script/proof to cibuild 2014-07-15 16:27:53 -07:00
Parker Moore
275a2e79ee Update history to reflect merge of #2601 [ci skip] 2014-07-15 15:41:58 -04:00
Parker Moore
7f48331ed4 Merge pull request #2601 from alfredxing/master 2014-07-15 11:47:37 -04:00
Parker Moore
e511550c91 Add slugs to the release sub headers, too! 2014-07-15 11:31:43 -04:00
Parker Moore
7f68b471aa Add ids to history blocks which are useful. 2014-07-15 10:51:20 -04:00
Alfred Xing
73893a921c Fix loads of other broken links 2014-07-14 16:36:52 -07:00
Alfred Xing
70ca41dd44 Fix Textile link
Fix broken link to Textile site to point to RedCloth
2014-07-14 16:36:31 -07:00
Parker Moore
22af1f07bf Update history to reflect merge of #2596 [ci skip] 2014-07-14 14:40:43 -04:00
Parker Moore
cfecc151d9 Merge pull request #2596 from ivantsepp/add_ivantsepp_plugins 2014-07-14 14:40:08 -04:00
Ivan Tse
fde3a02b71 Add Jekyll::AutolinkEmail and Jekyll::GitMetadata
Add these plugins to the list of plugins.
2014-07-14 04:35:09 -04:00
Parker Moore
56b0582272 Update history to reflect merge of #2584 [ci skip] 2014-07-13 00:11:10 -04:00
Parker Moore
b67dae1f65 Merge pull request #2584 from yous/patch-categories-feature 2014-07-13 00:10:01 -04:00
Parker Moore
d1057e821a Update history to reflect merge of #2591 [ci skip] 2014-07-12 19:22:31 -05:00
Parker Moore
5314bbf952 Merge pull request #2591 from jekyll/extract-list 2014-07-12 19:22:10 -05:00
Parker Moore
c7cc36abdb Put errors/exceptions into Jekyll::Errors module 2014-07-12 13:47:59 -07:00
Parker Moore
a97ae67552 Gracefully require 2014-07-12 13:46:49 -07:00
Parker Moore
4cc6a0f263 Mark certain gems as eventually-non-core. 2014-07-12 13:08:35 -07:00
Parker Moore
04d744fda3 Updated site history 2014-07-12 10:10:59 -07:00
Parker Moore
4b67c31277 Update history to reflect merge of #2588 [ci skip] 2014-07-12 10:10:33 -07:00
Parker Moore
84e0b1c904 Merge pull request #2588 from raboof/patch-2 2014-07-12 10:09:30 -07:00
Arnout Engelen
61a8512805 fix kramdown urls 2014-07-12 18:47:56 +02:00
Parker Moore
08a4c02d38 Release 2.1.1 2014-07-10 09:54:44 -07:00
Parker Moore
1cbff6b771 Merge pull request #2564 from jekyll/release-2-1-1 2014-07-10 09:44:17 -07:00
Parker Moore
9df9edc4c7 Finished the Jekyll 2.1.1 release post. [ci skip] 2014-07-10 09:43:55 -07:00
Parker Moore
685cdbe124 Release Jekyll v2.1.1 2014-07-10 09:40:36 -07:00
ChaYoung You
2716f65010 Add tests for duplicated categories 2014-07-10 18:03:50 +09:00
ChaYoung You
8006024715 Add missed tests for categories 2014-07-10 18:03:41 +09:00
ChaYoung You
2616a4cf5e Replace duplicated category feature with categories 2014-07-10 17:44:51 +09:00
Parker Moore
57a9deb98d Update history to reflect merge of #2576 [ci skip] 2014-07-09 23:44:26 -07:00
Parker Moore
ece22497dd Merge pull request #2576 from bhollis/maruku-update 2014-07-09 23:44:03 -07:00
Parker Moore
fb170007c8 Update history to reflect merge of #2575 [ci skip] 2014-07-09 23:43:47 -07:00
Parker Moore
36c5017300 Merge pull request #2575 from alfredxing/test-document-permalink 2014-07-09 23:43:01 -07:00
Parker Moore
e8e245e20f Fix Data Files example around iterative over files in a subfolder of _data.
Addresses @fkostadinov's comment in #2395:
https://github.com/jekyll/jekyll/pull/2395#issuecomment-48151478
2014-07-09 08:24:33 -07:00
Parker Moore
2141ea6564 Update history to reflect merge of #2578 [ci skip] 2014-07-08 23:16:58 -07:00
Parker Moore
d3959d5899 Merge pull request #2578 from juthilo/patch-1 2014-07-08 23:16:37 -07:00
Ben Hollis
cbb4b10ce6 Update Maruku dependency to allow use of the latest version.
All Maruku releases post-0.6 follow semver, so they should be backwards-compatible on minor versions. In this case, the only test that needed to change was one that was asserting buggy behavior that was fixed in 0.7.1.
2014-07-08 19:44:40 -07:00
Julian Thilo
861c81b590 Update link to Windows installation guide
I've just released a new version of Run Jekyll on Windows and it's now got its own domain!
2014-07-09 01:44:11 +02:00
Alfred Xing
28131624b8 Don't use old @url variable
Fix for #2557
2014-07-07 10:54:19 -07:00
Alfred Xing
ce1f01c494 Modify tests a bit 2014-07-07 10:49:36 -07:00
Alfred Xing
a13a4ca532 Solidify document permalink tests 2014-07-07 10:39:22 -07:00
Alfred Xing
f830120044 Add test for document permalink 2014-07-07 10:28:03 -07:00
Parker Moore
7645a72b2f Update history to reflect merge of #2572 [ci skip] 2014-07-05 13:46:14 -07:00
Parker Moore
ff8a8b8302 Merge pull request #2572 from AJ-Acevedo/master 2014-07-05 13:44:58 -07:00
AJ Acevedo
a7cc026e2c Fixed broken link to Permalinks page [ci skip]
The Permalinks link was generating a 404 error due to the link using a capital P in the link path.
2014-07-05 14:20:30 -04:00
Parker Moore
c78bf2775f Update history to reflect merge of #2567 [ci skip] 2014-07-04 03:19:41 -04:00
Parker Moore
0082bb22fb Merge pull request #2567 from austinpray/beefUpDox 2014-07-04 03:19:09 -04:00
Austin Pray
febf80cccd Merge branch 'master' of github.com:jekyll/jekyll into beefUpDox 2014-07-03 10:36:16 -05:00
Parker Moore
4d8dab6e33 Update history to reflect merge of #2563 [ci skip] 2014-07-01 20:15:54 -04:00
Parker Moore
f385fd9efd Merge pull request #2563 from jekyll/fix-read-vuln 2014-07-01 20:14:45 -04:00
Parker Moore
a66d96ce0a Use Jekyll.sanitized_path more. 2014-07-01 18:29:15 -04:00
Ben Balter
05f1fac2a7 Add feature for layouts vuln. 2014-07-01 18:29:01 -04:00
Parker Moore
03ae38a41e Merge pull request #2561 from jshawl/fix-typo
Fix typo
2014-06-30 14:12:17 -04:00
Jesse Shawl
fbb8c056d4 Fix typo 2014-06-30 13:26:22 -04:00
Parker Moore
0e68d34e1b Update history to reflect merge of #2558 [ci skip] 2014-06-29 02:52:49 -04:00
Parker Moore
a62027d5f3 Merge pull request #2558 from kleinfreund/patch-1 2014-06-29 02:52:19 -04:00
Philipp Rudloff
db38498d06 Add vertical margin to highlight
…so multiple code blocks are distinctive.
2014-06-29 08:41:59 +02:00
Parker Moore
af11f66646 Minor improvements to the rakefile. 2014-06-28 22:49:03 -04:00
Parker Moore
2a422e1d83 Add contributor list to 2.1.0 release post.
I forgot! I'm really sorry!
2014-06-28 22:48:44 -04:00
Parker Moore
f463aea399 Release 2.1.0 2014-06-28 22:27:57 -04:00
Parker Moore
f93da3cfb1 Add 3 more lines to 2.1.0 release post. 2014-06-28 21:54:56 -04:00
Parker Moore
253b10818c add #2554 to history on site 2014-06-28 21:38:17 -04:00
Parker Moore
2c0e086761 Update history to reflect merge of #2554 [ci skip] 2014-06-28 21:37:59 -04:00
Parker Moore
8882f4dd14 Merge pull request #2554 from alfredxing/fix-build-tomdoc 2014-06-28 21:37:25 -04:00
Parker Moore
2cf76cb701 Merge pull request #2553 from jekyll/release-2.1.0
Release 2.1.0
2014-06-28 21:37:01 -04:00
Alfred Xing
bb9517b73f Fill in a bit of missing TomDoc
Fill in a piece of missing doc for the `build` function in `commands/build.rb`
2014-06-28 17:48:19 -07:00
Parker Moore
f681b35b65 Booooom, 2.1.0 in history on site. 2014-06-28 17:42:53 -04:00
Parker Moore
8c5d36f0ee update history to reflect release of 2.1.0 2014-06-28 17:42:33 -04:00
Parker Moore
08d0ff0922 Bump version in gem. 2014-06-28 17:41:29 -04:00
Parker Moore
e5683b1da5 Release post for 2.1.0 2014-06-28 17:41:22 -04:00
Parker Moore
3dffa8284f Update history to reflect closing of #2520. 2014-06-28 17:20:09 -04:00
Parker Moore
e332197660 Be quiet very quickly. Fixes #2520. 2014-06-28 17:19:40 -04:00
Parker Moore
8b36b71833 Update history to reflect merge of #2552 [ci skip] 2014-06-28 16:59:08 -04:00
Parker Moore
7eb5e07e9d Merge pull request #2552 from jekyll/collections-with-dots 2014-06-28 16:58:11 -04:00
Parker Moore
0b9eb3c111 Ensure collections with dots work. 2014-06-28 16:51:44 -04:00
Parker Moore
5f7a3f2b69 Filter out directories from entries in the collection 2014-06-28 16:51:30 -04:00
Parker Moore
02676572dd Allow dots in collection labels. 2014-06-28 16:51:19 -04:00
Parker Moore
404661fc72 You need NodeJS in order to install jekyll-coffeescript. 2014-06-28 16:09:19 -04:00
Parker Moore
5c3f013325 Upgrade to jekyll-watch 1.0. 2014-06-27 17:52:54 -04:00
Parker Moore
ea4aa4f149 Update history to reflect merge of #2550 [ci skip] 2014-06-27 17:51:16 -04:00
Parker Moore
0c8fc63b33 Merge pull request #2550 from jekyll/extract-watch 2014-06-27 17:50:51 -04:00
Parker Moore
c239746363 Use bundle exec in CI guide. [ci skip]
h/t @ndarville
Ref: #2432
2014-06-27 17:10:06 -04:00
Parker Moore
12b47cc037 Spike out jekyll <cmd> --watch into a separate gem. 2014-06-27 16:41:10 -04:00
Parker Moore
2c636086bd Update history to reflect merge of #2432 [ci skip] 2014-06-27 16:40:02 -04:00
Parker Moore
6a7386e6ba Merge pull request #2432 from jekyll/docs-4-ci 2014-06-27 16:39:19 -04:00
Parker Moore
21ab9f8b9e Speak English good. h/t @gjtorikian 2014-06-27 16:35:21 -04:00
Parker Moore
eab113e4f5 html-proof ~> htmlproof 2014-06-27 15:43:37 -04:00
Parker Moore
bd4a8c1ce2 Fixes, fixes. 2014-06-27 15:32:16 -04:00
Parker Moore
e2de7ab0c7 Finish CI guide. 2014-06-27 15:25:33 -04:00
Parker Moore
a6e80b2bc1 Update history to reflect merge of #2547 [ci skip] 2014-06-27 03:56:39 -04:00
Parker Moore
3f5a55e240 Merge pull request #2547 from penibelst/docs-url 2014-06-27 03:56:23 -04:00
Parker Moore
b79be6d320 updates to CI page. [ci skip] 2014-06-27 03:53:41 -04:00
Anatol Broder
60bb78e25b Remove wrong statement 2014-06-27 09:44:39 +02:00
Parker Moore
281fb549f8 Update history to reflect merge of #2542 [ci skip] 2014-06-25 16:56:49 -04:00
Parker Moore
d16f62cb38 Ensure exclude and include arrays are arrays of strings.
Fixes #2542.
2014-06-25 16:56:27 -04:00
Parker Moore
912bd84629 A little more work. 2014-06-25 16:17:42 -04:00
Anatol Broder
d77078518d Add new page 2014-06-25 16:17:42 -04:00
Parker Moore
e310af00b4 Update history to reflect merge of #2532 [ci skip] 2014-06-25 16:14:56 -04:00
Parker Moore
cedbdf43ca Merge pull request #2532 from alexmedearis/hl_lines 2014-06-25 16:14:14 -04:00
Parker Moore
911559fe05 Update history to reflect merge of #2544 [ci skip] 2014-06-25 16:13:58 -04:00
Parker Moore
c958eae551 Merge pull request #2544 from mikecole/patch-2 2014-06-25 16:13:31 -04:00
mikecole
053ba9a9ca Provide an updated, more comprehensive link...
to Windows installation instructions.
2014-06-25 13:50:07 -05:00
Parker Moore
c5aa74f823 Update history to reflect merge of #2490 [ci skip] 2014-06-24 23:04:53 -04:00
Parker Moore
20180923cf Merge pull request #2490 from penibelst/deep-defaults 2014-06-24 23:04:38 -04:00
Parker Moore
6e104c3ed0 Ensure the post categories are unique (only one). Ref: #2527 #2531
h/t @Nicholas-Perry
https://github.com/jekyll/jekyll/issues/2527#issuecomment-47041756
2014-06-24 19:15:02 -04:00
Anatol Broder
880a503094 Add a test 2014-06-24 20:27:01 +02:00
Anatol Broder
edbc273829 Use Utils.deep_merge_hashes 2014-06-24 20:24:26 +02:00
Anatol Broder
5f807e7421 Merge deep 2014-06-24 20:20:15 +02:00
Parker Moore
579d9fc813 Update history to reflect merge of #2477 [ci skip] 2014-06-23 19:11:17 -04:00
Parker Moore
dc074fcc50 Merge pull request #2477 from jekyll/serve-skip-initial-build 2014-06-23 19:06:10 -04:00
Parker Moore
5d95267c4a Update history to reflect merge of #2495 [ci skip] 2014-06-23 19:04:40 -04:00
Parker Moore
69fdd45459 Merge pull request #2495 from jekyll/latest-liquid 2014-06-23 19:04:19 -04:00
Parker Moore
d3370bf596 Update history to reflect merge of #2493 [ci skip] 2014-06-23 19:03:50 -04:00
Parker Moore
d359c63018 Merge pull request #2493 from jekyll/fix-sort 2014-06-23 19:02:54 -04:00
Parker Moore
a9376f0a41 Update history to reflect merge of #2511 [ci skip] 2014-06-23 19:01:55 -04:00
Parker Moore
e75dcc18f1 Merge pull request #2511 from denilsonsa/patch-1 2014-06-23 19:01:31 -04:00
Parker Moore
7da0cfd0d8 Update history to reflect merge of #2524 [ci skip] 2014-06-23 19:00:38 -04:00
Parker Moore
b0e51e2cba Merge pull request #2524 from jekyll/all-html-files 2014-06-23 18:59:57 -04:00
Parker Moore
a762956000 Update history to reflect merge of #2531 [ci skip] 2014-06-23 18:59:10 -04:00
Parker Moore
e58c1ee306 Merge pull request #2531 from jekyll/merge-post-categories 2014-06-23 18:58:51 -04:00
Parker Moore
fd3ceb60c8 Update history to reflect merge of #2535 [ci skip] 2014-06-23 18:56:04 -04:00
Parker Moore
4c04420a51 Merge pull request #2535 from simonsarris/master 2014-06-23 18:54:11 -04:00
Parker Moore
e345ceb01a Update history to reflect merge of #2536 [ci skip] 2014-06-21 12:56:09 -04:00
Parker Moore
f3e4157698 Merge pull request #2536 from letuboy/master 2014-06-21 12:55:37 -04:00
Paul Henry
1a99b241ca nil parsed in yaml is just a string, should be explicit 2014-06-20 17:13:21 -07:00
Simon Sarris
74f0f27d18 Before copying file, explicitly remove the old one
On Windows, FileUtils.cp(path, dest_path) will fail with a Permission
Denied if the dest_path already exists and is read-only. People have
complained about this since at least 2008.

This lets `jekyll build` work without error in Windows when one or more
read-only files exist.

This change will accommodate users of Team Foundation, which uses the
read-only flag for for source control status. (dumb, I know, but but a
real problem)
2014-06-19 18:25:00 -04:00
Parker Moore
5846cc7b70 No private methods in LogAdapter. 2014-06-19 17:11:04 -04:00
Alex Medearis
b202b508f2 handles line numbers with more than 1 digit 2014-06-18 17:48:50 -07:00
Alex Medearis
a7d20df95a unit tests 2014-06-18 17:29:07 -07:00
Alex Medearis
674b540c6f unit tests 2014-06-18 17:27:27 -07:00
Alex Medearis
8b860d3f0e Fixes highlight.rb to correctly parse list values 2014-06-18 17:08:50 -07:00
Parker Moore
35ed101651 Add test for the concatenation of categories 2014-06-18 18:19:28 -04:00
Parker Moore
99cc12cc0a Merge file system categories with categories from YAML.
Fixes #2527
2014-06-18 18:10:07 -04:00
Parker Moore
21c7f2298a Update history to reflect merge of #2526 [ci skip] 2014-06-17 19:57:26 -04:00
Parker Moore
9da73b5222 Merge pull request #2526 from AlessandroLorenzi/master 2014-06-17 19:57:03 -04:00
Alessandro Lorenzi
db97d40f5e Add Piwigo Gallery plugin 2014-06-18 01:16:58 +02:00
Parker Moore
a78b5c2f8d Include files with a url which ends in / in the site.html_pages list
https://github.com/jekyll/jekyll-sitemap/issues/27
2014-06-17 15:18:41 -04:00
Parker Moore
df33ff7462 Update history to reflect merge of #2514 [ci skip] 2014-06-14 16:43:02 -04:00
Parker Moore
f589e11419 Merge pull request #2514 from penibelst/docs-compress 2014-06-14 16:34:54 -04:00
Anatol Broder
db462a181c Add link to jekyll-compress-html 2014-06-14 12:10:09 +02:00
Denilson Sá
b42e29c5a7 Fixing tests. 2014-06-13 03:50:02 -03:00
Denilson Figueiredo de Sá
cc734930c6 Making highlight behave more like redcarpet
See issue 2510 for details.
2014-06-13 03:31:38 -03:00
Parker Moore
11f9c22e56 Update history to reflect merge of #2419 [ci skip] 2014-06-12 20:38:50 -04:00
Parker Moore
d59b2c3ef6 Merge pull request #2419 from jens-na/collection-defaults 2014-06-12 20:38:21 -04:00
Parker Moore
116c00595c Update history to reflect the closing of #2504. [ci skip] 2014-06-12 00:40:54 -04:00
Parker Moore
8fb29a3af3 Bump pygments.rb to 0.6.0.
Closes #2504.
2014-06-12 00:40:15 -04:00
Parker Moore
202c459413 Update history to reflect merge of #2485 [ci skip] 2014-06-09 18:54:24 -04:00
Parker Moore
dd3e9806af Merge pull request #2485 from tomer/patch-2 2014-06-09 18:53:50 -04:00
Tomer Cohen
411cdb29a1 Change Github/Twitter keywords to site.{twitter,github}_username
Re: https://github.com/jekyll/jekyll/pull/2485/files#r13525347
2014-06-10 00:00:01 +03:00
Parker Moore
1005976a22 Bump to the latest Liquid version, 2.6.1 2014-06-09 02:18:25 -04:00
Parker Moore
504f30e045 Badger badger badger badger [ci skip] 2014-06-09 02:17:29 -04:00
Parker Moore
808f5dc452 Update history to reflect merge of #2494 [ci skip] 2014-06-08 22:11:12 -04:00
Parker Moore
b7d7f6d877 Merge pull request #2494 from penibelst/remove-coveralls 2014-06-08 22:11:01 -04:00
Anatol Broder
df334e809e Remove coverage reporting with Coveralls 2014-06-09 02:35:55 +02:00
Parker Moore
ade601ab81 Site: Don't allow the img to be larger than the containing obj. [ci skip]
/cc @penibelst
2014-06-08 19:45:14 -04:00
Parker Moore
50b04cdf92 Use raise instead of logging & aborting 2014-06-08 19:33:45 -04:00
Parker Moore
ccee1b6a55 Try item#to_liquid before looking at the data 2014-06-08 19:33:37 -04:00
Parker Moore
27c9fce15b Update history to reflect merge of #2492 [ci skip] 2014-06-08 19:30:14 -04:00
Parker Moore
c2fd35c687 Merge pull request #2492 from jekyll/upgrade-listen 2014-06-08 19:29:46 -04:00
Parker Moore
7e0bbf8161 Upgrade listen to 2.7.6 <= x < 3.0.0 2014-06-08 19:09:51 -04:00
Tomer Cohen
35f5bb0039 Default entries for twitter/github usernames 2014-06-07 11:16:43 +03:00
Tomer Cohen
ffd960ca4e Allow usage of different Twitter and Github usernames
and show these links only if twitter-username or github.username are set on _config.yml
2014-06-07 11:08:34 +03:00
Parker Moore
c881d24553 Add parens to issue #. [ci skip] 2014-06-06 23:12:57 -04:00
Parker Moore
290b0ea14b Update history to reflect merge of #2459 [ci skip] 2014-06-06 23:12:30 -04:00
Parker Moore
ccf97a62f1 Merge pull request #2459 from ivantsepp/watch_ignore_files 2014-06-06 23:11:44 -04:00
Parker Moore
d7d8dabb40 Update history to reflect merge of #2479 [ci skip] 2014-06-05 23:32:10 -04:00
Parker Moore
9d8b32c935 Merge pull request #2479 from kitsched/patch-1 2014-06-05 23:30:07 -04:00
János Rusiczki
19532cae88 Add link to JAPR. 2014-06-05 08:53:16 +03:00
Parker Moore
37e4a5ddae Update history to reflect merge of #2476 [ci skip] 2014-06-04 16:48:35 -04:00
Parker Moore
8792e509d7 Merge pull request #2476 from jekyll/stickermule-post 2014-06-04 16:48:11 -04:00
Parker Moore
b5b1ca068d Add "Other News" section for News sidebar on site 2014-06-04 16:47:24 -04:00
Parker Moore
ecdf6c2213 Add img to StickerMule post. 2014-06-04 16:43:01 -04:00
Parker Moore
8b272b0bf0 Post about StickerMule discount. 2014-06-04 16:02:15 -04:00
Ivan Tse
6684a8f914 Refactor logic into Command class. Add tests. 2014-06-04 14:23:40 -04:00
Parker Moore
50fee0275c Update history to reflect merge of #2436 [ci skip] 2014-06-04 14:20:36 -04:00
Parker Moore
4e26874298 Merge pull request #2436 from budparr/documenttoliquid 2014-06-04 14:16:22 -04:00
Parker Moore
b126159360 Skip initial build of site on serve with flag.
Adds --skip-initial-build flag to jekyll-serve, which serves the destination
immediately rather than waiting for the site to be built.

Fixes #1252.
2014-06-03 13:30:14 -04:00
Bud Parr
dc622470c9 add test for collection name 2014-06-02 15:12:21 -04:00
Parker Moore
63eba6c634 Update history to reflect merge of #2470 [ci skip] 2014-06-02 15:07:24 -04:00
Parker Moore
2f70dd7015 Merge pull request #2470 from XhmikosR/https 2014-06-02 15:06:47 -04:00
Bud Parr
441ac3742c remove extra space 2014-06-02 15:05:03 -04:00
Bud Parr
90bc9314f1 change label to collection
To make it clear the label is of the document's collection
2014-06-02 14:32:52 -04:00
XhmikosR
3ee02c1433 Use https for GitHub links.
The `http` links already redirect to `https` anyway.
2014-06-02 10:09:08 +03:00
Bud Parr
ff02e12389 Merge branch 'documenttoliquid' of https://github.com/budparr/jekyll into documenttoliquid 2014-06-01 22:36:24 -04:00
Bud Parr
69aae64133 Merge branch 'documenttoliquid' of https://github.com/budparr/jekyll into documenttoliquid
Conflicts:
lib/jekyll/document.rb
2014-06-01 22:36:20 -04:00
Bud Parr
00ab79b7cf add collection.label to Document#to_liquid 2014-06-01 21:45:23 -04:00
Jens Nazarenus
467945bedb Fixes the extra indentation in cucumber test 2014-06-01 22:21:31 +02:00
Jens Nazarenus
460d9c1c44 Adds an example how to use frontmatter defaults with collections 2014-06-01 22:21:31 +02:00
Jens Nazarenus
ae67940544 Adds the missing tests for #2405 2014-06-01 22:21:31 +02:00
Jens Nazarenus
497c10897f Passes the url to FrontmatterDefaults.all instead of full path 2014-06-01 22:21:31 +02:00
Jens Nazarenus
e868a8437f Includes tests for frontmatter defaults in documents 2014-06-01 22:21:31 +02:00
Jens Nazarenus
c8786b7b28 Adds default front-matter support for collecitons 2014-06-01 22:21:31 +02:00
Parker Moore
7a9bc641ee Update history to reflect merge of #2469 [ci skip] 2014-06-01 14:36:43 -04:00
Parker Moore
781e606e5a Merge pull request #2469 from jekyll/extract-gist-tag 2014-06-01 14:36:19 -04:00
Parker Moore
3c1c8c397f Jekyll-gist 1.0. 💥 2014-06-01 14:25:13 -04:00
Parker Moore
ed87454ff8 Remove tests for gists. 2014-06-01 14:01:57 -04:00
Parker Moore
7977769d91 Test our RC1 of jekyll-gist. 2014-06-01 14:01:47 -04:00
Parker Moore
879abc0949 Externalize the {% gist %} tag as the jekyll-gist gem. 2014-06-01 13:18:00 -04:00
Parker Moore
f9bbe8ed58 Update history to reflect merge of #2468 [ci skip] 2014-06-01 11:16:49 -04:00
Parker Moore
46c99e6c87 Merge pull request #2468 from rob-murray/add_link_to_version_plugin 2014-06-01 11:16:23 -04:00
Rob Murray
d34d4cbc37 Add link to Jekyll Project Version Tag plugin 2014-06-01 12:04:49 +01:00
Parker Moore
4dd208a2b3 Fix link to jekyll-import docs 2014-05-30 18:19:44 -04:00
Parker Moore
bce2d5242c Update history to reflect merge of #2444 [ci skip] 2014-05-30 18:17:26 -04:00
Parker Moore
83fb1fd0f6 Merge pull request #2444 from createdbypete/configurable-logger 2014-05-30 18:16:47 -04:00
Parker Moore
39ee223ef8 Update history to reflect merge of #2439 [ci skip] 2014-05-30 18:15:33 -04:00
Parker Moore
4e37b51749 Merge pull request #2439 from tschmidt/update-configuration-documentation 2014-05-30 18:14:52 -04:00
Parker Moore
85c07ce47b Update history to reflect merge of #2438 [ci skip] 2014-05-30 18:03:10 -04:00
Parker Moore
041f727fe3 Merge pull request #2438 from pathawks/spicy-feed 2014-05-30 18:02:25 -04:00
Parker Moore
3f8ee8dc93 Update history to reflect closing of #2464. [ci skip] 2014-05-30 18:01:18 -04:00
Parker Moore
6849d6a5e5 If rouge isn't there, say so.
In the previous version, it would say 'redcarpet' wasn't installed,
due to the rescue LoadError block on line 93. This change will tell
the user that, in fact, rouge isn't installed and that this is the
cause of the error, not that redcarpet isn't installed.

Fixes #2464.
https://github.com/jekyll/jekyll/issues/2464
2014-05-30 17:59:47 -04:00
Parker Moore
2d0ba26497 Update history to reflect merge of #2458 [ci skip] 2014-05-30 11:36:19 -04:00
Parker Moore
e9ac432e0f Merge pull request #2458 from karouf/cleaner-empty-dirs 2014-05-30 11:35:35 -04:00
Terry Schmidt
42cc3cac21 Changes to help clarify defaults in site config vs front-matter 2014-05-30 09:54:07 -05:00
Renaud Martinet
a324eafac4 Using implicit returns to conform to coding style 2014-05-30 08:46:31 +02:00
Parker Moore
6203224f3e Update history to reflect merge of #2463 [ci skip] 2014-05-29 18:55:52 -04:00
Parker Moore
df40dc46bb Merge pull request #2463 from bwillis/patch-1 2014-05-29 18:55:22 -04:00
Ben
8f9b0424b6 Add jekyll_github_sample plugin 2014-05-29 13:05:37 -07:00
Ivan Tse
c4434f27af Get relative paths of directories to ignore
Use `Pathname#realpath` to get absolute paths so that
`Pathname#relative_path_from` will not raise an exception. Also add the
config files to this list.
2014-05-28 01:16:34 -04:00
Ivan Tse
6ba077cf37 Remove Command.globs method
It is no longer being used.
2014-05-28 01:15:07 -04:00
Parker Moore
3893004f5e Update history to reflect merge of #2457 [ci skip] 2014-05-27 16:45:39 -04:00
Parker Moore
ba5922f468 Merge pull request #2457 from marcransome/master 2014-05-27 16:44:49 -04:00
Renaud Martinet
72c410363c Keep parents of directories in keep_files
Closes #1297
2014-05-27 21:11:17 +02:00
Marc Ransome
3b41a44050 Fixing help command in deprecation warning 2014-05-27 18:42:44 +01:00
Renaud Martinet
04baeefaa8 Make sure Cleaner doesn't remove dirs if they only contain subdirs
Closes #2204
2014-05-27 18:06:52 +02:00
Terry Schmidt
4dcb877ff9 Tweak front-matter vs site configuration per comments from @parkr on jekyll/jekyll#2439 2014-05-27 10:14:28 -05:00
Parker Moore
a68fb9d0b6 Update history to reflect merge of #2437 [ci skip] 2014-05-26 22:06:59 -04:00
Parker Moore
671a62e0fe Merge pull request #2437 from pathawks/date_to_rfc822 2014-05-26 22:06:33 -04:00
Parker Moore
0f7d4f57d8 Update history to reflect merge of #2455 [ci skip] 2014-05-26 22:03:37 -04:00
Parker Moore
6b9a443c05 Merge pull request #2455 from jekyll/extract-pagination-generator 2014-05-26 22:03:16 -04:00
Parker Moore
4414c70b87 Bump to jekyll-paginate 1.0.0 2014-05-26 21:08:03 -04:00
Parker Moore
9e4ef3cbff Add the paginator as a plugin: jekyll-paginate 2014-05-26 20:09:33 -04:00
Parker Moore
62129d9a2f Output Jekyll output if ENV['DEBUG'] exists 2014-05-26 20:09:13 -04:00
Peter Rhoades
4bdf4197db Rocket style hash and switching integers for Logger severity constants 2014-05-25 23:19:29 +01:00
Parker Moore
e5b7373298 Add link to #jekyll on irc.freenode.net 2014-05-25 00:41:14 -04:00
Parker Moore
c2fcf53e53 Update link to "Migrate" in README 2014-05-25 00:41:01 -04:00
Peter Rhoades
e6345f39a9 Renaming LogWriter to LogAdapter and adding tests for class
String coloring moved to Stevenson as not responsibility of LogAdapter
2014-05-24 21:22:10 +01:00
Peter Rhoades
4a73e099b7 Allow Jekyll's logger to be set to any Logger compatible instance
* Stevenson now inherits from Logger and extends some methods to use $stderr
for log messages greater than info level.
* LogWriter provides an interface between Jekyll and Logger to maintain API.
2014-05-24 15:00:14 +01:00
Terry
a0595a00e8 Update explanation of the site front-matter defaults section 2014-05-23 10:03:14 -05:00
Pat Hawks
bd836d88af Spice up site_template feed 2014-05-23 09:42:12 -05:00
Pat Hawks
43074632b3 Take advantage of date_to_rfc822
Jekyll has a filter built just for this purpose
2014-05-23 09:34:49 -05:00
Bud Parr
2e2aac5988 add label to document section of collections page 2014-05-22 21:30:40 -04:00
Bud Parr
f623404b89 add collection.label to Document#to_liquid 2014-05-22 21:19:47 -04:00
Parker Moore
8d65c9c92f Relax PATCH level in .travis.yml for ruby versions.
Ruby is now using SEMVER. Relaxing to 2.0 and 2.1 gives them the freedom to
release new patches and for us to take advantage of them without modifying
this file.
https://www.ruby-lang.org/en/news/2013/12/21/semantic-versioning-after-2-1-0/
2014-05-21 01:40:34 -04:00
Parker Moore
6b971f7200 Remove dependencies list from README. [ci skip]
We have a gemspec for that.
2014-05-21 01:16:33 -04:00
Parker Moore
eaf02f5a79 Update history to reflect merge of #2373 [ci skip] 2014-05-21 01:11:26 -04:00
Parker Moore
b9c3d8ba03 Merge pull request #2373 from tschmidt/handle-categories-in-site-config-defaults 2014-05-21 01:10:37 -04:00
Parker Moore
c0e333af53 Update history to reflect merge of #2389 [ci skip] 2014-05-21 01:10:11 -04:00
Parker Moore
f416c686af Merge pull request #2389 from kleinfreund/patch-1 2014-05-21 01:09:54 -04:00
Parker Moore
581f34dced Update history to reflect merge of #2395 [ci skip] 2014-05-21 01:09:27 -04:00
Parker Moore
3c6377d665 Merge pull request #2395 from rdumont/data-subdirectories 2014-05-21 01:09:15 -04:00
Parker Moore
b178960704 Update history to reflect merge of #2431 [ci skip] 2014-05-21 01:07:24 -04:00
Parker Moore
65275e5841 Merge pull request #2431 from jekyll/remove-collections-from-layouts 2014-05-21 01:07:01 -04:00
Parker Moore
e37b3ca8e1 Any assets read in as Pages shall not be rendered or layout'd 2014-05-21 00:52:21 -04:00
Parker Moore
1241f2debd Update history to reflect merge of #2418 [ci skip] 2014-05-20 22:52:50 -04:00
Parker Moore
5aefaa1c48 Merge pull request #2418 from mathbruyen/collections_permalink 2014-05-20 22:52:29 -04:00
Parker Moore
c7fb38b606 Update history to reflect merge of #2420 [ci skip] 2014-05-20 22:36:12 -04:00
Parker Moore
7e05b6e0b3 Merge pull request #2420 from albertogg/fix-encoding-issue 2014-05-20 22:35:50 -04:00
Alberto Grespan
879184fe37 Update unescaped string test
Nothing was being tested without explicitly making the string
encoding ASCII.
2014-05-20 17:04:08 -04:30
Parker Moore
cbe7e3e80e Don't place asset files or yaml files in layouts
Ref: #2402
2014-05-20 17:11:34 -04:00
Parker Moore
ebd87bfb78 WE WANT DOCS! Plz. ❤️ 2014-05-20 16:52:22 -04:00
Parker Moore
beeca433ae Update history to reflect merge of #2424 [ci skip] 2014-05-20 15:36:18 -04:00
Parker Moore
d3f9427e37 Merge pull request #2424 from kleinfreund/patch-2 2014-05-20 15:35:47 -04:00
Terry Schmidt
c76e41d157 Update Utils#pluralized_array_from_hash and Utils#value_from_singular_key per suggestion from @parkr
Switched to using the `#tap` method for more concise code. Also returning the value from
`value_from_singular_key` instead of returning an array wrapped presentation of the value.
This allows for a one-liner in `pluralized_array_from_hash`.
2014-05-20 12:32:59 -05:00
Parker Moore
f695603dec Merge pull request #2430 from ivantsepp/doc_fix
Extra period in collections documentation
2014-05-20 12:13:22 -04:00
Parker Moore
5bb7c7eb9a Update history to reflect merge of #2429 [ci skip] 2014-05-20 12:13:01 -04:00
Parker Moore
395d65454c Merge pull request #2429 from jshawl/code-overflow-fix 2014-05-20 12:12:36 -04:00
Ivan Tse
27381b7f07 Remove extra period. [ci skip] 2014-05-20 09:58:43 -04:00
Jesse shawl
e7c4fa0e5f Prevent code overflowing container 2014-05-20 09:51:57 -04:00
Alberto Grespan
7ce849a2b6 Revert changes and add encoding to the test file
* Add encoding to the test file as Ruby 1.9.3 doesn’t defaults to utf-8.
* Remove the forced encoding as encode seems too aggressive.
2014-05-20 00:03:40 -04:30
Parker Moore
a07f690509 Update history to reflect merge of #2406 [ci skip] 2014-05-20 00:16:58 -04:00
Parker Moore
54fba9af4b Merge pull request #2406 from yihangho/config-yaml 2014-05-20 00:15:58 -04:00
Alberto Grespan
2a1054b1a8 Change test to make it pass in Ruby 1.9.3 2014-05-19 22:08:14 -04:30
Alberto Grespan
77cef764d6 Force encoding before escaping or unescaping
This will reassure not having any errors when escaping or
unescaping.
2014-05-19 18:50:25 -04:30
Alberto Grespan
2f3390750d Add tests to validate encoding of URLs
Added tests to validate the encoding of returned URL strings
after been escaped or unescaped.
2014-05-19 18:45:47 -04:30
Philipp Rudloff
936a00a974 Prevent table from extending parent width
The table containing the _Permalink style examples_ [in the docs](http://jekyllrb.com/docs/permalinks/#permalink-style-examples) extends the width of the content container.

The solution I propose is a bit dirty, because I remove `permalink: ` in the left column to make the table fit.

Another way would be using `white-space: normal;` for code inside tables. That would lead to _ugly_ line-breaks within the code.

What do you think?
2014-05-19 16:41:33 +02:00
Yihang Ho
658a4d0b47 Try to load _config.yaml if _config.yml is nonexistent. 2014-05-19 09:06:55 +08:00
Parker Moore
5b281a06d6 Update history to reflect merge of #2421 [ci skip] 2014-05-18 15:29:51 -04:00
Parker Moore
45c9b82fb3 Merge pull request #2421 from chezou/fix-broken-link 2014-05-18 15:29:09 -04:00
Chezou
755088dbf0 Fix broken link on installation.md 2014-05-19 00:13:40 +09:00
Alberto Grespan
9932eb667b Encode URLs in utf-8 when escaping and unescaping
There is a problem while returning a path that has some special and possible Non-ASCII characters that may lead jekyll to break while doing the unescaping process. This is can be addressed by “forcing” ASCII to UTF-8.
2014-05-17 17:53:40 -04:30
Mathieu Bruyen
921dbe0547 Override collection url template 2014-05-17 10:40:52 +02:00
Parker Moore
ab679cbe26 Update history to reflect merge of #2417 [ci skip] 2014-05-17 00:54:29 -04:00
Parker Moore
4147e92561 Merge pull request #2417 from jekyll/jekyll-env 2014-05-17 00:53:55 -04:00
Parker Moore
3413c96845 Add test for Jekyll.env 2014-05-17 00:47:03 -04:00
Parker Moore
780cff46b3 Add jekyll.environment to site_payload. 2014-05-17 00:38:21 -04:00
Parker Moore
5d6f6b0571 Update history to reflect merge of #2377 [ci skip] 2014-05-16 03:51:12 -04:00
Parker Moore
04b0fe0160 Merge pull request #2377 from jekyll/numeric 2014-05-16 03:50:50 -04:00
Parker Moore
4d1c84aa2b date_to_xmlschema does some weird things with timezones, but whatever it's not important. 2014-05-16 03:42:35 -04:00
Jordon Bedwell
1c11afd78d Fix #2413 and setup a Jekyll.env. 2014-05-15 16:28:37 -05:00
Parker Moore
8b5fe24cb2 Update history to reflect merge of #2408 [ci skip] 2014-05-15 12:38:33 -04:00
Parker Moore
ba905a2c18 Merge pull request #2408 from quinn/patch-1 2014-05-15 12:37:56 -04:00
Parker Moore
bd51b250be Update history to reflect merge of #2411 [ci skip] 2014-05-15 12:37:28 -04:00
Parker Moore
996bf25aee Merge pull request #2411 from mathbruyen/patch-1 2014-05-15 12:37:02 -04:00
Parker Moore
2a5336b93a Update history to reflect merge of #2410 [ci skip] 2014-05-15 12:33:25 -04:00
Parker Moore
b54f4e830a Merge pull request #2410 from XhmikosR/master 2014-05-15 12:33:03 -04:00
Mathieu Bruyen
a38ea51994 Header links to pages which have a title
Header used to add link to all pages of the site, even those which do not have any title, creating empty anchors on the page like `<a class="page-link" href="/feed.xml"></a>`. Those were non click-able and used space on the page due to margins.

Now only displays pages with a title.
2014-05-15 08:59:29 +02:00
XhmikosR
7053e468cf Update Font Awesome to v4.1.0. 2014-05-15 09:41:38 +03:00
Quinn Shanahan
5ea62443f4 override EXCERPT_ATTRIBUTES_FOR_LIQUID
Allow EXCERPT_ATTRIBUTES_FOR_LIQUID to be overridden by inheriting class. Right now will always reference Jekyll::Post::EXCERPT_ATTRIBUTES_FOR_LIQUID. This is already being used in the codebase for ATTRIBUTES_FOR_LIQUID.
2014-05-14 13:39:16 -04:00
Parker Moore
8fc1e4b5ea Update history to reflect merge of #2401 [ci skip] 2014-05-12 13:20:58 -04:00
Parker Moore
da6d781768 Merge pull request #2401 from jdavis/patch-1 2014-05-12 13:20:41 -04:00
Josh Davis
11e3217ec1 Remove broken link in extras.md, closes #2400 2014-05-12 11:57:54 -05:00
Rodrigo Dumont
12a8be0b98 Add scenario for ensuring data folder over file precedence 2014-05-12 13:47:41 -03:00
Parker Moore
6286b6cd76 Update history to reflect merge of #2387 [ci skip] 2014-05-12 11:53:37 -04:00
Parker Moore
e7b8123141 Merge pull request #2387 from jaybe-jekyll/doc_updates 2014-05-12 11:52:35 -04:00
jaybe@jekyll
fc7f724529 Remove Quickstart' Default Markdown Section
Remove default Markdown section from Quickstart documentation page as
it is redundant and unnecessary at this time. #2387
2014-05-12 10:48:31 -05:00
Rodrigo Dumont
418c978b91 Add _data sub-folder support to docs 2014-05-12 11:21:31 -03:00
Parker Moore
89c782051b Update history to reflect merge of #2368 [ci skip] 2014-05-12 01:11:36 -04:00
Parker Moore
31d7afc987 Merge pull request #2368 from XhmikosR/master 2014-05-12 01:11:15 -04:00
Parker Moore
2f1138cd11 Update history to reflect merge of #2394 [ci skip] 2014-05-11 19:39:37 -04:00
Parker Moore
8068702c15 Merge pull request #2394 from penibelst/fix-dates 2014-05-11 19:38:40 -04:00
Rodrigo Dumont
604fb3286c Allow subdirectories in _data 2014-05-11 20:28:49 -03:00
Anatol Broder
a5b3104b0c Change timezone to Los Angeles 2014-05-12 00:47:54 +02:00
Austin Pray
a79279b1cc Beefs up variables.md
Adds site.data
Adds site.collections
Adds site.html_pages
2014-05-11 16:21:47 -05:00
Parker Moore
8f90ba82a4 Update history to reflect merge of #2393 [ci skip] 2014-05-11 16:42:30 -04:00
Parker Moore
9bd6c98320 Merge pull request #2393 from createdbypete/quieter-build-command 2014-05-11 16:42:06 -04:00
Peter Rhoades
6465cd6446 Setting log_level earlier to silence info level configuration output. 2014-05-11 21:14:10 +01:00
Philipp Rudloff
5e2c03635f Adding to pagination note: Cannot include collections
Adding a sentence to the paragraph to clarify, that pagination is restricted to posts and that it can't contain collections.
2014-05-11 22:14:03 +02:00
Philipp Rudloff
a9cf8c4c04 Add collections to info about pagination support.
Currently: _Pagination does not support tags or categories_
Proposed: _Pagination does not support tags, categories or collections_

Maybe in the future? Related: #2376
2014-05-11 10:10:06 +02:00
jaybe@jekyll
3233005a0a Update Quickstart re: kramdown default
Update Quickstart documentation to reflect Jekyll’ 2.0 default of
kramdown Markdown engine versus Redcarpet.
2014-05-10 23:47:48 -05:00
Parker Moore
d34f1d2c1a Update history to reflect merge of #2384 [ci skip] 2014-05-10 20:52:04 -04:00
Parker Moore
c68d83bce7 Merge pull request #2384 from penibelst/test-sort-utf8 2014-05-10 20:51:21 -04:00
Anatol Broder
7cd95734df Fix coding for 1.9.3 2014-05-11 02:22:58 +02:00
Anatol Broder
06cebb0816 Add ascii+utf8 sort. Props @ixti 2014-05-11 01:34:09 +02:00
Anatol Broder
b2f30f5bee Test Russian and Hebrew sort 2014-05-11 01:06:35 +02:00
Parker Moore
ab990933a2 Update history to reflect merge of #2383 [ci skip] 2014-05-10 16:15:18 -04:00
Parker Moore
9a635f0ce3 Merge pull request #2383 from kleinfreund/patch-1 2014-05-10 16:14:37 -04:00
Philipp Rudloff
7756adc75c Fixing spacing issue for code inside pre
Regular (one-line) code inside a `code` tag has some padding around it. This leads to some weird spacing when dealing with code blocks (e.g. inside `pre`).

Removing the horizontal paddings for these. (Also replacing `border: none;` with `border: 0;` because it's shorter)
2014-05-10 22:05:21 +02:00
Parker Moore
5e9b22fbb2 Update history to reflect merge of #2345 [ci skip] 2014-05-10 15:44:35 -04:00
Parker Moore
01c09fd7fa Merge pull request #2345 from penibelst/sort-collection 2014-05-10 15:42:53 -04:00
XhmikosR
af53111070 Include anchor_links before the end closing body tag. 2014-05-10 21:02:45 +03:00
XhmikosR
cba586f06f Update anchor_links.html.
* fix `TypeError` when we are in home
* remove default type and encoding
* format the code
2014-05-10 21:02:45 +03:00
Parker Moore
af9f1e6f48 Accept Numeric values for dates. 2014-05-09 23:11:05 -04:00
Parker Moore
53b2e1372c Update history to reflect merge of #2374 [ci skip] 2014-05-09 15:40:11 -04:00
Parker Moore
aee7d7327f Merge pull request #2374 from albertogg/update-ruby 2014-05-09 15:39:46 -04:00
Alberto Grespan
03291eb5f4 Update CI to use Ruby 2.1.2 2014-05-09 14:43:59 -04:30
Terry Schmidt
0371b69952 Set categor[y|ies] on post if they appear in site frontmatter defaults 2014-05-09 13:34:13 -05:00
Terry Schmidt
6c22ae3759 Merge branch 'master' into handle-categories-in-site-config-defaults 2014-05-09 13:13:04 -05:00
Matt Rogers
56b64d688d Update history to reflect merge of #2369 [ci skip] 2014-05-09 12:33:50 -05:00
Matt Rogers
50065a2781 Merge pull request #2369 from jekyll/json-data 2014-05-09 12:33:48 -05:00
Ben Balter
1315112ab5 dot json; 2014-05-09 10:32:18 -04:00
Ben Balter
d3f9da7645 document json support 2014-05-09 10:30:36 -04:00
Ben Balter
5129a3ccc3 add tests for json data 2014-05-09 10:29:37 -04:00
Ben Balter
bf3a20b2d7 allow json files in _data dir 2014-05-09 10:13:12 -04:00
Anatol Broder
fb523722b5 Fruity variables 2014-05-09 09:21:24 +02:00
Anatol Broder
ab3aaebe6d Resolve second conflict 2014-05-09 08:59:46 +02:00
Anatol Broder
5dcd84b71b Resolve conflict 2014-05-09 08:56:04 +02:00
Anatol Broder
6c48e9bbdf Simplify config 2014-05-09 08:53:21 +02:00
Anatol Broder
7f1b916f32 Fix output 2014-05-09 08:53:21 +02:00
Anatol Broder
df3c163eeb Use item_property 2014-05-09 08:53:16 +02:00
Anatol Broder
d96f39360b Revert "Make it fail"
This reverts commit c89e7539b86a483a2f8b14dd766ad90da1eb9773.
2014-05-09 08:53:16 +02:00
Anatol Broder
fd1778203d Make it fail 2014-05-09 08:53:16 +02:00
Anatol Broder
9ba89b9ab1 Try item_property 2014-05-09 08:53:15 +02:00
Anatol Broder
d8e68bc0e1 No output needed 2014-05-09 08:53:07 +02:00
Anatol Broder
9f6965c1b5 Add scenario for sorting by title 2014-05-09 08:51:57 +02:00
Anatol Broder
ae7e485474 Add hash_property 2014-05-09 08:44:40 +02:00
238 changed files with 8956 additions and 4099 deletions

2
.gitignore vendored
View File

@@ -13,3 +13,5 @@ site/_site/
coverage
.ruby-version
.sass-cache
tmp/stackprof-*
.jekyll-metadata

View File

@@ -1,15 +1,16 @@
language: ruby
cache: bundler
install:
- script/rebund download
- travis_retry bundle install --path vendor/bundle
sudo: false
rvm:
- 2.1.1
- 2.0.0
- 1.9.3
- 2.2
- 2.1
- 2.0
env:
matrix:
- TEST_SUITE=test
- TEST_SUITE=cucumber
before_script: bundle update
script: script/cibuild
after_script:
- script/rebund upload
notifications:
irc:
on_success: change
@@ -17,11 +18,9 @@ notifications:
channels:
- irc.freenode.org#jekyll
template:
- '%{repository}#%{build_number} (%{branch}) %{message} %{build_url}'
- "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}"
email:
on_success: never
on_failure: never
env:
global:
- secure: bt5nglPTdsc0N5fB1dOJz2WbM81dGpDuVD8PnhEsxgUfoo6xavhU4+pNrUADlSUqQ1aJrdU+MKW4x+JZ2ZnJS8vOpNzRymuMZSbFaljK4pgFGiKFgBdMKxVikvoYcxKCjLAl7NJZ11W6hUw+JtJScClDZwrJJAQB6I7Isp/LsdM=
- secure: Ym8nx7nbfGYGo47my92M+deJykaiMkdZdb615EO51liv/xy/0aQ919Jpfieugc9d3zVnm+zFGPbpv4YzRpsik6OlVBNa4lP+BnQ27ptf5YcLWD8Hksi7845WFLecXMoaTCoYer/TvYZsIWJb2nSDMH9qbfZhnd1YZKuvUpK0rEU=
slack:
secure: dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4YGEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAYO1AanCUbJSEyJTju347xCBGzESU=

View File

@@ -4,10 +4,10 @@ Contribute
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
* **Contributions will not be accepted without tests.**
* **Contributions will not be accepted without tests or necessary documentation updates.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) and
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
[RR](https://github.com/rr/rr).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps

27
Gemfile
View File

@@ -1,2 +1,29 @@
source 'https://rubygems.org'
gemspec
gem 'rake', '~> 10.1'
gem 'rdoc', '~> 3.11'
gem 'redgreen', '~> 1.2'
gem 'shoulda', '~> 3.5'
gem 'rr', '~> 1.1'
gem 'cucumber', '1.3.18'
gem 'RedCloth', '~> 4.2'
gem 'maruku', '~> 0.7.0'
gem 'rdiscount', '~> 1.6'
gem 'launchy', '~> 2.3'
gem 'simplecov', '~> 0.9'
gem 'simplecov-gem-adapter', '~> 1.0.1'
gem 'mime-types', '~> 1.5'
gem 'activesupport', '~> 3.2.13'
gem 'jekyll_test_plugin'
gem 'jekyll_test_plugin_malicious'
gem 'rouge', '~> 1.7'
gem 'liquid-c', '~> 0.0.3'
gem 'minitest' if RUBY_PLATFORM =~ /cygwin/
gem 'test-unit' if RUBY_PLATFORM =~ /cygwin/ || RUBY_VERSION.start_with?("2.2")
if ENV['BENCHMARK']
gem 'benchmark-ips'
gem 'rbtrace'
gem 'stackprof'
end

View File

@@ -2,14 +2,416 @@
### Major Enhancements
* Incremental regeneration (#3116)
* Drop support for Ruby 1.9.3. (#3235)
* Upgrade to Liquid 3.0.0 (#3002)
* Support Ruby v2.2 (#3234)
### Minor Enhancements
* Sort static files just once, and call `site_payload` once for all collections (#3204)
* Separate `jekyll docs` and optimize external gem handling (#3241)
* Improve `Site#getConverterImpl` and call it `Site#find_converter_instance` (#3240)
* Use relative path for `path` Liquid variable in Documents for consistency (#2908)
* Generalize `Utils#slugify` for any scripts (#3047)
* Added basic microdata to post template in site template (#3189)
* Store log messages in an array of messages. (#3244)
* Allow collection documents to override `output` property in front matter (#3172)
### Bug Fixes
* Remove unneeded end tag for `link` in site template (#3236)
* Kramdown: Use `enable_coderay` key instead of `use_coderay` (#3237)
* Unescape `Document` output path (#2924)
* Fix nav items alignment when on multiple rows (#3264)
### Development Fixes
* Improve the grammar in the documentation (#3233)
* Update the LICENSE text to match the MIT license exactly (#3253)
* Update rake task `site:publish` to fix minor bugs. (#3254)
* Switch to shields.io for the README badges. (#3255)
* Use `FileList` instead of `Dir.glob` in `site:publish` rake task (#3261)
### Site Enhancements
* Fixing the default host on docs (#3229)
* Add `jekyll-thumbnail-filter` to list of third-party plugins (#2790)
* Add link to 'Adding Ajax pagination to Jekyll' to Resources page (#3186)
* Add a Resources link to tutorial on building dynamic navbars (#3185)
* Semantic structure improvements to the post and page layouts (#3251)
## 2.5.3 / 2014-12-22
### Bug Fixes
* When checking a Markdown extname, include position of the `.` (#3147)
* Fix `jsonify` Liquid filter handling of boolean values (#3154)
* Add comma to value of `viewport` meta tag (#3170)
* Set the link type for the RSS feed to `application/rss+xml` (#3176)
* Refactor `#as_liquid` (#3158)
### Development Fixes
* Exclude built-in bundles from being added to coverage report (#3180)
### Site Enhancements
* Add `@alfredxing` to the `@jekyll/core` team. :tada: (#3218)
* Document the `-q` option for the `build` and `serve` commands (#3149)
* Fix some minor typos/flow fixes in documentation website content (#3165)
* Add `keep_files` to configuration documentation (#3162)
* Repeat warning about cleaning of the `destination` directory (#3161)
* Add jekyll-500px-embed to list of third-party plugins (#3163)
* Simplified platform detection in Gemfile example for Windows (#3177)
* Add the `jekyll-jalali` plugin added to the list of third-party plugins. (#3198)
* Add Table of Contents to Troubleshooting page (#3196)
* Add `inline_highlight` plugin to list of third-party plugins (#3212)
* Add `jekyll-mermaid` plugin to list of third-party plugins (#3222)
## 2.5.2 / 2014-11-17
### Minor Enhancements
* `post_url` should match `post.name` instead of slugs and dates (#3058)
### Bug Fixes
* Fix bundle require for `:jekyll_plugins` (#3119)
* Remove duplicate regexp phrase: `^\A` (#3089)
* Remove duplicate `Conversion error:` message in `Convertible` (#3088)
* Print full conversion error message in `Renderer#convert` (#3090)
### Site Enhancements
* Change variable names in Google Analytics script (#3093)
* Mention CSV files in the docs for data files (#3101)
* Add trailing slash to `paginate_path` example. (#3091)
* Get rid of noifniof (`excerpt_separator`) (#3094)
* Sass improvements, around nesting mostly. (#3123)
* Add webmentions.io plugin to the list of third-party plugins (#3127)
* Add Sass mixins and use them. (#2904)
* Slightly compress jekyll-sticker.jpg. (#3133)
* Update gridism and separate out related but custom styles. (#3132)
* Add remote-include plugin to list of third-party plugins (#3136)
## 2.5.1 / 2014-11-09
### Bug Fixes
* Fix path sanitation bug related to Windows drive names (#3077)
### Development Fixes
* Add development time dependencies on minitest and test-unit to gemspec for cygwin (#3064)
* Use Travis's built-in caching. (#3075)
## 2.5.0 / 2014-11-06
### Minor Enhancements
* Require gems in `:jekyll_plugins` Gemfile group unless `JEKYLL_NO_BUNDLER_REQUIRE` is specified in the environment. (#2865)
* Centralize path sanitation in the `Site` object (#2882)
* Allow placeholders in permalinks (#3031)
* Allow users to specify the log level via `JEKYLL_LOG_LEVEL`. (#3067)
* Fancy Indexing with WEBrick (#3018)
* Allow Enumerables to be used with `where` filter. (#2986)
* Meta descriptions in the site template now use `page.excerpt` if it's available (#2964)
* Change indentation in `head.html` of site template to 2 spaces from 4 (#2973)
* Use a `$content-width` variable instead of a fixed value in the site template CSS (#2972)
* Strip newlines in site template `<meta>` description. (#2982)
* Add link to atom feed in `head` of site template files (#2996)
* Performance optimizations (#2994)
* Use `Hash#each_key` instead of `Hash#keys.each` to speed up iteration
over hash keys. (#3017)
* Further minor performance enhancements. (#3022)
* Add 'b' and 's' aliases for build and serve, respectively (#3065)
### Bug Fixes
* Fix Rouge's RedCarpet plugin interface integration (#2951)
* Remove `--watch` from the site template blog post since it defaults
to watching in in 2.4.0 (#2922)
* Fix code for media query mixin in site template (#2946)
* Allow post URL's to have `.htm` extensions (#2925)
* `Utils.slugify`: Don't create new objects when gsubbing (#2997)
* The jsonify filter should deep-convert to Liquid when given an Array. (#3032)
* Apply `jsonify` filter to Hashes deeply and effectively (#3063)
* Use `127.0.0.1` as default host instead of `0.0.0.0` (#3053)
* In the case that a Gemfile does not exist, ensure Jekyll doesn't fail on requiring the Gemfile group (#3066)
### Development Fixes
* Fix a typo in the doc block for `Jekyll::URL.escape_path` (#3052)
* Add integration test for `jekyll new --blank` in TestUnit (#2913)
* Add unit test for `jekyll new --force` logic (#2929)
* Update outdated comment for `Convertible#transform` (#2957)
* Add Hakiri badge to README. (#2953)
* Add some simple benchmarking tools. (#2993)
### Site Enhancements
* `NOKOGIRI_USE_SYSTEM_LIBRARIES=true` **decreases** installation time. (#3040)
* Add FormKeep to resources as Jekyll form backend (#3010)
* Fixing a mistake in the name of the new Liquid tag (#2969)
* Update Font Awesome to v4.2.0. (#2898)
* Fix link to #2895 in 2.4.0 release post. (#2899)
* Add Big Footnotes for Kramdown plugin to list of third-party plugins (#2916)
* Remove warning regarding GHP use of singular types for front matter defaults (#2919)
* Fix quote character typo in site documentation for templates (#2917)
* Point Liquid links to Liquids Github wiki (#2887)
* Add HTTP Basic Auth (.htaccess) plugin to list of third-party plugins (#2931)
* (Minor) Grammar & `_config.yml` filename fixes (#2911)
* Added `mathml.rb` to the list of third-party plugins. (#2937)
* Add `--force_polling` to the list of configuration options (#2943)
* Escape unicode characters in site CSS (#2906)
* Add note about using the github-pages gem via pages.github.com/versions.json (#2939)
* Update usage documentation to reflect 2.4 auto-enabling of `--watch`. (#2954)
* Add `--skip-initial-build` to configuration docs (#2949)
* Fix a minor typo in Templates docs page (#2959)
* Add a ditaa-ditaa plugin under Other section on the Plugins page (#2967)
* Add `build/serve -V` option to configuration documentation (#2948)
* Add 'Jekyll Twitter Plugin' to list of third-party plugins (#2979)
* Docs: Update normalize.css to v3.0.2. (#2981)
* Fix typo in Continuous Integration documentation (#2984)
* Clarify behavior of `:categories` in permalinks (#3011)
## 2.4.0 / 2014-09-09
### Minor Enhancements
* Support a new `relative_include` tag (#2870)
* Auto-enable watch on 'serve' (#2858)
* Render Liquid in CoffeeScript files (#2830)
* Array Liquid filters: `push`, `pop`, `unshift`, `shift` (#2895)
* Add `:title` to collection URL template fillers (#2864)
* Add support for CSV files in the `_data` directory (#2761)
* Add the `name` variable to collection permalinks (#2799)
* Add `inspect` liquid filter. (#2867)
* Add a `slugify` Liquid filter (#2880)
### Bug Fixes
* Use `Jekyll.sanitized_path` when adding static files to Collections (#2849)
* Fix encoding of `main.scss` in site template (#2771)
* Fix orientation bugs in default site template (#2862)
### Development Fixes
* Update simplecov gem to 0.9 (#2748)
* Remove `docs/` dir (#2768)
* add class `<< self` idiom to `New` command (#2817)
* Allow Travis to 'parallelize' our tests (#2859)
* Fix test for Liquid rendering in Sass (#2856)
* Fixing "vertycal" typo in site template's `_base.scss` (#2889)
### Site Enhancements
* Document the `name` variable for collection permalinks (#2829)
* Adds info about installing jekyll in current dir (#2839)
* Remove deprecated `jekyll-projectlist` plugin from list of third-party
plugins (#2742)
* Remove tag plugins that are built in to Jekyll (#2751)
* Add `markdown-writer` package for Atom Editor to list of third-party
plugins (#2763)
* Fix typo in site documentation for collections (#2764)
* Fix minor typo on plugins docs page (#2765)
* Replace markdown with HTML in `sass_dir` note on assets page (#2791)
* Fixed "bellow" typo in datafiles docs (#2879)
* Fix code/markdown issue in documentation for variables (#2877)
* Remove Good Include third-party plugin from plugins page (#2881)
* Add some more docs on `include_relative` (#2884)
## 2.3.0 / 2014-08-10
### Minor Enhancements
* Allow Convertibles to be converted by >= 1 converters (#2704)
* Allow Sass files to be rendered in Liquid, but never place them in layouts. (#2733)
* Add `jekyll help` command (#2707)
* Use `.scss` for `site_template` styles. (#2667)
* Don't require the `scope` key in front matter defaults (#2659)
* No longer set `permalink: pretty` in the `_config.yml` for the site template (#2680)
* Rework site template to utilize Sass (#2687)
* Notify the user when auto-regeneration is disabled. (#2696)
* Allow partial variables in include tag filename argument (#2693)
* Move instances of `Time.parse` into a Utils method (#2682)
* Ignore subfolders in the `_posts` folder (#2705) REVERTS (#2633)
* Front Matter default types should always be pluralized (#2732)
* Read in static files into `collection.files` as `StaticFile`s (#2737)
* Add `sassify` and `scssify` Liquid filters (#2739)
* Replace `classifier` gem with `classifier-reborn` (#2721)
### Bug Fixes
* Use only the last extname when multiple converters exist (#2722)
* Call `#to_liquid` before calling `#to_json` in jsonify filter (#2729)
* Use non padded config in `strftime` to avoid parse string twice (#2673)
* Replace deprecated Ruby methods with undeprecated ones (#2664)
* Catch errors when parsing Post `date` front matter value & produce nice error message (#2649)
* Allow static files in Collections (#2615)
* Fixed typo in `Deprecator#gracefully_require` error message (#2694)
* Remove preemptive loading of the 'classifier' gem. (#2697)
* Use case-insensitive checking for the file extensions when loading config files (#2718)
* When Reading Documents, Respect `encoding` Option (#2720)
* Refactor based on jekyll-watch clean-up. (#2716)
* `Document#to_s` should produce just the content of the document (#2731)
### Development Fixes
* Only include lib files in the gem (#2671)
* Fix `git diff` command in `proof` script (#2672)
* Make default rake task a multitask so tests run in parallel (#2735)
### Site Enhancements
* Use Sass and a Docs Collection (#2651)
* Add `latest_version.txt` file to the site (#2740)
* Be more ambiguous about `page.content`. But more transparent. (#2522)
* Streamlining front matter wording (instead of front-matter/frontmatter) (#2674)
* Add note that source directory cannot be modified in GitHub Pages (#2669)
* Fix links from #2669 to be actual HTML. Whoops. (#2679)
* Add link to `jekyll-slim` in list of third-party plugins (#2689)
* Add Barry Clark's Smashing Magazine tutorial to resources page (#2688)
* Reorganize and update default configuration settings (#2456)
* Fixing indentation in the configuration docs about Redcarpet exts (#2717)
* Use `null` in YAML instead of `nil` in default config list (#2719)
* Fix typo in Continuous Integration docs (#2708)
## 2.2.0 / 2014-07-29
### Minor Enhancements
* Throw a warning if the specified layout does not exist (#2620)
* Whitelist Pygments options in safe mode (#2642)
### Bug Fixes
* Remove unnecessary `Jekyll::Tags::IncludeTag#blank?` method (#2625)
* Categories in the path are ignored (#2633)
### Development Fixes
* Refactoring Errors & Requires of Third-Party stuff (#2591)
* Add further tests for categories (#2584)
* Proof site with html-proofer on change (#2605)
* Fix up bug in #2605 which caused proofing the site not to function (#2608)
* Use `bundle exec` in `script/proof` (#2610)
### Site Enhancements
* Update Kramdown urls (#2588)
* Add `Jekyll::AutolinkEmail` and `Jekyll::GitMetadata` to the list of
third-party plugins (#2596)
* Fix a bunch of broken links in the site (#2601)
* Replace dead links with working links (#2611)
* Add jekyll-hook to deployment methods (#2617)
* Added kramdown-with-pygments plugin to the list of third-party plugins (#2623)
* Update outdated "Extras" page and remove duplicate documentation (#2622)
* Add co2 plugin to list of third-party plugins (#2639)
* Attempt to clarify the way Sass imports happen (#2642)
## 2.1.1 / 2014-07-01
### Bug Fixes
* Patch read vulnerabilities for data & confirm none for layouts (#2563)
* Update Maruku dependency to allow use of the latest version (#2576)
* Remove conditional assignment from document URL to prevent stale urls (#2575)
### Site Enhancements
* Add vertical margin to `highlight` to separate code blocks (#2558)
* Add `html_pages` to Variables docs (#2567)
* Fixed broken link to Permalinks page (#2572)
* Update link to Windows installation guide (#2578)
## 2.1.0 / 2014-06-28
### Minor Enhancements
* Bump to the latest Liquid version, 2.6.1 (#2495)
* Add support for JSON files in the `_data` directory (#2369)
* Allow subclasses to override `EXCERPT_ATTRIBUTES_FOR_LIQUID` (#2408)
* Add `Jekyll.env` and `jekyll.environment` (the Liquid var) (#2417)
* Use `_config.yaml` or `_config.yml` (`.yml` takes precedence) (#2406)
* Override collection url template (#2418)
* Allow subdirectories in `_data` (#2395)
* Extract Pagination Generator into gem: `jekyll-paginate` (#2455)
* Utilize `date_to_rfc822` filter in site template (#2437)
* Add categories, last build datetime, and generator to site template
feed (#2438)
* Configurable, replaceable Logger-compliant logger (#2444)
* Extract `gist` tag into a separate gem (#2469)
* Add `collection` attribute to `Document#to_liquid` to access the
document's collection label. (#2436)
* Upgrade listen to `2.7.6 <= x < 3.0.0` (#2492)
* Allow configuration of different Twitter and GitHub usernames in site template (#2485)
* Bump Pygments to v0.6.0 (#2504)
* Front matter defaults for documents in collections (#2419)
* Include files with a url which ends in `/` in the `site.html_pages` list (#2524)
* Make `highlight` tag use `language-` prefix in CSS class (#2511)
* Lookup item property via `item#to_liquid` before `#data` or `#[]` in filters (#2493)
* Skip initial build of site on serve with flag (#2477)
* Add support for `hl_lines` in `highlight` tag (#2532)
* Spike out `--watch` flag into a separate gem (#2550)
### Bug Fixes
* Liquid `sort` filter should sort even if one of the values is `nil` (#2345)
* Remove padding on `pre code` in the site template CSS (#2383)
* Set `log_level` earlier to silence info level configuration output (#2393)
* Only list pages which have `title` in site template (#2411)
* Accept `Numeric` values for dates, not `Number` values (#2377)
* Prevent code from overflowing container in site template (#2429)
* Encode URLs in UTF-8 when escaping and unescaping (#2420)
* No Layouts or Liquid for Asset Files (#2431)
* Allow front matter defaults to set post categories (#2373)
* Fix command in subcommand deprecation warning (#2457)
* Keep all parent directories of files/dirs in `keep_files` (#2458)
* When using RedCarpet and Rouge without Rouge installed, fixed erroneous
error which stated that redcarpet was missing, not rouge. (#2464)
* Ignore *all* directories and files that merit it on auto-generation (#2459)
* Before copying file, explicitly remove the old one (#2535)
* Merge file system categories with categories from YAML. (#2531)
* Deep merge front matter defaults (#2490)
* Ensure exclude and include arrays are arrays of strings (#2542)
* Allow collections to have dots in their filenames (#2552)
* Collections shouldn't try to read in directories as files (#2552)
* Be quiet very quickly. (#2520)
### Development Fixes
* Test Ruby 2.1.2 instead of 2.1.1 (#2374)
* Add test for sorting UTF-8 characters (#2384)
* Use `https` for GitHub links in documentation (#2470)
* Remove coverage reporting with Coveralls (#2494)
* Fix a bit of missing TomDoc to `Jekyll::Commands::Build#build` (#2554)
### Site Enhancements
* Set `timezone` to `America/Los_Angeles` (#2394)
* Improve JavaScript in `anchor_links.html` (#2368)
* Remove note on Quickstart page about default markdown converter (#2387)
* Remove broken link in extras.md to a Maruku fork (#2401)
* Update Font Awesome to v4.1.0. (#2410)
* Fix broken link on Installation page to Templates page (#2421)
* Prevent table from extending parent width in permalink style table (#2424)
* Add collections to info about pagination support (#2389)
* Add `jekyll_github_sample` plugin to list of third-party plugins (#2463)
* Clarify documentation around front matter defaults and add details
about defaults for collections. (#2439)
* Add Jekyll Project Version Tag to list of third-party plugins (#2468)
* Use `https` for GitHub links across whole site (#2470)
* Add StickerMule + Jekyll post (#2476)
* Add Jekyll Asset Pipeline Reborn to list of third-party plugins (#2479)
* Add link to jekyll-compress-html to list of third-party plugins (#2514)
* Add Piwigo Gallery to list of third-party plugins (#2526)
* Set `show_drafts` to `false` in default configuration listing (#2536)
* Provide an updated link for Windows installation instructions (#2544)
* Remove `url` from configuration docs (#2547)
* Documentation for Continuous Integration for your Jekyll Site (#2432)
## 2.0.3 / 2014-05-08
### Bug Fixes
@@ -32,7 +434,7 @@
* Update docs to reflect new `baseurl` default (#2341)
* Add links to headers who have an ID. (#2342)
* Use symbol instead of HTML number in `upgrading.md` (#2351)
* Fix link to frontmatter defaults docs (#2353)
* Fix link to front matter defaults docs (#2353)
* Fix for `History.markdown` in order to fix history page in docs (#2363)
## 2.0.2 / 2014-05-07
@@ -72,7 +474,7 @@
* Expose `site.static_files` to Liquid (#2075)
* Complete redesign of the template site generated by `jekyll new` (#2050)
* Update Listen from 1.x to 2.x (#2097)
* Front-matter defaults (#2205)
* Front matter defaults (#2205)
* Deprecate `relative_permalinks` configuration option (default to `false`) (#2307)
* Exclude files based on prefix as well as `fnmatch?` (#2303)
@@ -117,7 +519,7 @@
* 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 YAML 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)
@@ -790,7 +1192,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 YAML 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)
@@ -802,7 +1204,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 YAML front matter (#831)
* Look for plugins under the source directory (#654)
* Tumblr Migrator: finds `_posts` dir correctly, fixes truncation of long
post names (#775)
@@ -861,7 +1263,7 @@
* Fix error with `limit_posts` (#442)
* Properly select dotfile during directory scan (#363, #431, #377)
* Allow setting of Kramdown `smart_quotes` (#482)
* Ensure front-matter is at start of file (#562)
* Ensure front matter is at start of file (#562)
## 0.11.2 / 2011-12-27
* Bug Fixes
@@ -982,7 +1384,7 @@
## 0.5.6 / 2010-01-08
* Bug Fixes
* Require redcloth >= 4.2.1 in tests (#92)
* Don't break on triple dashes in yaml frontmatter (#93)
* Don't break on triple dashes in yaml front matter (#93)
### Minor Enhancements
* Allow .mkd as markdown extension
@@ -1017,9 +1419,9 @@
* 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)
(@ bahuvrihi)
* Bug Fixes
* Fixing Ruby 1.9 issue that requires to_s on the err object
* 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)
* Made pages respect permalinks style and permalinks in yml front matter
@@ -1029,8 +1431,8 @@
* 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 frontmatter (@juretta)
(@ gcnovus)
* Allow CRLFs in yaml front matter (@juretta)
* Added Date#xmlschema for Ruby versions < 1.9
## 0.5.1 / 2009-05-06

View File

@@ -1,9 +1,9 @@
(The MIT License)
The MIT License (MIT)
Copyright (c) 2008-2014 Tom Preston-Werner
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@@ -12,7 +12,7 @@ furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

View File

@@ -1,13 +1,12 @@
# [Jekyll](http://jekyllrb.com/)
[![Gem Version](https://badge.fury.io/rb/jekyll.svg)](http://badge.fury.io/rb/jekyll)
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)](https://rubygems.org/gems/jekyll)
[![Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg)](https://travis-ci.org/jekyll/jekyll)
[![Code Climate](https://img.shields.io/codeclimate/github/jekyll/jekyll.svg)](https://codeclimate.com/github/jekyll/jekyll)
[![Dependency Status](https://img.shields.io/gemnasium/jekyll/jekyll.svg)](https://gemnasium.com/jekyll/jekyll)
[![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)](https://hakiri.io/github/jekyll/jekyll/master)
[![Build Status](https://secure.travis-ci.org/jekyll/jekyll.svg?branch=master)](https://travis-ci.org/jekyll/jekyll)
[![Code Climate](https://codeclimate.com/github/jekyll/jekyll.png)](https://codeclimate.com/github/jekyll/jekyll)
[![Dependency Status](https://gemnasium.com/jekyll/jekyll.svg)](https://gemnasium.com/jekyll/jekyll)
[![Coverage Status](https://coveralls.io/repos/jekyll/jekyll/badge.png)](https://coveralls.io/r/jekyll/jekyll)
By Tom Preston-Werner, Nick Quaranto, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
By Tom Preston-Werner, Nick Quaranto, Parker Moore, and many [awesome contributors](https://github.com/jekyll/jekyll/graphs/contributors)!
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
@@ -19,42 +18,19 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
* [Install](http://jekyllrb.com/docs/installation/) the gem
* Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
* Take a gander at some existing [Sites](http://wiki.github.com/jekyll/jekyll/sites)
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out `#jekyll` on irc.freenode.net.
* Have questions? Check out [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/).
## Diving In
* [Migrate](http://jekyllrb.com/docs/migrations/) from your previous system
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
* Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](http://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site
## Runtime Dependencies
* Commander: Command-line interface constructor (Ruby)
* Colorator: Colorizes command line output (Ruby)
* Classifier: Generating related posts (Ruby)
* Directory Watcher: Auto-regeneration of sites (Ruby)
* Kramdown: Default Markdown engine (Ruby)
* Liquid: Templating system (Ruby)
* Pygments.rb: Syntax highlighting (Ruby/Python)
* RedCarpet: Markdown engine (Ruby)
* Safe YAML: YAML Parser built for security (Ruby)
## Developer Dependencies
* Launchy: Cross-platform file launcher (Ruby)
* Maruku: Markdown-superset interpreter (Ruby)
* RDiscount: Discount Markdown Processor (Ruby)
* RedCloth: Textile support (Ruby)
* RedGreen: Nicer test output (Ruby)
* RR: Mocking (Ruby)
* Shoulda: Test framework (Ruby)
* SimpleCov: Coverage framework (Ruby)
## License
See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).

109
Rakefile
View File

@@ -14,7 +14,7 @@ require 'jekyll/version'
#############################################################################
def name
@name ||= Dir['*.gemspec'].first.split('.').first
@name ||= File.basename(Dir['*.gemspec'].first, ".*")
end
def version
@@ -53,13 +53,32 @@ def liquid_escape(markdown)
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}")
end
def custom_release_header_anchors(markdown)
header_regexp = /^(\d{1,2})\.(\d{1,2})\.(\d{1,2}) \/ \d{4}-\d{2}-\d{2}/
section_regexp = /^### \w+ \w+$/
markdown.split(/^##\s/).map do |release_notes|
_, major, minor, patch = *release_notes.match(header_regexp)
release_notes
.gsub(header_regexp, "\\0\n{: #v\\1-\\2-\\3}")
.gsub(section_regexp) { |section| "#{section}\n{: ##{sluffigy(section)}-v#{major}-#{minor}-#{patch}}" }
end.join("\n## ")
end
def sluffigy(header)
header.gsub(/#/, '').strip.downcase.gsub(/\s+/, '-')
end
def remove_head_from_history(markdown)
index = markdown =~ /^##\s+\d+\.\d+\.\d+/
markdown[index..-1]
end
def converted_history(markdown)
remove_head_from_history(liquid_escape(linkify(normalize_bullets(markdown))))
remove_head_from_history(
custom_release_header_anchors(
liquid_escape(
linkify(
normalize_bullets(markdown)))))
end
#############################################################################
@@ -68,14 +87,7 @@ end
#
#############################################################################
if ENV["TRAVIS"] == "true"
require 'coveralls/rake/task'
Coveralls::RakeTask.new
task :default => [:test, :features, 'coveralls:push']
else
task :default => [:test, :features]
end
multitask :default => [:test, :features]
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
@@ -122,6 +134,7 @@ namespace :site do
desc "Generate and view the site locally"
task :preview do
require "launchy"
require "jekyll"
# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
# then open it in a browser. Someday we can do better than this, I hope.
@@ -133,44 +146,77 @@ namespace :site do
# Generate the site in server mode.
puts "Running Jekyll..."
Dir.chdir("site") do
sh "#{File.expand_path('bin/jekyll', File.dirname(__FILE__))} serve --watch"
end
options = {
"source" => File.expand_path("site"),
"destination" => File.expand_path("site/_site"),
"watch" => true,
"serving" => true
}
Jekyll::Commands::Build.process(options)
Jekyll::Commands::Serve.process(options)
end
desc "Generate the site"
task :generate => [:history, :version_file] do
require "jekyll"
Jekyll::Commands::Build.process({
"source" => File.expand_path("site"),
"destination" => File.expand_path("site/_site")
})
end
desc "Update normalize.css library to the latest version and minify"
task :update_normalize_css do
Dir.chdir("site/_includes/css") do
Dir.chdir("site/_sass") do
sh 'curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"'
sh 'sass "normalize.scss":"normalize.css" --style compressed'
sh 'rm "normalize.scss"'
sh 'sass "normalize.scss":"_normalize.scss" --style compressed'
rm ['normalize.scss', Dir.glob('*.map')].flatten
end
end
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
task :publish => [:history] do
task :publish => [:history, :version_file] do
# Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages")
puts "No gh-pages directory found. Run the following commands first:"
puts " `git clone git@github.com:jekyll/jekyll gh-pages"
puts " `cd gh-pages"
puts " `git checkout gh-pages`"
exit(1)
puts "Creating gh-pages dir..."
sh "git clone git@github.com:jekyll/jekyll gh-pages"
end
# Ensure gh-pages branch is up to date.
# Ensure latest gh-pages branch history.
Dir.chdir('gh-pages') do
sh "git checkout gh-pages"
sh "git pull origin gh-pages"
end
# Copy to gh-pages dir.
# Proceed to purge all files in case we removed a file in this release.
puts "Cleaning gh-pages directory..."
purge_exclude = %w[
gh-pages/.
gh-pages/..
gh-pages/.git
]
FileList["gh-pages/{*,.*}"].exclude(*purge_exclude).each do |path|
sh "rm -rf #{path}"
end
# Copy site to gh-pages dir.
puts "Copying site to gh-pages branch..."
Dir.glob("site/*") do |path|
next if path.include? "_site"
copy_exclude = %w[
site/.
site/..
site/.jekyll-metadata
site/_site
]
FileList["site/{*,.*}"].exclude(*copy_exclude).each do |path|
sh "cp -R #{path} gh-pages/"
end
# Change any configuration settings for production.
config = YAML.load_file("gh-pages/_config.yml")
config.merge!({'sass' => {'style' => 'compressed'}})
File.write('gh-pages/_config.yml', YAML.dump(config))
# Commit and push.
puts "Committing and pushing to GitHub Pages..."
sha = `git log`.match(/[a-z0-9]{40}/)[0]
@@ -192,7 +238,7 @@ namespace :site do
"permalink" => "/docs/history/",
"prev_section" => "contributing"
}
Dir.chdir('site/docs/') do
Dir.chdir('site/_docs/') do
File.open("history.md", "w") do |file|
file.write("#{front_matter.to_yaml}---\n\n")
file.write(converted_history(history_file))
@@ -203,6 +249,11 @@ namespace :site do
end
end
desc "Write the site latest_version.txt file"
task :version_file do
File.open('site/latest_version.txt', 'wb') { |f| f.write(version) }
end
namespace :releases do
desc "Create new release post"
task :new, :version do |t, args|
@@ -235,18 +286,20 @@ end
#
#############################################################################
desc "Release #{name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
exit!
end
sh "git commit --allow-empty -m 'Release #{version}'"
sh "git commit --allow-empty -m 'Release :gem: #{version}'"
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
sh "gem push pkg/#{name}-#{version}.gem"
end
desc "Build #{name} v#{version} into pkg/"
task :build do
mkdir_p "pkg"
sh "gem build #{gemspec_file}"

View File

@@ -0,0 +1,32 @@
require 'benchmark/ips'
require 'jekyll'
site = Jekyll::Site.new(Jekyll.configuration({
'source' => File.expand_path('../site', __dir__),
'destination' => File.expand_path('../site/_site', __dir__)
}))
payload = Jekyll::Utils.deep_merge_hashes(
site.site_payload,
{ 'site' => {'page' => site.pages.first.to_liquid } }
)
info = {
filters: [Jekyll::Filters],
registers: { :site => site, :page => payload['page'] }
}
class WithoutCacheInclude < Jekyll::Tags::IncludeTag
def source(file, context)
File.read(file, file_read_opts(context))
end
end
Liquid::Template.register_tag('include_woc', WithoutCacheInclude)
def parse(tag, payload, info)
Liquid::Template.parse("{% #{tag} footer.html %}").render!(payload, info)
end
Benchmark.ips do |x|
x.report('cached') { parse 'include', payload, info }
x.report('uncached') { parse 'include_woc', payload, info }
end

17
benchmark/flat-map Normal file
View File

@@ -0,0 +1,17 @@
require 'benchmark/ips'
enum = (0..50).to_a
nested = enum.map { |i| [i] }
def do_thing(blah)
blah * 1
end
Benchmark.ips do |x|
x.report('.map.flatten with nested arrays') { nested.map { |i| do_thing(i) }.flatten(1) }
x.report('.flat_map with nested arrays') { nested.flat_map { |i| do_thing(i) } }
x.report('.map.flatten with no nested arrays') { enum.map { |i| do_thing(i) }.flatten(1) }
x.report('.flat_map with no nested arrays') { enum.flat_map { |i| do_thing(i) } }
end

9
benchmark/hash-fetch Normal file
View File

@@ -0,0 +1,9 @@
require 'benchmark/ips'
h = {:bar => 'uco'}
Benchmark.ips do |x|
x.report('fetch with no block') { h.fetch(:bar, (0..9).to_a) }
x.report('fetch with a block') { h.fetch(:bar) { (0..9).to_a } }
x.report('brackets with an ||') { h[:bar] || (0..9).to_a }
end

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env ruby
require_relative '../lib/jekyll'
require 'benchmark/ips'
base_directory = Dir.pwd
Benchmark.ips do |x|
#
# Does not include the base_directory
#
x.report('with no questionable path') do
Jekyll.sanitized_path(base_directory, '')
end
x.report('with a single-part questionable path') do
Jekyll.sanitized_path(base_directory, 'thingy')
end
x.report('with a multi-part questionable path') do
Jekyll.sanitized_path(base_directory, 'thingy/in/my/soup')
end
x.report('with a single-part traversal path') do
Jekyll.sanitized_path(base_directory, '../thingy')
end
x.report('with a multi-part traversal path') do
Jekyll.sanitized_path(base_directory, '../thingy/in/my/../../soup')
end
#
# Including the base_directory
#
x.report('with the exact same paths') do
Jekyll.sanitized_path(base_directory, base_directory)
end
x.report('with a single-part absolute path including the base_directory') do
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy'))
end
x.report('with a multi-part absolute path including the base_directory') do
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy/in/my/soup'))
end
x.report('with a single-part traversal path including the base_directory') do
Jekyll.sanitized_path(base_directory, File.join(base_directory, 'thingy/..'))
end
x.report('with a multi-part traversal path including the base_directory') do
Jekyll.sanitized_path(base_directory, File.join('thingy/in/my/../../soup'))
end
end

View File

@@ -0,0 +1,14 @@
require 'benchmark/ips'
def fast
yield
end
def slow(&block)
block.call
end
Benchmark.ips do |x|
x.report('yield') { fast { (0..9).to_a } }
x.report('block.call') { slow { (0..9).to_a } }
end

View File

@@ -0,0 +1,11 @@
require 'benchmark/ips'
Benchmark.ips do |x|
x.report('parallel assignment') do
a, b = 1, 2
end
x.report('multi-line assignment') do
a = 1
b = 2
end
end

8
benchmark/string-concat Normal file
View File

@@ -0,0 +1,8 @@
require 'benchmark/ips'
url = "http://jekyllrb.com"
Benchmark.ips do |x|
x.report('+=') { url += '/' }
x.report('<<') { url << '/' }
end

View File

@@ -0,0 +1,13 @@
require 'benchmark/ips'
def str
'http://baruco.org/2014/some-talk-with-some-amount-of-value'
end
Benchmark.ips do |x|
x.report('#tr') { str.tr('some', 'a') }
x.report('#gsub') { str.gsub('some', 'a') }
x.report('#gsub!') { str.gsub!('some', 'a') }
x.report('#sub') { str.sub('some', 'a') }
x.report('#sub!') { str.sub!('some', 'a') }
end

6
benchmark/symbol-to-proc Normal file
View File

@@ -0,0 +1,6 @@
require 'benchmark/ips'
Benchmark.ips do |x|
x.report('block') { (1..100).map { |i| i.to_s } }
x.report('&:to_s') { (1..100).map(&:to_s) }
end

View File

@@ -6,12 +6,11 @@ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
require 'jekyll'
require 'mercenary'
%w[jekyll-import].each do |blessed_gem|
begin
require blessed_gem
rescue LoadError
end
end
Jekyll::External.require_if_present(
Jekyll::External.blessed_gems
)
Jekyll::PluginManager.require_from_bundler
Jekyll::Deprecator.process(ARGV)
@@ -30,6 +29,7 @@ Mercenary.program(:jekyll) do |p|
p.action do |args, options|
if args.empty?
Jekyll.logger.error "A subcommand is required."
puts p
else
unless p.has_command?(args.first)

View File

@@ -1,3 +0,0 @@
default: --format pretty
travis: --format progress
html_report: --format progress --format html --out=features_report.html

View File

@@ -1,93 +0,0 @@
コントリビュート
==========
あなたは Jekyll に投じるすばらしいアイディアを持っています。
すばらしいことです!次の事柄を心に留めてください。
* **テストなしではコントリビュートはできません。**
* もし、既存の機能への小さな修正やパッチを作成したなら、シンプルなテストを行います。
現在のテストスイートの範囲にとどまり、そして
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) や
[RR](http://github.com/btakita/rr/tree/master) を使用してください。
* もし、それが新しい機能の場合は、必ず新しい
[Cucumber](https://github.com/cucumber/cucumber/) の機能を作成し、
必要に応じて手順を再利用します。
また、あなたがフォークした `site`
急ぎいくつかのドキュメントを用意し、一度マージを行い
メイン `site` の jekyllrb.com に転送していただければ幸いです。
* あなたのコントリビュートによって Jekyll の振る舞いが変わった場合、ドキュメントを更新すべきです。
それは `site/docs` にあります。
もし、 docs に情報の誤りがあった場合、遠慮なく追加してください。
すばらしいドキュメントはすばらしいプロジェクトを作ります!
* Ruby のコードを変更するときは、 [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
に従ってください。
* **小さなプルリクエスト** に最善を尽くしてください。
簡単に提案された変更はレビューされ、マージされる可能性が高いです。
* プルリクエストを送信するとき、プルリクエストのボディを賢明に使用してください。
変更されたかどうかの記述、変更の背後にある動機、 [完了したかどうかのタスクリスト](http://git.io/gfm-tasks)
もレビュー時間を早めます。
テストの依存関係
-----------------
テストスイートの実行や gem のビルドのために、
Jekyll の依存ツールをインストールする必要があります。
Jekyll は Bundler を使用しており、 `bundle` コマンドを実行すると全ての設定が迅速に行われます!
$ bundle
はじめる前に、テストを実行し、必ずテストが通ることを
確認してください(あなたの環境が適切に設定されているかを確認するために):
$ bundle exec rake test
$ bundle exec rake features
ワークフロー
--------
これは、あなたの作業がプロジェクトにマージされるもっとも直接的な方法です:
* プロジェクトをフォークします。
* あなたのフォークプロジェクトをクローンします ( `git clone git@github.com:<username>/jekyll.git` )。
* トピックブランチを作成し、あなたの変更を含んでください ( `git checkout -b my_awesome_feature` )。
* ハックし、テストを追加します。必ずしもこの順番でなくてかまいません
* `rake` を実行し、テストが必ず全て通ることを確認してください
* 必要に応じて、エラーがないようにコミットを論理的な塊にリベースしてください
* ブランチをプッシュしてください ( `git push origin my_awesome_feature` ).
* jekyll/jekyll プロジェクトの master ブランチに対してプルリクエストを作成し、
あなたの変更内容と、なぜそれをマージすべきかを記述してください
ドキュメントの更新
----------------------
私たちは Jekyll のドキュメントについて最善を尽くしたいです。
私たちはドキュメントをオープンソース化しました、そして
あなたが Jekyll に欠けているものを見つけた場合、私たちはプルリクエストを歓迎しています。
あなたは、 GitHub.com 上の Jekyll リポジトリの [site]({{ site.repository }}/tree/master/site) で
jekyllrb.comのドキュメントを見つけることができます。
全てのドキュメントのプルリクエストは `master` に向けられる必要があります。
他のブランチに向けたプルリクエストは受け入れられません。
GitHub の [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) は、
自由に更新することができるように、プルリクエストなしで
全ての GitHub ユーザがアクセス権を持つことができます。
落とし穴
-------
* もし、 gem のバージョンがかちあった場合、コミットを分けてください。
この方法だと、メンテナが gem をリリースするときに制御できます。
* jekyll/jekyll の最新コミットに基づいて(複数の)パッチを維持してください。
それは適用するためのあなたの仕事で、メンテナがしなければならないことを少なくするのは
とてもよいことです。
* あなたの GitHub issue で [fix], [feature] などのタグをつけないでください。
メンテナは積極的に issue を読み、彼らが問題に出くわしたらラベルをつけるでしょう。
最後に…
----------
ありがとう! Jekyll のハックは楽しいものでなければなりません。
もし、あなたがこのハードを理解するための何かを発見した場合、知らせてください。
我々のプロセスやドキュメントを改善することができます!

View File

@@ -1,69 +0,0 @@
# [Jekyll](http://jekyllrb.com/)
[![Gem Version](https://badge.fury.io/rb/jekyll.png)](http://badge.fury.io/rb/jekyll)
[![Build Status](https://secure.travis-ci.org/jekyll/jekyll.png?branch=master)](https://travis-ci.org/jekyll/jekyll)
[![Code Climate](https://codeclimate.com/github/jekyll/jekyll.png)](https://codeclimate.com/github/jekyll/jekyll)
[![Dependency Status](https://gemnasium.com/jekyll/jekyll.png)](https://gemnasium.com/jekyll/jekyll)
[![Coverage Status](https://coveralls.io/repos/jekyll/jekyll/badge.png)](https://coveralls.io/r/jekyll/jekyll)
Tom Preston-Werner, Nick Quaranto や多くの[素晴らしいコントリビュータ](https://github.com/jekyll/jekyll/graphs/contributors)によって作成されています!
Jekyll は個人プロジェクトや組織のサイトに最適な、シンプルで、ブログを意識した静的サイトジェネレータです。
複雑さを排除したファイルベースのCMSのようなものと考えてください。
Jekyll はコンテンツを受け取り、 Markdown や Liquid テンプレート をレンダリングし、
Apache や Nginx やその他の Web サーバに提供する準備ができた静的な Web サイトを完全に出力してくれます。
Jekyll は [GitHub Pages](http://pages.github.com) の背後にあるエンジンなので、
あなたの GitHub リポジトリからサイトをホストするために使用する事ができます。
## 原理
Jekyll あなたがするように伝えたことをします ― それ以上でもそれ以下でもありません。
それは、大胆な仮定によってユーザの裏をかこうとせず、
また、不必要な複雑さや設定をユーザに負担しません。
簡単に言えば、 Jekyll はあなたの道を開け、
真に重要なもの: コンテンツに集中することができます。
## 開始方法
* gem を[インストール](http://jekyllrb.com/docs/installation/)します
* [使用方法](http://jekyllrb.com/docs/usage/) と [設定方法](http://jekyllrb.com/docs/configuration/) を読みます
* 既存の [Jekyll で作られたサイト](http://wiki.github.com/jekyll/jekyll/sites) をチラッと見ます
* Fork し、あなたの変更を [コントリビュート](http://jekyllrb.com/docs/contributing/) します
* 質問があったら? irc.freenode.net の `#jekyll` チャンネルをチェックしてください
## より深く
* 以前のシステムからの[移行](http://jekyllrb.com/docs/migrations/)
* [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) がどのように働くかを学ぶ
* [変数](http://jekyllrb.com/docs/variables/)を使ってサイトに情報を表示する
* posts が生成される時の[パーマリンク](http://jekyllrb.com/docs/permalinks/)をカスタマイズ
* 人生を容易にするために、組み込みの [Liquid 拡張](http://jekyllrb.com/docs/templates/)を使用する
* あなたのサイト固有のコンテンツを生成するために、カスタム[プラグイン](http://jekyllrb.com/docs/plugins/)を使用する
## 実行時の依存関係
* Commander: コマンドラインインターフェース構築 (Ruby)
* Colorator: コマンドライン出力に色付け (Ruby)
* Classifier: posts の関連を生成 (Ruby)
* Directory Watcher: サイトの自動再生成 (Ruby)
* Kramdown: デフォルトの Markdown エンジン (Ruby)
* Liquid: テンプレートシステム (Ruby)
* Pygments.rb: シンタックスハイライト (Ruby/Python)
* RedCarpet: Markdown エンジン (Ruby)
* Safe YAML: セキュリティのために構築された YAML パーサ (Ruby)
## 開発時の依存関係
* Launchy: クロスプラットフォーム ファイルランチャ (Ruby)
* Maruku: Markdown スーパーセット インタプリタ (Ruby)
* RDiscount: Discount Markdown プロセッサ (Ruby)
* RedCloth: Textile サポート (Ruby)
* RedGreen: よりよいテスト出力 (Ruby)
* RR: モック (Ruby)
* Shoulda: テストフレームワーク (Ruby)
* SimpleCov: カバレッジフレームワーク (Ruby)
## ライセンス
[ライセンス](https://github.com/jekyll/jekyll/blob/master/LICENSE)を見てください。

View File

@@ -9,7 +9,7 @@ Feature: Collections
And I have a configuration file with "collections" set to "['methods']"
When I run jekyll build
Then the _site directory should exist
And I should see "Collections: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p><code>Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Create dat site.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
And I should see "Collections: <p>Use <code>Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code>Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
And the "_site/methods/configuration.html" file should not exist
Scenario: Rendered collection
@@ -29,6 +29,20 @@ Feature: Collections
And I should see "Methods metadata: bar" in "_site/collection_metadata.html"
And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration.html"
Scenario: Rendered collection at a custom URL
Given I have an "index.html" page that contains "Collections: {{ site.collections }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
collections:
methods:
output: true
permalink: /:collection/:path/
"""
When I run jekyll build
Then the _site directory should exist
And I should see "<p>Whatever: foo.bar</p>" in "_site/methods/configuration/index.html"
Scenario: Rendered document in a layout
Given I have an "index.html" page that contains "Collections: {{ site.collections }}"
And I have a default layout that contains "<div class='title'>Tom Preston-Werner</div> {{content}}"
@@ -56,7 +70,7 @@ Feature: Collections
"""
When I run jekyll build
Then the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Collections specified as an hash
Given I have an "index.html" page that contains "Collections: {% for method in site.methods %}{{ method.relative_path }} {% endfor %}"
@@ -64,12 +78,11 @@ Feature: Collections
And I have a "_config.yml" file with content:
"""
collections:
methods:
baz: bin
- methods
"""
When I run jekyll build
Then the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: All the documents
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
@@ -81,7 +94,7 @@ Feature: Collections
"""
When I run jekyll build
Then the _site directory should exist
And I should see "All documents: _methods/configuration.md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Documents have an output attribute, which is the converted HTML
Given I have an "index.html" page that contains "First document's output: {{ site.documents.first.output }}"
@@ -106,3 +119,27 @@ Feature: Collections
When I run jekyll build
Then the _site directory should exist
And I should see "Item count: 1" in "_site/index.html"
Scenario: Sort by title
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}1. of {{ items.size }}: {{ items.first.output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
collections:
- methods
"""
When I run jekyll build
Then the _site directory should exist
And I should see "1. of 6: <p>Page without title.</p>" in "_site/index.html"
Scenario: Sort by relative_path
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{% for method in methods %}{{ method.title }}, {% endfor %}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
collections:
- methods
"""
When I run jekyll build
Then the _site directory should exist
And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, , Site#generate," in "_site/index.html"

View File

@@ -33,6 +33,32 @@ Feature: Data
And I should see "Jack" in "_site/index.html"
And I should see "Leon" in "_site/index.html"
Scenario: autoload *.json files in _data directory
Given I have a _data directory
And I have a "_data/members.json" file with content:
"""
[{"name": "Jack", "age": 28},{"name": "Leon", "age": 34}]
"""
And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}"
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "Jack" in "_site/index.html"
And I should see "Leon" in "_site/index.html"
Scenario: autoload *.csv files in _data directory
Given I have a _data directory
And I have a "_data/members.csv" file with content:
"""
name,age
Jack,28
Leon,34
"""
And I have an "index.html" page that contains "{% for member in site.data.members %}{{member.name}}{% endfor %}"
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "Jack" in "_site/index.html"
And I should see "Leon" in "_site/index.html"
Scenario: autoload *.yml files in _data directory with space in file name
Given I have a _data directory
And I have a "_data/team members.yml" file with content:
@@ -48,6 +74,35 @@ Feature: Data
And I should see "Jack" in "_site/index.html"
And I should see "Leon" in "_site/index.html"
Scenario: autoload *.yaml files in subdirectories in _data directory
Given I have a _data directory
And I have a _data/categories directory
And I have a "_data/categories/dairy.yaml" file with content:
"""
name: Dairy Products
"""
And I have an "index.html" page that contains "{{ site.data.categories.dairy.name }}"
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "Dairy Products" in "_site/index.html"
Scenario: folders should have precedence over files with the same name
Given I have a _data directory
And I have a _data/categories directory
And I have a "_data/categories/dairy.yaml" file with content:
"""
name: Dairy Products
"""
And I have a "_data/categories.yaml" file with content:
"""
dairy:
name: Should not display this
"""
And I have an "index.html" page that contains "{{ site.data.categories.dairy.name }}"
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "Dairy Products" in "_site/index.html"
Scenario: should be backward compatible with site.data in _config.yml
Given I have a "_config.yml" file with content:
"""
@@ -62,4 +117,3 @@ Feature: Data
Then the "_site/index.html" file should exist
And I should see "Jack" in "_site/index.html"
And I should see "Leon" in "_site/index.html"

View File

@@ -77,3 +77,62 @@ Feature: frontmatter defaults
Then I should see "a blog by some guy" in "_site/frontmatter.html"
And I should see "nothing" in "_site/override.html"
But the "_site/perma.html" file should not exist
Scenario: Use frontmatter defaults in collections
Given I have a _slides directory
And I have a "index.html" file that contains "nothing"
And I have a "_slides/slide1.html" file with content:
"""
---
---
Value: {{ page.myval }}
"""
And I have a "_config.yml" file with content:
"""
collections:
slides:
output: true
defaults:
-
scope:
path: ""
type: slides
values:
myval: "Test"
"""
When I run jekyll build
Then the _site directory should exist
And I should see "Value: Test" in "_site/slides/slide1.html"
Scenario: Override frontmatter defaults inside a collection
Given I have a _slides directory
And I have a "index.html" file that contains "nothing"
And I have a "_slides/slide2.html" file with content:
"""
---
myval: Override
---
Value: {{ page.myval }}
"""
And I have a "_config.yml" file with content:
"""
collections:
slides:
output: true
defaults:
-
scope:
path: ""
type: slides
values:
myval: "Test"
"""
When I run jekyll build
Then the _site directory should exist
And I should see "Value: Override" in "_site/slides/slide2.html"
Scenario: Deep merge frontmatter defaults
Given I have an "index.html" page with fruit "{orange: 1}" that contains "Fruits: {{ page.fruit.orange | plus: page.fruit.apple }}"
And I have a configuration file with "defaults" set to "[{scope: {path: ""}, values: {fruit: {apple: 2}}}]"
When I run jekyll build
Then I should see "Fruits: 3" in "_site/index.html"

View File

@@ -66,3 +66,14 @@ Feature: Include tags
When I run jekyll build
Then the _site directory should exist
And I should see "one included" in "_site/index.html"
Scenario: Include a file with partial variables
Given I have an _includes directory
And I have an "_includes/one.html" file that contains "one included"
And I have a configuration file with:
| key | value |
| include_file | one |
And I have an "index.html" page that contains "{% include {{ site.include_file }}.html %}"
When I run jekyll build
Then the _site directory should exist
And I should see "one included" in "_site/index.html"

View File

@@ -0,0 +1,60 @@
Feature: Incremental rebuild
As an impatient hacker who likes to blog
I want to be able to make a static site
Without waiting too long for it to build
Scenario: Produce correct output site
Given I have a _layouts directory
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
And I have a default layout that contains "Post Layout: {{ content }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
When I run jekyll build
Then the _site directory should exist
And I should see "Post Layout: <p>The only winning move is not to play.</p>" in "_site/2009/03/27/wargames.html"
Scenario: Generate a metadata file
Given I have an "index.html" file that contains "Basic Site"
When I run jekyll build
Then the ".jekyll-metadata" file should exist
Scenario: Rebuild when content is changed
Given I have an "index.html" file that contains "Basic Site"
When I run jekyll build
Then the _site directory should exist
And I should see "Basic Site" in "_site/index.html"
When I wait 1 second
Then I have an "index.html" file that contains "Bacon Site"
When I run jekyll build
Then the _site directory should exist
And I should see "Bacon Site" in "_site/index.html"
Scenario: Rebuild when layout is changed
Given I have a _layouts directory
And I have an "index.html" page with layout "default" that contains "Basic Site with Layout"
And I have a default layout that contains "Page Layout: {{ content }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Page Layout: Basic Site with Layout" in "_site/index.html"
When I wait 1 second
Then I have a default layout that contains "Page Layout Changed: {{ content }}"
When I run jekyll build --full-rebuild
Then the _site directory should exist
And I should see "Page Layout Changed: Basic Site with Layout" in "_site/index.html"
Scenario: Rebuild when an include is changed
Given I have a _includes directory
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
And I have an "_includes/about.textile" file that contains "Generated by Jekyll"
When I run jekyll build
Then the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
When I wait 1 second
Then I have an "_includes/about.textile" file that contains "Regenerated by Jekyll"
When I run jekyll build
Then the _site directory should exist
And I should see "Basic Site with include tag: Regenerated by Jekyll" in "_site/index.html"

View File

@@ -45,9 +45,9 @@ Feature: Markdown
When I run jekyll build
Then the _site directory should exist
And I should see "My awesome code" in "_site/index.html"
And I should see "<pre><code>\nMy awesome code\n</code></pre>" in "_site/index.html"
And I should see "<pre><code>My awesome code</code></pre>" in "_site/index.html"
Scenario: Maruku fenced codeblocks
Scenario: Maruku fenced codeblocks with syntax highlighting
Given I have a configuration file with "markdown" set to "maruku"
And I have an "index.markdown" file with content:
"""
@@ -64,4 +64,4 @@ Feature: Markdown
When I run jekyll build
Then the _site directory should exist
And I should see "My awesome string" in "_site/index.html"
And I should see "<pre class="ruby"><code class="ruby">\nputs &quot;My awesome string&quot;\n</code></pre>" in "_site/index.html"
And I should see "<pre class="ruby"><code class="ruby">puts &quot;My awesome string&quot;</code></pre>" in "_site/index.html"

View File

@@ -83,3 +83,13 @@ Feature: Fancy permalinks
Then the _site directory should exist
And the _site/custom/posts directory should exist
And I should see "bla bla" in "_site/custom/posts/some.html"
Scenario: Use per-post ending in .htm
Given I have a _posts directory
And I have the following post:
| title | date | permalink | content |
| Some post | 2013-04-14 | /custom/posts/some.htm | bla bla |
When I run jekyll build
Then the _site directory should exist
And the _site/custom/posts directory should exist
And I should see "bla bla" in "_site/custom/posts/some.htm"

34
features/plugins.feature Normal file
View File

@@ -0,0 +1,34 @@
Feature: Configuring and using plugins
As a hacker
I want to specify my own plugins that can modify Jekyll's behaviour
Scenario: Add a gem-based plugin
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with "gems" set to "[jekyll_test_plugin]"
When I run jekyll build
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And I should see "this is a test" in "_site/test.txt"
Scenario: Add an empty whitelist to restrict all gems
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with:
| key | value |
| gems | [jekyll_test_plugin] |
| whitelist | [] |
When I run jekyll build --safe
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should not exist
Scenario: Add a whitelist to restrict some gems but allow others
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with:
| key | value |
| gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] |
| whitelist | [jekyll_test_plugin] |
When I run jekyll build --safe
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should exist
And I should see "this is a test" in "_site/test.txt"

View File

@@ -70,6 +70,42 @@ Feature: Post data
Then the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and has category in YAML
Given I have a movies directory
And I have a movies/_posts directory
And I have a _layouts directory
And I have the following post in "movies":
| title | date | layout | category | content |
| Star Wars | 2009-03-27 | simple | film | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Post category: movies" in "_site/movies/film/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and has categories in YAML
Given I have a movies directory
And I have a movies/_posts directory
And I have a _layouts directory
And I have the following post in "movies":
| title | date | layout | categories | content |
| Star Wars | 2009-03-27 | simple | [film, scifi] | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Post category: movies" in "_site/movies/film/scifi/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in a folder and duplicated category is in YAML
Given I have a movies directory
And I have a movies/_posts directory
And I have a _layouts directory
And I have the following post in "movies":
| title | date | layout | category | content |
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.tags variable
Given I have a _posts directory
And I have a _layouts directory
@@ -129,12 +165,23 @@ Feature: Post data
Then the _site directory should exist
And I should see "Post category: movies" in "_site/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when category is in YAML
Scenario: Use post.categories variable when categories are in YAML
Given I have a _posts directory
And I have a _layouts directory
And I have the following post:
| title | date | layout | category | content |
| Star Wars | 2009-03-27 | simple | movies | Luke, I am your father. |
| title | date | layout | categories | content |
| Star Wars | 2009-03-27 | simple | ['scifi', 'movies'] | Luke, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll build
Then the _site directory should exist
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2009/03/27/star-wars.html"
Scenario: Use post.categories variable when categories are in YAML and are duplicated
Given I have a _posts directory
And I have a _layouts directory
And I have the following post:
| title | date | layout | categories | content |
| Star Wars | 2009-03-27 | simple | ['movies', 'movies'] | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll build
Then the _site directory should exist

View File

@@ -0,0 +1,35 @@
Feature: Rendering
As a hacker who likes to blog
I want to be able to make a static site
In order to share my awesome ideas with the interwebs
But I want to make it as simply as possible
So render with Liquid and place in Layouts
Scenario: Render Liquid and place in layout
Given I have a "index.html" page with layout "simple" that contains "Hi there, Jekyll {{ jekyll.environment }}!"
And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
When I run jekyll build
Then the _site directory should exist
And I should see "Hi there, Jekyll development!\nAhoy, indeed" in "_site/index.html"
Scenario: Don't place asset files in layout
Given I have an "index.scss" page with layout "simple" that contains ".foo-bar { color:black; }"
And I have an "index.coffee" page with layout "simple" that contains "whatever()"
And I have a simple layout that contains "{{ content }}Ahoy, indeed!"
When I run jekyll build
Then the _site directory should exist
And I should not see "Ahoy, indeed!" in "_site/index.css"
And I should not see "Ahoy, indeed!" in "_site/index.js"
Scenario: Render liquid in Sass
Given I have an "index.scss" page that contains ".foo-bar { color:{{site.color}}; }"
And I have a configuration file with "color" set to "red"
When I run jekyll build
Then the _site directory should exist
And I should see ".foo-bar {\n color: red; }" in "_site/index.css"
Scenario: Render liquid in CoffeeScript
Given I have an "index.coffee" page with animal "cicada" that contains "hey='for {{page.animal}}'"
When I run jekyll build
Then the _site directory should exist
And I should see "hey = 'for cicada';" in "_site/index.js"

View File

@@ -243,33 +243,10 @@ Feature: Site configuration
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
Scenario: Add a gem-based plugin
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with "gems" set to "[jekyll_test_plugin]"
Scenario: arbitrary file reads via layouts
Given I have an "index.html" page with layout "page" that contains "FOO"
And I have a "_config.yml" file that contains "layouts: '../../../../../../../../../../../../../../usr/include'"
When I run jekyll build
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And I should see "this is a test" in "_site/test.txt"
Scenario: Add an empty whitelist to restrict all gems
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with:
| key | value |
| gems | [jekyll_test_plugin] |
| whitelist | [] |
When I run jekyll build --safe
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should not exist
Scenario: Add a whitelist to restrict some gems but allow others
Given I have an "index.html" file that contains "Whatever"
And I have a configuration file with:
| key | value |
| gems | [jekyll_test_plugin, jekyll_test_plugin_malicious] |
| whitelist | [jekyll_test_plugin] |
When I run jekyll build --safe
Then the _site directory should exist
And I should see "Whatever" in "_site/index.html"
And the "_site/test.txt" file should exist
And I should see "this is a test" in "_site/test.txt"
And I should see "FOO" in "_site/index.html"
And I should not see " " in "_site/index.html"

View File

@@ -22,8 +22,9 @@ Before do
end
After do
FileUtils.rm_rf(TEST_DIR) if File.exists?(TEST_DIR)
FileUtils.rm(JEKYLL_COMMAND_OUTPUT_FILE) if File.exists?(JEKYLL_COMMAND_OUTPUT_FILE)
FileUtils.rm_rf(TEST_DIR) if File.exist?(TEST_DIR)
FileUtils.rm(JEKYLL_COMMAND_OUTPUT_FILE) if File.exist?(JEKYLL_COMMAND_OUTPUT_FILE)
Dir.chdir(File.dirname(TEST_DIR))
end
World(Test::Unit::Assertions)
@@ -133,6 +134,10 @@ Given /^I have fixture collections$/ do
FileUtils.cp_r File.join(JEKYLL_SOURCE_DIR, "test", "source", "_methods"), source_dir
end
Given /^I wait (\d+) second(s?)$/ do |time, plural|
sleep(time.to_f)
end
##################
#
# Changing stuff
@@ -141,7 +146,14 @@ end
When /^I run jekyll(.*)$/ do |args|
status = run_jekyll(args)
if !status || args.include?("--verbose")
if args.include?("--verbose") || ENV['DEBUG']
puts jekyll_run_output
end
end
When /^I run bundle(.*)$/ do |args|
status = run_bundle(args)
if args.include?("--verbose") || ENV['DEBUG']
puts jekyll_run_output
end
end
@@ -181,7 +193,15 @@ Then /^I should see escaped "(.*)" in "(.*)"$/ do |text, file|
end
Then /^the "(.*)" file should +exist$/ do |file|
assert File.file?(file), "The file \"#{file}\" does not exist"
file_does_exist = File.file?(file)
unless file_does_exist
all_steps_to_path(file).each do |dir|
STDERR.puts ""
STDERR.puts "Dir #{dir}:"
STDERR.puts Dir["#{dir}/**/*"]
end
end
assert file_does_exist, "The file \"#{file}\" does not exist.\n"
end
Then /^the "(.*)" file should not exist$/ do |file|
@@ -195,3 +215,7 @@ end
Then /^I should see today's date in "(.*)"$/ do |file|
assert_match Regexp.new(Date.today.to_s), file_contents(file)
end
Then /^I should see "(.*)" in the build output$/ do |text|
assert_match Regexp.new(text), jekyll_run_output
end

View File

@@ -1,30 +1,48 @@
require 'coveralls'
Coveralls.wear_merged!
require 'fileutils'
require 'posix-spawn'
require 'rr'
require 'test/unit'
require 'time'
JEKYLL_SOURCE_DIR = File.dirname(File.dirname(File.dirname(__FILE__)))
TEST_DIR = File.expand_path(File.join('..', '..', 'tmp', 'jekyll'), File.dirname(__FILE__))
JEKYLL_PATH = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll')
JEKYLL_PATH = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll'))
JEKYLL_COMMAND_OUTPUT_FILE = File.join(File.dirname(TEST_DIR), 'jekyll_output.txt')
def source_dir(*files)
File.join(TEST_DIR, *files)
end
def all_steps_to_path(path)
source = Pathname.new(source_dir('_site')).expand_path
dest = Pathname.new(path).expand_path
paths = []
dest.ascend do |f|
break if f.eql? source
paths.unshift f.to_s
end
paths
end
def jekyll_output_file
JEKYLL_COMMAND_OUTPUT_FILE
end
def jekyll_run_output
File.read(jekyll_output_file)
File.read(jekyll_output_file) if File.file?(jekyll_output_file)
end
def run_bundle(args)
child = run_in_shell('bundle', *args.strip.split(' '))
end
def run_jekyll(args)
system "#{JEKYLL_PATH} #{args} --trace > #{jekyll_output_file} 2>&1"
child = run_in_shell(JEKYLL_PATH, *args.strip.split(' '), "--trace")
child.status.exitstatus == 0
end
def run_in_shell(*args)
POSIX::Spawn::Child.new *args, :out => [JEKYLL_COMMAND_OUTPUT_FILE, "w"]
end
def slug(title)

View File

@@ -0,0 +1,147 @@
require 'fileutils'
require 'colorator'
require 'cucumber/formatter/console'
require 'cucumber/formatter/io'
require 'gherkin/formatter/escaping'
module Features
module Support
# The formatter used for <tt>--format pretty</tt> (the default formatter).
#
# This formatter prints features to plain text - exactly how they were parsed,
# just prettier. That means with proper indentation and alignment of table columns.
#
# If the output is STDOUT (and not a file), there are bright colours to watch too.
#
class Overview
include FileUtils
include Cucumber::Formatter::Console
include Cucumber::Formatter::Io
include Gherkin::Formatter::Escaping
attr_writer :indent
attr_reader :runtime
def initialize(runtime, path_or_io, options)
@runtime, @io, @options = runtime, ensure_io(path_or_io, "pretty"), options
@exceptions = []
@indent = 0
@prefixes = options[:prefixes] || {}
@delayed_messages = []
end
def before_features(features)
print_profile_information
end
def after_features(features)
@io.puts
print_summary(features)
end
def before_feature(feature)
@exceptions = []
@indent = 0
end
def comment_line(comment_line)
end
def after_tags(tags)
end
def tag_name(tag_name)
end
def before_feature_element(feature_element)
@indent = 2
@scenario_indent = 2
end
def after_feature_element(feature_element)
end
def before_background(background)
@indent = 2
@scenario_indent = 2
@in_background = true
end
def after_background(background)
@in_background = nil
end
def background_name(keyword, name, file_colon_line, source_indent)
print_feature_element_name(keyword, name, file_colon_line, source_indent)
end
def scenario_name(keyword, name, file_colon_line, source_indent)
print_feature_element_name(keyword, name, file_colon_line, source_indent)
end
def before_step(step)
@current_step = step
end
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
@hide_this_step = false
if exception
if @exceptions.include?(exception)
@hide_this_step = true
return
end
@exceptions << exception
end
if status != :failed && @in_background ^ background
@hide_this_step = true
return
end
@status = status
end
CHARS = {
:failed => "x".red,
:pending => "?".yellow,
:undefined => "x".red,
:passed => ".".green,
:skipped => "-".blue
}
def step_name(keyword, step_match, status, source_indent, background, file_colon_line)
@io.print CHARS[status]
end
def exception(exception, status)
return if @hide_this_step
@io.puts
print_exception(exception, status, @indent)
@io.flush
end
private
def print_feature_element_name(keyword, name, file_colon_line, source_indent)
@io.puts
names = name.empty? ? [name] : name.split("\n")
line = " #{keyword}: #{names[0]}"
if @options[:source]
line_comment = "#{file_colon_line}"
@io.print(line_comment)
end
@io.print(line)
@io.print " "
@io.flush
end
def cell_prefix(status)
@prefixes[status]
end
def print_summary(features)
@io.puts
print_stats(features, @options)
print_snippets(@options)
print_passing_wip(@options)
end
end
end
end

View File

@@ -5,58 +5,44 @@ require 'jekyll/version'
Gem::Specification.new do |s|
s.specification_version = 2 if s.respond_to? :specification_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
s.rubygems_version = '2.2.2'
s.required_ruby_version = '>= 1.9.3'
s.required_ruby_version = '>= 2.0.0'
s.name = 'jekyll'
s.version = Jekyll::VERSION
s.license = 'MIT'
s.name = 'jekyll'
s.version = Jekyll::VERSION
s.license = 'MIT'
s.summary = "A simple, blog aware, static site generator."
s.description = "Jekyll is a simple, blog aware, static site generator."
s.summary = 'A simple, blog aware, static site generator.'
s.description = 'Jekyll is a simple, blog aware, static site generator.'
s.authors = ["Tom Preston-Werner"]
s.email = 'tom@mojombo.com'
s.homepage = 'http://github.com/jekyll/jekyll'
s.authors = ['Tom Preston-Werner']
s.email = 'tom@mojombo.com'
s.homepage = 'https://github.com/jekyll/jekyll'
s.files = `git ls-files`.split($/)
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
s.test_files = s.files.grep(%r{^(test|spec|features)/})
s.require_paths = ["lib"]
all_files = `git ls-files -z`.split("\x0")
s.files = all_files.grep(%r{^(bin|lib)/})
s.executables = all_files.grep(%r{^bin/}) { |f| File.basename(f) }
s.require_paths = ['lib']
s.rdoc_options = ["--charset=UTF-8"]
s.rdoc_options = ['--charset=UTF-8']
s.extra_rdoc_files = %w[README.markdown LICENSE]
s.add_runtime_dependency('liquid', "~> 2.5.5")
s.add_runtime_dependency('classifier', "~> 1.3")
s.add_runtime_dependency('listen', "~> 2.5")
s.add_runtime_dependency('kramdown', "~> 1.3")
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
s.add_runtime_dependency('mercenary', "~> 0.3.3")
s.add_runtime_dependency('safe_yaml', "~> 1.0")
s.add_runtime_dependency('colorator', "~> 0.1")
s.add_runtime_dependency('redcarpet', "~> 3.1")
s.add_runtime_dependency('liquid', '~> 3.0')
s.add_runtime_dependency('kramdown', '~> 1.3')
s.add_runtime_dependency('mercenary', '~> 0.3.3')
s.add_runtime_dependency('safe_yaml', '~> 1.0')
s.add_runtime_dependency('colorator', '~> 0.1')
# Before 3.0 drops, phase the following gems out as dev dependencies
# and gracefully handle their absence.
s.add_runtime_dependency('pygments.rb', '~> 0.6.0')
s.add_runtime_dependency('redcarpet', '~> 3.1')
s.add_runtime_dependency('toml', '~> 0.1.0')
s.add_runtime_dependency('jekyll-paginate', '~> 1.0')
s.add_runtime_dependency('jekyll-gist', '~> 1.0')
s.add_runtime_dependency('jekyll-coffeescript', '~> 1.0')
s.add_runtime_dependency('jekyll-sass-converter', '~> 1.0')
s.add_development_dependency('rake', "~> 10.1")
s.add_development_dependency('rdoc', "~> 3.11")
s.add_development_dependency('redgreen', "~> 1.2")
s.add_development_dependency('shoulda', "~> 3.5")
s.add_development_dependency('rr', "~> 1.1")
s.add_development_dependency('cucumber', "1.3.11")
s.add_development_dependency('RedCloth', "~> 4.2")
s.add_development_dependency('maruku', "0.7.0")
s.add_development_dependency('rdiscount', "~> 1.6")
s.add_development_dependency('launchy', "~> 2.3")
s.add_development_dependency('simplecov', "~> 0.7")
s.add_development_dependency('simplecov-gem-adapter', "~> 1.0.1")
s.add_development_dependency('coveralls', "~> 0.7.0")
s.add_development_dependency('mime-types', "~> 1.5")
s.add_development_dependency('activesupport', '~> 3.2.13')
s.add_development_dependency('jekyll_test_plugin')
s.add_development_dependency('jekyll_test_plugin_malicious')
s.add_development_dependency('rouge', '~> 1.3')
s.add_runtime_dependency('jekyll-watch', '~> 1.1')
s.add_runtime_dependency('classifier-reborn', '~> 2.0')
end

View File

@@ -18,50 +18,150 @@ require 'rubygems'
# stdlib
require 'fileutils'
require 'time'
require 'safe_yaml/load'
require 'English'
require 'pathname'
require 'logger'
require 'set'
# 3rd party
require 'safe_yaml/load'
require 'liquid'
require 'kramdown'
require 'colorator'
require 'toml'
# internal requires
require 'jekyll/version'
require 'jekyll/utils'
require 'jekyll/stevenson'
require 'jekyll/deprecator'
require 'jekyll/configuration'
require 'jekyll/document'
require 'jekyll/collection'
require 'jekyll/plugin_manager'
require 'jekyll/frontmatter_defaults'
require 'jekyll/site'
require 'jekyll/convertible'
require 'jekyll/url'
require 'jekyll/layout'
require 'jekyll/page'
require 'jekyll/post'
require 'jekyll/excerpt'
require 'jekyll/draft'
require 'jekyll/filters'
require 'jekyll/static_file'
require 'jekyll/errors'
require 'jekyll/related_posts'
require 'jekyll/cleaner'
require 'jekyll/entry_filter'
require 'jekyll/layout_reader'
require 'jekyll/publisher'
require 'jekyll/renderer'
SafeYAML::OPTIONS[:suppress_warnings] = true
Liquid::Template.error_mode = :strict
# extensions
require 'jekyll/plugin'
require 'jekyll/converter'
require 'jekyll/generator'
require 'jekyll/command'
require 'jekyll/liquid_extensions'
module Jekyll
# internal requires
autoload :Cleaner, 'jekyll/cleaner'
autoload :Collection, 'jekyll/collection'
autoload :Configuration, 'jekyll/configuration'
autoload :Convertible, 'jekyll/convertible'
autoload :Deprecator, 'jekyll/deprecator'
autoload :Document, 'jekyll/document'
autoload :Draft, 'jekyll/draft'
autoload :EntryFilter, 'jekyll/entry_filter'
autoload :Errors, 'jekyll/errors'
autoload :Excerpt, 'jekyll/excerpt'
autoload :External, 'jekyll/external'
autoload :Filters, 'jekyll/filters'
autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
autoload :Layout, 'jekyll/layout'
autoload :LayoutReader, 'jekyll/layout_reader'
autoload :LogAdapter, 'jekyll/log_adapter'
autoload :Metadata, 'jekyll/metadata'
autoload :Page, 'jekyll/page'
autoload :PluginManager, 'jekyll/plugin_manager'
autoload :Post, 'jekyll/post'
autoload :Publisher, 'jekyll/publisher'
autoload :RelatedPosts, 'jekyll/related_posts'
autoload :Renderer, 'jekyll/renderer'
autoload :Site, 'jekyll/site'
autoload :StaticFile, 'jekyll/static_file'
autoload :Stevenson, 'jekyll/stevenson'
autoload :URL, 'jekyll/url'
autoload :Utils, 'jekyll/utils'
autoload :VERSION, 'jekyll/version'
# extensions
require 'jekyll/plugin'
require 'jekyll/converter'
require 'jekyll/generator'
require 'jekyll/command'
require 'jekyll/liquid_extensions'
class << self
# Public: Tells you which Jekyll environment you are building in so you can skip tasks
# if you need to. This is useful when doing expensive compression tasks on css and
# images and allows you to skip that when working in development.
def env
ENV["JEKYLL_ENV"] || "development"
end
# Public: Generate a Jekyll configuration Hash by merging the default
# options with anything in _config.yml, and adding the given options on top.
#
# override - A Hash of config directives that override any options in both
# the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
# list of option names and their defaults.
#
# Returns the final configuration Hash.
def configuration(override = Hash.new)
config = Configuration[Configuration::DEFAULTS]
override = Configuration[override].stringify_keys
unless override.delete('skip_config_files')
config = config.read_config_files(config.config_files(override))
end
# Merge DEFAULTS < _config.yml < override
config = Utils.deep_merge_hashes(config, override).stringify_keys
set_timezone(config['timezone']) if config['timezone']
config
end
# Public: Set the TZ environment variable to use the timezone specified
#
# timezone - the IANA Time Zone
#
# Returns nothing
def set_timezone(timezone)
ENV['TZ'] = timezone
end
# Public: Fetch the logger instance for this Jekyll process.
#
# Returns the LogAdapter instance.
def logger
@logger ||= LogAdapter.new(Stevenson.new, (ENV["JEKYLL_LOG_LEVEL"] || :info).to_sym)
end
# Public: Set the log writer.
# New log writer must respond to the same methods
# as Ruby's interal Logger.
#
# writer - the new Logger-compatible log transport
#
# Returns the new logger.
def logger=(writer)
@logger = LogAdapter.new(writer)
end
# Public: An array of sites
#
# Returns the Jekyll sites created.
def sites
@sites ||= []
end
# Public: Ensures the questionable path is prefixed with the base directory
# and prepends the questionable path with the base directory if false.
#
# base_directory - the directory with which to prefix the questionable path
# questionable_path - the path we're unsure about, and want prefixed
#
# Returns the sanitized path.
def sanitized_path(base_directory, questionable_path)
return base_directory if base_directory.eql?(questionable_path)
clean_path = File.expand_path(questionable_path, "/")
clean_path = clean_path.sub(/\A\w\:\//, '/')
unless clean_path.start_with?(base_directory.sub(/\A\w\:\//, '/'))
File.join(base_directory, clean_path)
else
clean_path
end
end
# Conditional optimizations
Jekyll::External.require_if_present('liquid-c')
end
end
require_all 'jekyll/commands'
require_all 'jekyll/converters'
@@ -69,60 +169,11 @@ require_all 'jekyll/converters/markdown'
require_all 'jekyll/generators'
require_all 'jekyll/tags'
# plugins
require 'jekyll-coffeescript'
require 'jekyll-sass-converter'
SafeYAML::OPTIONS[:suppress_warnings] = true
module Jekyll
# Public: Generate a Jekyll configuration Hash by merging the default
# options with anything in _config.yml, and adding the given options on top.
#
# override - A Hash of config directives that override any options in both
# the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
# list of option names and their defaults.
#
# Returns the final configuration Hash.
def self.configuration(override)
config = Configuration[Configuration::DEFAULTS]
override = Configuration[override].stringify_keys
config = config.read_config_files(config.config_files(override))
# Merge DEFAULTS < _config.yml < override
config = Utils.deep_merge_hashes(config, override).stringify_keys
set_timezone(config['timezone']) if config['timezone']
config
end
# Static: Set the TZ environment variable to use the timezone specified
#
# timezone - the IANA Time Zone
#
# Returns nothing
def self.set_timezone(timezone)
ENV['TZ'] = timezone
end
def self.logger
@logger ||= Stevenson.new
end
# Public: File system root
#
# Returns the root of the filesystem as a Pathname
def self.fs_root
@fs_root ||= "/"
end
def self.sanitized_path(base_directory, questionable_path)
clean_path = File.expand_path(questionable_path, fs_root)
clean_path.gsub!(/\A\w\:\//, '/')
unless clean_path.start_with?(base_directory)
File.join(base_directory, clean_path)
else
clean_path
end
end
end
# Eventually remove these for 3.0 as non-core
Jekyll::External.require_with_graceful_fail(%w[
toml
jekyll-paginate
jekyll-gist
jekyll-coffeescript
jekyll-sass-converter
])

View File

@@ -13,6 +13,7 @@ module Jekyll
# Cleans up the site's destination directory
def cleanup!
FileUtils.rm_rf(obsolete_files)
FileUtils.rm_rf(metadata_file) if @site.full_rebuild?
end
private
@@ -24,13 +25,20 @@ module Jekyll
(existing_files - new_files - new_dirs + replaced_files).to_a
end
# Private: The metadata file storing dependency tree and build history
#
# Returns an Array with the metdata file as the only item
def metadata_file
[site.metadata.metadata_file]
end
# Private: The list of existing files, apart from those included in keep_files and hidden files.
#
# Returns a Set with the file paths
def existing_files
files = Set.new
Dir.glob(File.join(site.dest, "**", "*"), File::FNM_DOTMATCH) do |file|
files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex
Dir.glob(site.in_dest_dir("**", "*"), File::FNM_DOTMATCH) do |file|
files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex || keep_dirs.include?(file)
end
files
end
@@ -49,7 +57,19 @@ module Jekyll
#
# Returns a Set with the directory paths
def new_dirs
new_files.map { |file| File.dirname(file) }.to_set
new_files.map { |file| parent_dirs(file) }.flatten.to_set
end
# Private: The list of parent directories of a given file
#
# Returns an Array with the directory paths
def parent_dirs(file)
parent_dir = File.dirname(file)
if parent_dir == site.dest
[]
else
[parent_dir] + parent_dirs(parent_dir)
end
end
# Private: The list of existing files that will be replaced by a directory during build
@@ -59,6 +79,14 @@ module Jekyll
new_dirs.select { |dir| File.file?(dir) }.to_set
end
# Private: The list of directories that need to be kept because they are parent directories
# of files specified in keep_files
#
# Returns a Set with the directory paths
def keep_dirs
site.keep_files.map { |file| parent_dirs(site.in_dest_dir(file)) }.flatten.to_set
end
# Private: Creates a regular expression from the config's keep_files array
#
# Examples

View File

@@ -22,14 +22,29 @@ module Jekyll
@docs ||= []
end
# Fetch the static files in this collection.
# Defaults to an empty array if no static files have been read in.
#
# Returns an array of Jekyll::StaticFile objects.
def files
@files ||= []
end
# Read the allowed documents into the collection's array of docs.
#
# Returns the sorted array of docs.
def read
filtered_entries.each do |file_path|
doc = Jekyll::Document.new(Jekyll.sanitized_path(directory, file_path), { site: site, collection: self })
doc.read
docs << doc
full_path = collection_dir(file_path)
next if File.directory?(full_path)
if Utils.has_yaml_header? full_path
doc = Jekyll::Document.new(full_path, { site: site, collection: self })
doc.read
docs << doc if site.publisher.publish?(doc)
else
relative_dir = Jekyll.sanitized_path(relative_directory, File.dirname(file_path)).chomp("/.")
files << StaticFile.new(site, site.source, relative_dir, File.basename(full_path), self)
end
end
docs.sort!
end
@@ -40,9 +55,10 @@ module Jekyll
# relative to the collection's directory
def entries
return Array.new unless exists?
Dir.glob(File.join(directory, "**", "*.*")).map do |entry|
entry[File.join(directory, "")] = ''; entry
end
@entries ||=
Dir.glob(collection_dir("**", "*.*")).map do |entry|
entry["#{collection_dir}/"] = ''; entry
end
end
# Filtered version of the entries in this collection.
@@ -51,9 +67,13 @@ module Jekyll
# Returns a list of filtered entry paths.
def filtered_entries
return Array.new unless exists?
Dir.chdir(directory) do
entry_filter.filter(entries)
end
@filtered_entries ||=
Dir.chdir(directory) do
entry_filter.filter(entries).reject do |f|
path = collection_dir(f)
File.directory?(path) || (File.symlink?(f) && site.safe)
end
end
end
# The directory for this Collection, relative to the site source.
@@ -61,15 +81,28 @@ module Jekyll
# Returns a String containing the directory name where the collection
# is stored on the filesystem.
def relative_directory
"_#{label}"
@relative_directory ||= "_#{label}"
end
# The full path to the directory containing the
# The full path to the directory containing the collection.
#
# Returns a String containing th directory name where the collection
# is stored on the filesystem.
def directory
Jekyll.sanitized_path(site.source, relative_directory)
@directory ||= site.in_source_dir(relative_directory)
end
# The full path to the directory containing the collection, with
# optional subpaths.
#
# *files - (optional) any other path pieces relative to the
# directory to append to the path
#
# Returns a String containing th directory name where the collection
# is stored on the filesystem.
def collection_dir(*files)
return directory if files.empty?
site.in_source_dir(relative_directory, *files)
end
# Checks whether the directory "exists" for this collection.
@@ -105,7 +138,7 @@ module Jekyll
#
# Returns a sanitized version of the label.
def sanitize_label(label)
label.gsub(/[^a-z0-9_\-]/i, '')
label.gsub(/[^a-z0-9_\-\.]/i, '')
end
# Produce a representation of this Collection for use in Liquid.
@@ -118,6 +151,7 @@ module Jekyll
metadata.merge({
"label" => label,
"docs" => docs,
"files" => files,
"directory" => directory,
"output" => write?,
"relative_directory" => relative_directory
@@ -132,6 +166,13 @@ module Jekyll
!!metadata['output']
end
# The URL template to render collection's documents at.
#
# Returns the URL template to render collection's documents at.
def url_template
metadata.fetch('permalink', "/:collection/:path:output_ext")
end
# Extract options for this collection from the site configuration.
#
# Returns the metadata for this collection
@@ -142,6 +183,5 @@ module Jekyll
{}
end
end
end
end

View File

@@ -19,21 +19,6 @@ module Jekyll
super(base)
end
# Listing of all directories (globbed to include subfiles and folders)
#
# source - the source path
# destination - the destination path
#
# Returns an Array of directory globs in the source, excluding the destination
def globs(source, destination)
Dir.chdir(source) do
dirs = Dir['*'].select { |x| File.directory?(x) }
dirs -= [destination, File.expand_path(destination), File.basename(destination)]
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
end
# Run Site#process and catch errors
#
# site - the Jekyll::Site object
@@ -41,7 +26,7 @@ module Jekyll
# Returns nothing
def process_site(site)
site.process
rescue Jekyll::FatalException => e
rescue Jekyll::Errors::FatalException => e
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
Jekyll.logger.error "", "------------------------------------"
Jekyll.logger.error "", e.message
@@ -66,13 +51,14 @@ module Jekyll
c.option 'config', '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.option 'future', '--future', 'Publishes posts with a future date'
c.option 'limit_posts', '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
c.option 'watch', '-w', '--watch', 'Watch for changes and rebuild'
c.option 'watch', '-w', '--[no-]watch', 'Watch for changes and rebuild'
c.option 'force_polling', '--force_polling', 'Force watch to use polling'
c.option 'lsi', '--lsi', 'Use LSI for improved related posts'
c.option 'show_drafts', '-D', '--drafts', 'Render posts in the _drafts folder'
c.option 'unpublished', '--unpublished', 'Render posts that were marked as unpublished'
c.option 'quiet', '-q', '--quiet', 'Silence output.'
c.option 'verbose', '-V', '--verbose', 'Print verbose output.'
c.option 'full_rebuild', '-f', '--full-rebuild', 'Disable incremental rebuild.'
end
end

View File

@@ -9,6 +9,7 @@ module Jekyll
prog.command(:build) do |c|
c.syntax 'build [options]'
c.description 'Build your site'
c.alias :b
add_build_options(c)
@@ -22,26 +23,37 @@ module Jekyll
# Build your jekyll site
# Continuously watch if `watch` is set to true in the config.
def process(options)
Jekyll.logger.log_level = :error if options['quiet']
options = configuration_from_options(options)
site = Jekyll::Site.new(options)
Jekyll.logger.log_level = :error if options['quiet']
if options.fetch('skip_initial_build', false)
Jekyll.logger.warn "Build Warning:", "Skipping the initial build. This may result in an out-of-date site."
else
build(site, options)
end
build(site, options)
watch(site, options) if options['watch']
if options.fetch('watch', false)
watch(site, options)
else
Jekyll.logger.info "Auto-regeneration:", "disabled. Use --watch to enable."
end
end
# Build your Jekyll site.
#
# site - the Jekyll::Site instance to build
# options - the
# options - A Hash of options passed to the command
#
# Returns nothing.
def build(site, options)
source = options['source']
destination = options['destination']
full_build = options['full_rebuild']
Jekyll.logger.info "Source:", source
Jekyll.logger.info "Destination:", destination
Jekyll.logger.info "Incremental build:", (full_build ? "disabled" : "enabled")
Jekyll.logger.info "Generating..."
process_site(site)
Jekyll.logger.info "", "done."
@@ -54,49 +66,8 @@ module Jekyll
#
# Returns nothing.
def watch(site, options)
require 'listen'
source = options['source']
destination = options['destination']
begin
dest = Pathname.new(destination).relative_path_from(Pathname.new(source)).to_s
ignored = Regexp.new(Regexp.escape(dest))
rescue ArgumentError
# Destination is outside the source, no need to ignore it.
ignored = nil
end
listener = Listen.to(
source,
:ignore => ignored,
:force_polling => options['force_polling']
) do |modified, added, removed|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
n = modified.length + added.length + removed.length
print Jekyll.logger.formatted_topic("Regenerating:") + "#{n} files at #{t} "
begin
process_site(site)
puts "...done."
rescue => e
puts "...error:"
Jekyll.logger.warn "Error:", e.message
Jekyll.logger.warn "Error:", "Run jekyll build --trace for more information."
end
end
listener.start
Jekyll.logger.info "Auto-regeneration:", "enabled"
unless options['serving']
trap("INT") do
listener.stop
puts " Halting auto-regeneration."
exit 0
end
loop { sleep 1000 }
end
External.require_with_graceful_fail 'jekyll-watch'
Jekyll::Watcher.watch(options)
end
end # end of class << self

View File

@@ -0,0 +1,42 @@
module Jekyll
module Commands
class Clean < Command
class << self
def init_with_program(prog)
prog.command(:clean) do |c|
c.syntax 'clean [subcommand]'
c.description 'Clean the site (removes site output and metadata file) without building.'
c.action do |args, _|
Jekyll::Commands::Clean.process({})
end
end
end
def process(options)
options = configuration_from_options(options)
destination = options['destination']
metadata_file = File.join(options['source'], '.jekyll-metadata')
if File.directory? destination
Jekyll.logger.info "Cleaning #{destination}..."
FileUtils.rm_rf(destination)
Jekyll.logger.info "", "done."
else
Jekyll.logger.info "Nothing to do for #{destination}."
end
if File.file? metadata_file
Jekyll.logger.info "Removing #{metadata_file}..."
FileUtils.rm_rf(metadata_file)
Jekyll.logger.info "", "done."
else
Jekyll.logger.info "Nothing to do for #{metadata_file}."
end
end
end
end
end
end

View File

@@ -1,30 +0,0 @@
module Jekyll
module Commands
class Docs < Command
class << self
def init_with_program(prog)
prog.command(:docs) do |c|
c.syntax 'docs'
c.description "Launch local server with docs for Jekyll v#{Jekyll::VERSION}"
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
c.action do |args, options|
options.merge!({
'source' => File.expand_path("../../../site", File.dirname(__FILE__)),
'destination' => File.expand_path("../../../site/_site", File.dirname(__FILE__))
})
Jekyll::Commands::Build.process(options)
Jekyll::Commands::Serve.process(options)
end
end
end
end
end
end
end

View File

@@ -0,0 +1,33 @@
module Jekyll
module Commands
class Help < Command
class << self
def init_with_program(prog)
prog.command(:help) do |c|
c.syntax 'help [subcommand]'
c.description 'Show the help message, optionally for a given subcommand.'
c.action do |args, _|
cmd = (args.first || "").to_sym
if args.empty?
puts prog
elsif prog.has_command? cmd
puts prog.commands[cmd]
else
invalid_command(prog, cmd)
abort
end
end
end
end
def invalid_command(prog, cmd)
Jekyll.logger.error "Error:", "Hmm... we don't know what the '#{cmd}' command is."
Jekyll.logger.info "Valid commands:", prog.commands.keys.join(", ")
end
end
end
end
end

View File

@@ -3,78 +3,80 @@ require 'erb'
module Jekyll
module Commands
class New < Command
def self.init_with_program(prog)
prog.command(:new) do |c|
c.syntax 'new PATH'
c.description 'Creates a new Jekyll site scaffold in PATH'
class << self
def init_with_program(prog)
prog.command(:new) do |c|
c.syntax 'new PATH'
c.description 'Creates a new Jekyll site scaffold in PATH'
c.option 'force', '--force', 'Force creation even if PATH already exists'
c.option 'blank', '--blank', 'Creates scaffolding but with empty files'
c.action do |args, options|
Jekyll::Commands::New.process(args, options)
end
end
end
def self.process(args, options = {})
raise ArgumentError.new('You must specify a path.') if args.empty?
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
FileUtils.mkdir_p new_blog_path
if preserve_source_location?(new_blog_path, options)
Jekyll.logger.abort_with "Conflict:", "#{new_blog_path} exists and is not empty."
end
if options["blank"]
create_blank_site new_blog_path
else
create_sample_files new_blog_path
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
f.write(scaffold_post_content)
c.option 'force', '--force', 'Force creation even if PATH already exists'
c.option 'blank', '--blank', 'Creates scaffolding but with empty files'
c.action do |args, options|
Jekyll::Commands::New.process(args, options)
end
end
end
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
end
def process(args, options = {})
raise ArgumentError.new('You must specify a path.') if args.empty?
def self.create_blank_site(path)
Dir.chdir(path) do
FileUtils.mkdir(%w(_layouts _posts _drafts))
FileUtils.touch("index.html")
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
FileUtils.mkdir_p new_blog_path
if preserve_source_location?(new_blog_path, options)
Jekyll.logger.abort_with "Conflict:", "#{new_blog_path} exists and is not empty."
end
if options["blank"]
create_blank_site new_blog_path
else
create_sample_files new_blog_path
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
f.write(scaffold_post_content)
end
end
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
end
end
def self.scaffold_post_content
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
end
def create_blank_site(path)
Dir.chdir(path) do
FileUtils.mkdir(%w(_layouts _posts _drafts))
FileUtils.touch("index.html")
end
end
# Internal: Gets the filename of the sample post to be created
#
# Returns the filename of the sample post, as a String
def self.initialized_post_name
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
end
def scaffold_post_content
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
end
private
# Internal: Gets the filename of the sample post to be created
#
# Returns the filename of the sample post, as a String
def initialized_post_name
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
end
def self.preserve_source_location?(path, options)
!options["force"] && !Dir["#{path}/**/*"].empty?
end
private
def self.create_sample_files(path)
FileUtils.cp_r site_template + '/.', path
FileUtils.rm File.expand_path(scaffold_path, path)
end
def preserve_source_location?(path, options)
!options["force"] && !Dir["#{path}/**/*"].empty?
end
def self.site_template
File.expand_path("../../site_template", File.dirname(__FILE__))
end
def create_sample_files(path)
FileUtils.cp_r site_template + '/.', path
FileUtils.rm File.expand_path(scaffold_path, path)
end
def self.scaffold_path
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
end
def site_template
File.expand_path("../../site_template", File.dirname(__FILE__))
end
def scaffold_path
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
end
end
end
end
end

View File

@@ -10,6 +10,7 @@ module Jekyll
c.syntax 'serve [options]'
c.description 'Serve your site locally'
c.alias :server
c.alias :s
add_build_options(c)
@@ -17,9 +18,11 @@ module Jekyll
c.option 'port', '-P', '--port [PORT]', 'Port to listen on'
c.option 'host', '-H', '--host [HOST]', 'Host to bind to'
c.option 'baseurl', '-b', '--baseurl [URL]', 'Base URL'
c.option 'skip_initial_build', '--skip-initial-build', 'Skips the initial site build which occurs before the server is started.'
c.action do |args, options|
options["serving"] ||= true
options["serving"] = true
options["watch"] = true unless options.key?("watch")
Jekyll::Commands::Build.process(options)
Jekyll::Commands::Serve.process(options)
end
@@ -73,16 +76,20 @@ module Jekyll
def webrick_options(config)
opts = {
:DocumentRoot => config['destination'],
:Port => config['port'],
:BindAddress => config['host'],
:MimeTypes => mime_types,
:DirectoryIndex => %w(index.html index.htm index.cgi index.rhtml index.xml),
:DocumentRoot => config['destination'],
:DoNotReverseLookup => true,
:StartCallback => start_callback(config['detach']),
:DirectoryIndex => %w(index.html index.htm index.cgi index.rhtml index.xml)
:MimeTypes => mime_types,
:Port => config['port'],
:StartCallback => start_callback(config['detach'])
}
if !config['verbose']
if config['verbose']
opts.merge!({
:Logger => WEBrick::Log.new($stdout, WEBrick::Log::DEBUG)
})
else
opts.merge!({
:AccessLog => [],
:Logger => WEBrick::Log.new([], WEBrick::Log::WARN)
@@ -116,9 +123,10 @@ module Jekyll
# recreate NondisclosureName under utf-8 circumstance
def file_handler_options
fh_option = WEBrick::Config::FileHandler
fh_option[:NondisclosureName] = ['.ht*','~*']
fh_option
WEBrick::Config::FileHandler.merge({
:FancyIndexing => true,
:NondisclosureName => ['.ht*','~*']
})
end
end

View File

@@ -6,46 +6,56 @@ module Jekyll
# Default options. Overridden by values in _config.yml.
# Strings rather than symbols are used for compatibility with YAML.
DEFAULTS = {
# Where things are
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => '_plugins',
'layouts' => '_layouts',
'data_source' => '_data',
'keep_files' => ['.git','.svn'],
'gems' => [],
'collections' => nil,
'timezone' => nil, # use the local timezone
'encoding' => 'utf-8', # always use utf-8 encoding. NEVER FORGET
# Handling Reading
'safe' => false,
'detach' => false, # default to not detaching the server
'include' => ['.htaccess'],
'exclude' => [],
'keep_files' => ['.git','.svn'],
'encoding' => 'utf-8',
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
'textile_ext' => 'textile',
'full_rebuild' => false,
# Filtering Content
'show_drafts' => nil,
'limit_posts' => 0,
'lsi' => false,
'future' => true, # remove and make true just default
'unpublished' => false,
'relative_permalinks' => false,
# Plugins
'whitelist' => [],
'gems' => [],
# Conversion
'markdown' => 'kramdown',
'highlighter' => 'pygments',
'permalink' => 'date',
'baseurl' => '',
'include' => ['.htaccess'],
'exclude' => [],
'paginate_path' => '/page:num',
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
'textile_ext' => 'textile',
'port' => '4000',
'host' => '0.0.0.0',
'lsi' => false,
'excerpt_separator' => "\n\n",
'defaults' => [],
# Serving
'detach' => false, # default to not detaching the server
'port' => '4000',
'host' => '127.0.0.1',
'baseurl' => '',
# Backwards-compatibility options
'relative_permalinks' => false,
# Output Configuration
'permalink' => 'date',
'paginate_path' => '/page:num',
'timezone' => nil, # use the local timezone
'quiet' => false,
'defaults' => [],
'maruku' => {
'use_tex' => false,
@@ -65,12 +75,12 @@ module Jekyll
},
'kramdown' => {
'auto_ids' => true,
'footnote_nr' => 1,
'entity_output' => 'as_char',
'toc_levels' => '1..6',
'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo',
'use_coderay' => false,
'auto_ids' => true,
'footnote_nr' => 1,
'entity_output' => 'as_char',
'toc_levels' => '1..6',
'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo',
'enable_coderay' => false,
'coderay' => {
'coderay_wrap' => 'div',
@@ -103,11 +113,15 @@ module Jekyll
override['source'] || self['source'] || DEFAULTS['source']
end
def quiet?(override = {})
override['quiet'] || self['quiet'] || DEFAULTS['quiet']
end
def safe_load_file(filename)
case File.extname(filename)
when '.toml'
when /\.toml/i
TOML.load_file(filename)
when /\.y(a)?ml/
when /\.ya?ml/i
SafeYAML.load_file(filename)
else
raise ArgumentError, "No parser for '#{filename}' is available. Use a .toml or .y(a)ml file instead."
@@ -120,10 +134,16 @@ module Jekyll
#
# Returns an Array of config files
def config_files(override)
# Be quiet quickly.
Jekyll.logger.log_level = :error if quiet?(override)
# Get configuration from <source>/_config.yml or <source>/<config_file>
config_files = override.delete('config')
if config_files.to_s.empty?
config_files = File.join(source(override), "_config.yml")
default = %w[yml yaml].find(Proc.new { 'yml' }) do |ext|
File.exists? Jekyll.sanitized_path(source(override), "_config.#{ext}")
end
config_files = Jekyll.sanitized_path(source(override), "_config.#{default}")
@default_config_file = true
end
config_files = [config_files] unless config_files.is_a? Array
@@ -189,31 +209,31 @@ module Jekyll
def backwards_compatibilize
config = clone
# Provide backwards-compatibility
if config.has_key?('auto') || config.has_key?('watch')
if config.key?('auto') || config.key?('watch')
Jekyll.logger.warn "Deprecation:", "Auto-regeneration can no longer" +
" be set from your configuration file(s). Use the"+
" --watch/-w command-line option instead."
" --[no-]watch/-w command-line option instead."
config.delete('auto')
config.delete('watch')
end
if config.has_key? 'server'
if config.key? 'server'
Jekyll.logger.warn "Deprecation:", "The 'server' configuration option" +
" is no longer accepted. Use the 'jekyll serve'" +
" subcommand to serve your site with WEBrick."
config.delete('server')
end
if config.has_key? 'server_port'
if config.key? 'server_port'
Jekyll.logger.warn "Deprecation:", "The 'server_port' configuration option" +
" has been renamed to 'port'. Please update your config" +
" file accordingly."
# copy but don't overwrite:
config['port'] = config['server_port'] unless config.has_key?('port')
config['port'] = config['server_port'] unless config.key?('port')
config.delete('server_port')
end
if config.has_key? 'pygments'
if config.key? 'pygments'
Jekyll.logger.warn "Deprecation:", "The 'pygments' configuration option" +
" has been renamed to 'highlighter'. Please update your" +
" config file accordingly. The allowed values are 'rouge', " +
@@ -231,6 +251,13 @@ module Jekyll
" as a list of comma-separated values."
config[option] = csv_to_array(config[option])
end
config[option].map!(&:to_s)
end
if (config['kramdown'] || {}).key?('use_coderay')
Jekyll::Deprecator.deprecation_message "Please change 'use_coderay'" +
" to 'enable_coderay' in your configuration file."
config['kramdown']['use_coderay'] = config['kramdown'].delete('enable_coderay')
end
if config.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku")
@@ -244,7 +271,7 @@ module Jekyll
def fix_common_issues
config = clone
if config.has_key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1)
if config.key?('paginate') && (!config['paginate'].is_a?(Integer) || config['paginate'] < 1)
Jekyll.logger.warn "Config Warning:", "The `paginate` key must be a" +
" positive integer or nil. It's currently set to '#{config['paginate'].inspect}'."
config['paginate'] = nil

View File

@@ -11,25 +11,50 @@ module Jekyll
@parser =
case @config['markdown'].downcase
when 'redcarpet' then RedcarpetParser.new(@config)
when 'kramdown' then KramdownParser.new(@config)
when 'kramdown' then KramdownParser.new(@config)
when 'rdiscount' then RDiscountParser.new(@config)
when 'maruku' then MarukuParser.new(@config)
when 'maruku' then MarukuParser.new(@config)
else
# So they can't try some tricky bullshit or go down the ancestor chain, I hope.
if allowed_custom_class?(@config['markdown'])
self.class.const_get(@config['markdown']).new(@config)
else
Jekyll.logger.error "Invalid Markdown Processor:", "#{@config['markdown']}"
Jekyll.logger.error "", "Valid options are [ maruku | rdiscount | kramdown | redcarpet ]"
raise FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
Jekyll.logger.error "", "Valid options are [ #{valid_processors.join(" | ")} ]"
raise Errors::FatalException, "Invalid Markdown Processor: #{@config['markdown']}"
end
end
@setup = true
end
def valid_processors
%w[
maruku
rdiscount
kramdown
redcarpet
] + third_party_processors
end
def third_party_processors
self.class.constants - %w[
KramdownParser
MarukuParser
RDiscountParser
RedcarpetParser
PRIORITIES
].map(&:to_sym)
end
def extname_matches_regexp
@extname_matches_regexp ||= Regexp.new(
'^\.(' + @config['markdown_ext'].gsub(',','|') +')$',
Regexp::IGNORECASE
)
end
def matches(ext)
rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$'
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
ext =~ extname_matches_regexp
end
def output_ext(ext)

View File

@@ -8,19 +8,19 @@ module Jekyll
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install kramdown'
raise FatalException.new("Missing dependency: kramdown")
raise Errors::FatalException.new("Missing dependency: kramdown")
end
def convert(content)
# Check for use of coderay
if @config['kramdown']['use_coderay']
if @config['kramdown']['enable_coderay']
%w[wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
key = "coderay_#{opt}"
@config['kramdown'][key] = @config['kramdown']['coderay'][key] unless @config['kramdown'].has_key?(key)
@config['kramdown'][key] = @config['kramdown']['coderay'][key] unless @config['kramdown'].key?(key)
end
end
Kramdown::Document.new(content, Utils.symbolize_hash_keys(@config["kramdown"])).to_html
Kramdown::Document.new(content, Utils.symbolize_hash_keys(@config['kramdown'])).to_html
end
end

View File

@@ -15,7 +15,7 @@ module Jekyll
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install maruku'
raise FatalException.new("Missing dependency: maruku")
raise Errors::FatalException.new("Missing dependency: maruku")
end
def load_divs_library

View File

@@ -3,13 +3,9 @@ module Jekyll
class Markdown
class RDiscountParser
def initialize(config)
require 'rdiscount'
Jekyll::External.require_with_graceful_fail "rdiscount"
@config = config
@rdiscount_extensions = @config['rdiscount']['extensions'].map { |e| e.to_sym }
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install rdiscount'
raise FatalException.new("Missing dependency: rdiscount")
end
def convert(content)

View File

@@ -14,7 +14,7 @@ module Jekyll
module WithPygments
include CommonMethods
def block_code(code, lang)
require 'pygments'
Jekyll::External.require_with_graceful_fail("pygments")
lang = lang && lang.split.first || "text"
add_code_tags(
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
@@ -48,45 +48,47 @@ module Jekyll
end
protected
def rouge_formatter(opts = {})
Rouge::Formatters::HTML.new(opts.merge(wrap: false))
def rouge_formatter(lexer)
Rouge::Formatters::HTML.new(:wrap => false)
end
end
def initialize(config)
require 'redcarpet'
External.require_with_graceful_fail("redcarpet")
@config = config
@redcarpet_extensions = {}
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
@renderer ||= case @config['highlighter']
when 'pygments'
Class.new(Redcarpet::Render::HTML) do
include WithPygments
end
when 'rouge'
Class.new(Redcarpet::Render::HTML) do
require 'rouge'
require 'rouge/plugins/redcarpet'
@renderer ||= class_with_proper_highlighter(@config['highlighter'])
end
if Rouge.version < '1.3.0'
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
end
def class_with_proper_highlighter(highlighter)
case highlighter
when "pygments"
Class.new(Redcarpet::Render::HTML) do
include WithPygments
end
when "rouge"
Class.new(Redcarpet::Render::HTML) do
Jekyll::External.require_with_graceful_fail(%w[
rouge
rouge/plugins/redcarpet
])
include Rouge::Plugins::Redcarpet
include CommonMethods
include WithRouge
end
else
Class.new(Redcarpet::Render::HTML) do
include WithoutHighlighting
end
end
rescue LoadError
STDERR.puts 'You are missing a library required for Markdown. Please run:'
STDERR.puts ' $ [sudo] gem install redcarpet'
raise FatalException.new("Missing dependency: redcarpet")
if Rouge.version < '1.3.0'
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
end
include Rouge::Plugins::Redcarpet
include CommonMethods
include WithRouge
end
else
Class.new(Redcarpet::Render::HTML) do
include WithoutHighlighting
end
end
end
def convert(content)

View File

@@ -13,12 +13,18 @@ module Jekyll
rescue LoadError
STDERR.puts 'You are missing a library required for Textile. Please run:'
STDERR.puts ' $ [sudo] gem install RedCloth'
raise FatalException.new("Missing dependency: RedCloth")
raise Errors::FatalException.new("Missing dependency: RedCloth")
end
def extname_matches_regexp
@extname_matches_regexp ||= Regexp.new(
'(' + @config['textile_ext'].gsub(',','|') +')$',
Regexp::IGNORECASE
)
end
def matches(ext)
rgx = '(' + @config['textile_ext'].gsub(',','|') +')'
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
ext =~ extname_matches_regexp
end
def output_ext(ext)
@@ -32,7 +38,7 @@ module Jekyll
return RedCloth.new(content).to_html if @config['redcloth'].nil?
# List of attributes defined on RedCloth
# (from http://redcloth.rubyforge.org/classes/RedCloth/TextileDoc.html)
# (from https://github.com/jgarber/redcloth/blob/master/lib/redcloth/textile_doc.rb)
attrs = ['filter_classes', 'filter_html', 'filter_ids', 'filter_styles',
'hard_breaks', 'lite_mode', 'no_span_caps', 'sanitize_html']

View File

@@ -25,7 +25,7 @@ module Jekyll
# Whether the file is published or not, as indicated in YAML front-matter
def published?
!(data.has_key?('published') && data['published'] == false)
!(data.key?('published') && data['published'] == false)
end
# Returns merged option hash for File.read of self.site (if exists)
@@ -43,7 +43,7 @@ module Jekyll
# Returns nothing.
def read_yaml(base, name, opts = {})
begin
self.content = File.read(File.join(base, name),
self.content = File.read(site.in_source_dir(base, name),
merged_file_read_opts(opts))
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
self.content = $POSTMATCH
@@ -60,13 +60,17 @@ module Jekyll
# Transform the contents based on the content type.
#
# Returns nothing.
# Returns the transformed contents.
def transform
self.content = converter.convert(content)
rescue => e
Jekyll.logger.error "Conversion error:", "There was an error converting" +
" '#{path}'."
raise e
converters.reduce(content) do |output, converter|
begin
converter.convert output
rescue => e
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error while converting '#{path}':"
Jekyll.logger.error("", e.to_s)
raise e
end
end
end
# Determine the extension depending on content_type.
@@ -74,15 +78,21 @@ module Jekyll
# Returns the String extension for the output file.
# e.g. ".html" for an HTML output file.
def output_ext
converter.output_ext(ext)
if converters.all? { |c| c.is_a?(Jekyll::Converters::Identity) }
ext
else
converters.map { |c|
c.output_ext(ext) unless c.is_a?(Jekyll::Converters::Identity)
}.compact.last
end
end
# Determine which converter to use based on this convertible's
# extension.
#
# Returns the Converter instance.
def converter
@converter ||= site.converters.find { |c| c.matches(ext) }
def converters
@converters ||= site.converters.select { |c| c.matches(ext) }.sort
end
# Render Liquid in the content
@@ -114,16 +124,75 @@ module Jekyll
Utils.deep_merge_hashes defaults, Utils.deep_merge_hashes(data, further_data)
end
# The type of a document,
# i.e., its classname downcase'd and to_sym'd.
#
# Returns the type of self.
def type
if is_a?(Post)
:post
if is_a?(Draft)
:drafts
elsif is_a?(Post)
:posts
elsif is_a?(Page)
:page
elsif is_a?(Draft)
:draft
:pages
end
end
# Determine whether the document is an asset file.
# Asset files include CoffeeScript files and Sass/SCSS files.
#
# Returns true if the extname belongs to the set of extensions
# that asset files use.
def asset_file?
sass_file? || coffeescript_file?
end
# Determine whether the document is a Sass file.
#
# Returns true if extname == .sass or .scss, false otherwise.
def sass_file?
%w[.sass .scss].include?(ext)
end
# Determine whether the document is a CoffeeScript file.
#
# Returns true if extname == .coffee, false otherwise.
def coffeescript_file?
'.coffee'.eql?(ext)
end
# Determine whether the file should be rendered with Liquid.
#
# Always returns true.
def render_with_liquid?
true
end
# Determine whether to regenerate the file based on metadata.
#
# Returns true if file needs to be regenerated
def regenerate?
asset_file? ||
data['regenerate'] ||
site.metadata.regenerate?(site.in_source_dir(relative_path))
end
# Determine whether the file should be placed into layouts.
#
# Returns false if the document is an asset file.
def place_in_layout?
!asset_file?
end
# Checks if the layout specified in the document actually exists
#
# layout - the layout to check
#
# Returns true if the layout is invalid, false if otherwise
def invalid_layout?(layout)
!data["layout"].nil? && layout.nil? && !(self.is_a? Jekyll::Excerpt)
end
# Recursively render layouts
#
# layouts - a list of the layouts
@@ -134,6 +203,9 @@ module Jekyll
def render_all_layouts(layouts, payload, info)
# recursively render layouts
layout = layouts[data["layout"]]
Jekyll.logger.warn("Build Warning:", "Layout '#{data["layout"]}' requested in #{path} does not exist.") if invalid_layout? layout
used = Set.new([layout])
while layout
@@ -144,6 +216,12 @@ module Jekyll
info,
File.join(site.config['layouts'], layout.name))
# Add layout to dependency tree
site.metadata.add_dependency(
site.in_source_dir(path),
site.in_source_dir(layout.path)
)
if layout = layouts[layout.data["layout"]]
if used.include?(layout)
layout = nil # avoid recursive chain
@@ -164,16 +242,16 @@ module Jekyll
info = { :filters => [Jekyll::Filters], :registers => { :site => site, :page => payload['page'] } }
# render and transform content (this becomes the final content of the object)
payload["highlighter_prefix"] = converter.highlighter_prefix
payload["highlighter_suffix"] = converter.highlighter_suffix
payload["highlighter_prefix"] = converters.first.highlighter_prefix
payload["highlighter_suffix"] = converters.first.highlighter_suffix
self.content = render_liquid(content, payload, info)
transform
self.content = render_liquid(content, payload, info) if render_with_liquid?
self.content = transform
# output keeps track of what will finally be written
self.output = content
render_all_layouts(layouts, payload, info)
render_all_layouts(layouts, payload, info) if place_in_layout?
end
# Write the generated page file to the destination directory.

View File

@@ -1,6 +1,8 @@
module Jekyll
class Deprecator
def self.process(args)
module Deprecator
extend self
def process(args)
no_subcommand(args)
arg_is_present? args, "--server", "The --server command has been replaced by the \
'serve' subcommand."
@@ -16,21 +18,27 @@ module Jekyll
arg_is_present? args, "--url", "The 'url' setting can only be set in your config files."
end
def self.no_subcommand(args)
def no_subcommand(args)
if args.size > 0 && args.first =~ /^--/ && !%w[--help --version].include?(args.first)
Jekyll.logger.error "Deprecation:", "Jekyll now uses subcommands instead of just \
switches. Run `jekyll help' to find out more."
deprecation_message "Jekyll now uses subcommands instead of just \
switches. Run `jekyll --help' to find out more."
end
end
def self.arg_is_present?(args, deprecated_argument, message)
def arg_is_present?(args, deprecated_argument, message)
if args.include?(deprecated_argument)
deprecation_message(message)
end
end
def self.deprecation_message(message)
def deprecation_message(message)
Jekyll.logger.error "Deprecation:", message
end
def defaults_deprecate_type(old, current)
Jekyll.logger.warn "Defaults:", "The '#{old}' type has become '#{current}'."
Jekyll.logger.warn "Defaults:", "Please update your front-matter defaults to use 'type: #{current}'."
end
end
end

View File

@@ -1,8 +1,10 @@
# encoding: UTF-8
module Jekyll
class Document
include Comparable
attr_reader :path, :site
attr_reader :path, :site, :extname
attr_accessor :content, :collection, :output
# Create a new Document.
@@ -14,7 +16,9 @@ module Jekyll
def initialize(path, relations)
@site = relations[:site]
@path = path
@extname = File.extname(path)
@collection = relations[:collection]
@has_yaml_header = nil
end
# Fetch the Document's data.
@@ -30,23 +34,21 @@ module Jekyll
# Returns a String path which represents the relative path
# from the site source to this document
def relative_path
Pathname.new(path).relative_path_from(Pathname.new(site.source)).to_s
@relative_path ||= Pathname.new(path).relative_path_from(Pathname.new(site.source)).to_s
end
# The base filename of the document, without the file extname.
#
# Returns the basename without the file extname.
def basename_without_ext
@basename_without_ext ||= File.basename(path, '.*')
end
# The base filename of the document.
#
# suffix - (optional) the suffix to be removed from the end of the filename
#
# Returns the base filename of the document.
def basename(suffix = "")
File.basename(path, suffix)
end
# The extension name of the document.
#
# Returns the extension name of the document.
def extname
File.extname(path)
def basename
@basename ||= File.basename(path)
end
# Produces a "cleaned" relative path.
@@ -61,7 +63,8 @@ module Jekyll
#
# Returns the cleaned relative path of the document.
def cleaned_relative_path
relative_path[0 .. -extname.length - 1].sub(collection.relative_directory, "")
@cleaned_relative_path ||=
relative_path[0 .. -extname.length - 1].sub(collection.relative_directory, "")
end
# Determine whether the document is a YAML file.
@@ -77,7 +80,21 @@ module Jekyll
# Returns true if the extname belongs to the set of extensions
# that asset files use.
def asset_file?
%w[.sass .scss .coffee].include?(extname)
sass_file? || coffeescript_file?
end
# Determine whether the document is a Sass file.
#
# Returns true if extname == .sass or .scss, false otherwise.
def sass_file?
%w[.sass .scss].include?(extname)
end
# Determine whether the document is a CoffeeScript file.
#
# Returns true if extname == .coffee, false otherwise.
def coffeescript_file?
'.coffee'.eql?(extname)
end
# Determine whether the file should be rendered with Liquid.
@@ -85,6 +102,21 @@ module Jekyll
# Returns false if the document is either an asset file or a yaml file,
# true otherwise.
def render_with_liquid?
!(coffeescript_file? || yaml_file?)
end
# Determine whether the document should be regenerated based on metadata.
#
# Returns true if the document needs to be regenerated.
def regenerate?
data['regenerate'] || site.metadata.regenerate?(path, write?)
end
# Determine whether the file should be placed into layouts.
#
# Returns false if the document is either an asset file or a yaml file,
# true otherwise.
def place_in_layout?
!(asset_file? || yaml_file?)
end
@@ -92,7 +124,7 @@ module Jekyll
#
# Returns the URL template for the document.
def url_template
"/:collection/:path:output_ext"
collection.url_template
end
# Construct a Hash of key-value pairs which contain a mapping between
@@ -103,7 +135,9 @@ module Jekyll
{
collection: collection.label,
path: cleaned_relative_path,
output_ext: Jekyll::Renderer.new(site, self).output_ext
output_ext: Jekyll::Renderer.new(site, self).output_ext,
name: Utils.slugify(basename_without_ext),
title: Utils.slugify(data['title']) || Utils.slugify(basename_without_ext)
}
end
@@ -119,7 +153,7 @@ module Jekyll
#
# Returns the computed URL for the document.
def url
@url ||= URL.new({
@url = URL.new({
template: url_template,
placeholders: url_placeholders,
permalink: permalink
@@ -132,7 +166,8 @@ module Jekyll
#
# Returns the full path to the output file of this document.
def destination(base_directory)
path = Jekyll.sanitized_path(base_directory, url)
dest = site.in_dest_dir(base_directory)
path = site.in_dest_dir(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if url =~ /\/$/
path
end
@@ -164,10 +199,12 @@ module Jekyll
#
# Returns true if the 'published' key is specified in the YAML front-matter and not `false`.
def published?
!(data.has_key?('published') && data['published'] == false)
!(data.key?('published') && data['published'] == false)
end
# Read in the file and assign the content and data based on the file contents.
# Merge the frontmatter of the file with the frontmatter default
# values
#
# Returns nothing.
def read(opts = {})
@@ -175,10 +212,17 @@ module Jekyll
@data = SafeYAML.load_file(path)
else
begin
defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
unless defaults.empty?
@data = defaults
end
@content = File.read(path, merged_file_read_opts(opts))
if content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
@content = $POSTMATCH
@data = SafeYAML.load($1)
data_file = SafeYAML.load($1)
unless data_file.nil?
@data = Utils.deep_merge_hashes(defaults, data_file)
end
end
rescue SyntaxError => e
puts "YAML Exception reading #{path}: #{e.message}"
@@ -196,9 +240,10 @@ module Jekyll
Utils.deep_merge_hashes data, {
"output" => output,
"content" => content,
"path" => path,
"relative_path" => relative_path,
"url" => url
"path" => relative_path,
"url" => url,
"collection" => collection.label
}
else
data
@@ -217,7 +262,7 @@ module Jekyll
#
# Returns the content of the document
def to_s
output || content
content || ''
end
# Compare this document against another document.

View File

@@ -14,8 +14,8 @@ module Jekyll
end
# Get the full path to the directory containing the draft files
def containing_dir(source, dir)
File.join(source, dir, '_drafts')
def containing_dir(dir)
site.in_source_dir(dir, '_drafts')
end
# The path to the draft source file, relative to the site source

View File

@@ -47,7 +47,7 @@ module Jekyll
def excluded?(entry)
excluded = glob_include?(site.exclude, relative_to_source(entry))
Jekyll.logger.debug "excluded?(#{relative_to_source(entry)}) ==> #{excluded}"
Jekyll.logger.debug "EntryFilter:", "excluded?(#{relative_to_source(entry)}) ==> #{excluded}"
excluded
end

View File

@@ -1,4 +1,9 @@
module Jekyll
class FatalException < StandardError
module Errors
class FatalException < RuntimeError
end
class MissingDependencyException < FatalException
end
end
end

View File

@@ -1,4 +1,3 @@
require 'jekyll/convertible'
require 'forwardable'
module Jekyll
@@ -26,7 +25,7 @@ module Jekyll
end
def to_liquid
post.to_liquid(Post::EXCERPT_ATTRIBUTES_FOR_LIQUID)
post.to_liquid(post.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
end
# Fetch YAML front-matter data from related post, without layout key
@@ -107,7 +106,7 @@ module Jekyll
# Returns excerpt String
def extract_excerpt(post_content)
separator = site.config['excerpt_separator']
head, _, tail = post_content.partition(separator)
head, _, tail = post_content.to_s.partition(separator)
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
end

59
lib/jekyll/external.rb Normal file
View File

@@ -0,0 +1,59 @@
module Jekyll
module External
class << self
#
# Gems that, if installed, should be loaded.
# Usually contain subcommands.
#
def blessed_gems
%w{
jekyll-docs
jekyll-import
}
end
#
# Require a gem or file if it's present, otherwise silently fail.
#
# names - a string gem name or array of gem names
#
def require_if_present(names)
Array(names).each do |name|
begin
require name
rescue LoadError
Jekyll.logger.debug "Couldn't load #{name}. Skipping."
false
end
end
end
#
# Require a gem or gems. If it's not present, show a very nice error
# message that explains everything and is much more helpful than the
# normal LoadError.
#
# names - a string gem name or array of gem names
#
def require_with_graceful_fail(names)
Array(names).each do |name|
begin
require name
rescue LoadError => e
Jekyll.logger.error "Dependency Error:", <<-MSG
Yikes! It looks like you don't have #{name} or one of its dependencies installed.
In order to use Jekyll as currently configured, you'll need to install this gem.
The full error message from Ruby is: '#{e.message}'
If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!
MSG
raise Jekyll::Errors::MissingDependencyException.new(name)
end
end
end
end
end
end

View File

@@ -10,7 +10,7 @@ module Jekyll
# Returns the HTML formatted String.
def textilize(input)
site = @context.registers[:site]
converter = site.getConverterImpl(Jekyll::Converters::Textile)
converter = site.find_converter_instance(Jekyll::Converters::Textile)
converter.convert(input)
end
@@ -21,10 +21,43 @@ module Jekyll
# Returns the HTML formatted String.
def markdownify(input)
site = @context.registers[:site]
converter = site.getConverterImpl(Jekyll::Converters::Markdown)
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
converter.convert(input)
end
# Convert a Sass string into CSS output.
#
# input - The Sass String to convert.
#
# Returns the CSS formatted String.
def sassify(input)
site = @context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::Sass)
converter.convert(input)
end
# Convert a Scss string into CSS output.
#
# input - The Scss String to convert.
#
# Returns the CSS formatted String.
def scssify(input)
site = @context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::Scss)
converter.convert(input)
end
# Slugify a filename or title.
#
# input - The filename or title to slugify.
#
# Returns the given filename or title as a lowercase String, with every
# sequence of spaces and non-alphanumeric characters replaced with a
# hyphen.
def slugify(input)
Utils.slugify(input)
end
# Format a date in short format e.g. "27 Jan 2011".
#
# date - the Time to format.
@@ -155,7 +188,7 @@ module Jekyll
#
# Returns the converted json string
def jsonify(input)
input.to_json
as_liquid(input).to_json
end
# Group an array of items by a property
@@ -181,24 +214,25 @@ module Jekyll
# Filter an array of objects
#
# input - the object array
# key - key within each object to filter by
# property - property within each object to filter by
# value - desired value
#
# Returns the filtered array of objects
def where(input, property, value)
return input unless input.is_a?(Array)
return input unless input.is_a?(Enumerable)
input = input.values if input.is_a?(Hash)
input.select { |object| item_property(object, property) == value }
end
# Sort an array of objects
#
# input - the object array
# key - key within each object to filter by
# property - property within each object to filter by
# nils ('first' | 'last') - nils appear before or after non-nil values
#
# Returns the filtered array of objects
def sort(input, key = nil, nils = "first")
if key.nil?
def sort(input, property = nil, nils = "first")
if property.nil?
input.sort
else
case
@@ -207,23 +241,62 @@ module Jekyll
when nils == "last"
order = + 1
else
Jekyll.logger.error "Invalid nils order:",
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'."
exit(1)
raise ArgumentError.new("Invalid nils order: " +
"'#{nils}' is not a valid nils order. It must be 'first' or 'last'.")
end
input.sort { |a, b|
if !a[key].nil? && b[key].nil?
input.sort { |apple, orange|
apple_property = item_property(apple, property)
orange_property = item_property(orange, property)
if !apple_property.nil? && orange_property.nil?
- order
elsif a[key].nil? && !b[key].nil?
elsif apple_property.nil? && !orange_property.nil?
+ order
else
a[key] <=> b[key]
apple_property <=> orange_property
end
}
end
end
def pop(array, input = 1)
return array unless array.is_a?(Array)
new_ary = array.dup
new_ary.pop(input.to_i || 1)
new_ary
end
def push(array, input)
return array unless array.is_a?(Array)
new_ary = array.dup
new_ary.push(input)
new_ary
end
def shift(array, input = 1)
return array unless array.is_a?(Array)
new_ary = array.dup
new_ary.shift(input.to_i || 1)
new_ary
end
def unshift(array, input)
return array unless array.is_a?(Array)
new_ary = array.dup
new_ary.unshift(input)
new_ary
end
# Convert an object into its String representation for debugging
#
# input - The Object to be converted
#
# Returns a String representation of the object.
def inspect(input)
CGI.escapeHTML(input.inspect)
end
private
def time(input)
case input
@@ -231,12 +304,12 @@ module Jekyll
input
when String
Time.parse(input) rescue Time.at(input.to_i)
when Number
when Numeric
Time.at(input)
else
Jekyll.logger.error "Invalid Date:", "'#{input}' is not a valid datetime."
exit(1)
end
end.localtime
end
def groupable?(element)
@@ -244,11 +317,35 @@ module Jekyll
end
def item_property(item, property)
if item.respond_to?(:data)
if item.respond_to?(:to_liquid)
item.to_liquid[property.to_s]
elsif item.respond_to?(:data)
item.data[property.to_s]
else
item[property.to_s]
end
end
def as_liquid(item)
case item
when Hash
pairs = item.map { |k, v| as_liquid([k, v]) }
Hash[pairs]
when Array
item.map{ |i| as_liquid(i) }
else
if item.respond_to?(:to_liquid)
liquidated = item.to_liquid
# prevent infinite recursion for simple types (which return `self`)
if liquidated == item
item
else
as_liquid(liquidated)
end
else
item
end
end
end
end
end

View File

@@ -1,148 +1,180 @@
module Jekyll
class Configuration
# This class handles custom defaults for YAML frontmatter settings.
# These are set in _config.yml and apply both to internal use (e.g. layout)
# and the data available to liquid.
# This class handles custom defaults for YAML frontmatter settings.
# These are set in _config.yml and apply both to internal use (e.g. layout)
# and the data available to liquid.
#
# It is exposed via the frontmatter_defaults method on the site class.
class FrontmatterDefaults
# Initializes a new instance.
def initialize(site)
@site = site
end
def update_deprecated_types(set)
return set unless set.key?('scope') && set['scope'].key?('type')
set['scope']['type'] = case set['scope']['type']
when 'page'
Deprecator.defaults_deprecate_type('page', 'pages')
'pages'
when 'post'
Deprecator.defaults_deprecate_type('post', 'posts')
'posts'
when 'draft'
Deprecator.defaults_deprecate_type('draft', 'drafts')
'drafts'
else
set['scope']['type']
end
set
end
# Finds a default value for a given setting, filtered by path and type
#
# It is exposed via the frontmatter_defaults method on the site class.
class FrontmatterDefaults
# Initializes a new instance.
def initialize(site)
@site = site
end
# path - the path (relative to the source) of the page, post or :draft the default is used in
# type - a symbol indicating whether a :page, a :post or a :draft calls this method
#
# Returns the default value or nil if none was found
def find(path, type, setting)
value = nil
old_scope = nil
# Finds a default value for a given setting, filtered by path and type
#
# path - the path (relative to the source) of the page, post or :draft the default is used in
# type - a symbol indicating whether a :page, a :post or a :draft calls this method
#
# Returns the default value or nil if none was found
def find(path, type, setting)
value = nil
old_scope = nil
matching_sets(path, type).each do |set|
if set['values'].has_key?(setting) && has_precedence?(old_scope, set['scope'])
value = set['values'][setting]
old_scope = set['scope']
end
end
value
end
# Collects a hash with all default values for a page or post
#
# path - the relative path of the page or post
# type - a symbol indicating the type (:post, :page or :draft)
#
# Returns a hash with all default values (an empty hash if there are none)
def all(path, type)
defaults = {}
old_scope = nil
matching_sets(path, type).each do |set|
if has_precedence?(old_scope, set['scope'])
defaults.merge! set['values']
old_scope = set['scope']
else
defaults = set['values'].merge(defaults)
end
end
defaults
end
private
# Checks if a given default setting scope matches the given path and type
#
# scope - the hash indicating the scope, as defined in _config.yml
# path - the path to check for
# type - the type (:post, :page or :draft) to check for
#
# Returns true if the scope applies to the given path and type
def applies?(scope, path, type)
applies_path?(scope, path) && applies_type?(scope, type)
end
def applies_path?(scope, path)
return true if scope['path'].empty?
scope_path = Pathname.new(scope['path'])
Pathname.new(sanitize_path(path)).ascend do |path|
if path == scope_path
return true
end
matching_sets(path, type).each do |set|
if set['values'].key?(setting) && has_precedence?(old_scope, set['scope'])
value = set['values'][setting]
old_scope = set['scope']
end
end
value
end
def applies_type?(scope, type)
!scope.has_key?('type') || scope['type'] == type.to_s
end
# Checks if a given set of default values is valid
#
# set - the default value hash, as defined in _config.yml
#
# Returns true if the set is valid and can be used in this class
def valid?(set)
set.is_a?(Hash) && set['scope'].is_a?(Hash) && set['scope']['path'].is_a?(String) && set['values'].is_a?(Hash)
end
# Determines if a new scope has precedence over an old one
#
# old_scope - the old scope hash, or nil if there's none
# new_scope - the new scope hash
#
# Returns true if the new scope has precedence over the older
def has_precedence?(old_scope, new_scope)
return true if old_scope.nil?
new_path = sanitize_path(new_scope['path'])
old_path = sanitize_path(old_scope['path'])
if new_path.length != old_path.length
new_path.length >= old_path.length
elsif new_scope.has_key? 'type'
true
# Collects a hash with all default values for a page or post
#
# path - the relative path of the page or post
# type - a symbol indicating the type (:post, :page or :draft)
#
# Returns a hash with all default values (an empty hash if there are none)
def all(path, type)
defaults = {}
old_scope = nil
matching_sets(path, type).each do |set|
if has_precedence?(old_scope, set['scope'])
defaults = Utils.deep_merge_hashes(defaults, set['values'])
old_scope = set['scope']
else
!old_scope.has_key? 'type'
defaults = Utils.deep_merge_hashes(set['values'], defaults)
end
end
defaults
end
# Collects a list of sets that match the given path and type
#
# Returns an array of hashes
def matching_sets(path, type)
valid_sets.select do |set|
applies?(set['scope'], path, type)
end
end
private
# Returns a list of valid sets
#
# This is not cached to allow plugins to modify the configuration
# and have their changes take effect
#
# Returns an array of hashes
def valid_sets
sets = @site.config['defaults']
return [] unless sets.is_a?(Array)
# Checks if a given default setting scope matches the given path and type
#
# scope - the hash indicating the scope, as defined in _config.yml
# path - the path to check for
# type - the type (:post, :page or :draft) to check for
#
# Returns true if the scope applies to the given path and type
def applies?(scope, path, type)
applies_path?(scope, path) && applies_type?(scope, type)
end
sets.select do |set|
unless valid?(set)
Jekyll.logger.warn "Default:", "An invalid default set was found"
end
valid?(set)
end
end
def applies_path?(scope, path)
return true if !scope.has_key?('path') || scope['path'].empty?
# Sanitizes the given path by removing a leading and addding a trailing slash
def sanitize_path(path)
if path.nil? || path.empty?
""
else
path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/')
scope_path = Pathname.new(scope['path'])
Pathname.new(sanitize_path(path)).ascend do |path|
if path == scope_path
return true
end
end
end
# Determines whether the scope applies to type.
# The scope applies to the type if:
# 1. no 'type' is specified
# 2. the 'type' in the scope is the same as the type asked about
#
# scope - the Hash defaults set being asked about application
# type - the type of the document being processed / asked about
# its defaults.
#
# Returns true if either of the above conditions are satisfied,
# otherwise returns false
def applies_type?(scope, type)
!scope.key?('type') || scope['type'].eql?(type.to_s)
end
# Checks if a given set of default values is valid
#
# set - the default value hash, as defined in _config.yml
#
# Returns true if the set is valid and can be used in this class
def valid?(set)
set.is_a?(Hash) && set['values'].is_a?(Hash)
end
# Determines if a new scope has precedence over an old one
#
# old_scope - the old scope hash, or nil if there's none
# new_scope - the new scope hash
#
# Returns true if the new scope has precedence over the older
def has_precedence?(old_scope, new_scope)
return true if old_scope.nil?
new_path = sanitize_path(new_scope['path'])
old_path = sanitize_path(old_scope['path'])
if new_path.length != old_path.length
new_path.length >= old_path.length
elsif new_scope.key? 'type'
true
else
!old_scope.key? 'type'
end
end
# Collects a list of sets that match the given path and type
#
# Returns an array of hashes
def matching_sets(path, type)
valid_sets.select do |set|
!set.has_key?('scope') || applies?(set['scope'], path, type)
end
end
# Returns a list of valid sets
#
# This is not cached to allow plugins to modify the configuration
# and have their changes take effect
#
# Returns an array of hashes
def valid_sets
sets = @site.config['defaults']
return [] unless sets.is_a?(Array)
sets.map do |set|
if valid?(set)
update_deprecated_types(set)
else
Jekyll.logger.warn "Defaults:", "An invalid front-matter default set was found:"
Jekyll.logger.warn "#{set}"
nil
end
end.compact
end
# Sanitizes the given path by removing a leading and addding a trailing slash
def sanitize_path(path)
if path.nil? || path.empty?
""
else
path.gsub(/\A\//, '').gsub(/([^\/])\z/, '\1/')
end
end
end
end
end

View File

@@ -1,217 +0,0 @@
module Jekyll
module Generators
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
# This generator should be passive with regard to its execution
priority :lowest
# Generate paginated pages if necessary.
#
# site - The Site.
#
# Returns nothing.
def generate(site)
if Pager.pagination_enabled?(site)
if template = template_page(site)
paginate(site, template)
else
Jekyll.logger.warn "Pagination:", "Pagination is enabled, but I couldn't find " +
"an index.html page to use as the pagination template. Skipping pagination."
end
end
end
# Paginates the blog's posts. Renders the index.html file into paginated
# directories, e.g.: page2/index.html, page3/index.html, etc and adds more
# site-wide data.
#
# site - The Site.
# page - The index.html Page that requires pagination.
#
# {"paginator" => { "page" => <Number>,
# "per_page" => <Number>,
# "posts" => [<Post>],
# "total_posts" => <Number>,
# "total_pages" => <Number>,
# "previous_page" => <Number>,
# "next_page" => <Number> }}
def paginate(site, page)
all_posts = site.site_payload['site']['posts']
pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
(1..pages).each do |num_page|
pager = Pager.new(site, num_page, all_posts, pages)
if num_page > 1
newpage = Page.new(site, site.source, page.dir, page.name)
newpage.pager = pager
newpage.dir = Pager.paginate_path(site, num_page)
site.pages << newpage
else
page.pager = pager
end
end
end
# Static: Fetch the URL of the template page. Used to determine the
# path to the first pager in the series.
#
# site - the Jekyll::Site object
#
# Returns the url of the template page
def self.first_page_url(site)
if page = Pagination.new.template_page(site)
page.url
else
nil
end
end
# Public: Find the Jekyll::Page which will act as the pager template
#
# site - the Jekyll::Site object
#
# Returns the Jekyll::Page which will act as the pager template
def template_page(site)
site.pages.dup.select do |page|
Pager.pagination_candidate?(site.config, page)
end.sort do |one, two|
two.path.size <=> one.path.size
end.first
end
end
end
class Pager
attr_reader :page, :per_page, :posts, :total_posts, :total_pages,
:previous_page, :previous_page_path, :next_page, :next_page_path
# Calculate the number of pages.
#
# all_posts - The Array of all Posts.
# per_page - The Integer of entries per page.
#
# Returns the Integer number of pages.
def self.calculate_pages(all_posts, per_page)
(all_posts.size.to_f / per_page.to_i).ceil
end
# Determine if pagination is enabled the site.
#
# site - the Jekyll::Site object
#
# Returns true if pagination is enabled, false otherwise.
def self.pagination_enabled?(site)
!site.config['paginate'].nil? &&
site.pages.size > 0
end
# Static: Determine if a page is a possible candidate to be a template page.
# Page's name must be `index.html` and exist in any of the directories
# between the site source and `paginate_path`.
#
# config - the site configuration hash
# page - the Jekyll::Page about which we're inquiring
#
# Returns true if the
def self.pagination_candidate?(config, page)
page_dir = File.dirname(File.expand_path(remove_leading_slash(page.path), config['source']))
paginate_path = remove_leading_slash(config['paginate_path'])
paginate_path = File.expand_path(paginate_path, config['source'])
page.name == 'index.html' &&
in_hierarchy(config['source'], page_dir, File.dirname(paginate_path))
end
# Determine if the subdirectories of the two paths are the same relative to source
#
# source - the site source
# page_dir - the directory of the Jekyll::Page
# paginate_path - the absolute paginate path (from root of FS)
#
# Returns whether the subdirectories are the same relative to source
def self.in_hierarchy(source, page_dir, paginate_path)
return false if paginate_path == File.dirname(paginate_path)
return false if paginate_path == Pathname.new(source).parent
page_dir == paginate_path ||
in_hierarchy(source, page_dir, File.dirname(paginate_path))
end
# Static: Return the pagination path of the page
#
# site - the Jekyll::Site object
# num_page - the pagination page number
#
# Returns the pagination path as a string
def self.paginate_path(site, num_page)
return nil if num_page.nil?
return Generators::Pagination.first_page_url(site) if num_page <= 1
format = site.config['paginate_path']
format = format.sub(':num', num_page.to_s)
ensure_leading_slash(format)
end
# Static: Return a String version of the input which has a leading slash.
# If the input already has a forward slash in position zero, it will be
# returned unchanged.
#
# path - a String path
#
# Returns the path with a leading slash
def self.ensure_leading_slash(path)
path[0..0] == "/" ? path : "/#{path}"
end
# Static: Return a String version of the input without a leading slash.
#
# path - a String path
#
# Returns the input without the leading slash
def self.remove_leading_slash(path)
ensure_leading_slash(path)[1..-1]
end
# Initialize a new Pager.
#
# site - the Jekyll::Site object
# page - The Integer page number.
# all_posts - The Array of all the site's Posts.
# num_pages - The Integer number of pages or nil if you'd like the number
# of pages calculated.
def initialize(site, page, all_posts, num_pages = nil)
@page = page
@per_page = site.config['paginate'].to_i
@total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
if @page > @total_pages
raise RuntimeError, "page number can't be greater than total pages: #{@page} > #{@total_pages}"
end
init = (@page - 1) * @per_page
offset = (init + @per_page - 1) >= all_posts.size ? all_posts.size : (init + @per_page - 1)
@total_posts = all_posts.size
@posts = all_posts[init..offset]
@previous_page = @page != 1 ? @page - 1 : nil
@previous_page_path = Pager.paginate_path(site, @previous_page)
@next_page = @page != @total_pages ? @page + 1 : nil
@next_page_path = Pager.paginate_path(site, @next_page)
end
# Convert this Pager's data to a Hash suitable for use by Liquid.
#
# Returns the Hash representation of this Pager.
def to_liquid
{
'page' => page,
'per_page' => per_page,
'posts' => posts,
'total_posts' => total_posts,
'total_pages' => total_pages,
'previous_page' => previous_page,
'previous_page_path' => previous_page_path,
'next_page' => next_page,
'next_page_path' => next_page_path
}
end
end
end

View File

@@ -8,6 +8,9 @@ module Jekyll
# Gets the name of this layout.
attr_reader :name
# Gets the path to this layout.
attr_reader :path
# Gets/Sets the extension of this layout.
attr_accessor :ext
@@ -26,6 +29,7 @@ module Jekyll
@site = site
@base = base
@name = name
@path = site.in_source_dir(base, name)
self.data = {}

View File

@@ -38,12 +38,12 @@ module Jekyll
end
def layout_directory_inside_source
Jekyll.sanitized_path(site.source, site.config['layouts'])
site.in_source_dir(site.config['layouts'])
end
def layout_directory_in_cwd
dir = Jekyll.sanitized_path(Dir.pwd, site.config['layouts'])
if File.directory?(dir)
if File.directory?(dir) && !site.safe
dir
else
nil

105
lib/jekyll/log_adapter.rb Normal file
View File

@@ -0,0 +1,105 @@
module Jekyll
class LogAdapter
attr_reader :writer, :messages
LOG_LEVELS = {
:debug => ::Logger::DEBUG,
:info => ::Logger::INFO,
:warn => ::Logger::WARN,
:error => ::Logger::ERROR
}
# Public: Create a new instance of Jekyll's log writer
#
# writer - Logger compatible instance
# log_level - (optional, symbol) the log level
#
# Returns nothing
def initialize(writer, level = :info)
@messages = []
@writer = writer
self.log_level = level
end
# Public: Set the log level on the writer
#
# level - (symbol) the log level
#
# Returns nothing
def log_level=(level)
writer.level = LOG_LEVELS.fetch(level)
end
# Public: Print a jekyll debug message
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def debug(topic, message = nil)
writer.debug(message(topic, message))
end
# Public: Print a jekyll message
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def info(topic, message = nil)
writer.info(message(topic, message))
end
# Public: Print a jekyll message
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def warn(topic, message = nil)
writer.warn(message(topic, message))
end
# Public: Print a jekyll error message
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def error(topic, message = nil)
writer.error(message(topic, message))
end
# Public: Print a Jekyll error message and immediately abort the process
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail (can be omitted)
#
# Returns nothing
def abort_with(topic, message = nil)
error(topic, message)
abort
end
# Internal: Build a Jekyll topic method
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns the formatted message
def message(topic, message)
msg = formatted_topic(topic) + message.to_s.gsub(/\s+/, ' ')
messages << msg
msg
end
# Internal: Format the topic
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
#
# Returns the formatted topic statement
def formatted_topic(topic)
"#{topic} ".rjust(20)
end
end
end

121
lib/jekyll/metadata.rb Normal file
View File

@@ -0,0 +1,121 @@
module Jekyll
class Metadata
attr_reader :site, :metadata, :cache
def initialize(site)
@site = site
# Read metadata from file
read_metadata
# Initialize cache to an empty hash
@cache = {}
end
# Add a path to the metadata
#
# Returns true, also on failure.
def add(path)
return true unless File.exist?(path)
metadata[path] = {
"mtime" => File.mtime(path),
"deps" => []
}
cache[path] = true
end
# Force a path to regenerate
#
# Returns true.
def force(path)
cache[path] = true
end
# Clear the metadata and cache
#
# Returns nothing
def clear
@metadata = {}
@cache = {}
end
# Checks if a path should be regenerated
#
# Returns a boolean.
def regenerate?(path, add = true)
return true if disabled?
# Check for path in cache
if cache.has_key? path
return cache[path]
end
# Check path that exists in metadata
data = metadata[path]
if data
data["deps"].each do |dependency|
if regenerate?(dependency)
return cache[dependency] = cache[path] = true
end
end
if data["mtime"].eql? File.mtime(path)
return cache[path] = false
else
return !add || add(path)
end
end
# Path does not exist in metadata, add it
return !add || add(path)
end
# Add a dependency of a path
#
# Returns nothing.
def add_dependency(path, dependency)
return if (metadata[path].nil? || @disabled)
metadata[path]["deps"] << dependency unless metadata[path]["deps"].include? dependency
regenerate? dependency
end
# Write the metadata to disk
#
# Returns nothing.
def write
File.open(metadata_file, 'w') do |f|
f.write(metadata.to_yaml)
end
end
# Produce the absolute path of the metadata file
#
# Returns the String path of the file.
def metadata_file
site.in_source_dir('.jekyll-metadata')
end
# Check if metadata has been disabled
#
# Returns a Boolean (true for disabled, false for enabled).
def disabled?
@disabled = site.full_rebuild? if @disabled.nil?
@disabled
end
private
# Read metadata from the metadata file, if no file is found,
# initialize with an empty hash
#
# Returns the read metadata.
def read_metadata
@metadata = if !disabled? && File.file?(metadata_file)
SafeYAML.load(File.read(metadata_file))
else
{}
end
end
end
end

View File

@@ -126,7 +126,7 @@ module Jekyll
#
# Returns the path to the source file
def path
data.fetch('path', relative_path.sub(/\A\//, ''))
data.fetch('path') { relative_path.sub(/\A\//, '') }
end
# The path to the page source file, relative to the site source
@@ -140,7 +140,7 @@ module Jekyll
#
# Returns the destination file path String.
def destination(dest)
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = site.in_dest_dir(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if url =~ /\/$/
path
end

View File

@@ -27,7 +27,7 @@ module Jekyll
# Returns the Symbol priority.
def self.priority(priority = nil)
@priority ||= nil
if priority && PRIORITIES.has_key?(priority)
if priority && PRIORITIES.key?(priority)
@priority = priority
end
@priority || :normal
@@ -56,6 +56,15 @@ module Jekyll
PRIORITIES[other.priority] <=> PRIORITIES[self.priority]
end
# Spaceship is priority [higher -> lower]
#
# other - The class to be compared.
#
# Returns -1, 0, 1.
def <=>(other)
self.class <=> other.class
end
# Initialize a new plugin. This should be overridden by the subclass.
#
# config - The Hash of configuration options.

View File

@@ -25,11 +25,27 @@ module Jekyll
def require_gems
site.gems.each do |gem|
if plugin_allowed?(gem)
Jekyll.logger.debug("PluginManager:", "Requiring #{gem}")
require gem
end
end
end
def self.require_from_bundler
if !ENV["JEKYLL_NO_BUNDLER_REQUIRE"] && File.file?("Gemfile")
require "bundler"
Bundler.setup # puts all groups on the load path
required_gems = Bundler.require(:jekyll_plugins) # requires the gems in this group only
Jekyll.logger.debug("PluginManager:", "Required #{required_gems.map(&:name).join(', ')}")
ENV["JEKYLL_NO_BUNDLER_REQUIRE"] = "true"
true
else
false
end
rescue LoadError, Bundler::GemfileNotFound
false
end
# Check whether a gem plugin is allowed to be used during this build.
#
# gem_name - the name of the gem
@@ -66,7 +82,7 @@ module Jekyll
# Returns an Array of plugin search paths
def plugins_path
if (site.config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
[Jekyll.sanitized_path(site.source, site.config['plugins'])]
[site.in_source_dir(site.config['plugins'])]
else
Array(site.config['plugins']).map { |d| File.expand_path(d) }
end

View File

@@ -49,7 +49,7 @@ module Jekyll
def initialize(site, source, dir, name)
@site = site
@dir = dir
@base = containing_dir(source, dir)
@base = containing_dir(dir)
@name = name
self.categories = dir.downcase.split('/').reject { |x| x.empty? }
@@ -60,8 +60,8 @@ module Jekyll
site.frontmatter_defaults.find(File.join(dir, name), type, key)
end
if data.has_key?('date')
self.date = Time.parse(data["date"].to_s)
if data.key?('date')
self.date = Utils.parse_date(data["date"].to_s, "Post '#{relative_path}' does not have a valid date in the YAML front matter.")
end
populate_categories
@@ -69,7 +69,7 @@ module Jekyll
end
def published?
if data.has_key?('published') && data['published'] == false
if data.key?('published') && data['published'] == false
false
else
true
@@ -77,10 +77,10 @@ module Jekyll
end
def populate_categories
if categories.empty?
self.categories = Utils.pluralized_array_from_hash(data, 'category', 'categories').map {|c| c.to_s.downcase}
end
categories.flatten!
categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories')
self.categories = (
Array(categories) + categories_from_data
).map {|c| c.to_s.downcase}.flatten.uniq
end
def populate_tags
@@ -88,8 +88,8 @@ module Jekyll
end
# Get the full path to the directory containing the post files
def containing_dir(source, dir)
return File.join(source, dir, '_posts')
def containing_dir(dir)
site.in_source_dir(dir, '_posts')
end
# Read the YAML frontmatter.
@@ -108,14 +108,14 @@ module Jekyll
#
# Returns excerpt string.
def excerpt
data.fetch('excerpt', extracted_excerpt.to_s)
data.fetch('excerpt') { extracted_excerpt.to_s }
end
# Public: the Post title, from the YAML Front-Matter or from the slug
#
# Returns the post title
def title
data.fetch("title", titleized_slug)
data.fetch('title') { titleized_slug }
end
# Turns the post slug into a suitable title
@@ -130,7 +130,7 @@ module Jekyll
#
# Returns the path to the file relative to the site source
def path
data.fetch('path', relative_path.sub(/\A\//, ''))
data.fetch('path') { relative_path.sub(/\A\//, '') }
end
# The path to the post source file, relative to the site source
@@ -159,14 +159,9 @@ module Jekyll
# Returns nothing.
def process(name)
m, cats, date, slug, ext = *name.match(MATCHER)
self.date = Time.parse(date)
self.date = Utils.parse_date(date, "Post '#{relative_path}' does not have a valid date in the filename.")
self.slug = slug
self.ext = ext
rescue ArgumentError
path = File.join(@dir || "", name)
msg = "Post '#{path}' does not have a valid date.\n"
msg << "Fix the date, or exclude the file or directory from being processed"
raise FatalException.new(msg)
end
# The generated directory into which the post will be placed
@@ -221,8 +216,8 @@ module Jekyll
:month => date.strftime("%m"),
:day => date.strftime("%d"),
:title => slug,
:i_day => date.strftime("%d").to_i.to_s,
:i_month => date.strftime("%m").to_i.to_s,
:i_day => date.strftime("%-d"),
:i_month => date.strftime("%-m"),
:categories => (categories || []).map { |c| c.to_s }.join('/'),
:short_month => date.strftime("%b"),
:short_year => date.strftime("%y"),
@@ -256,7 +251,7 @@ module Jekyll
# construct payload
payload = Utils.deep_merge_hashes({
"site" => { "related_posts" => related_posts(site_payload["site"]["posts"]) },
"page" => to_liquid(EXCERPT_ATTRIBUTES_FOR_LIQUID)
"page" => to_liquid(self.class::EXCERPT_ATTRIBUTES_FOR_LIQUID)
}, site_payload)
if generate_excerpt?
@@ -273,8 +268,8 @@ module Jekyll
# Returns destination file path String.
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
path = Jekyll.sanitized_path(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if path[/\.html$/].nil?
path = site.in_dest_dir(dest, URL.unescape_path(url))
path = File.join(path, "index.html") if path[/\.html?$/].nil?
path
end

View File

@@ -10,7 +10,7 @@ module Jekyll
def initialize(post)
@post = post
@site = post.site
require 'classifier' if site.lsi
require 'classifier-reborn' if site.lsi
end
def build
@@ -27,7 +27,7 @@ module Jekyll
def build_index
self.class.lsi ||= begin
lsi = Classifier::LSI.new(:auto_rebuild => false)
lsi = ClassifierReborn::LSI.new(:auto_rebuild => false)
display("Populating LSI...")
site.posts.each do |x|
@@ -46,8 +46,7 @@ module Jekyll
end
def most_recent_posts
recent_posts = site.posts.reverse - [post]
recent_posts.first(10)
@most_recent_posts ||= (site.posts.reverse - [post]).first(10)
end
def display(output)

View File

@@ -1,11 +1,14 @@
# encoding: UTF-8
module Jekyll
class Renderer
attr_reader :document, :site
attr_reader :document, :site, :site_payload
def initialize(site, document)
@site = site
@document = document
def initialize(site, document, site_payload = nil)
@site = site
@document = document
@site_payload = site_payload
end
# Determine which converters to use based on this document's
@@ -30,7 +33,7 @@ module Jekyll
def run
payload = Utils.deep_merge_hashes({
"page" => document.to_liquid
}, site.site_payload)
}, site_payload || site.site_payload)
info = {
filters: [Jekyll::Filters],
@@ -47,11 +50,18 @@ module Jekyll
output = render_liquid(output, payload, info)
end
place_in_layouts(
convert(output),
payload,
info
)
output = convert(output)
document.content = output
if document.place_in_layout?
place_in_layouts(
output,
payload,
info
)
else
output
end
end
# Convert the given content using the converters which match this renderer's document.
@@ -64,7 +74,8 @@ module Jekyll
begin
converter.convert output
rescue => e
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error converting '#{document.relative_path}'."
Jekyll.logger.error "Conversion error:", "#{converter.class} encountered an error while converting '#{document.relative_path}':"
Jekyll.logger.error("", e.to_s)
raise e
end
end
@@ -88,6 +99,15 @@ module Jekyll
raise e
end
# Checks if the layout specified in the document actually exists
#
# layout - the layout to check
#
# Returns true if the layout is invalid, false if otherwise
def invalid_layout?(layout)
!document.data["layout"].nil? && layout.nil?
end
# Render layouts and place given content inside.
#
# content - the content to be placed in the layout
@@ -97,6 +117,9 @@ module Jekyll
def place_in_layouts(content, payload, info)
output = content.dup
layout = site.layouts[document.data["layout"]]
Jekyll.logger.warn("Build Warning:", "Layout '#{document.data["layout"]}' requested in #{document.relative_path} does not exist.") if invalid_layout? layout
used = Set.new([layout])
while layout
@@ -116,6 +139,12 @@ module Jekyll
File.join(site.config['layouts'], layout.name)
)
# Add layout to dependency tree
site.metadata.add_dependency(
site.in_source_dir(document.path),
site.in_source_dir(layout.path)
) if document.write?
if layout = site.layouts[layout.data["layout"]]
if used.include?(layout)
layout = nil # avoid recursive chain

View File

@@ -1,27 +1,35 @@
# encoding: UTF-8
require 'csv'
module Jekyll
class Site
attr_accessor :config, :layouts, :posts, :pages, :static_files,
:exclude, :include, :source, :dest, :lsi, :highlighter,
:permalink_style, :time, :future, :unpublished, :safe, :plugins, :limit_posts,
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts, :gems,
:plugin_manager
attr_reader :source, :dest, :config
attr_accessor :layouts, :posts, :pages, :static_files,
:exclude, :include, :lsi, :highlighter, :permalink_style,
:time, :future, :unpublished, :safe, :plugins, :limit_posts,
:show_drafts, :keep_files, :baseurl, :data, :file_read_opts,
:gems, :plugin_manager
attr_accessor :converters, :generators
attr_reader :metadata
# Public: Initialize a new Site.
#
# config - A Hash containing site configuration details.
def initialize(config)
self.config = config.clone
@config = config.clone
%w[safe lsi highlighter baseurl exclude include future unpublished
show_drafts limit_posts keep_files gems].each do |opt|
self.send("#{opt}=", config[opt])
end
self.source = File.expand_path(config['source'])
self.dest = File.expand_path(config['destination'])
self.permalink_style = config['permalink'].to_sym
# Source and destination may not be changed after the site has been created.
@source = File.expand_path(config['source']).freeze
@dest = File.expand_path(config['destination']).freeze
# Build metadata
@metadata = Metadata.new(self)
self.plugin_manager = Jekyll::PluginManager.new(self)
self.plugins = plugin_manager.plugins_path
@@ -29,6 +37,10 @@ module Jekyll
self.file_read_opts = {}
self.file_read_opts[:encoding] = config['encoding'] if config['encoding']
self.permalink_style = config['permalink'].to_sym
Jekyll.sites << self
reset
setup
end
@@ -49,7 +61,7 @@ module Jekyll
#
# Returns nothing
def reset
self.time = (config['time'] ? Time.parse(config['time'].to_s) : Time.now)
self.time = (config['time'] ? Utils.parse_date(config['time'].to_s, "Invalid time in _config.yml.") : Time.now)
self.layouts = {}
self.posts = []
self.pages = []
@@ -80,11 +92,35 @@ module Jekyll
dest_pathname = Pathname.new(dest)
Pathname.new(source).ascend do |path|
if path == dest_pathname
raise FatalException.new "Destination directory cannot be or contain the Source directory."
raise Errors::FatalException.new "Destination directory cannot be or contain the Source directory."
end
end
end
# Public: Prefix a given path with the source directory.
#
# paths - (optional) path elements to a file or directory within the
# source directory
#
# Returns a path which is prefixed with the source directory.
def in_source_dir(*paths)
paths.reduce(source) do |base, path|
Jekyll.sanitized_path(base, path)
end
end
# Public: Prefix a given path with the destination directory.
#
# paths - (optional) path elements to a file or directory within the
# destination directory
#
# Returns a path which is prefixed with the destination directory.
def in_dest_dir(*paths)
paths.reduce(dest) do |base, path|
Jekyll.sanitized_path(base, path)
end
end
# The list of collections and their corresponding Jekyll::Collection instances.
# If config['collections'] is set, a new instance is created for each item in the collection.
# If config['collections'] is not set, a new hash is returned.
@@ -129,7 +165,7 @@ module Jekyll
#
# Returns nothing.
def read_directories(dir = '')
base = File.join(source, dir)
base = in_source_dir(dir)
entries = Dir.chdir(base) { filter_entries(Dir.entries('.'), base) }
read_posts(dir)
@@ -138,11 +174,11 @@ module Jekyll
limit_posts! if limit_posts > 0 # limit the posts if :limit_posts option is set
entries.each do |f|
f_abs = File.join(base, f)
f_abs = in_source_dir(base, f)
if File.directory?(f_abs)
f_rel = File.join(dir, f)
read_directories(f_rel) unless dest.sub(/\/$/, '') == f_abs
elsif has_yaml_header?(f_abs)
elsif Utils.has_yaml_header?(f_abs)
page = Page.new(self, source, dir, f)
pages << page if publisher.publish?(page)
else
@@ -151,6 +187,7 @@ module Jekyll
end
pages.sort_by!(&:name)
static_files.sort_by!(&:relative_path)
end
# Read all the files in <source>/<dir>/_posts and create a new Post
@@ -195,18 +232,39 @@ module Jekyll
#
# Returns nothing
def read_data(dir)
base = File.join(source, dir)
return unless File.directory?(base) && (!safe || !File.symlink?(base))
base = in_source_dir(dir)
read_data_to(base, self.data)
end
entries = Dir.chdir(base) { Dir['*.{yaml,yml}'] }
entries.delete_if { |e| File.directory?(File.join(base, e)) }
# Read and parse all yaml files under <dir> and add them to the
# <data> variable.
#
# dir - The string absolute path of the directory to read.
# data - The variable to which data will be added.
#
# Returns nothing
def read_data_to(dir, data)
return unless File.directory?(dir) && (!safe || !File.symlink?(dir))
entries = Dir.chdir(dir) do
Dir['*.{yaml,yml,json,csv}'] + Dir['*'].select { |fn| File.directory?(fn) }
end
entries.each do |entry|
path = File.join(source, dir, entry)
path = in_source_dir(dir, entry)
next if File.symlink?(path) && safe
key = sanitize_filename(File.basename(entry, '.*'))
self.data[key] = SafeYAML.load_file(path)
if File.directory?(path)
read_data_to(path, data[key] = {})
else
case File.extname(path).downcase
when '.csv'
data[key] = CSV.read(path, :headers => true).map(&:to_hash)
else
data[key] = SafeYAML.load_file(path)
end
end
end
end
@@ -234,15 +292,16 @@ module Jekyll
def render
relative_permalinks_deprecation_method
payload = site_payload
collections.each do |label, collection|
collection.docs.each do |document|
document.output = Jekyll::Renderer.new(self, document).run
document.output = Jekyll::Renderer.new(self, document, payload).run if document.regenerate?
end
end
payload = site_payload
[posts, pages].flatten.each do |page_or_post|
page_or_post.render(layouts, payload)
page_or_post.render(layouts, payload) if page_or_post.regenerate?
end
rescue Errno::ENOENT => e
# ignore missing layout dir
@@ -259,7 +318,10 @@ module Jekyll
#
# Returns nothing.
def write
each_site_file { |item| item.write(dest) }
each_site_file { |item|
item.write(dest) if item.regenerate?
}
metadata.write unless full_rebuild?
end
# Construct a Hash of Posts indexed by the specified Post attribute.
@@ -314,19 +376,23 @@ module Jekyll
# "tags" - The Hash of tag values and Posts.
# See Site#post_attr_hash for type info.
def site_payload
{"jekyll" => { "version" => Jekyll::VERSION },
"site" => Utils.deep_merge_hashes(config,
Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], {
"time" => time,
"posts" => posts.sort { |a, b| b <=> a },
"pages" => pages,
"static_files" => static_files.sort { |a, b| a.relative_path <=> b.relative_path },
"html_pages" => pages.reject { |page| !page.html? },
"categories" => post_attr_hash('categories'),
"tags" => post_attr_hash('tags'),
"collections" => collections,
"documents" => documents,
"data" => site_data
{
"jekyll" => {
"version" => Jekyll::VERSION,
"environment" => Jekyll.env
},
"site" => Utils.deep_merge_hashes(config,
Utils.deep_merge_hashes(Hash[collections.map{|label, coll| [label, coll.docs]}], {
"time" => time,
"posts" => posts.sort { |a, b| b <=> a },
"pages" => pages,
"static_files" => static_files,
"html_pages" => pages.select { |page| page.html? || page.url.end_with?("/") },
"categories" => post_attr_hash('categories'),
"tags" => post_attr_hash('tags'),
"collections" => collections,
"documents" => documents,
"data" => site_data
}))
}
end
@@ -348,13 +414,8 @@ module Jekyll
# klass - The Class of the Converter to fetch.
#
# Returns the Converter instance implementing the given Converter.
def getConverterImpl(klass)
matches = converters.select { |c| c.class == klass }
if impl = matches.first
impl
else
raise "Converter implementation not found for #{klass}"
end
def find_converter_instance(klass)
converters.find { |c| c.class == klass } || proc { raise "No converter for #{klass}" }.call
end
# Create array of instances of the subclasses of the class or module
@@ -379,10 +440,10 @@ module Jekyll
#
# Returns the list of entries to process
def get_entries(dir, subfolder)
base = File.join(source, dir, subfolder)
base = in_source_dir(dir, subfolder)
return [] unless File.exist?(base)
entries = Dir.chdir(base) { filter_entries(Dir['**/*'], base) }
entries.delete_if { |e| File.directory?(File.join(base, e)) }
entries.delete_if { |e| File.directory?(in_source_dir(base, e)) }
end
# Aggregate post information
@@ -396,7 +457,7 @@ module Jekyll
def relative_permalinks_deprecation_method
if config['relative_permalinks'] && has_relative_page?
Jekyll.logger.warn "Deprecation:", "Starting in 2.0, permalinks for pages" +
Jekyll.logger.warn "Deprecation:", "Since v2.0, permalinks for pages" +
" in subfolders must be relative to the" +
" site source directory, not the parent" +
" directory. Check http://jekyllrb.com/docs/upgrading/"+
@@ -410,7 +471,7 @@ module Jekyll
def documents
collections.reduce(Set.new) do |docs, (_, collection)|
docs.merge(collection.docs)
docs + collection.docs + collection.files
end.to_a
end
@@ -423,7 +484,18 @@ module Jekyll
end
def frontmatter_defaults
@frontmatter_defaults ||= Configuration::FrontmatterDefaults.new(self)
@frontmatter_defaults ||= FrontmatterDefaults.new(self)
end
# Whether to perform a full rebuild without metadata
#
# Returns a Boolean: true for a full rebuild, false for normal build
def full_rebuild?(override = {})
override['full_rebuild'] || config['full_rebuild']
end
def publisher
@publisher ||= Publisher.new(self)
end
private
@@ -432,10 +504,6 @@ module Jekyll
pages.any? { |page| page.uses_relative_permalinks }
end
def has_yaml_header?(file)
!!(File.open(file, 'rb') { |f| f.read(5) } =~ /\A---\r?\n/)
end
def limit_posts!
limit = posts.length < limit_posts ? posts.length : limit_posts
self.posts = posts[-limit, limit]
@@ -450,9 +518,5 @@ module Jekyll
name.gsub!(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2')
name.gsub(/\s+/, '_')
end
def publisher
@publisher ||= Publisher.new(self)
end
end
end

View File

@@ -3,17 +3,21 @@ module Jekyll
# The cache of last modification times [path] -> mtime.
@@mtimes = Hash.new
attr_reader :relative_path
# Initialize a new StaticFile.
#
# site - The Site.
# base - The String path to the <source>.
# dir - The String path between <source> and the file.
# name - The String filename of the file.
def initialize(site, base, dir, name)
def initialize(site, base, dir, name, collection = nil)
@site = site
@base = base
@dir = dir
@name = name
@collection = collection
@relative_path = File.join(*[@dir, @name].compact)
end
# Returns source file path.
@@ -21,9 +25,8 @@ module Jekyll
File.join(*[@base, @dir, @name].compact)
end
# Returns the source file path relative to the site source
def relative_path
@relative_path ||= path.sub(/\A#{@site.source}/, '')
def extname
File.extname(path)
end
# Obtain destination path.
@@ -32,7 +35,15 @@ module Jekyll
#
# Returns destination file path.
def destination(dest)
File.join(*[dest, @dir, @name].compact)
@site.in_dest_dir(*[dest, destination_rel_dir, @name].compact)
end
def destination_rel_dir
if @collection
@dir.gsub(/\A_/, '')
else
@dir
end
end
# Returns last modification time for this file.
@@ -47,6 +58,15 @@ module Jekyll
@@mtimes[path] != mtime
end
# Whether to write the file to the filesystem
#
# Returns true.
def write?
true
end
alias_method :regenerate?, :write?
# Write the static file to the destination directory (if modified).
#
# dest - The String path to the destination dir.
@@ -59,6 +79,7 @@ module Jekyll
@@mtimes[path] = mtime
FileUtils.mkdir_p(File.dirname(dest_path))
FileUtils.rm(dest_path) if File.exist?(dest_path)
FileUtils.cp(path, dest_path)
true
@@ -74,7 +95,7 @@ module Jekyll
def to_liquid
{
"path" => relative_path,
"path" => File.join("", relative_path),
"modified_time" => mtime.to_s,
"extname" => File.extname(relative_path)
}

View File

@@ -1,102 +1,58 @@
module Jekyll
class Stevenson
attr_accessor :log_level
LOG_LEVELS = {
debug: 0,
info: 1,
warn: 2,
error: 3
}
# Public: Create a new instance of Stevenson, Jekyll's logger
#
# level - (optional, symbol) the log level
#
# Returns nothing
def initialize(level = :info)
@log_level = level
class Stevenson < ::Logger
def initialize
@progname = nil
@level = DEBUG
@default_formatter = Formatter.new
@logdev = $stdout
@formatter = proc do |severity, datetime, progname, msg|
"#{msg}"
end
end
# Public: Print a jekyll debug message to stdout
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def debug(topic, message = nil)
$stdout.puts(message(topic, message)) if should_log(:debug)
def add(severity, message = nil, progname = nil, &block)
severity ||= UNKNOWN
@logdev = set_logdevice(severity)
if @logdev.nil? or severity < @level
return true
end
progname ||= @progname
if message.nil?
if block_given?
message = yield
else
message = progname
progname = @progname
end
end
@logdev.puts(
format_message(format_severity(severity), Time.now, progname, message))
true
end
# Public: Print a jekyll message to stdout
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def info(topic, message = nil)
$stdout.puts(message(topic, message)) if should_log(:info)
# Log a +WARN+ message
def warn(progname = nil, &block)
add(WARN, nil, progname.yellow, &block)
end
# Public: Print a jekyll message to stderr
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def warn(topic, message = nil)
$stderr.puts(message(topic, message).yellow) if should_log(:warn)
# Log an +ERROR+ message
def error(progname = nil, &block)
add(ERROR, nil, progname.red, &block)
end
# Public: Print a jekyll error message to stderr
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def error(topic, message = nil)
$stderr.puts(message(topic, message).red) if should_log(:error)
def close
# No LogDevice in use
end
# Public: Print a Jekyll error message to stderr and immediately abort the process
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail (can be omitted)
#
# Returns nothing
def abort_with(topic, message = nil)
error(topic, message)
abort
end
private
# Public: Build a Jekyll topic method
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns the formatted message
def message(topic, message)
formatted_topic(topic) + message.to_s.gsub(/\s+/, ' ')
end
# Public: Format the topic
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
#
# Returns the formatted topic statement
def formatted_topic(topic)
"#{topic} ".rjust(20)
end
# Public: Determine whether the current log level warrants logging at the
# proposed level.
#
# level_of_message - the log level of the message (symbol)
#
# Returns true if the log level of the message is greater than or equal to
# this logger's log level.
def should_log(level_of_message)
LOG_LEVELS.fetch(log_level) <= LOG_LEVELS.fetch(level_of_message)
def set_logdevice(severity)
if severity > INFO
$stderr
else
$stdout
end
end
end
end

View File

@@ -1,47 +0,0 @@
# Gist Liquid Tag
#
# Example:
# {% gist username/1234567 %}
# {% gist username/1234567 file.rb %}
module Jekyll
class GistTag < Liquid::Tag
def render(context)
if tag_contents = determine_arguments(@markup.strip)
gist_id, filename = tag_contents[0], tag_contents[1]
gist_script_tag(gist_id, filename)
else
raise ArgumentError.new <<-eos
Syntax error in tag 'gist' while parsing the following markup:
#{@markup}
Valid syntax:
for all gists: {% gist user/1234567 %}
eos
end
end
private
def determine_arguments(input)
matched = if input.include?("/")
input.match(/\A([a-zA-Z0-9\/\-_]+) ?(\S*)\Z/)
else
input.match(/\A(\d+) ?(\S*)\Z/)
end
[matched[1].strip, matched[2].strip] if matched && matched.length >= 3
end
def gist_script_tag(gist_id, filename = nil)
if filename.empty?
"<script src=\"https://gist.github.com/#{gist_id}.js\"> </script>"
else
"<script src=\"https://gist.github.com/#{gist_id}.js?file=#{filename}\"> </script>"
end
end
end
end
Liquid::Template.register_tag('gist', Jekyll::GistTag)

View File

@@ -4,9 +4,11 @@ module Jekyll
include Liquid::StandardFilters
# The regular expression syntax checker. Start with the language specifier.
# Follow that by zero or more space separated options that take one of two
# forms: name or name=value
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=\w+)?)*)$/
# Follow that by zero or more space separated options that take one of three
# forms: name, name=value, or name="<quoted list>"
#
# <quoted list> is a space-separated list of numbers
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=(\w+|"([0-9]+\s)*[0-9]+"))?)*)$/
def initialize(tag_name, markup, tokens)
super
@@ -14,8 +16,14 @@ module Jekyll
@lang = $1.downcase
@options = {}
if defined?($2) && $2 != ''
$2.split.each do |opt|
# Split along 3 possible forms -- key="<quoted list>", key=value, or key
$2.scan(/(?:\w="[^"]*"|\w=\w|\w)+/) do |opt|
key, value = opt.split('=')
# If a quoted list, convert to array
if value && value.include?("\"")
value.gsub!(/"/, "")
value = value.split
end
@options[key.to_sym] = value || true
end
end
@@ -36,24 +44,46 @@ eos
suffix = context["highlighter_suffix"] || ""
code = super.to_s.strip
output = case context.registers[:site].highlighter
when 'pygments'
render_pygments(code)
when 'rouge'
render_rouge(code)
else
render_codehighlighter(code)
end
is_safe = !!context.registers[:site].safe
output =
case context.registers[:site].highlighter
when 'pygments'
render_pygments(code, is_safe)
when 'rouge'
render_rouge(code)
else
render_codehighlighter(code)
end
rendered_output = add_code_tag(output)
prefix + rendered_output + suffix
end
def render_pygments(code)
def sanitized_opts(opts, is_safe)
if is_safe
Hash[[
[:startinline, opts.fetch(:startinline, nil)],
[:hl_linenos, opts.fetch(:hl_linenos, nil)],
[:linenos, opts.fetch(:linenos, nil)],
[:encoding, opts.fetch(:encoding, 'utf-8')],
[:cssclass, opts.fetch(:cssclass, nil)]
].reject {|f| f.last.nil? }]
else
opts
end
end
def render_pygments(code, is_safe)
require 'pygments'
@options[:encoding] = 'utf-8'
highlighted_code = Pygments.highlight(code, :lexer => @lang, :options => @options)
highlighted_code = Pygments.highlight(
code,
:lexer => @lang,
:options => sanitized_opts(@options, is_safe)
)
if highlighted_code.nil?
Jekyll.logger.error "There was an error highlighting your code:"
@@ -83,7 +113,7 @@ eos
def add_code_tag(code)
# Add nested <code> tags to code blocks
code = code.sub(/<pre>\n*/,'<pre><code class="' + @lang.to_s.gsub("+", "-") + '">')
code = code.sub(/<pre>\n*/,'<pre><code class="language-' + @lang.to_s.gsub("+", "-") + '" data-lang="' + @lang.to_s + '">')
code = code.sub(/\n*<\/pre>/,"</code></pre>")
code.strip
end

View File

@@ -1,3 +1,5 @@
# encoding: UTF-8
module Jekyll
module Tags
class IncludeTagError < StandardError
@@ -11,15 +13,20 @@ module Jekyll
class IncludeTag < Liquid::Tag
SYNTAX_EXAMPLE = "{% include file.ext param='value' param2='value' %}"
attr_reader :includes_dir
VALID_SYNTAX = /([\w-]+)\s*=\s*(?:"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|([\w\.-]+))/
VARIABLE_SYNTAX = /(?<variable>\{\{\s*(?<name>[\w\-\.]+)\s*(\|.*)?\}\})(?<params>.*)/
VARIABLE_SYNTAX = /(?<variable>[^{]*\{\{\s*(?<name>[\w\-\.]+)\s*(\|.*)?\}\}[^\s}]*)(?<params>.*)/
INCLUDES_DIR = '_includes'
class << self
def source_cache
@@source_cache ||= {}
end
end
def initialize(tag_name, markup, tokens)
super
@includes_dir = tag_includes_dir
matched = markup.strip.match(VARIABLE_SYNTAX)
if matched
@file = matched['variable'].strip
@@ -28,6 +35,11 @@ module Jekyll
@file, @params = markup.strip.split(' ', 2);
end
validate_params if @params
@tag_name = tag_name
end
def syntax_example
"{% #{@tag_name} file.ext param='value' param2='value' %}"
end
def parse_params(context)
@@ -59,7 +71,7 @@ Invalid syntax for include tag. File contains invalid characters or sequences:
Valid syntax:
#{SYNTAX_EXAMPLE}
#{syntax_example}
eos
end
@@ -75,7 +87,7 @@ Invalid syntax for include tag:
Valid syntax:
#{SYNTAX_EXAMPLE}
#{syntax_example}
eos
end
@@ -94,14 +106,27 @@ eos
end
end
def tag_includes_dir
'_includes'
end
def render(context)
dir = File.join(File.realpath(context.registers[:site].source), INCLUDES_DIR)
site = context.registers[:site]
dir = resolved_includes_dir(context)
file = render_variable(context) || @file
validate_file_name(file)
path = File.join(dir, file)
validate_path(path, dir, context.registers[:site].safe)
validate_path(path, dir, site.safe)
# Add include to dependency tree
if context.registers[:page] and context.registers[:page].has_key? "path"
site.metadata.add_dependency(
site.in_source_dir(context.registers[:page]["path"]),
path
)
end
begin
partial = Liquid::Template.parse(source(path, context))
@@ -111,10 +136,14 @@ eos
partial.render!(context)
end
rescue => e
raise IncludeTagError.new e.message, File.join(INCLUDES_DIR, @file)
raise IncludeTagError.new e.message, File.join(@includes_dir, @file)
end
end
def resolved_includes_dir(context)
File.join(File.realpath(context.registers[:site].source), @includes_dir)
end
def validate_path(path, dir, safe)
if safe && !realpath_prefixed_with?(path, dir)
raise IOError.new "The included file '#{path}' should exist and should not be a symlink"
@@ -124,23 +153,34 @@ eos
end
def path_relative_to_source(dir, path)
File.join(INCLUDES_DIR, path.sub(Regexp.new("^#{dir}"), ""))
File.join(@includes_dir, path.sub(Regexp.new("^#{dir}"), ""))
end
def realpath_prefixed_with?(path, dir)
File.exist?(path) && File.realpath(path).start_with?(dir)
end
def blank?
false
end
# This method allows to modify the file content by inheriting from the class.
def source(file, context)
File.read(file, file_read_opts(context))
self.class.source_cache[file] ||= File.read(file, file_read_opts(context))
end
end
class IncludeRelativeTag < IncludeTag
def tag_includes_dir
'.'
end
def page_path(context)
context.registers[:page].nil? ? includes_dir : File.dirname(context.registers[:page]["path"])
end
def resolved_includes_dir(context)
context.registers[:site].in_source_dir(page_path(context))
end
end
end
end
Liquid::Template.register_tag('include', Jekyll::Tags::IncludeTag)
Liquid::Template.register_tag('include_relative', Jekyll::Tags::IncludeRelativeTag)

View File

@@ -3,16 +3,22 @@ module Jekyll
class PostComparer
MATCHER = /^(.+\/)*(\d+-\d+-\d+)-(.*)$/
attr_accessor :date, :slug
attr_reader :path, :date, :slug, :name
def initialize(name)
all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
raise ArgumentError.new("'#{name}' does not contain valid date and/or title") unless all
@slug = path ? path + slug : slug
@date = Time.parse(date)
@name = name
all, @path, @date, @slug = *name.sub(/^\//, "").match(MATCHER)
raise ArgumentError.new("'#{name}' does not contain valid date and/or title.") unless all
@name_regex = /^#{path}#{date}-#{slug}\.[^.]+/
end
def ==(other)
other.name.match(@name_regex)
end
def deprecated_equality(other)
date = Utils.parse_date(name, "'#{name}' does not contain valid date and/or title.")
slug == post_slug(other) &&
date.year == other.date.year &&
date.month == other.date.month &&
@@ -59,6 +65,19 @@ eos
end
end
# New matching method did not match, fall back to old method
# with deprecation warning if this matches
site.posts.each do |p|
if @post.deprecated_equality p
Jekyll::Deprecator.deprecation_message "A call to '{{ post_url #{name} }}' did not match " +
"a post using the new matching method of checking name " +
"(path-date-slug) equality. Please make sure that you " +
"change this tag to match the post's name exactly."
return p.url
end
end
raise ArgumentError.new <<-eos
Could not find post "#{@orig_post}" in tag 'post_url'.

View File

@@ -37,33 +37,46 @@ module Jekyll
#
# Returns the String URL
def to_s
sanitize_url(@permalink || generate_url)
sanitize_url(generated_permalink || generated_url)
end
# Generates a URL from the permalink
#
# Returns the _unsanitized String URL
def generated_permalink
(@generated_permlink ||= generate_url(@permalink)) if @permalink
end
# Generates a URL from the template
#
# Returns the _unsanitized String URL
def generated_url
@generated_url ||= generate_url(@template)
end
# Internal: Generate the URL by replacing all placeholders with their
# respective values
# respective values in the given template
#
# Returns the _unsanitizied_ String URL
def generate_url
@placeholders.inject(@template) do |result, token|
def generate_url(template)
@placeholders.inject(template) do |result, token|
break result if result.index(':').nil?
result.gsub(/:#{token.first}/, self.class.escape_path(token.last))
end
end
# Returns a sanitized String URL
def sanitize_url(in_url)
# Remove all double slashes
url = in_url.gsub(/\/\//, "/")
# Remove every URL segment that consists solely of dots
url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
url = in_url \
# Remove all double slashes
.gsub(/\/\//, '/') \
# Remove every URL segment that consists solely of dots
.split('/').reject{ |part| part =~ /^\.+$/ }.join('/') \
# Always add a leading slash
.gsub(/\A([^\/])/, '/\1')
# Append a trailing slash to the URL if the unsanitized URL had one
url += "/" if in_url =~ /\/$/
# Always add a leading slash
url.gsub!(/\A([^\/])/, '/\1')
url << "/" if in_url[-1].eql?('/')
url
end
@@ -79,7 +92,7 @@ module Jekyll
#
# Returns the escaped path.
def self.escape_path(path)
# Because URI.escape doesn't escape '?', '[' and ']' by defaut,
# Because URI.escape doesn't escape '?', '[' and ']' by default,
# specify unsafe string (except unreserved, sub-delims, ":", "@" and "/").
#
# URI path segment is defined in RFC 3986 as follows:
@@ -89,7 +102,7 @@ module Jekyll
# pct-encoded = "%" HEXDIG HEXDIG
# sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
# / "*" / "+" / "," / ";" / "="
URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/)
URI.escape(path, /[^a-zA-Z\d\-._~!$&\'()*+,;=:@\/]/).encode('utf-8')
end
# Unescapes a URL path segment
@@ -103,7 +116,7 @@ module Jekyll
#
# Returns the unescaped path.
def self.unescape_path(path)
URI.unescape(path)
URI.unescape(path.encode('utf-8'))
end
end
end

View File

@@ -1,79 +1,125 @@
module Jekyll
module Utils
class << self
extend self
# Merges a master hash with another hash, recursively.
#
# master_hash - the "parent" hash whose values will be overridden
# other_hash - the other hash whose values will be persisted after the merge
#
# This code was lovingly stolen from some random gem:
# http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
#
# Thanks to whoever made it.
def deep_merge_hashes(master_hash, other_hash)
target = master_hash.dup
# Merges a master hash with another hash, recursively.
#
# master_hash - the "parent" hash whose values will be overridden
# other_hash - the other hash whose values will be persisted after the merge
#
# This code was lovingly stolen from some random gem:
# http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
#
# Thanks to whoever made it.
def deep_merge_hashes(master_hash, other_hash)
target = master_hash.dup
other_hash.keys.each do |key|
if other_hash[key].is_a? Hash and target[key].is_a? Hash
target[key] = Utils.deep_merge_hashes(target[key], other_hash[key])
next
end
target[key] = other_hash[key]
other_hash.each_key do |key|
if other_hash[key].is_a? Hash and target[key].is_a? Hash
target[key] = Utils.deep_merge_hashes(target[key], other_hash[key])
next
end
target
end
# Read array from the supplied hash favouring the singular key
# and then the plural key, and handling any nil entries.
#
# hash - the hash to read from
# singular_key - the singular key
# plural_key - the plural key
#
# Returns an array
def pluralized_array_from_hash(hash, singular_key, plural_key)
if hash.has_key?(singular_key)
array = [hash[singular_key]] if hash[singular_key]
elsif hash.has_key?(plural_key)
case hash[plural_key]
when String
array = hash[plural_key].split
when Array
array = hash[plural_key].compact
end
end
array || []
end
def transform_keys(hash)
result = {}
hash.each_key do |key|
result[yield(key)] = hash[key]
end
result
end
# Apply #to_sym to all keys in the hash
#
# hash - the hash to which to apply this transformation
#
# Returns a new hash with symbolized keys
def symbolize_hash_keys(hash)
transform_keys(hash) { |key| key.to_sym rescue key }
end
# Apply #to_s to all keys in the Hash
#
# hash - the hash to which to apply this transformation
#
# Returns a new hash with stringified keys
def stringify_hash_keys(hash)
transform_keys(hash) { |key| key.to_s rescue key }
target[key] = other_hash[key]
end
target
end
# Read array from the supplied hash favouring the singular key
# and then the plural key, and handling any nil entries.
#
# hash - the hash to read from
# singular_key - the singular key
# plural_key - the plural key
#
# Returns an array
def pluralized_array_from_hash(hash, singular_key, plural_key)
[].tap do |array|
array << (value_from_singular_key(hash, singular_key) || value_from_plural_key(hash, plural_key))
end.flatten.compact
end
def value_from_singular_key(hash, key)
hash[key] if (hash.key?(key) || (hash.default_proc && hash[key]))
end
def value_from_plural_key(hash, key)
if hash.key?(key) || (hash.default_proc && hash[key])
val = hash[key]
case val
when String
val.split
when Array
val.compact
end
end
end
def transform_keys(hash)
result = {}
hash.each_key do |key|
result[yield(key)] = hash[key]
end
result
end
# Apply #to_sym to all keys in the hash
#
# hash - the hash to which to apply this transformation
#
# Returns a new hash with symbolized keys
def symbolize_hash_keys(hash)
transform_keys(hash) { |key| key.to_sym rescue key }
end
# Apply #to_s to all keys in the Hash
#
# hash - the hash to which to apply this transformation
#
# Returns a new hash with stringified keys
def stringify_hash_keys(hash)
transform_keys(hash) { |key| key.to_s rescue key }
end
# Parse a date/time and throw an error if invalid
#
# input - the date/time to parse
# msg - (optional) the error message to show the user
#
# Returns the parsed date if successful, throws a FatalException
# if not
def parse_date(input, msg = "Input could not be parsed.")
Time.parse(input).localtime
rescue ArgumentError
raise Errors::FatalException.new("Invalid date '#{input}': " + msg)
end
# Determines whether a given file has
#
# Returns true if the YAML front matter is present.
def has_yaml_header?(file)
!!(File.open(file, 'rb') { |f| f.read(5) } =~ /\A---\r?\n/)
end
# Slugify a filename or title.
#
# name - the filename or title to slugify
#
# Returns the given filename or title in lowercase, with every
# sequence of spaces and non-alphanumeric characters replaced with a
# hyphen.
def slugify(string)
unless string.nil?
string \
# Replace each non-alphanumeric character sequence with a hyphen
.gsub(/[^[:alnum:]]+/i, '-') \
# Remove leading/trailing hyphen
.gsub(/^\-|\-$/i, '') \
# Downcase it
.downcase
end
end
end
end

View File

@@ -1,3 +1,3 @@
module Jekyll
VERSION = '2.0.3'
VERSION = '2.5.3'
end

View File

@@ -1 +1,2 @@
_site
_site
.sass-cache

View File

@@ -1,10 +1,14 @@
# Site settings
title: Your awesome title
email: your-email@domain.com
description: "Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description."
baseurl: ""
url: "http://yourdomain.com"
description: > # this means to ignore newlines until "baseurl:"
Write an awesome description for your new site here. You can edit this
line in _config.yml. It will appear in your document head meta (for
Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog/
url: "http://yourdomain.com" # the base hostname & protocol for your site
twitter_username: jekyllrb
github_username: jekyll
# Build settings
markdown: kramdown
permalink: pretty

View File

@@ -1,59 +1,53 @@
<footer class="site-footer">
<div class="wrap">
<div class="wrapper">
<h2 class="footer-heading">{{ site.title }}</h2>
<div class="footer-col-1 column">
<ul>
<li>{{ site.title }}</li>
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
</ul>
</div>
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="contact-list">
<li>{{ site.title }}</li>
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
</ul>
</div>
<div class="footer-col-2 column">
<ul>
<li>
<a href="https://github.com/{{ site.username }}">
<span class="icon github">
<svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C2C2C2" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761
c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32
c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472
c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037
C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65
c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261
c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082
c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129
c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
</svg>
</span>
<span class="username">{{ site.username }}</span>
</a>
</li>
<li>
<a href="https://twitter.com/{{ site.username }}">
<span class="icon twitter">
<svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path fill="#C2C2C2" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27
c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767
c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206
C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271
c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469
c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
</svg>
</span>
<span class="username">{{ site.username }}</span>
</a>
</li>
</ul>
</div>
<div class="footer-col footer-col-2">
<ul class="social-media-list">
{% if site.github_username %}
<li>
<a href="https://github.com/{{ site.github_username }}">
<span class="icon icon--github">
<svg viewBox="0 0 16 16">
<path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
</svg>
</span>
<div class="footer-col-3 column">
<p class="text">{{ site.description }}</p>
<span class="username">{{ site.github_username }}</span>
</a>
</li>
{% endif %}
{% if site.twitter_username %}
<li>
<a href="https://twitter.com/{{ site.twitter_username }}">
<span class="icon icon--twitter">
<svg viewBox="0 0 16 16">
<path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
</svg>
</span>
<span class="username">{{ site.twitter_username }}</span>
</a>
</li>
{% endif %}
</ul>
</div>
<div class="footer-col footer-col-3">
<p class="text">{{ site.description }}</p>
</div>
</div>
</div>

View File

@@ -1,12 +1,12 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="viewport" content="width=device-width">
<meta name="description" content="{{ site.description }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Custom CSS -->
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>

View File

@@ -1,24 +1,23 @@
<header class="site-header">
<div class="wrap">
<div class="wrapper">
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<nav class="site-nav">
<a href="#" class="menu-icon">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
<path fill="#505050" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0
h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#505050" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484
h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#505050" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0
c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
<svg viewBox="0 0 18 15">
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</a>
<div class="trigger">
{% for page in site.pages %}
{% if page.title %}
<a class="page-link" href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a>
{% endif %}
{% endfor %}
</div>
</nav>

View File

@@ -3,17 +3,18 @@
{% include head.html %}
<body>
<body>
{% include header.html %}
<div class="page-content">
<div class="wrap">
{{ content }}
<div class="wrapper">
{{ content }}
</div>
</div>
{% include footer.html %}
</body>
</html>
</body>
</html>

View File

@@ -1,14 +1,14 @@
---
layout: default
---
<div class="post">
<article class="post">
<header class="post-header">
<h1>{{ page.title }}</h1>
<h1 class="post-title">{{ page.title }}</h1>
</header>
<article class="post-content">
{{ content }}
</article>
<div class="post-content">
{{ content }}
</div>
</div>
</article>

View File

@@ -1,15 +1,15 @@
---
layout: default
---
<div class="post">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1>{{ page.title }}</h1>
<p class="meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
</header>
<article class="post-content">
{{ content }}
</article>
<div class="post-content" itemprop="articleBody">
{{ content }}
</div>
</div>
</article>

View File

@@ -4,9 +4,9 @@ title: "Welcome to Jekyll!"
date: <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>
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 `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
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.
Jekyll also offers powerful support for code snippets:
@@ -18,7 +18,8 @@ print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekylls GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekylls dedicated Help repository][jekyll-help].
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll]: http://jekyllrb.com
[jekyll]: http://jekyllrb.com
[jekyll-gh]: https://github.com/jekyll/jekyll
[jekyll-help]: https://github.com/jekyll/jekyll-help

View File

@@ -0,0 +1,204 @@
/**
* Reset some basic elements
*/
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}
/**
* Basic styling
*/
body {
font-family: $base-font-family;
font-size: $base-font-size;
line-height: $base-line-height;
font-weight: 300;
color: $text-color;
background-color: $background-color;
-webkit-text-size-adjust: 100%;
}
/**
* Set `margin-bottom` to maintain vertical rhythm
*/
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: $spacing-unit / 2;
}
/**
* Images
*/
img {
max-width: 100%;
vertical-align: middle;
}
/**
* Figures
*/
figure > img {
display: block;
}
figcaption {
font-size: $small-font-size;
}
/**
* Lists
*/
ul, ol {
margin-left: $spacing-unit;
}
li {
> ul,
> ol {
margin-bottom: 0;
}
}
/**
* Headings
*/
h1, h2, h3, h4, h5, h6 {
font-weight: 300;
}
/**
* Links
*/
a {
color: $brand-color;
text-decoration: none;
&:visited {
color: darken($brand-color, 15%);
}
&:hover {
color: $text-color;
text-decoration: underline;
}
}
/**
* Blockquotes
*/
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: $spacing-unit / 2;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;
> :last-child {
margin-bottom: 0;
}
}
/**
* Code formatting
*/
pre,
code {
font-size: 15px;
border: 1px solid $grey-color-light;
border-radius: 3px;
background-color: #eef;
}
code {
padding: 1px 5px;
}
pre {
padding: 8px 12px;
overflow-x: scroll;
> code {
border: 0;
padding-right: 0;
padding-left: 0;
}
}
/**
* Wrapper
*/
.wrapper {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
margin-right: auto;
margin-left: auto;
padding-right: $spacing-unit;
padding-left: $spacing-unit;
@extend %clearfix;
@include media-query($on-laptop) {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
max-width: calc(#{$content-width} - (#{$spacing-unit}));
padding-right: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}
}
/**
* Clearfix
*/
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
/**
* Icons
*/
.icon {
> svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $grey-color;
}
}
}

View File

@@ -0,0 +1,236 @@
/**
* Site header
*/
.site-header {
border-top: 5px solid $grey-color-dark;
border-bottom: 1px solid $grey-color-light;
min-height: 56px;
// Positioning context for the mobile navigation icon
position: relative;
}
.site-title {
font-size: 26px;
line-height: 56px;
letter-spacing: -1px;
margin-bottom: 0;
float: left;
&,
&:visited {
color: $grey-color-dark;
}
}
.site-nav {
float: right;
line-height: 56px;
.menu-icon {
display: none;
}
.page-link {
color: $text-color;
line-height: $base-line-height;
// Gaps between nav items, but not on the last one
&:not(:last-child) {
margin-right: 20px;
}
}
@include media-query($on-palm) {
position: absolute;
top: 9px;
right: 30px;
background-color: $background-color;
border: 1px solid $grey-color-light;
border-radius: 5px;
text-align: right;
.menu-icon {
display: block;
float: right;
width: 36px;
height: 26px;
line-height: 0;
padding-top: 10px;
text-align: center;
> svg {
width: 18px;
height: 15px;
path {
fill: $grey-color-dark;
}
}
}
.trigger {
clear: both;
display: none;
}
&:hover .trigger {
display: block;
padding-bottom: 5px;
}
.page-link {
display: block;
padding: 5px 10px;
}
}
}
/**
* Site footer
*/
.site-footer {
border-top: 1px solid $grey-color-light;
padding: $spacing-unit 0;
}
.footer-heading {
font-size: 18px;
margin-bottom: $spacing-unit / 2;
}
.contact-list,
.social-media-list {
list-style: none;
margin-left: 0;
}
.footer-col-wrapper {
font-size: 15px;
color: $grey-color;
margin-left: -$spacing-unit / 2;
@extend %clearfix;
}
.footer-col {
float: left;
margin-bottom: $spacing-unit / 2;
padding-left: $spacing-unit / 2;
}
.footer-col-1 {
width: -webkit-calc(35% - (#{$spacing-unit} / 2));
width: calc(35% - (#{$spacing-unit} / 2));
}
.footer-col-2 {
width: -webkit-calc(20% - (#{$spacing-unit} / 2));
width: calc(20% - (#{$spacing-unit} / 2));
}
.footer-col-3 {
width: -webkit-calc(45% - (#{$spacing-unit} / 2));
width: calc(45% - (#{$spacing-unit} / 2));
}
@include media-query($on-laptop) {
.footer-col-1,
.footer-col-2 {
width: -webkit-calc(50% - (#{$spacing-unit} / 2));
width: calc(50% - (#{$spacing-unit} / 2));
}
.footer-col-3 {
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
width: calc(100% - (#{$spacing-unit} / 2));
}
}
@include media-query($on-palm) {
.footer-col {
float: none;
width: -webkit-calc(100% - (#{$spacing-unit} / 2));
width: calc(100% - (#{$spacing-unit} / 2));
}
}
/**
* Page content
*/
.page-content {
padding: $spacing-unit 0;
}
.page-heading {
font-size: 20px;
}
.post-list {
margin-left: 0;
list-style: none;
> li {
margin-bottom: $spacing-unit;
}
}
.post-meta {
font-size: $small-font-size;
color: $grey-color;
}
.post-link {
display: block;
font-size: 24px;
}
/**
* Posts
*/
.post-header {
margin-bottom: $spacing-unit;
}
.post-title {
font-size: 42px;
letter-spacing: -1px;
line-height: 1;
@include media-query($on-laptop) {
font-size: 36px;
}
}
.post-content {
margin-bottom: $spacing-unit;
h2 {
font-size: 32px;
@include media-query($on-laptop) {
font-size: 28px;
}
}
h3 {
font-size: 26px;
@include media-query($on-laptop) {
font-size: 22px;
}
}
h4 {
font-size: 20px;
@include media-query($on-laptop) {
font-size: 18px;
}
}
}

View File

@@ -0,0 +1,67 @@
/**
* Syntax highlighting styles
*/
.highlight {
background: #fff;
@extend %vertical-rhythm;
.c { color: #998; font-style: italic } // Comment
.err { color: #a61717; background-color: #e3d2d2 } // Error
.k { font-weight: bold } // Keyword
.o { font-weight: bold } // Operator
.cm { color: #998; font-style: italic } // Comment.Multiline
.cp { color: #999; font-weight: bold } // Comment.Preproc
.c1 { color: #998; font-style: italic } // Comment.Single
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
.gd { color: #000; background-color: #fdd } // Generic.Deleted
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
.ge { font-style: italic } // Generic.Emph
.gr { color: #a00 } // Generic.Error
.gh { color: #999 } // Generic.Heading
.gi { color: #000; background-color: #dfd } // Generic.Inserted
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
.go { color: #888 } // Generic.Output
.gp { color: #555 } // Generic.Prompt
.gs { font-weight: bold } // Generic.Strong
.gu { color: #aaa } // Generic.Subheading
.gt { color: #a00 } // Generic.Traceback
.kc { font-weight: bold } // Keyword.Constant
.kd { font-weight: bold } // Keyword.Declaration
.kp { font-weight: bold } // Keyword.Pseudo
.kr { font-weight: bold } // Keyword.Reserved
.kt { color: #458; font-weight: bold } // Keyword.Type
.m { color: #099 } // Literal.Number
.s { color: #d14 } // Literal.String
.na { color: #008080 } // Name.Attribute
.nb { color: #0086B3 } // Name.Builtin
.nc { color: #458; font-weight: bold } // Name.Class
.no { color: #008080 } // Name.Constant
.ni { color: #800080 } // Name.Entity
.ne { color: #900; font-weight: bold } // Name.Exception
.nf { color: #900; font-weight: bold } // Name.Function
.nn { color: #555 } // Name.Namespace
.nt { color: #000080 } // Name.Tag
.nv { color: #008080 } // Name.Variable
.ow { font-weight: bold } // Operator.Word
.w { color: #bbb } // Text.Whitespace
.mf { color: #099 } // Literal.Number.Float
.mh { color: #099 } // Literal.Number.Hex
.mi { color: #099 } // Literal.Number.Integer
.mo { color: #099 } // Literal.Number.Oct
.sb { color: #d14 } // Literal.String.Backtick
.sc { color: #d14 } // Literal.String.Char
.sd { color: #d14 } // Literal.String.Doc
.s2 { color: #d14 } // Literal.String.Double
.se { color: #d14 } // Literal.String.Escape
.sh { color: #d14 } // Literal.String.Heredoc
.si { color: #d14 } // Literal.String.Interpol
.sx { color: #d14 } // Literal.String.Other
.sr { color: #009926 } // Literal.String.Regex
.s1 { color: #d14 } // Literal.String.Single
.ss { color: #990073 } // Literal.String.Symbol
.bp { color: #999 } // Name.Builtin.Pseudo
.vc { color: #008080 } // Name.Variable.Class
.vg { color: #008080 } // Name.Variable.Global
.vi { color: #008080 } // Name.Variable.Instance
.il { color: #099 } // Literal.Number.Integer.Long
}

View File

@@ -1,405 +0,0 @@
/* Base */
/* ----------------------------------------------------------*/
* {
margin: 0;
padding: 0;
}
html, body { height: 100%; }
body {
font-family: Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
font-weight: 300;
background-color: #fdfdfd;
}
h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: 400; }
a { color: #2a7ae2; text-decoration: none; }
a:hover { color: #000; text-decoration: underline; }
a:visited { color: #205caa; }
/* Utility */
.wrap:before,
.wrap:after { content:""; display:table; }
.wrap:after { clear: both; }
.wrap {
max-width: 800px;
padding: 0 30px;
margin: 0 auto;
zoom: 1;
}
/* Layout Styles */
/* ----------------------------------------------------------*/
/* Site header */
.site-header {
border-top: 5px solid #333;
border-bottom: 1px solid #e8e8e8;
min-height: 56px;
background-color: white;
}
.site-title,
.site-title:hover,
.site-title:visited {
display: block;
color: #333;
font-size: 26px;
letter-spacing: -1px;
float: left;
line-height: 56px;
position: relative;
z-index: 1;
}
.site-nav {
float: right;
line-height: 56px;
}
.site-nav .menu-icon { display: none; }
.site-nav .page-link {
margin-left: 20px;
color: #727272;
letter-spacing: -.5px;
}
/* Site footer */
.site-footer {
border-top: 1px solid #e8e8e8;
padding: 30px 0;
}
.footer-heading {
font-size: 18px;
font-weight: 300;
letter-spacing: -.5px;
margin-bottom: 15px;
}
.site-footer .column { float: left; margin-bottom: 15px; }
.footer-col-1 {
width: 270px; /*fallback*/
width: -webkit-calc(35% - 10px);
width: -moz-calc(35% - 10px);
width: -o-calc(35% - 10px);
width: calc(35% - 10px);
margin-right: 10px
}
.footer-col-2 {
width: 175px; /*fallback*/
width: -webkit-calc(23.125% - 10px);
width: -moz-calc(23.125% - 10px);
width: -o-calc(23.125% - 10px);
width: calc(23.125% - 10px);
margin-right: 10px
}
.footer-col-3 {
width: 335px; /*fallback*/
width: -webkit-calc(41.875%);
width: -moz-calc(41.875%);
width: -o-calc(41.875%);
width: calc(41.875%);
}
.site-footer ul { list-style: none; }
.site-footer li,
.site-footer p {
font-size: 15px;
letter-spacing: -.3px;
color: #828282;
}
.github-icon-svg,
.twitter-icon-svg {
display: inline-block;
width: 16px;
height: 16px;
position: relative;
top: 3px;
}
/* Page Content styles */
/* ----------------------------------------------------------*/
.page-content {
padding: 30px 0;
background-color: #fff;
}
/* Home styles */
/* ----------------------------------------------------------*/
.home h1 { margin-bottom: 25px; }
.posts { list-style-type: none; }
.posts li { margin-bottom: 30px; }
.posts .post-link {
font-size: 24px;
letter-spacing: -1px;
line-height: 1;
}
.posts .post-date {
display: block;
font-size: 15px;
color: #818181;
}
/* Post styles */
/* ----------------------------------------------------------*/
.post-header { margin: 10px 0 30px; }
.post-header h1 {
font-size: 42px;
letter-spacing: -1.75px;
line-height: 1;
font-weight: 300;
}
.post-header .meta {
font-size: 15px;
color: #818181;
margin-top: 5px;
}
.post-content { margin: 0 0 30px; }
.post-content > * { margin: 20px 0; }
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
line-height: 1;
font-weight: 300;
margin: 40px 0 20px;
}
.post-content h2 {
font-size: 32px;
letter-spacing: -1.25px;
}
.post-content h3 {
font-size: 26px;
letter-spacing: -1px;
}
.post-content h4 {
font-size: 20px;
letter-spacing: -1px;
}
.post-content blockquote {
border-left: 4px solid #e8e8e8;
padding-left: 20px;
font-size: 18px;
opacity: .6;
letter-spacing: -1px;
font-style: italic;
margin: 30px 0;
}
.post-content ul,
.post-content ol { padding-left: 20px; }
.post pre,
.post code {
border: 1px solid #d5d5e9;
background-color: #eef;
padding: 8px 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 15px;
}
.post code { padding: 1px 5px; }
.post ul,
.post ol { margin-left: 1.35em; }
.post pre code { border: none; }
/* terminal */
.post pre.terminal {
border: 1px solid #000;
background-color: #333;
color: #FFF;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.post pre.terminal code { background-color: #333; }
/* Syntax highlighting styles */
/* ----------------------------------------------------------*/
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
/* media queries */
/* ----------------------------------------------------------*/
@media screen and (max-width: 750px) {
.footer-col-1 { width: 50%; }
.footer-col-2 {
width: 45%; /*fallback*/
width: -webkit-calc(50% - 10px);
width: -moz-calc(50% - 10px);
width: -o-calc(50% - 10px);
width: calc(50% - 10px);
margin-right: 0;
}
.site-footer .column.footer-col-3 {
width: auto;
float: none;
clear: both;
}
}
@media screen and (max-width: 600px) {
.wrap { padding: 0 12px; }
.site-nav {
position: fixed;
z-index: 10;
top: 14px; right: 8px;
background-color: white;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border: 1px solid #e8e8e8;
}
.site-nav .menu-icon {
display: block;
font-size: 24px;
color: #505050;
float: right;
width: 36px;
text-align: center;
line-height: 36px;
}
.site-nav .menu-icon svg { width: 18px; height: 16px; }
.site-nav .trigger {
clear: both;
margin-bottom: 5px;
display: none;
}
.site-nav:hover .trigger { display: block; }
.site-nav .page-link {
display: block;
text-align: right;
line-height: 1.25;
padding: 5px 10px;
margin: 0;
}
.post-header h1 { font-size: 36px; }
.post-content h2 { font-size: 28px; }
.post-content h3 { font-size: 22px; }
.post-content h4 { font-size: 18px; }
.post-content blockquote { padding-left: 10px; }
.post-content ul,
.post-content ol { padding-left: 10px; }
.site-footer .column {
float: none;
clear: both;
width: auto;
margin: 0 0 15px; }
}

52
lib/site_template/css/main.scss Executable file
View File

@@ -0,0 +1,52 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---
@charset "utf-8";
// Our variables
$base-font-family: Helvetica, Arial, sans-serif;
$base-font-size: 16px;
$small-font-size: $base-font-size * 0.875;
$base-line-height: 1.5;
$spacing-unit: 30px;
$text-color: #111;
$background-color: #fdfdfd;
$brand-color: #2a7ae2;
$grey-color: #828282;
$grey-color-light: lighten($grey-color, 40%);
$grey-color-dark: darken($grey-color, 25%);
// Width of the content area
$content-width: 800px;
$on-palm: 600px;
$on-laptop: 800px;
// Using media queries with like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
// Import partials from `sass_dir` (defaults to `_sass`)
@import
"base",
"layout",
"syntax-highlighting"
;

View File

@@ -1,5 +1,5 @@
---
layout: none
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
@@ -7,14 +7,23 @@ layout: none
<title>{{ site.title | xml_escape }}</title>
<description>{{ site.description | xml_escape }}</description>
<link>{{ site.url }}{{ site.baseurl }}/</link>
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml" />
<atom:link href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" rel="self" type="application/rss+xml"/>
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
<generator>Jekyll v{{ jekyll.version }}</generator>
{% for post in site.posts limit:10 %}
<item>
<title>{{ post.title | xml_escape }}</title>
<description>{{ post.content | xml_escape }}</description>
<pubDate>{{ post.date | date: "%a, %d %b %Y %H:%M:%S %z" }}</pubDate>
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
{% for tag in post.tags %}
<category>{{ tag | xml_escape }}</category>
{% endfor %}
{% for cat in post.categories %}
<category>{{ cat | xml_escape }}</category>
{% endfor %}
</item>
{% endfor %}
</channel>

View File

@@ -4,13 +4,16 @@ layout: default
<div class="home">
<h1>Posts</h1>
<h1 class="page-heading">Posts</h1>
<ul class="posts">
<ul class="post-list">
{% for post in site.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}
</ul>

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