Compare commits

...

181 Commits

Author SHA1 Message Date
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
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
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
75 changed files with 1369 additions and 458 deletions

View File

@@ -2,6 +2,64 @@
### Major Enhancements
### Minor Enhancements
### Bug Fixes
### Development Fixes
### Site Enhancements
## 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)
@@ -27,6 +85,8 @@
* 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
@@ -46,6 +106,11 @@
* 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
@@ -53,6 +118,7 @@
* 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
@@ -74,6 +140,9 @@
* 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
@@ -1082,9 +1151,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
@@ -1094,7 +1163,7 @@
* Added trailing slash to pretty permalink style so Apache is happy
(@eugenebolshakov)
* Bad markdown processor in config fails sooner and with better message
(@gcnovus)
(@ gcnovus)
* Allow CRLFs in yaml frontmatter (@juretta)
* Added Date#xmlschema for Ruby versions < 1.9

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
#############################################################################
@@ -228,6 +247,7 @@ end
#
#############################################################################
desc "Release #{name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
puts "You must be on the master branch to release!"
@@ -240,6 +260,7 @@ task :release => :build do
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

@@ -128,3 +128,9 @@ Feature: frontmatter defaults
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

@@ -45,7 +45,7 @@ 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
Given I have a configuration file with "markdown" set to "maruku"
@@ -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

@@ -70,17 +70,41 @@ 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] | Luke, I am your father. |
| 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/2009/03/27/star-wars.html"
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
@@ -141,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

@@ -273,3 +273,11 @@ Feature: Site configuration
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"
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 "FOO" in "_site/index.html"
And I should not see " " in "_site/index.html"

View File

@@ -28,20 +28,23 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.extra_rdoc_files = %w[README.markdown LICENSE]
s.add_runtime_dependency('liquid', "~> 2.6.1")
s.add_runtime_dependency('classifier', "~> 1.3")
s.add_runtime_dependency('listen', [">= 2.7.6", "< 3.0.0"])
s.add_runtime_dependency('kramdown', "~> 1.3")
s.add_runtime_dependency('pygments.rb', "~> 0.6.0")
s.add_runtime_dependency('liquid', "~> 2.6.1")
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('classifier', "~> 1.3")
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_runtime_dependency('jekyll-watch', '~> 1.0')
s.add_development_dependency('rake', "~> 10.1")
s.add_development_dependency('rdoc', "~> 3.11")
@@ -50,7 +53,7 @@ Gem::Specification.new do |s|
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('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")

View File

@@ -18,69 +18,56 @@ require 'rubygems'
# stdlib
require 'fileutils'
require 'time'
require 'safe_yaml/load'
require 'English'
require 'pathname'
require 'logger'
# 3rd party
require 'safe_yaml/load'
require 'liquid'
require 'kramdown'
require 'colorator'
require 'toml'
# internal requires
require 'jekyll/version'
require 'jekyll/utils'
require 'jekyll/log_adapter'
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'
# extensions
require 'jekyll/plugin'
require 'jekyll/converter'
require 'jekyll/generator'
require 'jekyll/command'
require 'jekyll/liquid_extensions'
require_all 'jekyll/commands'
require_all 'jekyll/converters'
require_all 'jekyll/converters/markdown'
require_all 'jekyll/generators'
require_all 'jekyll/tags'
# plugins
require 'jekyll-coffeescript'
require 'jekyll-sass-converter'
require 'jekyll-paginate'
require 'jekyll-gist'
SafeYAML::OPTIONS[:suppress_warnings] = true
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 :Filters, 'jekyll/filters'
autoload :FrontmatterDefaults, 'jekyll/frontmatter_defaults'
autoload :Layout, 'jekyll/layout'
autoload :LayoutReader, 'jekyll/layout_reader'
autoload :LogAdapter, 'jekyll/log_adapter'
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'
# 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.
@@ -143,3 +130,19 @@ module Jekyll
end
end
end
require_all 'jekyll/commands'
require_all 'jekyll/converters'
require_all 'jekyll/converters/markdown'
require_all 'jekyll/generators'
require_all 'jekyll/tags'
# Eventually remove these for 3.0 as non-core
Jekyll::Deprecator.gracefully_require(%w[
classifier
toml
jekyll-paginate
jekyll-gist
jekyll-coffeescript
jekyll-sass-converter
])

View File

@@ -52,7 +52,7 @@ module Jekyll
def filtered_entries
return Array.new unless exists?
Dir.chdir(directory) do
entry_filter.filter(entries)
entry_filter.filter(entries).reject { |f| File.directory?(f) }
end
end
@@ -105,7 +105,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.

View File

@@ -51,7 +51,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

View File

@@ -38,7 +38,7 @@ module Jekyll
# 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)
@@ -58,38 +58,8 @@ module Jekyll
#
# Returns nothing.
def watch(site, options)
require 'listen'
listener = Listen.to(
options['source'],
:ignore => ignore_paths(options),
: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 for '#{source}'"
unless options['serving']
trap("INT") do
listener.stop
puts " Halting auto-regeneration."
exit 0
end
loop { sleep 1000 }
end
Deprecator.gracefully_require 'jekyll-watch'
Jekyll::Commands::Watch.watch(site, options)
end
end # end of class << self

View File

@@ -40,6 +40,7 @@ module Jekyll
'markdown_ext' => 'markdown,mkdown,mkdn,mkd,md',
'textile_ext' => 'textile',
'quiet' => false,
'port' => '4000',
'host' => '0.0.0.0',
@@ -103,6 +104,10 @@ 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'
@@ -120,6 +125,9 @@ 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?
@@ -234,6 +242,7 @@ 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.fetch('markdown', 'kramdown').to_s.downcase.eql?("maruku")

View File

@@ -11,22 +11,41 @@ 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 matches(ext)
rgx = '^\.(' + @config['markdown_ext'].gsub(',','|') +')$'
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)

View File

@@ -8,7 +8,7 @@ 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)

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::Deprecator.gracefully_require "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::Deprecator.gracefully_require("pygments")
lang = lang && lang.split.first || "text"
add_code_tags(
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
@@ -55,45 +55,40 @@ module Jekyll
def initialize(config)
require 'redcarpet'
Deprecator.gracefully_require("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
begin
require 'rouge'
require 'rouge/plugins/redcarpet'
rescue LoadError => e
Jekyll.logger.error "You are missing the 'rouge' gem. Please run:"
Jekyll.logger.error " $ [sudo] gem install rouge"
Jekyll.logger.error "Or add 'rouge' to your Gemfile."
raise FatalException.new("Missing dependency: rouge")
end
@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::Deprecator.gracefully_require(%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,7 +13,7 @@ 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 matches(ext)
@@ -32,7 +32,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

@@ -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(Jekyll.sanitized_path(base, name),
merged_file_read_opts(opts))
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
self.content = $POSTMATCH
@@ -153,6 +153,15 @@ module Jekyll
!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? && data["layout"] != "none" && layout.nil? && !(self.is_a? Jekyll::Excerpt)
end
# Recursively render layouts
#
# layouts - a list of the layouts
@@ -163,6 +172,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

View File

@@ -1,5 +1,5 @@
module Jekyll
class Deprecator
module Deprecator
def self.process(args)
no_subcommand(args)
arg_is_present? args, "--server", "The --server command has been replaced by the \
@@ -32,5 +32,23 @@ module Jekyll
def self.deprecation_message(message)
Jekyll.logger.error "Deprecation:", message
end
def self.gracefully_require(gem_name)
Array(gem_name).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 contfigured, 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 Errors::MissingDependencyException.new(name)
end
end
end
end
end

View File

@@ -127,7 +127,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

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

View File

@@ -1,148 +1,146 @@
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
# 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'].has_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['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
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
else
!old_scope.has_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|
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.select do |set|
unless valid?(set)
Jekyll.logger.warn "Default:", "An invalid default set was found"
end
valid?(set)
end
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

@@ -78,8 +78,9 @@ module Jekyll
def populate_categories
categories_from_data = Utils.pluralized_array_from_hash(data, 'category', 'categories')
self.categories = (Array(categories) + categories_from_data).map {|c| c.to_s.downcase}
categories.flatten!
self.categories = (
Array(categories) + categories_from_data
).map {|c| c.to_s.downcase}.flatten.uniq
end
def populate_tags
@@ -158,6 +159,8 @@ module Jekyll
# Returns nothing.
def process(name)
m, cats, date, slug, ext = *name.match(MATCHER)
self.categories ||= []
self.categories += (cats || '').downcase.split('/')
self.date = Time.parse(date)
self.slug = slug
self.ext = ext
@@ -165,7 +168,7 @@ module Jekyll
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)
raise Errors::FatalException.new(msg)
end
# The generated directory into which the post will be placed

View File

@@ -92,6 +92,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
@@ -101,6 +110,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

View File

@@ -80,7 +80,7 @@ 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
@@ -195,7 +195,7 @@ module Jekyll
#
# Returns nothing
def read_data(dir)
base = File.join(source, dir)
base = Jekyll.sanitized_path(source, dir)
read_data_to(base, self.data)
end
@@ -214,7 +214,7 @@ module Jekyll
end
entries.each do |entry|
path = File.join(dir, entry)
path = Jekyll.sanitized_path(dir, entry)
next if File.symlink?(path) && safe
key = sanitize_filename(File.basename(entry, '.*'))
@@ -443,7 +443,7 @@ module Jekyll
end
def frontmatter_defaults
@frontmatter_defaults ||= Configuration::FrontmatterDefaults.new(self)
@frontmatter_defaults ||= FrontmatterDefaults.new(self)
end
private

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,9 +44,11 @@ eos
suffix = context["highlighter_suffix"] || ""
code = super.to_s.strip
is_safe = !!context.registers[:site].safe
output = case context.registers[:site].highlighter
when 'pygments'
render_pygments(code)
render_pygments(code, is_safe)
when 'rouge'
render_rouge(code)
else
@@ -49,11 +59,30 @@ eos
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:"

View File

@@ -131,10 +131,6 @@ eos
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))

View File

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

View File

@@ -1,4 +1,7 @@
#! /bin/bash
set -e
script/branding
bundle exec rake
script/proof
script/test

22
script/proof Executable file
View File

@@ -0,0 +1,22 @@
#! /bin/bash
#
# Usage:
# script/proof
set -e
git diff --name-only origin $(git log --pretty=format:"%h" -2 | tail -1) | grep '^site/' || {
echo "No site files changed. We'll skip proofing."
exit 0
}
echo "Some site files have been changed! Proofing..."
command -v htmlproof || {
echo "Installing HTML::Proofer!"
gem install html-proofer -- --use-system-libraries
}
bundle exec jekyll build -s site -d _site --trace
printf "\e[0;36mProofing begins now!\e[0m\n"
htmlproof ./_site

View File

@@ -1,11 +1,17 @@
#! /bin/bash
#
# Usage:
# script/test
# script/test <hi>
set -x
if [ -z "$1" ]; then
TEST_FILES="test/test*.rb"
TEST_FILES="test/test_*.rb"
else
TEST_FILES="$@"
fi
/usr/bin/env bundle exec ruby -I"lib:test" -r rake -r rake/rake_test_loader ${TEST_FILES}
set -x
bundle exec rake

View File

@@ -7,4 +7,3 @@ excerpt_separator: noifniof3nioaniof3nioafafinoafnoif
repository: https://github.com/jekyll/jekyll
help_url: https://github.com/jekyll/jekyll-help
google_analytics_id: UA-50755011-1
timezone: America/Los_Angeles

View File

@@ -31,6 +31,7 @@
docs:
- github-pages
- deployment-methods
- continuous-integration
- title: Miscellaneous
docs:

View File

@@ -699,6 +699,7 @@ pre, code {
}
.highlight {
margin: 1em 0;
padding: 10px 0;
width: 100%;
overflow: auto;

View File

@@ -19,5 +19,5 @@ examples and for compiling this list):
Take a look at the [Upgrading][] page in the docs for more detailed information.
[history]: /docs/history/#100__20130506
[history]: /docs/history/#v1-0-0
[Upgrading]: /docs/upgrading/

View File

@@ -24,4 +24,4 @@ See the [History][] page for more information on this release.
[#{{ issue }}]: {{ site.repository }}/issues/{{ issue }}
{% endfor %}
[History]: /docs/history/#101__20130508
[History]: /docs/history/#v1-0-1

View File

@@ -25,4 +25,4 @@ See the [History][] page for more information on this release.
[#{{ issue }}]: {{ site.repository }}/issues/{{ issue }}
{% endfor %}
[History]: /docs/history/#102__20130512
[History]: /docs/history/#v1-0-2

View File

@@ -22,4 +22,4 @@ See the [History][] page for more information on this release.
[#{{ issue }}]: {{ site.repository }}/issues/{{ issue }}
{% endfor %}
[History]: /docs/history/#103__20130607
[History]: /docs/history/#v1-0-3

View File

@@ -16,4 +16,4 @@ For a full changelog, check out our [history][] page.
Now, back to work on 2.0.0!
[fun issue with path sanitizing]: https://github.com/jekyll/jekyll/issues/1948
[history]: /docs/history/#150__20140324
[history]: /docs/history/#v1-5-0

View File

@@ -22,10 +22,10 @@ Check out our [changelog][] for a complete list of all (200+) changes.
Many thanks to these 183 contributors for making Jekyll 2.0.0 happen:
Parker Moore, Matt Rogers, maul.esel, Anatol Broder, Zach Gersh, Joel Glovier, Ben Balter, XhmikosR, Coby Chapple, John Piasetzki, Aidan Feldman, Robin Dupret, Pascal Borreli, Troy Swanson, Erik Michaels-Ober, albertogg, Lucas Jenss, Matt Rogers & Persa Zula, Eric Mill, Shigeya Suzuki, Jens Nazarenus, ddavison, Pat Hawks, Rob Wierzbowski, MURAOKA Taro, Casey Lang, Fabian Rodriguez, Greg Karékinian, Zlatan Vasović, Christopher Nicotera, Dmitry Chestnykh, Ryan Morrissey, Jordon, John Hughes, akira yamada, Matt Swanson, Jashank Jeremy, Matthew Iversen, Meeka, liufengyun, Anand Narayan, nitoyon, Geoff Shannon, Benjamin J. Balter, Juan Ignacio Donoso, David Briggs, Benjamin Esham, Slava Pavlutin, Assaf Gelber, Josh Brown, Nick Fagerlund, Davide Ficano, pilosus, Anthony Smith, André Arko, Mikael Konutgan, Matthew Scharley, Dan Tao, scribu, Mort Yao, m, Stephen McDonald, Marcus Stollsteimer, Thomas Torsney-Weir, Jordon Bedwell, Tom Preston-Werner, Lincoln Mullen, Philip Poots, Ivan Tse, Christopher Giroir, Valery Tolstov, Wlodek Bzyl, Xavier Noria, Yi Zeng, Persa Zula, Phil Leggetter, Pirogov Evgenij, Rafael Revi, Rob McGuire-Dale, Rob Muhlestein, Robin Mehner, Roland Warmerdam, Rusty Geldmacher, Sam Rayner, Santeri Paavolainen, Sebastian Morr, Stephan Groß, Steven Spasbo, Tobias Brunner, Tuomas Kareinen, Tyler Margison, Uwe Dauernheim, Yihang Ho, Zach Leatherman, Zequez, andrew morton, andrewhavens, imathis, jannypie, jaybe@jekyll, kk_Ataka, markets, redwallhp, schneems, szymzet, thomasdao, tomsugden, wǒ_is神仙, 张君君, Noah Slater, Abhi Yerra, Adam Heckler, Ahmed Hazem, Aigars Dzerviniks, Aleksey V. Zapparov, Andreas Möller, Andy Lindeman, Arlen Cuss, Aziz Shamim, Ben Baker-Smith, Ben Hanzl, Ben Hildred, Brian Kim, Brice, Carol Nichols, Chezou, Chris Jones, Christian Grobmeier, Christoph Hochstrasser, Christoph Schiessl, Clint Shryock, Colin Dean, Corey Ward, Damian Lettie, Daniel Schauenberg, David Ensinger, David Paschich, David Sawyer, David Silva Smith, Donald Perry, Doug Johnston, Edward Ball, Eric Dobson, Erik Dungan, Florent Guilleux, Francis, Frederic ROS, GSI2013, Garen Torikian, George Anderson, Giuseppe Capizzi, Ishibashi Hideto, Jarrod Birch, Jeff Kolesky, Jens Bissinger, Jens Krause, John Firebaugh, John Papandriopoulos, Josh Branchaud, Katy DeCorah, Lachlan Holden, Mark Prins, Markus Roth, Martin Charles, Matt Iversen, Matt Sheehan, Matt Swensen, Matthias Vogelgesang, Michael Parker, Miha Rekar, Nathan Youngman, Nick Quaranto, Nick Quinlan, Nick Schonning, Nicolas Alpi, Nicolás Reynolds, Nikkau, 4ensicLog, Octavian Damiean, Olov Lassus, PatrickC8t, Paul Annesley, and Paul Oppenheim.
Parker Moore, Matt Rogers, maul.esel, Anatol Broder, Zach Gersh, Joel Glovier, Ben Balter, XhmikosR, Coby Chapple, John Piasetzki, Aidan Feldman, Robin Dupret, Pascal Borreli, Troy Swanson, Erik Michaels-Ober, albertogg, Lucas Jenss, Matt Rogers & Persa Zula, Eric Mill, Shigeya Suzuki, Jens Nazarenus, ddavison, Pat Hawks, Rob Wierzbowski, MURAOKA Taro, Casey Lang, Fabian Rodriguez, Greg Karékinian, Zlatan Vasović, Christopher Nicotera, Dmitry Chestnykh, Ryan Morrissey, Jordon, John Hughes, akira yamada, Matt Swanson, Jashank Jeremy, Matthew Iversen, Meeka, liufengyun, Anand Narayan, nitoyon, Geoff Shannon, Benjamin J. Balter, Juan Ignacio Donoso, David Briggs, Benjamin Esham, Slava Pavlutin, Assaf Gelber, Josh Brown, Nick Fagerlund, Davide Ficano, pilosus, Anthony Smith, André Arko, Mikael Konutgan, Matthew Scharley, Dan Tao, scribu, Mort Yao, m, Stephen McDonald, Marcus Stollsteimer, Thomas Torsney-Weir, Jordon Bedwell, Tom Preston-Werner, Lincoln Mullen, Philip Poots, Ivan Tse, Christopher Giroir, Valery Tolstov, Wlodek Bzyl, Xavier Noria, Yi Zeng, Persa Zula, Phil Leggetter, Pirogov Evgenij, Rafael Revi, Rob McGuire-Dale, Rob Muhlestein, Robin Mehner, Roland Warmerdam, Rusty Geldmacher, Sam Rayner, Santeri Paavolainen, Sebastian Morr, Stephan Groß, Steven Spasbo, Tobias Brunner, Tuomas Kareinen, Tyler Margison, Uwe Dauernheim, Yihang Ho, Zach Leatherman, Zequez, andrew morton, andrewhavens, imathis, jannypie, jaybe@jekyll, kk_Ataka, markets, redwallhp, schneems, szymzet, thomasdao, tomsugden, wǒis神仙, 张君君, Noah Slater, Abhi Yerra, Adam Heckler, Ahmed Hazem, Aigars Dzerviniks, Aleksey V. Zapparov, Andreas Möller, Andy Lindeman, Arlen Cuss, Aziz Shamim, Ben Baker-Smith, Ben Hanzl, Ben Hildred, Brian Kim, Brice, Carol Nichols, Chezou, Chris Jones, Christian Grobmeier, Christoph Hochstrasser, Christoph Schiessl, Clint Shryock, Colin Dean, Corey Ward, Damian Lettie, Daniel Schauenberg, David Ensinger, David Paschich, David Sawyer, David Silva Smith, Donald Perry, Doug Johnston, Edward Ball, Eric Dobson, Erik Dungan, Florent Guilleux, Francis, Frederic ROS, GSI2013, Garen Torikian, George Anderson, Giuseppe Capizzi, Ishibashi Hideto, Jarrod Birch, Jeff Kolesky, Jens Bissinger, Jens Krause, John Firebaugh, John Papandriopoulos, Josh Branchaud, Katy DeCorah, Lachlan Holden, Mark Prins, Markus Roth, Martin Charles, Matt Iversen, Matt Sheehan, Matt Swensen, Matthias Vogelgesang, Michael Parker, Miha Rekar, Nathan Youngman, Nick Quaranto, Nick Quinlan, Nick Schonning, Nicolas Alpi, Nicolás Reynolds, Nikkau, 4ensicLog, Octavian Damiean, Olov Lassus, PatrickC8t, Paul Annesley, and Paul Oppenheim.
Happy developing!
[changelog]: /docs/history/
[@jglovier]: https://github.com/jglovier
[jekyll-1]: {% post_url 2013-05-05-jekyll-1-0-0-released %}
[jekyll-1]: /news/2013/05/06/jekyll-1-0-0-released/

View File

@@ -0,0 +1,31 @@
---
layout: news_item
title: 'Jekyll Turns 21! Err... I mean 2.1.0.'
date: 2014-06-28 17:26:59 -0400
author: parkr
version: 2.1.0
categories: [release]
---
Jekyll's finally [legal to drink in the States](http://en.wikipedia.org/wiki/Legal_drinking_age).
And he's done a lot of learning in the process! Here are some of the new
things to look forward to:
- Uses the latest Liquid version (2.6.1) (#2495)
- Set front-matter defaults for collections (#2419)
- Set a collection-specific URL template (#2418)
- `pygments.rb` 0.6.0! (#2504)
- `.json` files in `_data` (#2369)
- Allow subdirectories in `_data` (#2395)
- Add support for `hl_lines` in `highlight` tag (#2532)
- Post categories now merge with directory, front-matter, and defaults (#2373)
- New `--skip_initial_build` flag for `jekyll serve` (#2477)
- A bajilion bug fixes and site updates!
Let's go party!
*Check out the [full changelog](/docs/history/#v2-1-0) for more.*
Many thanks to these 37 contributors for the 2.1.0 release:
Alberto Grespan, Alessandro Lorenzi, Alex Medearis, Alfred Xing, Anatol Broder, Ben, Ben Balter, Bud Parr, Chezou, Denilson Figueiredo de Sá, Denilson Sá, Ivan Tse, Jens Nazarenus, Jesse Shawl, Jordon Bedwell, Josh Davis, János Rusiczki, Marc Ransome, Mathieu Bruyen, Matt Rogers, Parker Moore, Pat Hawks, Paul Henry, Peter Rhoades, Philipp Rudloff, Quinn Shanahan, Renaud Martinet, Rob Murray, Rodrigo Dumont, Simon Sarris, Terry, Terry Schmidt, Tomer Cohen, XhmikosR, Yihang Ho, jaybe@jekyll, and mikecole.

View File

@@ -0,0 +1,30 @@
---
layout: news_item
title: 'Jekyll 2.1.1 Released'
date: 2014-07-01 20:16:43 -0400
author: parkr
version: 2.1.1
categories: [release]
---
This is a minor release for Jekyll 2.1.0. It fixes a couple bugs and
introduces fixes for a couple security-related issues.
It covers two security vulnerabilities:
1. One in the reading of data
2. One in the `layouts` setting
They were identified in Jekyll 1.5.1 and has been confirmed as patched
in this version and the version used by GitHub Pages. If you are in the
business of building Jekyll sites, please ensure you upgrade to 2.1.1 as
soon as possible.
For more, check out [`jekyll/jekyll#2563`](https://github.com/jekyll/jekyll/pull/2563).
Additionally, the dependency on Maruku has been loosened and a bug was
fixed with document URLs.
As always, check out the [full changelog](/docs/history/) for more info!
Happy Jekylling!

View File

@@ -0,0 +1,19 @@
---
layout: news_item
title: 'Jekyll 2.2.0 Released'
date: 2014-07-29 18:59:13 -0400
author: parkr
version: 2.2.0
categories: [release]
---
Jekyll 2.2.0 contains a few key updates:
1. A warning will now fire if you specify a layout in any of your pages or
posts that doesn't exist.
2. Certain Pygments options are now whitelisted in safe mode
3. Categories in a post's path are now respected (i.e. folders in `_posts`
will now work properly).
As always, a full list of the updates are on the
[history page](/docs/history#v2-2-0). Happy Jekylling!

View File

@@ -21,9 +21,9 @@ or `.coffee`) and start the file with two lines of triple dashes, like this:
Jekyll treats these files the same as a regular page, in that the output file
will be placed in the same directory that it came from. For instance, if you
have a file named `/css/styles.scss` in your site's source folder, Jekyll
have a file named `css/styles.scss` in your site's source folder, Jekyll
will process it and put it in your site's destination folder under
`/css/styles.css`.
`css/styles.css`.
## Sass/SCSS
@@ -38,7 +38,21 @@ sass:
sass_dir: _sass
{% endhighlight %}
The Sass converter will default to `_sass`.
The Sass converter will default the `sass_dir` configuration option to
`_sass`.
<div class="note info">
<h5>The <code>sass_dir</code> is only used by Sass</h5>
<p>
Note that the `sass_dir` becomes the load path for Sass imports,
nothing more. This means that Jekyll does not know about these files
directly, so any files here should not contain the YAML front matter as
described above nor will they be transformed as described above. This
folder should only contain imports.
</p>
</div>
You may also specify the output style with the `style` option in your
`_config.yml` file:

View File

@@ -56,7 +56,7 @@ For example, if you have `_my_collection/some_subdir/some_doc.md`,
it will be rendered using Liquid and the Markdown converter of your
choice and written out to `<dest>/my_collection/some_subdir/some_doc.html`.
As for posts with [Permalinks](../Permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
As for posts with [Permalinks](../permalinks/), document URL can be customized by setting a `permalink` metadata to the collection:
{% highlight yaml %}
collections:

View File

@@ -434,7 +434,6 @@ server: false # deprecated
host: 0.0.0.0
port: 4000
baseurl: ""
url: http://localhost:4000
lsi: false
maruku:

View File

@@ -0,0 +1,177 @@
---
layout: docs
title: Continuous Integration
prev_section: deployment-methods
next_section: troubleshooting
permalink: /docs/continuous-integration/
---
You can easily test your website build against one or more versions of Ruby.
The following guide will show you how to set up a free build environment on
[Travis][0], with [GitHub][1] integration for pull requests. Paid
alternatives exist for private repositories.
[0]: https://travis-ci.org/
[1]: https://github.com/
## 1. Enabling Travis and GitHub
Enabling Travis builds for your GitHub repository is pretty simple:
1. Go to your profile on travis-ci.org: https://travis-ci.org/profile/username
2. Find the repository for which you're interested in enabling builds.
3. Click the slider on the right so it says "ON" and is a dark grey.
4. Optionally configure the build by clicking on the wrench icon. Further
configuration happens in you `.travis.yml` file. More details on that
below.
## 2. The Test Script
The simplest test script simply runs `jekyll build` and ensures that Jekyll
doesn't fail to build the site. It doesn't check the resulting site, but it
does ensure things are built properly.
When testing Jekyll output, there is no better tool than [html-proofer][2].
This tool checks your resulting site to ensure all links and images exist.
Utilize it either with the convenient `htmlproof` command-line executable,
or write a Ruby script which utilizes the gem.
### The HTML Proofer Executable
{% highlight bash %}
#!/usr/bin/env bash
set -e # halt script on error
bundle exec jekyll build
bundle exec htmlproof ./_site
{% endhighlight %}
Some options can be specified via command-line switches. Check out the
`html-proofer` README for more information about these switches, or run
`htmlproof --help` locally.
### The HTML Proofer Library
You can also invoke `html-proofer` in Ruby scripts (e.g. in a Rakefile):
{% highlight ruby %}
#!/usr/bin/env ruby
require 'html/proofer'
HTML::Proofer.new("./_site").run
{% endhighlight %}
Options are given as a second argument to `.new`, and are encoded in a
symbol-keyed Ruby Hash. More information about the configuration options,
check out `html-proofer`'s README file.
[2]: https://github.com/gjtorikian/html-proofer
## 3. Configuring Your Travis Builds
This file is used to configure your Travis builds. Because Jekyll is built
with Ruby and requires RubyGems to install, we use the Ruby language build
environment. Below is a sample `.travis.yml` file, and what follows that is
an explanation of each line.
{% highlight yaml %}
language: ruby
rvm:
- 2.1
script: ./script/cibuild
# branch whitelist
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
{% endhighlight %}
Ok, now for an explanation of each line:
{% highlight yaml %}
language: ruby
{% endhighlight %}
This line tells Travis to use a Ruby build container. It gives your script
access to Bundler, RubyGems, and and Ruby runtime.
{% highlight yaml %}
rvm:
- 2.1
{% endhighlight %}
RVM is a popular Ruby Version Manager (like rbenv, chruby, etc). This
directive tells Travis the Ruby version to use when running your test
script.
{% highlight yaml %}
script: ./script/cibuild
{% endhighlight %}
Travis allows you to run any arbitrary shell script to test your site. One
convention is to put all scripts for your project in the `script`
directory, and to call your test script `cibuild`. This line is completely
customizable. If your script won't change much, you can write your test
incantation here directly:
{% highlight yaml %}
script: jekyll build && htmlproof ./_site
{% endhighlight %}
The `script` directive can be absolutely any valid shell command.
{% highlight yaml %}
# branch whitelist
branches:
only:
- gh-pages # test the gh-pages branch
- /pages-(.*)/ # test every branch which starts with "pages-"
{% endhighlight %}
You want to ensure the Travis builds for your site are being run only on
the branch or branches which contain your site. One means of ensuring this
isolation is including a branch whitelist in your Travis configuration
file. By specifying the `gh-pages` branch, you will ensure the associated
test script (discussed above) is only executed on site branches. If you use
a pull request flow for proposing changes, you may wish to enforce a
convention for your builds such that all branches containing edits are
prefixed, exemplified above with the `/pages-(.*)/` regular expression.
The `branches` directive is completely optional.
{% highlight yaml %}
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
{% endhighlight %}
Using `html-proofer`? You'll want this environment variable. Nokogiri, used
to parse HTML files in your compiled site, comes bundled with libraries
which it must compile each time it is installed. Luckily, you can
dramatically increase the install time of Nokogiri by setting the
environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
## 4. Gotchas
### Exclude `vendor`
Travis bundles all gems in the `vendor` directory on its build servers,
which Jekyll will mistakenly read and explode on. To avoid this, exclude
`vendor` in your `_config.yml`:
{% highlight yaml %}
exclude: [vendor]
{% endhighlight %}
### Questions?
This entire guide is open-source. Go ahead and [edit it][3] if you have a
fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/site/docs/continuous-integration.md
[4]: https://github.com/jekyll/jekyll-help#how-do-i-ask-a-question

View File

@@ -106,7 +106,7 @@ The [Jekyll wiki]({{ site.repository }}/wiki) on GitHub
can be freely updated without a pull request as all
GitHub users have access.
If you want to add your plugin to the [list of plugins](/docs/plugins/#available_plugins),
If you want to add your plugin to the [list of plugins](/docs/plugins/#available-plugins),
please submit a pull request modifying the [plugins page source
file]({{ site.repository }}/blob/master/site/docs/plugins.md) by adding a
link to your plugin under the proper subheading depending upon its type.

View File

@@ -94,7 +94,8 @@ The organizations can then be accessed via `site.data.orgs`, followed by the fil
{% highlight html %}
{% raw %}
<ul>
{% for org in site.data.orgs %}
{% for org_hash in site.data.orgs %}
{% assign org = org_hash[1] %}
<li>
<a href="https://github.com/{{ org.username }}">
{{ org.name }}

View File

@@ -73,10 +73,23 @@ Deploying is now as easy as telling nginx or Apache to look at
laptops$ git push deploy master
{% endhighlight %}
### Jekyll-hook
You can also use jekyll-hook, a server that listens for webhook posts from
GitHub, generates a website with Jekyll, and moves it somewhere to be
published. Use this to run your own GitHub Pages-style web server.
This method is useful if you need to serve your websites behind a firewall,
need extra server-level features like HTTP basic authentication or want to
host your site directly on a CDN or file host like S3.
Setup steps are fully documented
[in the `jekyll-hook` repo](https://github.com/developmentseed/jekyll-hook).
### Rake
Another way to deploy your Jekyll site is to use [Rake](https://github.com/jimweirich/rake), [HighLine](https://github.com/JEG2/highline), and
[Net::SSH](http://net-ssh.rubyforge.org/). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
[Net::SSH](https://github.com/net-ssh/net-ssh). A more complex example of deploying Jekyll with Rake that deals with multiple branches can be found in [Git Ready](https://github.com/gitready/gitready/blob/cdfbc4ec5321ff8d18c3ce936e9c749dbbc4f190/Rakefile).
### rsync
@@ -86,7 +99,7 @@ this script from within Textmate.
## Rack-Jekyll
[Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) is an easy way to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomakyo/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme).
[Rack-Jekyll](https://github.com/adaoraul/rack-jekyll/) is an easy way to deploy your site on any Rack server such as Amazon EC2, Slicehost, Heroku, and so forth. It also can run with [shotgun](https://github.com/rtomayko/shotgun/), [rackup](https://github.com/rack/rack), [mongrel](https://github.com/mongrel/mongrel), [unicorn](https://github.com/defunkt/unicorn/), and [others](https://github.com/adaoraul/rack-jekyll#readme).
Read [this post](http://blog.crowdint.com/2010/08/02/instant-blog-using-jekyll-and-heroku.html) on how to deploy to Heroku using Rack-Jekyll.

View File

@@ -9,82 +9,10 @@ permalink: /docs/extras/
There are a number of (optional) extra features that Jekyll supports that you
may want to install, depending on how you plan to use Jekyll.
## LaTeX Support
## Math Support
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
(Version 0.6) which must be in your `$PATH` along with `dvips`.
Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](http://www.mathjax.org/) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details.
## Alternative Markdown Processors
While Jekyll defaults to using Maruku for Markdown conversion, you may use one
of the other three pre-defined markdown parsers or define your own.
### RDiscount
If you prefer to use [RDiscount](https://github.com/rtomayko/rdiscount) instead
of [Maruku](https://github.com/bhollis/maruku) for Markdown, just make sure you have
it installed:
{% highlight bash %}
$ [sudo] gem install rdiscount
{% endhighlight %}
And then specify RDiscount as the Markdown engine in your `_config.yml` file to
have Jekyll run with that option.
{% highlight yaml %}
# In _config.yml
markdown: rdiscount
{% endhighlight %}
### Kramdown
You can also use [Kramdown](http://kramdown.rubyforge.org/) instead of Maruku
for Markdown. Make sure that Kramdown is installed:
{% highlight bash %}
$ [sudo] gem install kramdown
{% endhighlight %}
Then you can specify Kramdown as the Markdown engine in `_config.yml`.
{% highlight yaml %}
# In _config.yml
markdown: kramdown
{% endhighlight %}
Kramdown has various options for customizing the HTML output. The
[Configuration](/docs/configuration/) page lists the default options used by
Jekyll. A complete list of options is also available on the [Kramdown
website](http://kramdown.rubyforge.org/options.html).
### User-Defined
So, you're totally at odds with our four built-in markdown parsers, eh? No
sweat. You can define one as a plugin:
{% highlight ruby %}
require 'jekyll'
require 'some_renderer'
class Jekyll::Converters::Markdown::MyCustomParser
def initialize(config)
@site_config = config
end
def convert(content)
# (this _must_ return the resulting String after the rendering)
SomeRenderer.new(@site_config).to_html(content)
end
end
{% endhighlight %}
Once you've got that setup, ask Jekyll to use your custom markdown parser in
your `_config.yml` file:
{% highlight yaml %}
markdown: MyCustomParser
{% endhighlight %}
(Note that this **is case-sensitive**, and is only the piece after
`Jekyll::Converters::Markdown`.) And there you are!
See the Markdown section on the [configuration page](/docs/configuration/#markdown-options) for instructions on how to use and configure alternative Markdown processors, as well as how to create [custom processors](/docs/configuration/#custom-markdown-processors).

View File

@@ -8,7 +8,7 @@ permalink: /docs/github-pages/
[GitHub Pages](http://pages.github.com) are public web pages for users,
organizations, and repositories, that are freely hosted on GitHub's
[github.io]() domain or on a custom domain name of your choice. GitHub Pages are
`github.io` domain or on a custom domain name of your choice. GitHub Pages are
powered by Jekyll behind the scenes, so in addition to supporting regular HTML
content, theyre also a great way to host your Jekyll-powered website for free.

View File

@@ -1,9 +0,0 @@
---
layout: docs
title: Heroku
prev_section: github-pages
next_section: manual-deployment
permalink: /docs/heroku/
---
Move along, people. Nothing to see here.

File diff suppressed because it is too large Load Diff

View File

@@ -16,7 +16,7 @@ development of Jekyll itself.
Jekyll is a simple, blog-aware, static site generator. It takes a template
directory containing raw text files in various formats, runs it through
[Markdown](http://daringfireball.net/projects/markdown/) (or
[Textile](http://textile.sitemonks.com/)) and
[Textile](http://redcloth.org/textile)) and
[Liquid](http://wiki.shopify.com/Liquid)
converters, and spits out a complete, ready-to-publish static website suitable
for serving with your favorite web server. Jekyll also happens to be the engine

View File

@@ -19,6 +19,8 @@ youll need to make sure your system has before you start.
- [Ruby](http://www.ruby-lang.org/en/downloads/)
- [RubyGems](http://rubygems.org/pages/download)
- Linux, Unix, or Mac OS X
- [NodeJS](http://nodejs.org), or another JavaScript runtime (for
CoffeeScript support).
<div class="note info">
<h5>Running Jekyll on Windows</h5>
@@ -32,7 +34,7 @@ youll need to make sure your system has before you start.
## Install with RubyGems
The best way to install Jekyll is via
[RubyGems](http://docs.rubygems.org/read/chapter/3). At the terminal prompt,
[RubyGems](http://rubygems.org/pages/download). At the terminal prompt,
simply run the following command to install Jekyll:
{% highlight bash %}

View File

@@ -427,6 +427,8 @@ You can find a few useful plugins at the following locations:
- [Pages Directory by Ben Baker-Smith](https://github.com/bbakersmith/jekyll-pages-directory): Defines a `_pages` directory for page files which routes its output relative to the project root.
- [Page Collections by Jeff Kolesky](https://github.com/jeffkole/jekyll-page-collections): Generates collections of pages with functionality that resembles posts.
- [Windows 8.1 Live Tile Generation by Matt Sheehan](https://github.com/sheehamj13/jekyll-live-tiles): Generates Internet Explorer 11 config.xml file and Tile Templates for pinning your site to Windows 8.1.
- [Jekyll::AutolinkEmail by Ivan Tse](https://github.com/ivantsepp/jekyll-autolink_email): Autolink your emails.
- [Jekyll::GitMetadata by Ivan Tse](https://github.com/ivantsepp/jekyll-git_metadata): Expose Git metadata for your templates.
#### Converters
@@ -445,6 +447,7 @@ You can find a few useful plugins at the following locations:
- [Jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats) by [edsl](https://github.com/edsl): Use pandoc to generate your site in multiple formats. Supports pandocs markdown extensions.
- [Transform Layouts](https://gist.github.com/1472645): Allows HAML layouts (you need a HAML Converter plugin for this to work).
- [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
- [Customized Kramdown Converter](https://github.com/mvdbos/kramdown-with-pygments): Enable Pygments syntax highlighting for Kramdown-parsed fenced code blocks.
#### Filters
@@ -454,7 +457,7 @@ You can find a few useful plugins at the following locations:
- [URL encoding by James An](https://gist.github.com/919275): Percent encoding for URIs.
- [JSON Filter](https://gist.github.com/1850654) by [joelverhagen](https://github.com/joelverhagen): Filter that takes input text and outputs it as JSON. Great for rendering JavaScript.
- [i18n_filter](https://github.com/gacha/gacha.id.lv/blob/master/_plugins/i18n_filter.rb): Liquid filter to use I18n localization.
- [Smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics ([Demo](http://saswatpadhi.github.com/)).
- [Smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics.
- [Read in X Minutes](https://gist.github.com/zachleat/5792681) by [zachleat](https://github.com/zachleat): Estimates the reading time of a string (for blog post content).
- [Jekyll-timeago](https://github.com/markets/jekyll-timeago): Converts a time value to the time ago in words.
- [pluralize](https://github.com/bdesham/pluralize): Easily combine a number and a word into a gramatically-correct amount like “1 minute” or “2 minute**s**”.
@@ -468,7 +471,7 @@ You can find a few useful plugins at the following locations:
- [Asset Path Tag](https://github.com/samrayner/jekyll-asset-path-plugin) by [Sam Rayner](http://www.samrayner.com/): Allows organisation of assets into subdirectories by outputting a path for a given file relative to the current post or page.
- [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
- [Ultraviolet Plugin by Steve Alex](https://gist.github.com/480380): Jekyll tag for the [Ultraviolet](http://ultraviolet.rubyforge.org/) code highligher.
- [Ultraviolet Plugin by Steve Alex](https://gist.github.com/480380): Jekyll tag for the [Ultraviolet](https://github.com/grosser/ultraviolet) code highligher.
- [Tag Cloud Plugin by Ilkka Laukkanen](https://gist.github.com/710577): Generate a tag cloud that links to tag pages.
- [GIT Tag by Alexandre Girard](https://gist.github.com/730347): Add Git activity inside a list.
- [MathJax Liquid Tags by Jessy Cowan-Sharp](https://gist.github.com/834610): Simple liquid tags for Jekyll that convert inline math and block equations to the appropriate MathJax script tags.
@@ -540,6 +543,7 @@ You can find a few useful plugins at the following locations:
- [grunt-jekyll](https://github.com/dannygarcia/grunt-jekyll): A straightforward [Grunt](http://gruntjs.com/) plugin for Jekyll.
- [jekyll-postfiles](https://github.com/indirect/jekyll-postfiles): Add `_postfiles` directory and {% raw %}`{{ postfile }}`{% endraw %} tag so the files a post refers to will always be right there inside your repo.
- [A layout that compresses HTML](https://github.com/penibelst/jekyll-compress-html) by [Anatol Broder](http://penibelst.de/): Github Pages compatible, configurable way to compress HTML files on site build.
- [Jekyll CO₂](https://github.com/wdenton/jekyll-co2): Generates HTML showing the monthly change in atmospheric CO₂ at the Mauna Loa observatory in Hawaii.
#### Editors

View File

@@ -18,7 +18,7 @@ and web-based CMS systems, this will be a welcome change!
As explained on the [directory structure](../structure/) page, the `_posts`
folder is where your blog posts will live. These files can be either
[Markdown](http://daringfireball.net/projects/markdown/) or
[Textile](http://textile.sitemonks.com/) formatted text files, and as long as
[Textile](http://redcloth.org/textile) formatted text files, and as long as
they have [YAML front-matter](../frontmatter/), they will be converted from their
source format into an HTML page that is part of your static site.
@@ -44,7 +44,7 @@ file. For example, the following are examples of valid post filenames:
<div class="note">
<h5>ProTip™: Link to other posts</h5>
<p>
Use the <a href="../templates#post_url"><code>post_url</code></a>
Use the <a href="../templates#post-url"><code>post_url</code></a>
tag to link to other posts without having to worry about the URL's
breaking when the site permalink style changes.
</p>
@@ -56,7 +56,7 @@ All blog post files must begin with [YAML front-matter](../frontmatter/). After
that, it's simply a matter of deciding which format you prefer. Jekyll supports
two popular content markup formats:
[Markdown](http://daringfireball.net/projects/markdown/) and
[Textile](http://textile.sitemonks.com/). These formats each have their own way
[Textile](http://redcloth.org/textile). These formats each have their own way
of marking up different types of content within a post, so you should
familiarize yourself with these formats and decide which one best suits your
needs.

View File

@@ -35,12 +35,9 @@ Jekylls growing use is producing a wide variety of tutorials, frameworks, ext
> “Jekyll is a well-architected throwback to a time before WordPress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to its core. Here, Ill point out some highlights of my fork in the hopes that they see usage beyond this site.”
- [About this Website, by Carter Allen](http://cartera.me/2010/08/12/about-this-website/)
> “Jekyll is everything that I ever wanted in a blogging engine. Really. It isnt perfect, but whats excellent about it is that if theres something wrong, I know exactly how it works and how to fix it. It runs on the your machine only, and is essentially an added”build" step between you and the browser. I coded this entire site in TextMate using standard HTML5 and CSS3, and then at the end I added just a few little variables to the markup. Presto-chango, my site is built and I am at peace with the world.”
- [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/)
- [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/)
A guide to implementing a tag cloud and per-tag content pages using Jekyll.
A guide to implementing a tag cloud and per-tag content pages using Jekyll.
- [Jekyll Extensions -= Pain](http://rfelix.com/2010/01/19/jekyll-extensions-minus-equal-pain/)
A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
- A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
- [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)

View File

@@ -119,16 +119,6 @@ Firefox and possibly other browsers and is [discouraged in
XHTML.](http://www.w3.org/TR/xhtml1/#C_3) An easy fix is to put a space
between the opening and closing tags.
### RedCloth
Versions 4.1.1 and higher do not obey the notextile tag. [This is a known
bug](http://aaronqian.com/articles/2009/04/07/redcloth-ate-my-notextile.html)
and will hopefully be fixed for 4.2. You can still use 4.1.9, but the
test suite requires that 4.1.0 be installed. If you use a version of
RedCloth that does not have the notextile tag, you may notice that
syntax highlighted blocks from Pygments or Rouge are not formatted
correctly, among other things. If youre seeing this just install 4.1.0.
### Liquid
The latest version, version 2.0, seems to break the use of `{{ "{{" }}` in

View File

@@ -122,6 +122,30 @@ following is a reference of the available data.
</p></td>
</tr>
<tr>
<td><p><code>site.html_pages</code></p></td>
<td><p>
A list of all HTML Pages.
</p></td>
</tr>
<tr>
<td><p><code>site.collections</code></p></td>
<td><p>
A list of all the collections.
</p></td>
</tr>
<tr>
<td><p><code>site.data</code></p></td>
<td><p>
A list containing the data loaded from the YAML files located in the <code>_data</code> directory.
</p></td>
</tr>
<tr>
<td><p><code>site.documents</code></p></td>
<td><p>

View File

@@ -12,7 +12,7 @@ knowledge and lessons that have been unearthed by Windows users.
## Installation
Madhur Ahuja has written up instructions to get
Julian Thilo has written up instructions to get
[Jekyll running on Windows][windows-installation] and it seems to work for most.
## Encoding
@@ -29,7 +29,7 @@ the site generation process. It can be done with the following command:
$ chcp 65001
{% endhighlight %}
[windows-installation]: http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html
[windows-installation]: http://jekyll-windows.juthilo.com/
## Auto-regeneration

View File

@@ -22,7 +22,7 @@ overview: true
</div>
<div class="unit one-third">
<h2>Static</h2>
<p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://textile.sitemonks.com/">Textile</a>), <a href="http://wiki.shopify.com/Liquid">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
<p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://redcloth.org/textile">Textile</a>), <a href="http://wiki.shopify.com/Liquid">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
<a href="/docs/templates/">Jekyll template guide &rarr;</a>
</div>
<div class="unit one-third">

View File

@@ -0,0 +1,5 @@
---
title: Override permalink
layout: slide
permalink: /slide/3/
---

View File

@@ -0,0 +1,5 @@
---
title: v2.4.0
---
v2.4.0

View File

View File

@@ -17,15 +17,15 @@ class TestCollections < Test::Unit::TestCase
end
should "sanitize the label name" do
assert_equal @collection.label, "etcpassword"
assert_equal @collection.label, "....etcpassword"
end
should "have a sanitized relative path name" do
assert_equal @collection.relative_directory, "_etcpassword"
assert_equal @collection.relative_directory, "_....etcpassword"
end
should "have a sanitized full path" do
assert_equal @collection.directory, source_dir("_etcpassword")
assert_equal @collection.directory, source_dir("_....etcpassword")
end
end
@@ -194,4 +194,31 @@ class TestCollections < Test::Unit::TestCase
end
end
context "with dots in the filenames" do
setup do
@site = fixture_site({
"collections" => ["with.dots"],
"safe" => true
})
@site.process
@collection = @site.collections["with.dots"]
end
should "exist" do
assert_not_nil @collection
end
should "contain one document" do
assert_equal 2, @collection.docs.size
end
should "allow dots in the filename" do
assert_equal "_with.dots", @collection.relative_directory
end
should "read document in subfolders with dots" do
assert @collection.docs.any? { |d| d.path.include?("all.dots") }
end
end
end

View File

@@ -44,7 +44,7 @@ class TestCommand < Test::Unit::TestCase
context "when fatal error occurs" do
should "exit with non-zero error code" do
site = Object.new
stub(site).process { raise Jekyll::FatalException }
stub(site).process { raise Jekyll::Errors::FatalException }
error = assert_raise(SystemExit) { Command.process_site(site) }
assert_not_equal 0, error.status
end

View File

@@ -165,6 +165,28 @@ class TestDocument < Test::Unit::TestCase
end
end
context "a document in a collection with a custom permalink" do
setup do
@site = Site.new(Jekyll.configuration({
"collections" => ["slides"],
"source" => source_dir,
"destination" => dest_dir
}))
@site.process
@document = @site.collections["slides"].docs[2]
@dest_file = dest_dir("slide/3/index.html")
end
should "know its permalink" do
assert_equal "/slide/3/", @document.permalink
end
should "produce the right URL" do
assert_equal "/slide/3/", @document.url
end
end
context " a document part of a rendered collection" do
end

View File

@@ -26,7 +26,7 @@ class TestKramdown < Test::Unit::TestCase
@markdown = Converters::Markdown.new(@config)
end
# http://kramdown.rubyforge.org/converter/html.html#options
# http://kramdown.gettalong.org/converter/html.html#options
should "pass kramdown options" do
assert_equal "<h1>Some Header</h1>", @markdown.convert('# Some Header #').strip
end

View File

@@ -76,6 +76,21 @@ class TestPost < Test::Unit::TestCase
assert_equal "/2008/09/09/foo-bar", @post.id
end
should "keep categories" do
post = Post.allocate
post.site = @site
post.process("cat1/2008-09-09-foo-bar.textile")
assert_equal 1, post.categories.size
assert_equal "cat1", post.categories[0]
post = Post.allocate
post.site = @site
post.process("cat2/CAT3/2008-09-09-foo-bar.textile")
assert_equal 2, post.categories.size
assert_equal "cat2", post.categories[0]
assert_equal "cat3", post.categories[1]
end
should "create url based on date and title" do
@post.categories = []
@post.process(@fake_file)
@@ -83,7 +98,7 @@ class TestPost < Test::Unit::TestCase
end
should "raise a good error on invalid post date" do
assert_raise Jekyll::FatalException do
assert_raise Jekyll::Errors::FatalException do
@post.process("2009-27-03-foo-bar.textile")
end
end
@@ -615,7 +630,7 @@ class TestPost < Test::Unit::TestCase
should "generate categories and topics" do
post = Post.new(@site, File.join(File.dirname(__FILE__), *%w[source]), 'foo', 'bar/2008-12-12-topical-post.textile')
assert_equal ['foo'], post.categories
assert_equal ['foo', 'bar'], post.categories
end
end

View File

@@ -212,7 +212,7 @@ class TestSite < Test::Unit::TestCase
posts = Dir[source_dir("**", "_posts", "**", "*")]
posts.delete_if { |post| File.directory?(post) && !Post.valid?(post) }
categories = %w(2013 bar baz category foo z_category publish_test win).sort
categories = %w(2013 bar baz category es foo z_category publish_test win).sort
assert_equal posts.size - @num_invalid_posts, @site.posts.size
assert_equal categories, @site.categories.keys.sort
@@ -225,7 +225,7 @@ class TestSite < Test::Unit::TestCase
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => source_dir})
end
assert_raise Jekyll::FatalException do
assert_raise Jekyll::Errors::FatalException do
site = Site.new(Jekyll.configuration)
end
end
@@ -235,7 +235,7 @@ class TestSite < Test::Unit::TestCase
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => File.join(source_dir, "..")})
end
assert_raise Jekyll::FatalException do
assert_raise Jekyll::Errors::FatalException do
site = Site.new(Jekyll.configuration)
end
end
@@ -332,7 +332,7 @@ class TestSite < Test::Unit::TestCase
bad_processor = "Custom::Markdown"
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
assert_raise Jekyll::FatalException do
assert_raise Jekyll::Errors::FatalException do
s.process
end
@@ -352,7 +352,7 @@ class TestSite < Test::Unit::TestCase
should 'throw FatalException at process time' do
bad_processor = 'not a processor name'
s = Site.new(Jekyll.configuration.merge({ 'markdown' => bad_processor }))
assert_raise Jekyll::FatalException do
assert_raise Jekyll::Errors::FatalException do
s.process
end
end

View File

@@ -76,11 +76,48 @@ CONTENT
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table' }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl hl_linenos=3', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table', :hl_linenos => '3' }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'ruby linenos=table cssclass=hl hl_linenos="3 5 6"', ["test", "{% endhighlight %}", "\n"])
assert_equal({ :cssclass => 'hl', :linenos => 'table', :hl_linenos => ['3', '5', '6'] }, tag.instance_variable_get(:@options))
tag = Jekyll::Tags::HighlightBlock.new('highlight', 'Ruby ', ["test", "{% endhighlight %}", "\n"])
assert_equal "ruby", tag.instance_variable_get(:@lang), "lexers should be case insensitive"
end
end
context "in safe mode" do
setup do
@tag = Jekyll::Tags::HighlightBlock.new('highlight', 'text ', ["test", "{% endhighlight %}", "\n"])
end
should "allow linenos" do
sanitized = @tag.sanitized_opts({:linenos => true}, true)
assert_equal true, sanitized[:linenos]
end
should "allow hl_linenos" do
sanitized = @tag.sanitized_opts({:hl_linenos => %w[1 2 3 4]}, true)
assert_equal %w[1 2 3 4], sanitized[:hl_linenos]
end
should "allow cssclass" do
sanitized = @tag.sanitized_opts({:cssclass => "ahoy"}, true)
assert_equal "ahoy", sanitized[:cssclass]
end
should "allow startinline" do
sanitized = @tag.sanitized_opts({:startinline => true}, true)
assert_equal true, sanitized[:startinline]
end
should "strip unknown options" do
sanitized = @tag.sanitized_opts({:light => true}, true)
assert_nil sanitized[:light]
end
end
context "post content has highlight tag" do
setup do
fill_post("test")
@@ -238,8 +275,8 @@ CONTENT
end
should "have the url to the \"nested\" post from 2008-11-21" do
assert_match %r{3\s/2008/11/21/nested/}, @result
assert_match %r{4\s/2008/11/21/nested/}, @result
assert_match %r{3\s/es/2008/11/21/nested/}, @result
assert_match %r{4\s/es/2008/11/21/nested/}, @result
end
end
@@ -414,9 +451,8 @@ CONTENT
)
end
# todo: if #112 is merged into maruku, update to remove the newlines inside code block
should "render fenced code blocks" do
assert_match %r{<pre class=\"ruby\"><code class=\"ruby\">\nputs &quot;Hello world&quot;\n</code></pre>}, @result.strip
assert_match %r{<pre class=\"ruby\"><code class=\"ruby\">puts &quot;Hello world&quot;</code></pre>}, @result.strip
end
end