Compare commits

..

1198 Commits
book ... v1.0.4

Author SHA1 Message Date
Matt Rogers
8a9f8dce49 Release 1.0.4 2013-07-25 12:42:09 -05:00
Matt Rogers
5c4d995b9d Update history to reflect merge of #1349 on the 1_0_x-branch 2013-07-25 12:34:50 -05:00
Ben Balter
5ad3f7e215 require liquid >= 2.5.1 2013-07-25 12:29:52 -05:00
Parker Moore
700d840a06 Release 1.0.3 2013-06-07 21:02:13 +02:00
Parker Moore
32143588ef Update history to reflect merge of #1189. Solves #1185. 2013-06-07 20:56:21 +02:00
Parker Moore
86e5a1f7a9 Merge pull request #1189 from mojombo/private-gist-support
Support new private gist syntax.
2013-06-07 11:55:09 -07:00
Parker Moore
f211560dcc Update history to reflect merge of #1190. Fixes #673. 2013-06-07 20:45:08 +02:00
Parker Moore
ae4da46ea1 Merge pull request #1190 from mojombo/maruku-errors
Fail loudly on MaRuKu errors (exit code other than 0).
2013-06-07 11:43:37 -07:00
Parker Moore
1c18394afc Catch and print errors when MaRuKu freaks out, and exit with an error code other than 0. 2013-06-07 01:41:30 +02:00
Parker Moore
066912556e Support new private gist syntax. 2013-06-07 00:34:23 +02:00
Parker Moore
5e9b8d64c6 Merge pull request #1186 from gcapizzi/fix_command_line_params
Set short versions of --port and --host as -P and -H, respectively. Fixes #1173.
2013-06-06 15:08:42 -07:00
Giuseppe Capizzi
788ab57109 Fix #1173 2013-06-06 16:24:04 +02:00
Parker Moore
004125bcd2 Update history to reflect merge of #1147. 2013-06-03 21:02:07 +02:00
Parker Moore
94e5cb151f Merge pull request #1147 from beeeswax/frontmatter-nil
Add a Pro Tip to docs about front matter variables being optional
2013-06-03 12:00:40 -07:00
m
4efaaa8232 Add a Pro Tip to docs about front matter variables being optional 2013-06-03 11:07:35 -05:00
Matt Rogers
4270cce2e0 Update history to reflect merge of #1170. 2013-06-03 10:09:43 -05:00
Matt Rogers
cd3732e612 Merge pull request #1170 from mojombo/remove-ids-from-site-template
For template site, convert #post to .post. Fixes #1161.
2013-06-03 08:07:09 -07:00
Parker Moore
a3d1777251 Update history to reflect merge of #1166. 2013-06-02 19:07:04 +02:00
Parker Moore
c0bead4ae1 Merge pull request #1166 from dracula2000/stevenson
Fix typo in Stevenson: "ERROR" only has three "R's".
2013-06-02 10:05:51 -07:00
Parker Moore
2d27deaec7 For template site, convert #post to .post. 2013-06-02 18:48:45 +02:00
Parker Moore
3d267b3baa Update history to reflect merge of #1065 2013-06-02 14:31:50 +02:00
Parker Moore
3ef819833d Update files in gemspec. 2013-06-02 14:30:53 +02:00
Parker Moore
27cf7aad83 Merge pull request #1065 from zachgersh/changelist_page
Added changelist to site as /docs/history/
2013-06-02 05:29:14 -07:00
Matt Rogers
5e6a4135b4 Update history to reflect merge of #1150 2013-06-01 21:54:00 -05:00
Matt Rogers
a45d2d544e Merge pull request #1150 from jpiasetz/iso-dates
Switch cucumber features to use iso dates
2013-06-01 19:47:38 -07:00
Parker Moore
b3908d5bf7 Move note about drafts on Upgrading page a bit higher. 2013-06-01 16:07:14 +02:00
Parker Moore
d9784fa55c Capitalize all words in titles on Upgrading page in documentation. 2013-06-01 16:06:21 +02:00
Parker Moore
2dad826aff Update history to reflect merge of #1146. 2013-06-01 16:04:45 +02:00
Parker Moore
d2d6d3a1d6 Merge branch 'master' of git://github.com/beeeswax/jekyll into beeeswax-master
* 'master' of git://github.com/beeeswax/jekyll:
  Add note to upgrading docs on new config file options.
2013-06-01 16:01:42 +02:00
Brian Kim
1083bfd533 Fix typo in Stevenson 2013-05-31 17:23:57 -04:00
Parker Moore
6296010c43 Update history to reflect merge of #1149. 2013-05-29 12:06:36 +02:00
Parker Moore
21c153a8df Merge pull request #1149 from mojombo/jekyll-logger
Use Jekyll.logger instead of Jekyll::Stevenson to log things
2013-05-29 03:05:32 -07:00
Parker Moore
14a4e32bbe Use singleton instance variable instead of class variable 2013-05-29 12:04:50 +02:00
Josh Branchaud
19ec56c494 The command-line flags for Jekyll for the source directory and the destination directory are now specified in the docs for the deployment methods.
Fixes #1157.
2013-05-29 12:01:16 +02:00
Parker Moore
1f59e9c757 Use Jekyll.logger instead of Jekyll::Stevenson to log things. 2013-05-29 11:58:35 +02:00
zachgersh
cffd3a051b Added a prereq to generate history before publishing to gh-pages. 2013-05-28 22:47:45 -07:00
zachgersh
4440f273e0 Added more comments as per mattr. 2013-05-28 22:39:37 -07:00
zachgersh
db1eb14cb2 Added correct permalink and made sure back/next links were working properly. 2013-05-28 22:34:53 -07:00
zachgersh
75ced04c8d Added latest rev of history. 2013-05-28 22:14:03 -07:00
zachgersh
d8be0b1906 Removed exclamation points for mattr. 2013-05-28 22:13:48 -07:00
zachgersh
19572d9a81 Removed history dir and updated Rakefile to write to history.md. 2013-05-28 22:02:35 -07:00
zachgersh
20eda0e89f Merge branch 'master' into changelist_page 2013-05-28 21:54:49 -07:00
Matt Rogers
2defdad3ae Update history to reflect merge of #1156 2013-05-28 21:38:19 -05:00
Matt Rogers
86e72db4cd Merge pull request #1156 from nathany/span-go-1153
Qualify .go class for Pygments, fixes #1153
2013-05-28 19:35:55 -07:00
Nathan Youngman
2cfc70735d Qualify .go class for Pygments, fixes #1153 2013-05-26 19:51:05 -06:00
John Piasetzki
72fa7f8a73 Switch cucumber features to use iso dates 2013-05-25 11:35:28 -04:00
m
e9902292d3 Add note to upgrading docs on new config file options. 2013-05-25 00:53:15 -05:00
Matt Rogers
8eec9f7759 Update history to reflect merge of #1143 2013-05-23 20:32:40 -05:00
Matt Rogers
e6098493c7 Merge pull request #1143 from redwallhp/changing-plugins-page
Added JekyllGalleryTag to plugins.md
2013-05-23 18:31:23 -07:00
redwallhp
0e8e2fd3ca Added JekyllGalleryTag to plugins.md 2013-05-23 19:28:07 -04:00
Parker Moore
8b8d2f830e Merge @mattr's history update with mine 2013-05-23 23:30:58 +02:00
Parker Moore
da7e44cd46 Update history to reflect merge of #1139. Fixes #622. 2013-05-23 23:29:46 +02:00
Matt Rogers
d454abf386 Update history to reflect merge of #1124 2013-05-23 16:29:31 -05:00
Parker Moore
4b6baf01cb Merge pull request #1139 from scribu/cucumber-fix
Fix for #622 (Cucumber infinite loop)
2013-05-23 14:28:31 -07:00
Matt Rogers
1cf9efcfa1 Merge pull request #1124 from jpiasetz/master
Change cucumber tests to not write posts with timezones
2013-05-23 14:28:01 -07:00
Parker Moore
23d0c130a5 Update history to reflect merge of #1142. 2013-05-23 23:27:06 +02:00
Parker Moore
2393ae58b7 Merge pull request #1142 from kmikael/filters-documentation
Documentation for `date_to_rfc822` and `uri_escape`
2013-05-23 14:26:01 -07:00
John Piasetzki
e043c419f5 Trying to edit my history to remove the mistakes 2013-05-23 16:49:43 -04:00
Mikael Konutgan
9adfd6ddeb Document uri_escape 2013-05-23 20:18:08 +02:00
Mikael Konutgan
008a094e95 Document Jekyll's date_to_rfc822 and uri_escape filters on the site 2013-05-23 20:15:24 +02:00
John Piasetzki
c4750cf48f Fixes so that the timezone gets written when it explicit is specificied in a test 2013-05-23 14:04:22 -04:00
John Piasetzki
6936bbded8 Changed the jekyll steps to write only the date and time for tests. This avoids timezone issues. 2013-05-23 14:04:22 -04:00
scribu
7579c1c42d cucumber: don't manually include assertions
It causes hard to debug infinite loops and it's done automatically
in recent versions of Cucumber anyway.
2013-05-23 20:35:27 +03:00
scribu
09d229de33 make bin/jekyll executable
`bundle install` makes it executable and it should be anyway, since it
has the hashbang at the top.
2013-05-23 20:35:07 +03:00
Matt Rogers
5cc65de628 Stick to the 1.0.x versions of rr 2013-05-23 12:16:06 -05:00
Parker Moore
afc5cf098a Fix syntax errors in Drupal migration docs. 2013-05-23 00:00:40 +02:00
Matt Rogers
8ab4915182 Update history to reflect merge of #1136 2013-05-22 16:51:53 -05:00
Matt Rogers
8d87d4ee30 Merge pull request #1136 from mojombo/migrators-docs-updates
Updated the docs for migrators
2013-05-22 14:48:52 -07:00
Parker Moore
9aca84c55b Updated the docs for migrators so they're at least a bit more helpful. 2013-05-22 23:43:10 +02:00
Matt Rogers
cbc0e72847 Update history to reflect merge of #1063 2013-05-22 14:42:18 -05:00
Matt Rogers
1eab13c068 Merge pull request #1063 from Kelsin/fixing-paginate_path-for-windows
Fixing pagination on windows
2013-05-22 12:26:54 -07:00
Parker Moore
19461bc186 Install jekyll-import with the --pre flag for now. 2013-05-21 15:36:29 +02:00
Parker Moore
9ab2448e5a Update history to reflect merge of #1123 2013-05-18 14:09:05 +02:00
Parker Moore
d36f4dfea9 Merge pull request #1123 from mainerror/docs_overflow_auto
Documentation highlight boxes shouldn't show scrollbars if not necessary. Fixes #1122.
2013-05-18 05:07:27 -07:00
Matt Rogers
70d38c70f7 Update history to reflect merge of #1115 2013-05-17 23:16:26 -05:00
Matt Rogers
7c012a9e0c Merge pull request #1115 from clang1234/master
Add --force flag to new command
2013-05-17 21:15:17 -07:00
Matt Rogers
786a120b51 Update history to reflect fixing of #1099 and #1119 2013-05-17 22:49:09 -05:00
Matt Rogers
6a7ed52b37 Update history to reflect merge of #1114 2013-05-17 22:46:11 -05:00
Matt Rogers
9614d516f0 Update history to reflect merge of #1121 2013-05-17 22:43:56 -05:00
Matt Rogers
2b84173eca Merge pull request #1121 from mojombo/non-zero-exit-on-liquid-exception
Non zero exit on Liquid exception
2013-05-17 20:41:04 -07:00
Matt Rogers
ddba4cde8b Merge pull request #1114 from mojombo/backwards-compatibilize-exclude-include
Backwards-compatibilize 'exclude' and 'include' config tags
2013-05-17 19:56:48 -07:00
Octavian Damiean
d9fd0fd7ad Fix for issue #1122. 2013-05-18 01:12:17 +02:00
Parker Moore
ff8cf7c868 provide access to the layout name so when shit goes down we get the name of the layout which couldn't be processed 2013-05-17 22:45:39 +02:00
Parker Moore
a95fa70d72 raise things when there's a yaml exception (non-zero exit code 2013-05-17 22:44:46 +02:00
Parker Moore
63dc563621 Add tests for exclude/include backwards-compatibility 2013-05-17 21:05:09 +02:00
Parker Moore
fa1cbb7708 Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Update history to reflect merge of #1116
  Removed space characters in empty lines
2013-05-17 20:44:40 +02:00
Parker Moore
3e7b0bbe47 Pygments does not need to be installed. Fixes #1099 #1119 2013-05-17 20:44:29 +02:00
Casey Lang
fafacc43ca Add ? to preserve_source_location 2013-05-16 16:15:21 -05:00
Casey Lang
00dd37d2e4 Extract check for force to improve readability 2013-05-16 16:13:13 -05:00
Casey Lang
09eb0c5718 Merge in additional changes from mojombo/jekyll 2013-05-16 16:08:44 -05:00
Matt Rogers
4123406bd2 Update history to reflect merge of #1116 2013-05-16 15:27:50 -05:00
Matt Rogers
70672c98d9 Merge pull request #1116 from blinry/master
Removed space characters in empty lines
2013-05-16 12:47:17 -07:00
Sebastian Morr
151ffab6fe Removed space characters in empty lines 2013-05-16 20:27:27 +02:00
Casey Lang
294437fbf1 Merge latest commits from mojombo/jekyll 2013-05-15 17:36:48 -05:00
Casey Lang
2ce39bc20a Add '--force' to 'new' command. Implements #1104 2013-05-15 17:29:27 -05:00
Parker Moore
8e3ab9ea36 Backwards-compatibilize 'exclude' and 'include' config tags. Fixes #1109 2013-05-16 00:25:16 +02:00
Parker Moore
d1c626f2e2 Update history to reflect merge of #1035 2013-05-15 23:59:51 +02:00
Parker Moore
13ed02fdb0 Merge pull request #1035 from tkareine/add_minibundle_to_plugin_list
Add link to jekyll-minibundle in the doc's plugins list
2013-05-15 14:59:05 -07:00
Parker Moore
784aaee40a Update gemspec with new files. 2013-05-15 23:58:32 +02:00
Tuomas Kareinen
fb28c0292b Add link to jekyll-minibundle in the doc's plugins list 2013-05-15 22:00:07 +03:00
Parker Moore
98923f87b5 Update history to reflect merge of #1057 👍 2013-05-15 16:26:41 +02:00
Parker Moore
ef48cbefec Merge pull request #1057 from mojombo/refactor-related-posts
Move the building of related posts into their own class
2013-05-15 07:25:53 -07:00
Parker Moore
5258e3afa3 Logger ~> Stevenson and don't inherit from Ruby Logger. #1106. 2013-05-15 15:15:00 +02:00
Parker Moore
7b22502c94 Quick patch for migration docs. 2013-05-15 13:58:08 +02:00
Parker Moore
8537c6770e Update history to reflect merge of #1107 2013-05-15 13:45:16 +02:00
Parker Moore
77ddb2765b Merge pull request #1107 from pauloppenheim/master
doc fix: migrations - wordpressdotcom command
2013-05-15 04:43:57 -07:00
Paul Oppenheim
98f8ee31e3 doc fix: migrations - wordpressdotcom command
The new paths are what just worked for me. Was frustrating figuring it out, figured I'd share.
2013-05-15 03:32:17 -07:00
Matt Rogers
98aff03595 Use Jekyll::Stevenson#formatted_topic for printing messages
Beats trying to line them up yourself. :-)
2013-05-14 22:04:34 -05:00
Matt Rogers
ff600bfcd9 Merge branch 'master' into refactor-related-posts 2013-05-14 21:54:12 -05:00
Parker Moore
8877d0db66 Update history to reflect merge of #1106 2013-05-14 22:03:37 +02:00
Parker Moore
e71e90cebc Merge pull request #1106 from mojombo/stevenson
Rename Jekyll::Logger ~> Jekyll::Stevenson to fix inheritance problem
2013-05-14 13:01:38 -07:00
Parker Moore
35f4f09c3e Rename Jekyll::Logger ~> Jekyll::Stevenson to fix inheritance problem
Problem described here: ca888cad76
2013-05-14 21:07:23 +02:00
Parker Moore
7186a557f6 Update history to reflect merge of #1068. 2013-05-14 21:01:06 +02:00
Parker Moore
ed80f6b017 Merge branch 'add_contentblocks' of git://github.com/rustygeldmacher/jekyll into rustygeldmacher-add_contentblocks
* 'add_contentblocks' of git://github.com/rustygeldmacher/jekyll:
  Added jekyll-contentblocks to the plugins list
2013-05-14 21:00:00 +02:00
Parker Moore
7611b936b1 The --watch has two dashes. Prevent MaRuKu blending them into an emdash. 2013-05-14 20:58:28 +02:00
Parker Moore
8793048add The CLI command isn't capitalized :) 2013-05-14 20:29:14 +02:00
Parker Moore
3f21f87ccf Make MaRuKu bend to our will. 2013-05-14 20:27:17 +02:00
Parker Moore
03887262a3 Update history to reflect merge of #1089. 2013-05-14 19:58:48 +02:00
Parker Moore
a85f7c1cf2 Merge pull request #1089 from zachgersh/cobyism_style
Adds margin to code highlights. Tweaks colorscheme of notes.
2013-05-14 10:57:18 -07:00
zachgersh
fed4f516bf Simplified based on cobyism suggestion. 2013-05-14 08:25:54 -07:00
Parker Moore
1ce36fb1ff Update history to reflect merge of #1101. 2013-05-14 12:40:04 +02:00
Parker Moore
93a041d871 Merge pull request #1101 from sankage/upgrade-docs
relative permalinks in upgrade docs are reversed
2013-05-14 03:37:31 -07:00
zachgersh
f2d7cdea89 Fixed shading on notes, made it less apparent. 2013-05-13 23:31:05 -07:00
David Briggs
47e1a449e1 fix upgrade docs 2013-05-14 00:12:48 -04:00
Parker Moore
d99b4324e7 When talking about post excerpts, be singular about it. 2013-05-12 23:19:38 +02:00
Parker Moore
6aaf631fcf Fix some language problems, props @maul-esel 2013-05-12 23:18:25 +02:00
Parker Moore
f1c5579c5b Add docs for post excerpt #1072 2013-05-12 17:54:15 +02:00
zachgersh
4a3826aee6 Needed to be issues and not issue in the url. Regenerated file. 2013-05-12 08:36:15 -07:00
zachgersh
94b5f22cfa Merge branch 'master' into changelist_page 2013-05-12 08:20:03 -07:00
Parker Moore
483ecec2b4 Update history to reflect addition of docs for gist tag #1072 2013-05-12 16:20:46 +02:00
Parker Moore
208becee86 Add docs for gist tag. 2013-05-12 16:20:05 +02:00
Parker Moore
f56090be3f Updated language for relative_permalinks 2013-05-12 16:05:18 +02:00
Parker Moore
8051df0f4c Release 1.0.2 2013-05-12 15:26:45 +02:00
Parker Moore
56e7f7688e Add note in history about documentation for #1081 2013-05-12 14:08:11 +02:00
Parker Moore
61faef46cc Add documentation about relative_permalinks. #1081 2013-05-12 14:07:30 +02:00
Parker Moore
7671b45a92 Update history to reflect merge of #1066. 2013-05-12 12:12:49 +02:00
Parker Moore
179a746091 Merge pull request #1066 from Rowno/data-language
Add a `data-lang` attribute to code blocks
2013-05-12 03:11:11 -07:00
Parker Moore
427bb6aec7 Update history to reflect merge of #1081. 2013-05-12 11:57:56 +02:00
Parker Moore
28b9e351c4 Merge pull request #1081 from mojombo/relative-permalinks
Backwards-compatibilize relative permalinks
2013-05-12 02:55:49 -07:00
Parker Moore
91317b29b3 Update history to reflect merge of #1078 2013-05-12 11:53:37 +02:00
Parker Moore
f9502dc9f5 Merge pull request #1078 from maul-esel/fix-num-category
Fix number category
2013-05-12 02:52:39 -07:00
Parker Moore
d9e056bd60 Update history to reflect merge of #1084 2013-05-12 11:51:52 +02:00
Parker Moore
9140aad429 Merge pull request #1084 from maul-esel/deprecate-old-config
Deprecate old config 'server_port'
2013-05-12 02:50:20 -07:00
zachgersh
d2fabfcf15 Programatically create github issue links via rake task. 2013-05-11 23:27:06 -07:00
zachgersh
e4543e268f Added /history directory to the gemspec. 2013-05-11 21:40:26 -07:00
zachgersh
16954daa19 Updated rakefile to support new directory and parsing structure. 2013-05-11 21:16:50 -07:00
zachgersh
9ac69e3091 Moved changelist to /history directory. 2013-05-11 20:31:53 -07:00
zachgersh
59b3f095fa Merge branch 'master' into changelist_page 2013-05-11 20:08:11 -07:00
Parker Moore
665e8d15f7 Turn off relative permalinks on Jekyll docs. 2013-05-12 01:43:36 +02:00
Parker Moore
1d1d3727ce Merge branch 'master' into relative-permalinks
* master:
  Update history to reflect merge of #1079
  Update gemspec for new page-based docs.
  remove docs on installing pygments
2013-05-12 01:21:55 +02:00
Parker Moore
c59cfcfd2e Not automatically deprecated. 2013-05-12 01:19:04 +02:00
Parker Moore
d9f0dce67d make sure relative_permalinks is set to TRUE 2013-05-12 01:16:52 +02:00
Parker Moore
2e1316ec8b Ensure the page is in a subdir. That's the only time it's eff'd. 2013-05-12 01:08:33 +02:00
Parker Moore
6167747440 Say happy things when everything is cool 2013-05-12 01:07:58 +02:00
maul.esel
1b80fc8cc8 always be polite to the user :) 2013-05-11 20:03:55 +02:00
maul.esel
a8788f4a0a copy over deprecated config option to new one 2013-05-11 19:57:11 +02:00
maul.esel
c44d4248ac warn on use of deprecated "server_port" option 2013-05-11 19:54:06 +02:00
Parker Moore
0e82b4eb2f Use site config to determine whether permalinks should be relative. 2013-05-11 18:26:20 +02:00
Parker Moore
161244fd78 Add better language and link to Upgrading page in docs for relative permalinks deprecation msg 2013-05-11 18:06:33 +02:00
maul.esel
eda11aa534 ensure number category is NOT included as fixnum 2013-05-11 18:03:51 +02:00
Parker Moore
1f23bc4dc0 Add support for relative permalinks 2013-05-11 18:03:03 +02:00
Parker Moore
19bc54bb07 Add doctor command 2013-05-11 18:02:53 +02:00
Parker Moore
6294c4a204 Better-formatted output with relation to 'Generating... done.' 2013-05-11 17:56:42 +02:00
Parker Moore
b355ef6469 Add jekyll doctor command 2013-05-11 17:49:20 +02:00
Parker Moore
e22b1bb74a Add deprecation support for pages in subfolders with relative permalinks. 2013-05-11 17:40:00 +02:00
Parker Moore
470a187395 Update history to reflect merge of #1079 2013-05-11 17:10:50 +02:00
Parker Moore
3b50f4116a Merge pull request #1079 from maul-esel/docs-remove-pygments
Remove docs on installing pygments
2013-05-11 08:09:53 -07:00
Parker Moore
d869f99345 Update gemspec for new page-based docs. 2013-05-11 17:08:46 +02:00
maul.esel
ef06f19a9e remove docs on installing pygments
This is no longer needed as stated by @parkr in #1021,
as jekyll now comes bundled with pygments.rb.

Fixes #1021.
2013-05-11 16:52:39 +02:00
zachgersh
81bbafefea Reverted my upgrading.md to fix merge conflict. 2013-05-10 20:01:34 -07:00
Parker Moore
d675ef6662 Fixed some things on the site. 2013-05-10 23:28:42 +02:00
Parker Moore
fdceb50595 Can't use post_url to ask for the url's of the docs anymore. 2013-05-10 23:09:12 +02:00
Parker Moore
fe921190c7 Moving /docs to /docs/home 2013-05-10 23:05:59 +02:00
Parker Moore
9530e56176 Fix links to /docs/ in the site. 2013-05-10 22:57:51 +02:00
Parker Moore
23087b9c3f Add permalink to docs/upgrading/ 2013-05-10 22:55:27 +02:00
Parker Moore
d8070ec6be Make Upgrading docs page a Page. 2013-05-10 22:55:01 +02:00
Parker Moore
6bd7feeaa8 Update history to reflect merge of #985. Closes #980. 2013-05-10 22:13:32 +02:00
Parker Moore
628f8280d0 Merge benbalter:docs-pages #985 2013-05-10 22:11:36 +02:00
Parker Moore
65a1b33f6c Update history to reflect merge of #1073. 2013-05-10 21:55:57 +02:00
Parker Moore
6a36ace5ab Merge pull request #1073 from zachgersh/link_change
Changed link to liquid, was going to a dead link and it really bothered me
2013-05-10 12:54:46 -07:00
zachgersh
59f2a41ced Changed liquid link of the homepage. 2013-05-10 09:15:56 -07:00
zachgersh
29c165ef4c Changed the liquid link in posts. 2013-05-10 09:13:18 -07:00
zachgersh
7a2a9d36a7 Corrected additional liquid link on the Welcome page. 2013-05-10 08:59:56 -07:00
zachgersh
07d87b2cc0 Changed link to liquid, was going to a dead link and it really bothered me. 2013-05-10 08:53:47 -07:00
maul.esel
17cdd59206 adjust tests to new test post 2013-05-10 14:07:43 +02:00
maul.esel
eae3ae8479 fix handling of number categories 2013-05-10 14:07:23 +02:00
Roland Warmerdam
2a6c722e78 Add a data-lang attribute to code blocks 2013-05-10 19:18:13 +12:00
Rafael Revi
528c94e481 new test case: numbers in categories 2013-05-10 02:20:43 -04:00
Rusty Geldmacher
1646c223c4 Added jekyll-contentblocks to the plugins list 2013-05-09 10:09:12 -04:00
Parker Moore
012717ed04 Update history to reflect merge of #1061. 2013-05-09 13:51:55 +02:00
Mort Yao
8d0543d54c Bump pygments.rb version to 0.5.0 2013-05-09 13:51:25 +02:00
Parker Moore
3fbddc583c Update history to reflect merge of #1067 2013-05-09 13:48:34 +02:00
Parker Moore
cd260535d3 Merge pull request #1067 from stomar/kramdown
Update to kramdown 1.0.2
2013-05-09 04:47:43 -07:00
Marcus Stollsteimer
7977c5ed1b Update to kramdown 1.0.2 2013-05-09 13:26:29 +02:00
zachgersh
0712916d7d Manually fixed formatting for now. 2013-05-09 00:04:53 -07:00
zachgersh
2c5807faad Rake task added to move History into site and update its formatting. 2013-05-08 23:59:59 -07:00
zachgersh
eb5a8a6358 Cleaned up the formatting of changelist page and removed HEAD section. 2013-05-08 22:06:16 -07:00
zachgersh
cfc6d7797d Created new changelist page. It currently looks bad. 2013-05-08 21:31:57 -07:00
Matt Rogers
770402d912 Also stub the building of the index
Since we don't actually use the index in getting the related posts from
the tests there's no need to build an index, which can take a long time
if the ruby bindings for the GSL library are not installed.
2013-05-08 22:33:20 -05:00
Matt Rogers
08b49ec9db Update the display of the LSI progress output
It now fits more in line with what the other messages display.
2013-05-08 22:02:23 -05:00
Matt Rogers
1aa49fa734 Wrap tests around Jekyll::RelatedPosts
This gives me more confidence that we're doing the right things when it
comes to both the LSI and non-LSI cases and prevents regressions.
2013-05-08 21:57:10 -05:00
Christopher Giroir
b0c04c89f4 Further clarify what paginate_path should do in the case of directories in the path 2013-05-08 14:08:03 -07:00
Matt Rogers
64f8a7b228 Move the require for related_posts to jekyll.rb 2013-05-08 07:39:00 -05:00
Parker Moore
0c04e5d55b Catching that the Redcarpet gem has been installed. Fixes #1059 2013-05-08 11:55:19 +02:00
Christopher Giroir
09fafd6418 Fixing paginate_path on windows 2013-05-07 23:24:10 -07:00
Matt Rogers
f67f7f3db4 Move the building of related posts into their own class 2013-05-07 22:27:38 -05:00
Parker Moore
8bd14f18f6 Update History to reflect release of 1.0.1. 2013-05-08 01:06:11 +02:00
Parker Moore
abc633a36a Release 1.0.1 2013-05-08 01:03:51 +02:00
Parker Moore
c758f8d24f Release 1.0.1 2013-05-08 01:03:14 +02:00
Parker Moore
2bee768e79 Update history to reflect merge of #1053. Closes #1038. 2013-05-08 00:58:31 +02:00
Parker Moore
cb0054b6d7 Merge pull request #1053 from mojombo/redcarpet-respect-pygments
Respect pygments config option in Redcarpet renderer.
2013-05-07 15:57:17 -07:00
Parker Moore
739f752580 Properly wrap and encode non-pygmentized code. 2013-05-08 00:45:55 +02:00
Parker Moore
f69c39c3ac fix up tests for pygments-aware redcarpet 2013-05-08 00:45:42 +02:00
Parker Moore
62b4fd77ac Using modules instead of classes for Redcarpet with/without Pygments. 2013-05-08 00:28:51 +02:00
Parker Moore
2114bb3c2e Respect pygments config option in Redcarpet renderer. 2013-05-08 00:10:18 +02:00
Parker Moore
3fef9607bc Update history to reflect introduction of #1051. 2013-05-07 23:54:02 +02:00
Chris Jones
25cb387953 Changed https to http in the GitHub Pages link. fixes #1051. 2013-05-07 23:53:17 +02:00
Parker Moore
eda088136f Update history to reflect merge of #1048. 2013-05-07 22:13:21 +02:00
Parker Moore
541dbf1a04 Merge pull request #1048 from mojombo/fix-toc-rdiscount
Check to make sure there is a toc_token before trying to use it.
2013-05-07 13:11:10 -07:00
Parker Moore
1d2f172d6b Check to make sure there is a toc_token before trying to use it. Fixes #1047 2013-05-07 18:12:47 +02:00
Parker Moore
81fea5ae22 Update history to reflect merge of #1037. 2013-05-07 16:46:02 +02:00
Parker Moore
5dd3b0b71d Update tests to be compliant with #1037. 2013-05-07 16:45:15 +02:00
Parker Moore
f9e3cf21f9 Provide backwards-compatibility for change in #1037. 2013-05-07 16:45:06 +02:00
Parker Moore
6b9ef70d7b Merge pull request #1037 from djui/patch-1
Add newer `language-` class name prefix to code blocks
2013-05-07 07:41:08 -07:00
Parker Moore
cacc0d0872 Clean up history file. Update it to reflect merge of #1027 2013-05-07 15:20:50 +02:00
Parker Moore
ea29bff239 Fix up markdownified history file. 2013-05-07 15:19:09 +02:00
Parker Moore
b625dbdbe3 I have weird preferences with filenames. Sorry, not sorry. 2013-05-07 15:18:01 +02:00
Parker Moore
3728f8149c Merge pull request #1027 from benbalter/markdownify-changelog
Markdownify the changelog
2013-05-07 06:17:07 -07:00
Benjamin J. Balter
6928d5b550 rebase changelog 2013-05-07 08:59:16 -04:00
Parker Moore
877e328650 Update history to reflect merge of #1045 2013-05-07 14:32:37 +02:00
Parker Moore
368582832d Merge pull request #1045 from mojombo/fix-lsi-build
Fix the index build with LSI. Fixes #1039.
2013-05-07 05:31:39 -07:00
Matt Rogers
39d33b48b0 Fix the index build with LSI 2013-05-07 06:58:54 -05:00
Parker Moore
e12482fc6b Update history to reflect fix of #1040 2013-05-07 13:16:15 +02:00
Parker Moore
d0a9948eed Let Commander handle bad args after printing of deprecation warning. Fixes #1040. 2013-05-07 13:15:03 +02:00
Parker Moore
7dccb6c996 Update history to reflect fix of #1041. 2013-05-07 13:11:17 +02:00
Parker Moore
a0ad8a4031 Don't print deprecation warning if no arg is specified. Fixes #1041. 2013-05-07 13:10:29 +02:00
Uwe Dauernheim
3770bcbdb7 Use newer language- class name prefix
This change makes it partly possible to use Jekyll+RedCarpet+Prism.js without using a plugin.

Another change will respect Jekyll's `pygments` configuration option and not render the code block using Pygments. Together, these two changes allow using prism.js with Jekyll out of the box.
2013-05-07 02:33:58 +03:00
Parker Moore
dde2d7c3f6 Update history to reflect merge of #1032 2013-05-06 22:10:18 +02:00
Parker Moore
b9a94123d6 Merge pull request #1032 from pborreli/typos
Fixed typos, add missing <div> to site_template
2013-05-06 12:51:49 -07:00
Pascal Borreli
29b3dc97f0 Fixed typos 2013-05-06 20:27:00 +01:00
Pascal Borreli
410e5912a2 Fixed html 2013-05-06 20:26:39 +01:00
Parker Moore
c7b707cdfd Ignore --help and --version in Deprecator. Fixes #1030 2013-05-06 20:17:28 +02:00
Parker Moore
60bbcaa863 Update history to reflect merge of #1028 2013-05-06 20:06:53 +02:00
Parker Moore
7cea0657ba Merge pull request #1028 from pborreli/site-typos
Fixed some typos
2013-05-06 11:05:31 -07:00
Pascal Borreli
d34991ce3d Removed useless measure in css 2013-05-06 16:10:29 +01:00
Pascal Borreli
221c525057 Fixed duplicate attribute in css 2013-05-06 16:09:26 +01:00
Pascal Borreli
b61f81c64d Removed duplicate css entry 2013-05-06 16:08:36 +01:00
Pascal Borreli
eacf7e948b Fixed typos 2013-05-06 16:07:45 +01:00
Pascal Borreli
e4e73bddb3 Fixed select closing tag 2013-05-06 15:57:43 +01:00
Benjamin J. Balter
6f3fbc69e7 markdownify the changelog 2013-05-06 09:50:38 -04:00
Parker Moore
0c76792aa7 Update history to reflect merge of #1025 2013-05-06 15:27:36 +02:00
Parker Moore
494f0aac4f Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Removing manual install of Pip and Distribute
2013-05-06 15:27:00 +02:00
Parker Moore
4cf99f7de0 Merge pull request #1025 from Nikkau/patch-1
Removing manual install of Pip and Distribute
2013-05-06 06:26:36 -07:00
Nikkau
f4f2932cb8 Removing manual install of Pip and Distribute
Brew automatically install Pip and Distribute.

https://github.com/mxcl/homebrew/blob/master/Library/Formula/python.rb#L245-247
2013-05-06 16:19:47 +03:00
Parker Moore
dd242db3da Update history to reflect merge of #1022 2013-05-06 11:15:00 +02:00
Parker Moore
cbe1448ad1 Merge pull request #1022 from olov/patch-1
Updated URL for Markdown references plugin (moved from Gist to project)
2013-05-06 02:14:19 -07:00
Olov Lassus
7a65f2d268 Updated URL for Markdown references plugin (moved from Gist to a GitHub project) 2013-05-06 11:53:52 +03:00
David Briggs
a5a6be1b1b fix unescaped liquid tag, fixes #1019 2013-05-06 10:51:08 +02:00
Parker Moore
d30117aeb2 Update history to reflect merge of #1018 2013-05-06 02:07:51 +02:00
Parker Moore
21e99430bc Update history to reflect release of 1.0.0. 2013-05-06 02:07:11 +02:00
Parker Moore
097ac95d49 Merge pull request #1018 from kivikakk/readme_links
Update README links.
2013-05-05 17:05:31 -07:00
Arlen Cuss
fadd53ab8b Update README links. 2013-05-06 10:01:51 +10:00
Parker Moore
9f94eaf061 Release 1.0.0 2013-05-06 01:16:34 +02:00
Parker Moore
9f6da26bb4 remove failsave for docs publishing 2013-05-06 01:16:14 +02:00
Parker Moore
4d9d6b689b Cleaning up the site template CSS. 2013-05-06 01:00:00 +02:00
Parker Moore
58103d11c9 Add Upgrading docs page to gemspec. 2013-05-05 23:51:10 +02:00
Parker Moore
24d694e6a0 We now have native drafts, wahoo 2013-05-05 23:42:08 +02:00
Parker Moore
0619265e5b Update Upgrading docs. #965 2013-05-05 23:39:42 +02:00
Parker Moore
04837f7c78 Merge pull request #965 from benbalter/upgrading-docs
Add docs to help users upgrade from < 1.0, fixes #877
2013-05-05 14:10:44 -07:00
Parker Moore
06beb4b72b Bump version for 1.0.0. 2013-05-05 23:02:45 +02:00
Parker Moore
0b1d22dd61 Merge pull request #1016 from mojombo/fix-pagination
Paginate in subdirectories properly
2013-05-05 14:01:29 -07:00
Parker Moore
bcf1464162 Update history to reflect merge of #992 2013-05-05 22:58:55 +02:00
Parker Moore
ce999f12fc Merge pull request #992 from maul-esel/consistent-page.url
add leading slash to page.url and post.url
2013-05-05 13:56:15 -07:00
Parker Moore
8bd1e0f06e Update history to reflect merge of #964. 2013-05-05 21:08:03 +02:00
Parker Moore
50d66831ff Merge pull request #964 from benbalter/html-template-site
Make Template site HTML5
2013-05-05 12:05:47 -07:00
Benjamin J. Balter
8ec08fceb6 Downgrade default site template for Internet exploder
Swap `<header>` and `<footer>` tags to `<div>`s, so we can support IE without the need for an html5 shim.
2013-05-05 14:28:58 -04:00
Parker Moore
dcd7b36269 Fixing Pager test for 1.8.7. 2013-05-05 18:08:03 +02:00
Parker Moore
1c146ec649 Instead of just a string name, Pager.pagination_enabled? now accepts a page 2013-05-05 17:26:48 +02:00
Parker Moore
050e982006 Add extra question to ensure that the index.html file is in thepagination path's directory 2013-05-05 17:26:29 +02:00
Parker Moore
2d0e65b5f7 In Cucumber step definitions, it'd be smart not to chdir into a dir we're about to kill 2013-05-05 17:25:42 +02:00
Parker Moore
5836b441f6 Fixing up pagination feature test 2013-05-05 17:25:09 +02:00
Parker Moore
ea71036e8c Paginate in subdirectories properly. Fixes #878. 2013-05-05 15:40:13 +02:00
Parker Moore
3e670e72ab Update gemspec. 2013-05-05 15:20:18 +02:00
Parker Moore
20334aabbe Test all cases for post_url modifications. #998 2013-05-05 15:13:17 +02:00
Parker Moore
9179f56ed7 Quick clean-up from #998. 2013-05-05 14:59:50 +02:00
Parker Moore
0edbbc1641 Update history to reflect merge of #998 2013-05-05 14:22:01 +02:00
Parker Moore
290ba131e2 Merge pull request #998 from dhcole/master
Use post's directory path when matching for the post_url tag
2013-05-05 05:16:39 -07:00
Parker Moore
0d49aacc29 Update history to reflect merge of #1015 2013-05-05 13:49:34 +02:00
Parker Moore
1b994a9682 Merge pull request #1015 from mojombo/loose-pygments-dep
Loosen Pygments Dependency
2013-05-05 04:48:37 -07:00
Parker Moore
bd0ff6644e Update history to reflect merge of #1014 2013-05-05 13:44:09 +02:00
Parker Moore
dcf3911176 Merge pull request #1014 from mojombo/string-times
Parse strings into Time objects for date-related parsing
2013-05-05 04:42:26 -07:00
Parker Moore
ca888cad76 When pygments is required after Jekyll::Logger is required, its internal require to Ruby's stdlib Logger class chokes. This is an ugly-ass work-around. 2013-05-04 15:31:02 +02:00
Parker Moore
3feb18bb56 Redcarpet Parser requires pygments 2013-05-04 15:29:43 +02:00
Parker Moore
3c218d2dcd Only require pygments where it's needed. 2013-05-04 15:04:57 +02:00
Parker Moore
67aaada839 Clean up some copy in the limit_posts error handling. 2013-05-04 14:57:27 +02:00
Parker Moore
c9bd1437a3 Testing parsing of String objects which represent times to Date filters 2013-05-04 14:41:21 +02:00
Parker Moore
7554c4ce61 Parse strings into Time objects for date-related parsing. Fixes #997. 2013-05-04 14:01:44 +02:00
Parker Moore
1c4f5b4ee5 Update history to reflect the merge of #860 2013-05-02 23:55:49 +02:00
Parker Moore
1404a97cd4 Merge pull request #860 from cobyism/responsify
Responsive jekyllrb.com (thanks to @cobyism)
2013-05-02 14:53:46 -07:00
Coby Chapple
e419029b93 update github logo in footer 2013-05-02 21:56:45 +01:00
Coby Chapple
eaaba892a2 derp 2013-05-02 21:56:35 +01:00
Coby Chapple
f0fc262812 tweak some of the code blocks on the troubleshooting page to work better on mobiles 2013-05-02 21:46:43 +01:00
Coby Chapple
cdcb92bb38 make these clone instructions behave as blocks 2013-05-02 21:43:22 +01:00
Coby Chapple
6cc77dfeee this code block was sticking way out, usage detailed on gist anyway 2013-05-02 21:38:24 +01:00
Coby Chapple
72d4e1f65b oops, pagination page got left out 2013-05-02 21:34:47 +01:00
Coby Chapple
04bbca5871 use <th> instead of <td> for table headers on variable page 2013-05-02 21:32:41 +01:00
Coby Chapple
6f2f296578 more padding for extra quick-start command line 2013-05-02 21:32:07 +01:00
Parker Moore
4c7b9cb953 #583 has been merged, but should wait for #860. 2013-05-02 22:19:01 +02:00
Coby Chapple
6a57d5248b merge in changes from latest master
conflicts:
- site/_posts/2012-07-01-permalinks.md
- site/css/style.css
- site/index.html
2013-05-02 21:16:47 +01:00
Coby Chapple
e0640d6687 side scrolling wrappers for remaining tables 2013-05-02 21:08:18 +01:00
Coby Chapple
0d80d10ebf wrappers for permalinks page 2013-05-02 14:17:16 +01:00
Coby Chapple
c6ce15e435 notes, warnings etc should break out rightwards too, come to think of it 2013-05-02 14:16:19 +01:00
Coby Chapple
8446f47247 wrapper classes for frontmatter page 2013-05-02 14:05:44 +01:00
Coby Chapple
951cb11d48 padding should be even when table fits without overflow 2013-05-02 13:52:21 +01:00
Coby Chapple
fb642bb97f break side scrolling tables out of the grid/parent containers 🤘 2013-05-02 13:51:26 +01:00
Coby Chapple
f924a04733 scroll tables sideways on mobiles 2013-05-02 13:50:46 +01:00
Parker Moore
40b587c46c Update history to reflect change to solve #1008 2013-04-30 22:18:58 +02:00
Parker Moore
c32b570114 Checking the arguments to ensure we have a subcommand before proceeding. (#1008) 2013-04-30 22:17:22 +02:00
Parker Moore
463ea15a3e Update history to reflect merge of #1007 2013-04-30 22:02:36 +02:00
Parker Moore
1f02150ee9 Merge pull request #1007 from michaelklishin/patch-1
Catch all exceptions, not just StandardError descendents
2013-04-30 12:59:02 -07:00
Michael Klishin
82ec02905e Catch all exceptions, not just StandardError descendents
We've hit a few edge cases in Liquid/Markdown rendering
with http://clojurewerkz.org documentation sites.
They resulted in exceptions Jekyll silently swallowed because
they were not StandardException subclasses.
2013-04-30 23:33:08 +04:00
Dave Cole
b1cf3d5dd5 Adjust expected post count for tests. 2013-04-30 12:46:31 -04:00
Parker Moore
48fe514c54 Updating Configuration page in docs with the defaults 2013-04-30 16:08:21 +02:00
Parker Moore
0b1bc0c24d Update history to reflect merge of #1004 2013-04-30 15:54:58 +02:00
Parker Moore
7efd0a8d11 Merge pull request #1004 from uu59/fix_limit_posts_from_cli
Fix `jekyll serve --limit_posts n` failed
2013-04-30 06:53:05 -07:00
Dave Cole
805f378586 Add test for nested post_url 2013-04-29 17:48:10 -04:00
uu59
0f52f15cc2 Clean up code #1104 2013-04-29 21:07:46 +09:00
uu59
94756340cd Remove to_i. Let commander gem do it #1004 2013-04-29 15:56:02 +09:00
Parker Moore
b4b66d5713 Merge pull request #1001 from mojombo/refactoring-convertible
Refactoring Jekyll::Convertible
2013-04-28 16:43:38 -07:00
Parker Moore
3237b39f21 Merge pull request #1002 from mojombo/refactor-post
Refactor Jekyll::Post
2013-04-28 16:40:22 -07:00
uu59
20a837d15c Change default value of limit_posts from nil to 0 (see #1004)
Before this commit meaning of limit_posts:
  nil: no limit. generate all posts
  0: raise error
  n ( > 0): generate n posts only
  n ( < 0): raise error
  else: raise error

After this commit:
  nil: same as 0
  0: no limit. generate all posts
  n ( > 0): generate n posts only
  n ( < 0): raise error
  else: almost same as 0 (depend on `to_i` result)
2013-04-29 01:41:22 +09:00
Parker Moore
f7fde70f5f 'The Best of Both Worlds,' à la @chad's comment 2013-04-28 15:21:17 +02:00
uu59
ad2c706a34 Fix jekyll serve --limit_posts n failed 2013-04-28 02:03:08 +09:00
Parker Moore
46ce757b71 Compliant with Ruby 2.0.0 2013-04-26 21:20:48 +02:00
Parker Moore
5f13e00791 Comments for Convertible.render_all_layouts and Convertible.render_liquid 2013-04-26 21:09:02 +02:00
Parker Moore
fcbab9a3ca Post#is_published ~> Post#published? 2013-04-26 21:00:47 +02:00
Parker Moore
f7841d1713 Remove unnecessary self.tags.flatten! in favour of a one-line sol'n. 2013-04-26 20:59:54 +02:00
Parker Moore
422a4bd5cd Renamed tag- and category-instantiation methods 2013-04-26 20:25:07 +02:00
Parker Moore
6d9845a58b Refactor Post category instantiation 2013-04-26 20:23:58 +02:00
Parker Moore
482986e346 Refactored setting of Post.published flag 2013-04-26 20:21:17 +02:00
Parker Moore
266a52b161 The call to Post#read_yaml was in an unnecessary begin...rescue block. 2013-04-26 20:09:18 +02:00
Parker Moore
09c1c01d07 Refactor Post#related_posts to build the index in a different method 2013-04-26 20:05:52 +02:00
Parker Moore
ffa93c22f1 Refactor Post#to_liquid 2013-04-26 20:03:57 +02:00
Parker Moore
29a1c18300 Refactoring Jekyll::Convertible 2013-04-26 19:36:52 +02:00
Parker Moore
fe36b0f479 Update history to reflect fixing of #981 2013-04-26 19:16:23 +02:00
Parker Moore
217b2298d1 Update history to reflect fixing of #836 2013-04-26 19:13:21 +02:00
Parker Moore
6923865091 Update history to reflect fixing of #993 2013-04-26 19:12:32 +02:00
Parker Moore
6bb8b82a1e Update history to reflect merge of #989 2013-04-26 19:10:53 +02:00
Parker Moore
9a5a702e47 When one clones one's fork of Jekyll, one should not use the readonly git:// protocol. Instead, use SSH. 2013-04-26 19:09:11 +02:00
Parker Moore
d2f364b60c Merge pull request #989 from mojombo/docs-proofreading
Proofread and fix up the documentation
2013-04-26 09:43:48 -07:00
Dave Cole
fc09ac4862 Use post's directory path when matching for the post_url tag 2013-04-25 13:58:05 -04:00
Parker Moore
61c24c601a Add UTF-8 encoding where we read in YAML so it reads in UTF-8 characters properly. Fixes #836. 2013-04-25 02:15:25 +02:00
Parker Moore
5a20fa4382 --plugins can now accept plugin directories. Fixes #993. 2013-04-23 01:50:57 +02:00
Parker Moore
8ed092ed94 Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Moving comparison for PostUrl tag to the PostComparer class
  Fail if destination directory for jekyll new exists and is not empty. Fixes #981.
  Remove code duplication: #write in Page and Post is the same.
2013-04-23 01:41:43 +02:00
Parker Moore
24aabbe05f Moving comparison for PostUrl tag to the PostComparer class 2013-04-22 12:57:52 +02:00
maul.esel
9582a7cc84 note leading slash in the docs 2013-04-20 13:34:54 +02:00
maul.esel
6f28b6d432 fix tests for always-present slash 2013-04-20 13:21:31 +02:00
maul.esel
d73841c961 always ADD a leading slash to page.url or post.url 2013-04-20 13:15:40 +02:00
Matt Rogers
47f8fb5091 Don't end an independent thought with a preposition. 2013-04-19 22:56:19 -05:00
Matt Rogers
b05afb022f Use 'the' instead of 'a' 2013-04-19 22:51:18 -05:00
Matt Rogers
7d59df92b3 Use 'from' instead of 'at' 2013-04-19 22:50:45 -05:00
maul.esel
c6df2e150a remove leading slash from page.url and post.url 2013-04-19 16:37:48 +02:00
Matt Rogers
94449c4088 Tell people to update the site not the wiki.
We want to kill the wiki with fire.
2013-04-18 23:17:09 -05:00
Matt Rogers
7d3dcc0116 Fix the link to the Homebrew wiki 2013-04-18 23:17:09 -05:00
Matt Rogers
898d9d13a8 Remove the word 'also' when describing Typo migrations.
The use of the 'also' is out of place here. We're only talking about one thing.
2013-04-18 23:17:08 -05:00
Matt Rogers
35a59ab766 Use 'newer' instead of 'future'
When talking about versions of Drupal greater than 6.1, use the word newer to
indicate that those versions have already been released. The word future implies
that those versions haven't been released yet.
2013-04-18 23:17:08 -05:00
Matt Rogers
205e65d017 Be explicit about what we require when migrating systems
We require access to the database from the old system and we're generating posts
for Jekyll.
2013-04-18 23:17:08 -05:00
Matt Rogers
96fa05ac3d Make the text clearer for the layout option 2013-04-18 23:17:08 -05:00
Matt Rogers
a8361315ed Add a missing 'the'
We're serving the website. There can be only one.
2013-04-18 23:17:08 -05:00
Matt Rogers
f5a4d36efc Add a missing comma
We have three or more terms with a single conjunction. According to Strunk and
White, we need a comma.
2013-04-18 23:17:08 -05:00
Matt Rogers
c06bb76610 Fix a verb tense mismatch 2013-04-18 23:17:08 -05:00
Matt Rogers
ef6ae8c073 Add a word that was missing 2013-04-18 23:17:08 -05:00
Matt Rogers
2e65658920 Fix up some verbiage that didn't jive quite right. 2013-04-18 23:17:08 -05:00
Matt Rogers
8d7be33dfb Wrap at 80 columns 2013-04-18 23:16:53 -05:00
Benjamin J. Balter
e1f04968e8 Use pages for documentation, not posts, fixes #980. 2013-04-18 10:10:59 -04:00
Parker Moore
ba64a9fe30 Fail if destination directory for jekyll new exists and is not empty. Fixes #981. 2013-04-16 18:24:10 +02:00
Benjamin J. Balter
11419868dc CSS reorganization
1. Fix regression on s/.footer/footer/
2. Fix whitespace and tabbing
3. Reorganize properties more logically
2013-04-16 09:48:18 -04:00
Parker Moore
6ed41e373c Remove code duplication: #write in Page and Post is the same. 2013-04-16 02:55:31 +02:00
Parker Moore
aba0e3a79e Release 1.0.0.rc1 2013-04-16 00:49:31 +02:00
Parker Moore
c0c0150bb5 Release 1.0.0.rc1 2013-04-16 00:47:31 +02:00
Parker Moore
82f32d5c02 Merge configuration properly. Closes #978. 2013-04-16 00:41:10 +02:00
Benjamin J. Balter
55b890b407 Move site title to H1 tag, wrap header in header tag. 2013-04-15 16:50:01 -04:00
Benjamin J. Balter
3bf38ad0d3 significant rewrite of baseurl section for clarity, props mattr- 2013-04-15 16:25:40 -04:00
Benjamin J. Balter
db31c1a453 s/mardown/markdown/ part deux 2013-04-15 16:16:27 -04:00
Benjamin J. Balter
4063e47fb9 s/--server/serve/ part deux 2013-04-15 16:15:38 -04:00
Benjamin J. Balter
766ef9e3da s/mardown/markdown, props @mattr 2013-04-15 16:13:46 -04:00
Benjamin J. Balter
7a0b6da5ed s/along side/alongside/ h/t @mattr 2013-04-15 16:13:22 -04:00
Benjamin J. Balter
6b624fb699 upper case P dangit 2013-04-15 16:12:54 -04:00
Benjamin J. Balter
075e14aaad moar hard word wrapping 2013-04-15 16:12:13 -04:00
Benjamin J. Balter
380e7a9744 s/--server/serve 2013-04-15 16:10:19 -04:00
Benjamin J. Balter
783d59045b remove stray comma 2013-04-15 16:09:24 -04:00
Benjamin J. Balter
343d56dfe3 hard wrap *all* the things! 2013-04-15 16:09:02 -04:00
Benjamin J. Balter
223dbdc155 86'd conditional IE classes 2013-04-15 13:37:05 -04:00
Benjamin J. Balter
91bcb83c8a plurlize file(s) 2013-04-15 13:34:38 -04:00
Benjamin J. Balter
55368898f5 Clarify new way to do server and auto, props @parkr
see https://github.com/mojombo/jekyll/pull/965#issuecomment-16396829
2013-04-15 13:33:53 -04:00
Parker Moore
e7546a98f6 Remove unnecessary override of #read_yaml in Page. 2013-04-15 19:24:23 +02:00
Parker Moore
f6f3aa6218 Update history to reflect merge of #977. Repealed #580. 2013-04-15 19:21:15 +02:00
Parker Moore
9571e4c536 Merge pull request #977 from maul-esel/no-layout-defaults
No layout defaults (reverts #580)
2013-04-15 10:19:32 -07:00
Parker Moore
e4b8dbc112 Add files to the manifest in the gemspec 2013-04-15 19:15:55 +02:00
Benjamin J. Balter
db76121d89 Make --config usage more explicit.
See https://github.com/mojombo/jekyll/pull/965#discussion_r3797116 and https://github.com/mojombo/jekyll/pull/965#discussion_r3797085

Props @parkr.
2013-04-15 12:56:33 -04:00
Benjamin J. Balter
14ca57893f 86'd Chrome Frame in template site 2013-04-15 12:04:27 -04:00
Benjamin J. Balter
532adddbb8 quick shout out to jekyll new 2013-04-15 12:02:06 -04:00
Benjamin J. Balter
f8e8160358 clarify baseurl usage 2013-04-15 11:56:46 -04:00
maul.esel
cc5ce06d78 remove tests for default layouts 2013-04-15 17:24:18 +02:00
maul.esel
b7064a4bc3 remove 'post' and 'page' default layouts 2013-04-15 17:24:09 +02:00
Parker Moore
5a8a04391c Update history to reflect merge of #957. 2013-04-15 16:25:42 +02:00
Parker Moore
afa3ef90b9 Merge pull request #957 from mojombo/timezonify
Set Timezone in _config.yml
2013-04-15 07:23:53 -07:00
Parker Moore
457e90fd41 Just remove the darn TEST_DIR 2013-04-15 15:42:21 +02:00
Parker Moore
b4f68baafb Jekyll.set_timezone accepts just the timezone, not the config 2013-04-15 15:39:36 +02:00
Parker Moore
b68d33ed8b Remove 'shell' from description of changing TZ 2013-04-15 14:37:37 +02:00
Parker Moore
aa1f52fce8 Renamed timezone feature scenarios 2013-04-15 14:35:28 +02:00
Parker Moore
83cb01dd59 Using File.exists? more generally instead of File.directory? so /tmp/jekyll is always removed before running tests 2013-04-15 14:34:06 +02:00
Parker Moore
88e68e038a Extract out date parsing in feature steps 2013-04-15 14:32:14 +02:00
Parker Moore
9c57fad430 Finished feature for timezone shifting. 2013-04-15 00:42:14 +02:00
Parker Moore
df868b308a Set Jekyll path relative to the env file, not to CWD 2013-04-15 00:42:14 +02:00
Parker Moore
48795462c2 Cucumber: remove test dir if it's there 2013-04-15 00:42:14 +02:00
Parker Moore
b51b796a1e Feature for timezone switching 2013-04-15 00:42:13 +02:00
Parker Moore
fbf818b618 Add example TZ and default value note. 2013-04-15 00:42:13 +02:00
Parker Moore
d6a08b093a Add docs for timezone setting. 2013-04-15 00:42:13 +02:00
Parker Moore
c0a2d0f888 Fixed syntax error 2013-04-15 00:42:13 +02:00
Parker Moore
b249289b9d Set the timezone for the process 2013-04-15 00:42:13 +02:00
Parker Moore
5bcce7a1f1 Fix unit tests for Configuration#backwards_compatibilize 2013-04-15 00:41:46 +02:00
Parker Moore
d33f45ff05 Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Print deprecation warnings for 'server', 'watch' and 'auto' when loaded from files. Fixes #972
  Fixes multiple config loading. Closes #973. Rel: #945.
2013-04-15 00:32:17 +02:00
Parker Moore
f7310f554e Whitespace in post.rb 2013-04-15 00:32:04 +02:00
Parker Moore
55a964a7da Print deprecation warnings for 'server', 'watch' and 'auto' when loaded from files. Fixes #972 2013-04-14 23:18:47 +02:00
Parker Moore
e531925cae Fixes multiple config loading. Closes #973. Rel: #945. 2013-04-14 23:04:20 +02:00
Parker Moore
e0335e2167 .formatted_topic has moved back to Jekyll::Logger. Update Build.watch to use it 2013-04-14 20:21:39 +02:00
Parker Moore
85fc27bdd5 Update history to reflect merge of #959. 2013-04-14 20:06:58 +02:00
Parker Moore
398cd633b6 Merge pull request #959 from mojombo/deprecator
Refactor Logging and Deprecation Messaging
2013-04-14 11:05:07 -07:00
Parker Moore
6a4a607aea Merge pull request #968 from maul-esel/cucumber-fix
minor test fix: the variable is named page.path
2013-04-14 10:42:27 -07:00
Benjamin J. Balter
47e9c978bf Direct users to the proper command when previewing drafts. 2013-04-14 13:35:24 -04:00
Benjamin J. Balter
38e7d61858 fix typo in draft post explanation, props @parkr 2013-04-14 13:31:17 -04:00
Benjamin J. Balter
6133252f06 s/root/source/, props @parkr 2013-04-14 13:30:14 -04:00
Parker Moore
4ef107f3e8 Remove Logger methods from main Jekyll module. 2013-04-14 19:27:19 +02:00
Benjamin J. Balter
30859cd979 First pass at baseurl documentation 2013-04-14 13:27:14 -04:00
Benjamin J. Balter
87d3ddc1d9 Add draft functionality explanation to upgrading docs 2013-04-14 13:18:03 -04:00
Benjamin J. Balter
f4c61e59a6 clean up language a bit to clarify meaning 2013-04-14 13:11:37 -04:00
Benjamin J. Balter
37f332d58e Note that --auto is not --watch 2013-04-14 13:06:55 -04:00
Benjamin J. Balter
ff88254ccb De-deprecate --safe, props @mojombo 2013-04-14 13:03:06 -04:00
Benjamin J. Balter
c038ea6cc2 s/problematically/programmatically/, props @mojombo 2013-04-14 13:00:59 -04:00
Benjamin J. Balter
652b548ca5 Hard line wrap FTW! 2013-04-14 12:59:09 -04:00
Benjamin J. Balter
ba2281c4a3 Strip CSS, JS, and IMG from template site
Per #964, just upgrade the template site from XHTML to HTML5,
leaving the existing CSS. No need to get fancy.

The HTML is essentially HTML5 Boilerplate. No need for a holy war.

Look and feel should remain the same.
2013-04-14 12:52:27 -04:00
maul.esel
64702f2faf minor test fix: the variable is named page.path 2013-04-14 09:52:30 +02:00
Parker Moore
91b9d974b2 Update history to reflect merge of #955 2013-04-14 05:26:32 +02:00
Parker Moore
81e44bf5f4 Merge pull request #955 from mojombo/refactor-markdown
Refactor Markdown Parser Logic
2013-04-13 20:25:37 -07:00
Parker Moore
7a7990fb9a Moved markdown converters into lib/jekyll/converters/markdown 2013-04-14 05:23:42 +02:00
Parker Moore
30b49e7d4d Update history to reflect merge of #907 2013-04-14 04:22:29 +02:00
Parker Moore
c708d1d71b Merge pull request #907 from advatar/pkpass_mime_type_support
Added pkpass to the list
2013-04-13 19:17:35 -07:00
Parker Moore
7557e732a2 Update history to reflect addition of docs for page.path #951 2013-04-13 20:42:35 +02:00
Parker Moore
0ba7bc12b0 Update history to reflect merge of #956 2013-04-13 20:41:43 +02:00
Parker Moore
db3a2ab941 Update history to reflect merge of #966 2013-04-13 20:39:52 +02:00
Parker Moore
10c2445003 Merge pull request #966 from benbalter/quick-start-scaffold
Update quickstart instructions with `new` command
2013-04-13 11:38:56 -07:00
Parker Moore
ef51b0f9e4 Error message is red 2013-04-13 20:27:44 +02:00
Parker Moore
ef9d8ddb7d Matching tests to new colorized output 2013-04-13 20:24:45 +02:00
Benjamin J. Balter
f69a716d93 Update quickstart instructions with new command
Quickstart instructions as written would serve an empty directory.

They instruct the user to install Jekyll (:metal), `cd` to a directory that may not exist, and then run `jekyll serve` (:hurtrealbad:).

Instead, lets have them run `jekyll new` to stand up a scaffold site, so they can see how things work and poke around a bit.

It's one more command, but IMHO a better user experience for someone just getting started.
2013-04-13 14:09:58 -04:00
Benjamin J. Balter
c2dc80b95e Add docs to help users upgrade from < 1.0, fixes #877
* Help with new command line usage
* Help with deprecated flags
* Help with baseurl
* Help with drafts
2013-04-13 14:03:16 -04:00
Parker Moore
b99baeae27 Colorize warns as yellow 2013-04-13 19:58:41 +02:00
Parker Moore
97dbadb5dd Add colorator gem 2013-04-13 19:46:25 +02:00
Parker Moore
cef0a80897 Update history to reflect merge of #961 2013-04-13 19:27:21 +02:00
Parker Moore
9b5ebb874f Merge pull request #961 from benbalter/default-markdown-engine
Move template site to default markdown renderer
2013-04-13 10:26:34 -07:00
Parker Moore
3e04655025 Merge pull request #962 from dracula2000/refactor-site
Move defaults found in site.rb to DEFAULTS Hash
2013-04-13 10:24:35 -07:00
Benjamin J. Balter
1163fa905e Make template site HTML5
It would really pain me if the default Jekyll site were XHTML. That'd be bad for the internet.

Instead, use Twitter Bootstrap as a base (while still keeping @mojombo's origin design), to give users a great initial baseline to build beautiful, simple sites.

Defaults are more than just the starting point. It's what 80% of users are going to use. Look at WordPress and the default theme. May as well lead by example and start the user off right.

* Add Bootstrap base CSS as a better reset and base layer
* Update default layout to HTML5 with boilerplate best practices
* Add title and post date to post.html (rather than including in the post itself)
* Make site title a variable and add to _config.yml
* Add page title to header
* Add default .gitignore to ignore `_site`
* Remove unused `rss.png` and `.gitkeep`
* Add Modernizr for legacy IE support
2013-04-13 13:15:31 -04:00
Benjamin J. Balter
485b37e3d1 move template site to default markdown renderer 2013-04-13 12:41:03 -04:00
Brian Kim
028e580bb8 Remove short-circuits from Site 2013-04-13 12:39:49 -04:00
Brian Kim
e7815d873c Add implicit defaults to DEFAULTS 2013-04-13 12:37:38 -04:00
Parker Moore
17f97cdbab Move manual printing to Jekyll.info and Jekyll.warn 2013-04-13 18:22:34 +02:00
Parker Moore
c5f6e527b5 Bring Logger and Deprecator into the fold 2013-04-13 18:05:03 +02:00
Parker Moore
a355762190 Run Jekyll::Deprecator.process upon invocation of Jekyll 2013-04-13 18:04:37 +02:00
Parker Moore
bc6748f139 Add Jekyll::Deprecator 2013-04-13 18:03:38 +02:00
Parker Moore
61465053eb Add Jekyll::Logger 2013-04-13 18:02:16 +02:00
Parker Moore
dcad4b2867 Merge pull request #956 from jhauraw/doc-var-excerpt
Add 'excerpt' page variable to Docs Variables page.
2013-04-13 07:19:46 -07:00
Parker Moore
891ccbd656 Merge pull request #953 from mojombo/refactor-configuration
Refactor Jekyll Configuration
2013-04-13 07:19:03 -07:00
Jhaura Wachsman
48bb29c1f7 Moved 'excerpt' var below 'title'. 2013-04-12 18:26:29 -07:00
Jhaura Wachsman
73a1ffd77a Add 'excerpt' page variable to Docs Variables page. 2013-04-12 17:42:48 -07:00
Parker Moore
a971fec801 rescue block for the method and added redcarpet as option for parser 2013-04-13 02:13:50 +02:00
Parker Moore
3bc497c1c9 Moved out conversion logic 2013-04-13 01:55:03 +02:00
Parker Moore
63cdd21353 Move initialization of parsers to separate classes 2013-04-13 01:47:40 +02:00
Parker Moore
47653381b1 Merge pull request #954 from maul-esel/liquid-override-path
Allow overriding "path" in YAML frontmatter
2013-04-12 15:16:11 -07:00
maul.esel
c20fc03604 add cucumber tests for overriding path 2013-04-13 00:06:09 +02:00
maul.esel
968f3b0911 allow overriding page.path in YAML frontmatter 2013-04-13 00:05:49 +02:00
Parker Moore
6881d3bfbf Refactored Configuration#config_files 2013-04-12 23:59:37 +02:00
Parker Moore
b44cf939e6 Add note in docs about page.path. #951. 2013-04-12 23:43:25 +02:00
Parker Moore
dc39f02132 Add new pagination variables to the Variables page in the docs site. #942 2013-04-12 23:39:20 +02:00
Parker Moore
65f0d66e39 Update history to reflect merge of #951 2013-04-12 23:34:34 +02:00
Parker Moore
92db4ed89f Merge pull request #951 from maul-esel/liquid-file-path
Expose file path to Liquid
2013-04-12 14:33:19 -07:00
Parker Moore
bd8d271ce3 Moving the backwards-compatibilizing to Configuration#read_config_files. @mattr- 2013-04-12 23:11:38 +02:00
Parker Moore
0f600a322c Added a unit test for Configuration#backwards_compatibilize 2013-04-12 22:42:54 +02:00
Parker Moore
7c7bacffe7 Refactor setup block for test of Configuration#config_files 2013-04-12 22:37:01 +02:00
Parker Moore
25a882fa75 Merge pull request #952 from mojombo/refactor-commands
Remove code duplication in Build command
2013-04-12 13:36:19 -07:00
Parker Moore
879b08a0b0 In Configuration#config_files, cascade to the Configuration's value of 'source' before the default 2013-04-12 22:29:52 +02:00
Parker Moore
0812c1b4c9 Add unit tests for Configuration#config_files 2013-04-12 22:29:27 +02:00
Parker Moore
0c0b13e69b Unit test for Configuration#stringify_keys 2013-04-12 21:56:45 +02:00
Parker Moore
f2f20d18f0 TomDoc Jekyll::Configuration 2013-04-12 21:38:30 +02:00
Parker Moore
810a29c719 Rescue the entire method instead of just a begin block 2013-04-12 22:25:58 +03:00
Parker Moore
e2967c96cd Jekyll.configuration should use the new Jekyll::Configuration class 2013-04-12 21:20:30 +02:00
Parker Moore
64f224933b Add Jekyll::Configuration 2013-04-12 21:20:14 +02:00
Parker Moore
04fd68a232 Move Jekyll::DEFAULTS to Jekyll::Configuration::DEFAULTS 2013-04-12 21:19:20 +02:00
Parker Moore
0884a52fea Add TomDoc for Jekyll::Command.process_site 2013-04-12 20:01:25 +02:00
Parker Moore
5f54507204 Remove code duplication 2013-04-12 19:35:46 +02:00
maul.esel
5a92a73010 add cucumber tests for page.path variable 2013-04-12 18:18:17 +02:00
maul.esel
dc4d7c0bf4 fix path for posts: must include "_posts" 2013-04-12 18:17:57 +02:00
maul.esel
d64fd1e8fe expose file path relative to source dir to liquid
Fixes #633.
2013-04-12 17:37:16 +02:00
Parker Moore
5c680db758 Update history to reflect merge of #946. 2013-04-12 15:42:09 +02:00
Parker Moore
bee8cd9d77 Merge pull request #946 from maul-esel/preserve_excerpt
Preserve 'excerpt` in YAML Front-Matter
2013-04-12 06:24:51 -07:00
Parker Moore
64aa31b3d3 Update history to reflect merge of #945 2013-04-12 15:20:55 +02:00
Parker Moore
17c1e23203 Merge pull request #945 from voidfiles/master
Accept multiple config files from command line
2013-04-12 06:19:55 -07:00
maul.esel
2b238786a2 one more indentation fix 2013-04-12 12:05:07 +02:00
maul.esel
bcda51f97b do not allow markdown etc. in excerpt
Adjust the tests accordingly. Also
add a message for one of the tests.
2013-04-11 21:02:08 +02:00
maul.esel
b10e06ce47 new test: ensure the correct excerpt is exposed to liquid
Also shorten test code a little bit.
2013-04-11 19:33:32 +02:00
Alex Kessinger
14a669530e Fixing tests, and making it more ruby friendly 2013-04-11 10:17:59 -07:00
maul.esel
951ee09a75 remove useless attr_reader for excerpt (is a method now) 2013-04-11 19:05:28 +02:00
maul.esel
654d598fcf rework excerpt to be an accessor method
Instead of setting self.excerpt, make it a method
that returns either the custom excerpt or the pre-
viously extracted excerpt.
2013-04-11 17:13:15 +02:00
maul.esel
2792e1e427 fix indentation of test 2013-04-11 16:51:48 +02:00
maul.esel
0113fea7a1 Add tests for using custom excerpt 2013-04-11 14:26:20 +02:00
maul.esel
069e70d1b3 do not override custom excerpt set in YAML frontmatter
Fixes #933.
2013-04-11 14:25:47 +02:00
Alex Kessinger
1e209c9bf3 Upgrade --config to accept an array of files 2013-04-10 11:38:49 -07:00
Alex Kessinger
df1efeff25 Accept multiple config files from command line
Parse config as if it can contain multiple references to config files.
This allows you to pass in multiple config files from the command line

Helps with issues #514 and #703
2013-04-10 10:19:48 -07:00
Parker Moore
8446d6e8ad Update history to reflect merge of #413. 2013-04-10 01:58:06 +02:00
Parker Moore
abb8e5039e Merge pull request #413 from sethladd/master
add page variable to liquid custom tags and blocks
2013-04-09 16:54:20 -07:00
Parker Moore
1319b823f8 Release 1.0.0.beta4 2013-04-09 21:31:23 +02:00
Parker Moore
a715a8970b Update history to reflect merge of #942 2013-04-09 21:25:16 +02:00
Parker Moore
b7646cc9ca Merge pull request #942 from mojombo/pagination-paths
Add paginator.previous_page_path and paginator.next_page_path
2013-04-09 12:24:30 -07:00
Parker Moore
88f92729bc Use paginate_path and don't help too much 2013-04-09 21:00:27 +02:00
Parker Moore
c9a8a1b29f A bunch of pagination attributes will be nil if the subsequent/previous pages don't exist 2013-04-09 20:29:48 +02:00
Parker Moore
9c296f04a9 Join the path with baseurl in Pager.paginate_url 2013-04-09 20:26:08 +02:00
Parker Moore
b9e7a31ab8 Return nil if num_page is nil 2013-04-09 20:25:43 +02:00
Parker Moore
e5bf5aa09e Documentation for Pager.paginate_url 2013-04-09 20:25:33 +02:00
Parker Moore
102e29899f Add some docs regarding what the paginator exposes in liquid 2013-04-09 20:11:12 +02:00
Parker Moore
c0f50f2c78 Update docs to use paginator.{next,previous}_page_path 2013-04-09 19:51:26 +02:00
Parker Moore
b10939912f Add paginator.previous_page_path and paginator.next_page_path 2013-04-09 19:48:41 +02:00
Parker Moore
fd82635868 Merge pull request #941 from dracula2000/refactor-features
Remove superfluous references to File#close
2013-04-09 03:17:29 -07:00
Brian Kim
c9b03991f8 Remove superfluous references to File#close 2013-04-08 17:08:17 -04:00
Parker Moore
1b8c955446 Merge pull request #939 from jroes/patch-1
Link to LICENSE
2013-04-08 06:57:02 -07:00
Jonathan Roes
6dcf3ad265 Link to LICENSE 2013-04-08 09:47:30 -04:00
Parker Moore
59040b84db Update history to reflect merge of #938 2013-04-08 15:41:34 +02:00
Parker Moore
5f8895dc5f Merge pull request #938 from maul-esel/restrict-cucumber
exclude cucumber 1.2.4
2013-04-08 06:39:50 -07:00
maul.esel
439278fc2c exclude cucumber 1.2.4 2013-04-08 13:25:47 +02:00
Tom Preston-Werner
fbbcf78a99 Update GH Pages docs for github.io change. 2013-04-07 15:33:21 -07:00
Parker Moore
7d71650b4c Update history to reflect merge of #935 2013-04-08 00:20:59 +02:00
Parker Moore
b667a6a1a8 Merge pull request #935 from mojombo/baseurl-normalization
Fix cascade problem with site.baseurl.
2013-04-07 15:19:23 -07:00
Parker Moore
dbb3dd3a1a Move port and host configuration options to Jekyll::DEFAULTS so Commander doesn't override in serving awkwardly. 2013-04-07 23:55:04 +02:00
Parker Moore
90366941a2 Update history to reflect merge of #928 2013-04-07 22:53:56 +02:00
Parker Moore
8bf55ef8fa Merge pull request #928 from danieldriver/ordinal_date
add ordinal date permalink style (/YYYY/DDD/slug.html)
2013-04-07 13:52:30 -07:00
Parker Moore
1526aa3b1d Fix cascade problem with site.baseurl. Fixes #931. 2013-04-07 22:47:55 +02:00
Parker Moore
5fe31bcbca Update history to reflect merge of #934. 2013-04-07 22:39:53 +02:00
Parker Moore
659ad36329 Merge pull request #934 from mojombo/auto-to-watch
Backwards-compatibility for 'auto'
2013-04-07 13:38:42 -07:00
Parker Moore
ae462afb76 Backwards-compatibility for 'auto'. Fixes #821. 2013-04-07 22:29:30 +02:00
Parker Moore
b5d1b4e344 Update history to reflect merge of #918 2013-04-07 22:22:05 +02:00
Parker Moore
3e968ad14f Merge pull request #918 from mojombo/awesome-docs
Clean up site docs to prepare for 1.0 release.
2013-04-07 13:20:03 -07:00
Parker Moore
b1c0f90d36 Update history to reflect merge of #875 2013-04-07 21:56:28 +02:00
Parker Moore
0f2c9d29ee Merge pull request #875 from mojombo/posts-cant-be-dirs
Directories with valid post names should be filtered out
2013-04-07 12:54:42 -07:00
Parker Moore
ccf9d19aea Update history to reflect merge of #892. 2013-04-07 21:44:49 +02:00
Parker Moore
7b36d26240 Merge pull request #892 from rafaelrosafu/master
Added date_to_rfc822 used on RSS feeds
2013-04-07 12:43:50 -07:00
Tom Preston-Werner
e427e82785 Clarify config option docs for problem in #858. 2013-04-07 11:39:43 -07:00
Tom Preston-Werner
565e815354 Fixes for @parkr comments. 2013-04-06 23:14:03 -07:00
Daniel Driver
ea753130e6 add ordinal date permalink style (/YYYY/DDD/slug.html) 2013-04-06 08:17:02 -04:00
Parker Moore
7376d66af2 Upgrade pygments.rb to 0.4.2. Fixes #927 2013-04-05 19:04:10 +02:00
Parker Moore
464ea6e90c Update history to reflect merge of #890 2013-04-05 18:48:08 +02:00
Parker Moore
483a0b68b6 Merge pull request #890 from zachgersh/abbreviated_month
Added abbreviated month + test.
2013-04-05 09:44:50 -07:00
Parker Moore
8e18df5b09 Merge pull request #921 from tombell/patch-1
Remove pygments as a dependency
2013-04-05 09:40:39 -07:00
Coby Chapple
972b67cad7 more robust header responsivityishness 2013-04-05 11:20:41 +01:00
Coby Chapple
077deb2435 go back to thirds, for the header on tablets and above 2013-04-05 11:20:02 +01:00
Coby Chapple
aa6bc7dae9 change header grid so the nav doesn’t look so squished 2013-04-04 20:50:00 +01:00
Coby Chapple
7fa4633c00 monospace type tweaks 2013-04-04 18:15:33 +01:00
Coby Chapple
65eadd4172 💄 prettier diff 2013-04-04 18:11:57 +01:00
Coby Chapple
91e66310c3 add code highlighting stuff back in 2013-04-04 18:09:18 +01:00
Coby Chapple
a765b75b5e some polish for the docs nav/content responsiveness 2013-04-04 18:05:03 +01:00
Coby Chapple
f583e4fbb5 some simple js to switch location using the dropdown on mobiles 2013-04-04 17:30:41 +01:00
Coby Chapple
780472ff55 not sure wtf happened here 2013-04-04 17:01:10 +01:00
Coby Chapple
258df5146c add a dropdown for navigating docs on mobiles 2013-04-04 16:51:43 +01:00
Coby Chapple
6270ae0d33 derp we need one of these 2013-04-04 16:51:26 +01:00
Coby Chapple
662bc3b5ac start working docs styles back in 2013-04-04 16:51:18 +01:00
Coby Chapple
68e82a1cac twerk the github pages section a bit so it mostly works 2013-04-04 16:28:25 +01:00
Coby Chapple
f98482d0fa retinafy octojekyll 2013-04-04 16:28:08 +01:00
Parker Moore
6782ac9ef5 Release 1.0.0.beta3 2013-04-04 16:15:02 +02:00
Parker Moore
28097a9ebb Updated version to 1.0.0.beta3. 2013-04-04 16:14:54 +02:00
Coby Chapple
8354ef1960 Merge remote-tracking branch 'mojombo/master' into responsify 2013-04-04 15:11:23 +01:00
Coby Chapple
95672bac99 some polish for the quick-start instructions section 2013-04-04 15:10:55 +01:00
Coby Chapple
fbfe891295 finally style the mobile nav items a bit more consistently 2013-04-04 14:49:30 +01:00
Coby Chapple
0abc3dc975 don’t cut off the edges of the logo 2013-04-04 14:30:02 +01:00
Tom Bell
608088105c Remove pygments as a dependency
Pygments is bundled in pygments.rb it's no longer required
to be installed by the user.
2013-04-04 10:09:11 +02:00
Parker Moore
d3e92183fd Update history to reflect merge of #909. 2013-04-03 23:11:40 +02:00
Parker Moore
cf461ea1a5 Merge pull request #909 from x3ro/symlinked-static-files
Fix symlinked static files not being correctly built in unsafe mode
2013-04-03 14:10:35 -07:00
Matt Rogers
8316e1da4a Add a URL for Drupal 2013-04-03 14:10:24 -05:00
Matt Rogers
3b39a2a00c Highlight “localhost” as code in the migration docs 2013-04-03 14:09:00 -05:00
Matt Rogers
bdcc50d3c7 Fix up a few places where words were missing.
This makes the text sound better when I read it out loud.
2013-04-03 14:06:38 -05:00
Matt Rogers
d6d04573da Remove an unnecesary word. 2013-04-03 13:48:13 -05:00
Tom Preston-Werner
17bb13a686 Clean up site docs to prepare for 1.0 release. 2013-04-03 19:06:05 +02:00
Parker Moore
cf393cb862 Using directory_watcher 1.4.1.
1.5.1 has issues on ubuntu.
#916.
2013-04-03 19:03:25 +02:00
Parker Moore
5f7b9b8504 Merge pull request #916 from AlexanderEkdahl/directory_pre_load
Preloads directory_watcher glob
2013-04-03 09:52:36 -07:00
Parker Moore
e0a1bbe6e5 Update history to reflect inclusion of fix from #916. 2013-04-03 00:59:25 +02:00
Alexander Ekdahl
91197a1928 Fixes for directory_watcher 1.5.x integration. Closes #916. 2013-04-03 00:58:25 +02:00
Parker Moore
050bcbf6d1 Merge pull request #913 from dracula2000/master
Add code climate badge to README
2013-04-02 15:45:41 -07:00
Alexander Ekdahl
8810dc6479 Preloads directory_watcher glob 2013-04-02 17:46:07 +02:00
Brian Kim
d1de9e29d1 Add code climate badge to README 2013-04-01 16:42:53 -04:00
Parker Moore
6c6c576098 Update history to reflect merge of #910. 2013-04-01 20:03:33 +02:00
Parker Moore
791fa3ea7d Merge pull request #910 from x3ro/fix-import-command-parameters
Fix import command parameters
2013-04-01 11:02:20 -07:00
Lucas Jenss
571bdd686c Move tests for symlinked files to separate test cases 2013-04-01 12:02:15 +02:00
Lucas Jenss
88bd349ca9 Fix import command parameters
Apparently, the Commander gem treats options as boolean values
when one does not indicate that a certain options is followed
by a string. This led to the jekyll-import gem only receiving
booleans instead of dbname/user/pwd...
2013-03-31 22:49:07 +02:00
Lucas Jenss
2c7325223f Fix symlinked assets not being included, even in unsafe mode 2013-03-31 20:49:43 +02:00
Lucas Jenss
0bebe0f31c Add test for processing of symlinked static files and pages 2013-03-31 20:20:15 +02:00
Johan Sellström
8d1b6720c3 Added pkpass to the list 2013-03-31 18:22:41 +03:00
Rafael Rosa Fu
7879d2e02c Fixed expected output from xmlschema and rfc822 2013-03-29 01:07:47 -04:00
zachgersh
e931414b77 Changed to short_month and re-ran tests. 2013-03-27 08:40:58 -07:00
Rafael Rosa Fu
186b68adb0 Added filter date_to_rfc822
According to the W3C RSS Feed Validator, feeds must format dates as described
on RFC-822 to be valid. Refer to their site to get more info:
http://feedvalidator.org/docs/error/InvalidRFC2822Date.html

I also added a couple of missing unit tests to the other date filters
2013-03-27 02:21:48 -04:00
zachgersh
6657f2add9 Added abbreviated month + test. 2013-03-26 23:06:34 -07:00
Parker Moore
58f64e8269 Merge pull request #885 from mattr-/remove-unused-code
Remove unused code
2013-03-26 04:11:30 -07:00
Matt Rogers
fa39a97bc6 Remove unused code 2013-03-25 21:22:42 -05:00
Parker Moore
0520ecb3c4 Update history to reflect merge of #883 2013-03-25 19:01:57 +01:00
Parker Moore
51e130bb79 Force usage of older directory_watcher gem as 1.5 is broken. #883 2013-03-25 19:01:28 +01:00
Aleksey V. Zapparov
196e26b580 Flatten tags and categories lists. Fixes #741. 2013-03-19 23:16:53 +01:00
Parker Moore
0353733455 @mojombo and I are sick of Travis emails. 2013-03-19 22:38:58 +01:00
Parker Moore
a72cdc9293 Auto-regeneration fails loudly. Fixes #470. 2013-03-19 22:31:37 +01:00
Parker Moore
d6e0e5e297 Syncing STDOUT. Fixes #625. 2013-03-19 22:22:46 +01:00
Parker Moore
8f890cb064 Fix tests that fail due to having a directory that looks like a post 2013-03-19 21:59:43 +01:00
Parker Moore
6f6ad001d2 Ignore entries if they are directories. 2013-03-19 21:59:06 +01:00
Parker Moore
787d68f512 Release 1.0.0.beta2 2013-03-19 00:11:33 +01:00
Parker Moore
de8f0c986c Update version for 1.0.0.beta2. 2013-03-19 00:08:56 +01:00
Parker Moore
51ec073e34 Add 0.12.1 release notes to History.txt in master. #866 2013-03-18 18:32:50 +01:00
Parker Moore
c1f309d2d7 Update history to reflect merge of #872. Closes #842. 2013-03-18 00:00:48 +01:00
Parker Moore
b83d0a3fa5 Merge pull request #872 from mojombo/downcase-post-cats
Ensure all Post categories are downcase
2013-03-17 15:59:25 -07:00
Parker Moore
73ca35ee81 Ensure all categories are downcase. Fix for #842. 2013-03-17 23:43:37 +01:00
Parker Moore
9d814a4eb7 Add method String#force_encoding to 1.8.7 2013-03-17 23:35:46 +01:00
Parker Moore
e3192792cd Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Added note to highlight common pitfall/misconception regarding Pagination's capabilities.
2013-03-17 22:31:50 +01:00
Parker Moore
036fce8799 Update history to reflect merge of #555. Closes #555. 2013-03-17 22:29:50 +01:00
Dave Wasmer
f7f64576e5 Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors 2013-03-17 22:28:52 +01:00
Parker Moore
dd7cf6511e Merge pull request #853 from davecranwell/master
Pagination can't be filtered by tag or category, but this isn't clear and is often found out too late by an implementer
2013-03-17 14:24:57 -07:00
Parker Moore
677a87e437 Update history to reflect #861 2013-03-17 21:34:35 +01:00
Parker Moore
a054ce2788 Merge pull request #861 from danielgrieve/gist-tag
display single files from gist
2013-03-17 13:33:10 -07:00
Parker Moore
309e03b1d3 Update history to reflect merge of #871. 2013-03-17 21:31:30 +01:00
Parker Moore
7ba5a27a74 Merge pull request #871 from mojombo/gh-pages-mime-types
Use GH Pages MIME types.
2013-03-17 13:22:51 -07:00
Parker Moore
4400e89898 Expect a 'baseurl' to be passed in to Site 2013-03-17 21:18:45 +01:00
Parker Moore
0765d07730 Added sanity tests for #869. 2013-03-17 21:15:17 +01:00
Tom Preston-Werner
8c6c33a6c8 Use GH Pages MIME types. 2013-03-17 13:14:35 -07:00
Parker Moore
ee697a6308 Add Jekyll::DEFAULTS['baseurl'] and set the default pygments option to _true_ 2013-03-17 21:09:58 +01:00
Parker Moore
92a2a9ff61 Update gemspec so bundler doesn't complain. 2013-03-17 21:07:27 +01:00
Parker Moore
69edec8559 Update history to reflect merge of #869. 2013-03-17 20:54:52 +01:00
Parker Moore
ebcf3eb385 Merge pull request #869 from mojombo/baseurl-in-liquid
Expose site.baseurl to Liquid templates.
2013-03-17 12:53:27 -07:00
Parker Moore
b3c319743c Update history to reflect merge of #862. 2013-03-17 20:49:58 +01:00
Parker Moore
6c1a08ce87 Merge pull request #862 from mojombo/fix-autogen-dest-prob
Stop DirectoryWatcher from watching the destination directory
2013-03-17 12:48:30 -07:00
Parker Moore
d5ed4fc5d0 Add baseurl to Site attr_accessor list. 2013-03-17 20:42:11 +01:00
Parker Moore
eef13d7d43 Expose site.baseurl to Liquid templates. 2013-03-17 17:26:33 +01:00
Daniel Grieve
b9cbce5e5f fix regex 2013-03-17 15:04:03 +00:00
Parker Moore
88f59c6154 Update history to reflect merge of #837. 2013-03-17 15:54:47 +01:00
Parker Moore
936ed1f849 Merge pull request #837 from ixti/feature-excerpt
Adds excerpt to posts
2013-03-17 07:53:41 -07:00
Parker Moore
43213c2e79 Update history to reflect merge of #764 2013-03-17 15:50:01 +01:00
Parker Moore
e2d0697f30 Merge pull request #764 from mojombo/jekyll-new
`jekyll new`: scaffold site generator
2013-03-17 07:47:56 -07:00
Parker Moore
a15e0c811b Remove git poop. 2013-03-17 15:47:26 +01:00
Parker Moore
9726bd625d Whitespace issue in bin/jekyll 2013-03-17 15:46:46 +01:00
Parker Moore
aa7a234c18 Merge master into jekyll-new 2013-03-17 15:45:37 +01:00
Aleksey V Zapparov
66c5ef2556 Fix typos and remove some obtrusive code 2013-03-17 13:42:46 +01:00
Daniel Grieve
22d1fdab54 tie down the regex match on gist filenames 2013-03-17 11:29:42 +00:00
Parker Moore
9ae7ca008b Update history to reflect merge of #723. 2013-03-16 21:21:13 +01:00
paco
23a01e7766 Patch for multibyte URI problem. Closes #723. 2013-03-16 21:20:11 +01:00
Daniel Grieve
6c5d001986 replace \s with space 2013-03-16 19:20:54 +00:00
Parker Moore
df7b9f4f01 Update history to reflect merge of #864. 2013-03-16 20:11:11 +01:00
Parker Moore
5d34a4c533 Merge pull request #864 from mojombo/prioritize_plugins
Prioritize plugins & DRY subclass instantiation
2013-03-16 12:09:43 -07:00
Parker Moore
bdc3d67799 Update history to reflect merge of #863 2013-03-16 20:09:22 +01:00
Parker Moore
d091cfe3fc Merge pull request #863 from mojombo/accept-custom-config
Accept custom configuration
2013-03-16 12:07:31 -07:00
Parker Moore
39f144ed01 Newline. 2013-03-16 20:06:50 +01:00
Parker Moore
1d05e0be81 Added tests for generators. 2013-03-16 20:06:40 +01:00
Tommy Sullivan
caa6a4ebfd Sort instantiated subclasses in Site. 2013-03-16 15:24:34 +01:00
Matt Rogers
10ee5c8999 Remove the duplication when creating Converters and Generators
Encapsulate it in a method and give the method the class to walk the
subclass tree for to create new objects.
2013-03-16 15:20:11 +01:00
Tommy Sullivan
7425b2c32e Add test to ensure plugins are executed in order of priority. 2013-03-16 15:12:57 +01:00
Parker Moore
7a57451962 Add --config switch to build and serve commands. 2013-03-16 14:54:44 +01:00
Parker Moore
9100967ebd Add unit tests for custom configuration. 2013-03-16 14:46:26 +01:00
Parker Moore
7e1100962c Load in config from --config switch 2013-03-16 14:44:49 +01:00
Parker Moore
8acb1b29bd Using 1.8.7-compliant File.expand_path instead of >1.9 File.realpath 2013-03-16 14:24:34 +01:00
Parker Moore
52efb71aa2 Added directory_with_contents() to DRY up test code and ensure folders exist in TestCommand. 2013-03-16 14:09:53 +01:00
Parker Moore
d93faac3b8 Rudimentary tests for Jekyll::Command 2013-03-16 13:59:59 +01:00
Parker Moore
a0c0d983bf Using a test_dir helper method for tests. 2013-03-16 13:59:40 +01:00
Parker Moore
1d920f52f1 Fix bug where Command.globs didn't delete the destination directory.
There was often a mix between absolute and relative paths and in the
previous version, the destination argument was usually an absolute
path where the glob array (from Dir['*']) was a relative path.
2013-03-16 13:57:28 +01:00
Parker Moore
b49bba9351 Renamed test under wrong name. 2013-03-16 13:15:15 +01:00
Daniel Grieve
92d9c4301b display single files from gist 2013-03-15 22:37:14 +00:00
Coby Chapple
6e831b65d2 basic grid section for gh-pages section 2013-03-15 15:29:45 +00:00
Coby Chapple
bd63042582 start bringing the quickstart instruction section back in too 2013-03-15 15:24:14 +00:00
Coby Chapple
e23f0d126d start working intro into the equation 2013-03-15 13:38:51 +00:00
Coby Chapple
7dcc0ba820 start spiking out a more responsive header/nav 2013-03-15 13:25:35 +00:00
Coby Chapple
02785d09a9 more footer tweaks 2013-03-15 12:47:57 +00:00
Coby Chapple
0249c5b901 how was did this not being retina-ready slip by before? 2013-03-15 12:47:45 +00:00
Coby Chapple
6d19924d35 start ripping this thing apart so it can be responsive 2013-03-15 12:34:13 +00:00
Parker Moore
bc673722d6 Release 1.0.0.beta1 2013-03-14 21:26:42 +01:00
Parker Moore
5c35a84662 Updated version and gemspec to reflect 1.0.0.beta1 release 2013-03-14 21:26:06 +01:00
Parker Moore
7ba7328d47 Release 1.0.0.pre 2013-03-14 21:23:53 +01:00
Parker Moore
dbc356f9f4 Bump version to 1.0.0.pre. 2013-03-14 21:23:34 +01:00
Parker Moore
5bde4a3131 Merge pull request #856 from danielgrieve/jekyll-new
Jekyll 'new' command fixes
2013-03-13 16:05:15 -07:00
Daniel Grieve
5bcc2fd8f9 update safe_yaml 2013-03-13 21:57:08 +00:00
Daniel Grieve
4be5dfdb9a fix copying of site template files 2013-03-13 21:27:41 +00:00
Daniel Grieve
1ab83ff9e9 fix test to highlight issue with FileUtils.cp_r 2013-03-13 19:55:15 +00:00
Parker Moore
98b37a54b1 Merge pull request #855 from danielgrieve/remove-ruby-version
ignore .ruby-version
2013-03-13 12:24:45 -07:00
Daniel Grieve
099fcc27d6 raise ArgumentError if no args. rename sample post 2013-03-13 19:21:11 +00:00
Daniel Grieve
e8b8234898 ignore .ruby-version 2013-03-13 18:47:07 +00:00
Daniel Grieve
b306835ce0 Add tests for 'new' command. 2013-03-12 19:38:05 +01:00
Parker Moore
74def64bef Merge pull request #851 from jroes/jekyll-new
Make `jekyll new` work when installed via `gem install`
2013-03-12 11:34:08 -07:00
Parker Moore
df9964c3b5 Merge pull request #838 from mattr-/dedupe-entry-generation
Remove code duplication during site generation
2013-03-12 11:27:56 -07:00
Parker Moore
2053a8fa8c Update history to reflect merge of #847 2013-03-12 19:07:51 +01:00
Parker Moore
2473bdbd7c Merge pull request #847 from mojombo/mime_file
Load in Apache MIME Types
2013-03-12 11:06:26 -07:00
Dave Cranwell
a6f3c4f1cd Added note to highlight common pitfall/misconception regarding Pagination's capabilities. 2013-03-12 15:21:56 +00:00
Jonathan Roes
7a86d901f1 Refactor Commands::New a bit and remove scaffold post once copied. 2013-03-12 00:48:22 -04:00
Jonathan Roes
b71ec624f8 Add commands/new and scaffold post to gemspec so they get copied over. 2013-03-12 00:47:42 -04:00
Parker Moore
4e794a73e0 Merge pull request #829 from stomar/patch-1
Update Readme to link to the Plugins wiki page
2013-03-11 14:17:37 -07:00
Parker Moore
8886727bd8 Requiring safe_yaml ~> 0.7.0 because 0.8.x has weird bugs. 2013-03-11 22:17:19 +01:00
Marcus Stollsteimer
605332cc05 Fix link in Readme 2013-03-11 20:34:34 +01:00
Parker Moore
005f58c900 Update history to reflect merge of #536 2013-03-10 02:09:15 +01:00
Parker Moore
725b127f9b Merge pull request #536 from fotos/fix_page_dir
Added path in url.
2013-03-09 17:07:16 -08:00
Fotos Georgiadis
f79662719b Fix indentation. 2013-03-09 15:07:27 +02:00
Parker Moore
524aa1f36a Jekyll::Commands::Serve reads in mime.types file. 2013-03-08 20:12:52 +01:00
Parker Moore
5e6c2f6e4b Added mime.types file from Apache SVN repo. 2013-03-08 20:12:21 +01:00
Matt Rogers
6399ec9b2b Remove duplication when aggregating post information 2013-03-05 19:11:07 -06:00
Matt Rogers
2dd98816d4 Remove duplication when generating list of entries to process
Posts and Drafts share the same logic to get the list of files to
process into objects when generating the site. Factor this logic into
its own method and use it when reading posts and reading drafts.
2013-03-05 19:06:20 -06:00
Aleksey V Zapparov
22dcc4e20f Adds excerpt to posts 2013-03-04 17:13:25 +01:00
Parker Moore
5dea057db7 Merge pull request #835 from larrylv/fix-typo
Fix typo.
2013-03-04 02:47:07 -08:00
larrylv
035bbdf99f Fix typo. 2013-03-04 14:59:34 +08:00
Tom Preston-Werner
3a9ca0a796 Merge branch 'drafts-fixup'
Add a drafts feature. This allows you to place draft posts into an _drafts
folder in the site root while you're working on them, and then request that
they be rendered as normal posts via a command line switch.

Draft files should be named just like normal posts, except they must not
contain the date prefix. When you're ready to make a post live, rename it
with the date and move it to the proper place.

To preview your drafts, run Jekyll with the `--drafts` switch. This will
render all the posts with a date corresponding to the last time the file
was modified.
2013-03-03 18:57:36 -08:00
Tom Preston-Werner
da273b685a Update history for drafts feature. 2013-03-03 18:55:50 -08:00
Tom Preston-Werner
b46000f6af Kill unnecessary return keyword. 2013-03-03 18:43:54 -08:00
Parker Moore
0d3ea5b710 Forgot to escape newlines. 2013-03-04 03:41:18 +01:00
Parker Moore
ee057a99a7 Update history to reflect merge of #832. 2013-03-04 03:24:26 +01:00
Parker Moore
968ca6967c Merge pull request #832 from mojombo/features-html
Add rake features:html
2013-03-03 18:23:12 -08:00
Tom Preston-Werner
2b9b613687 Normalize CLI options to match configuration expectations. 2013-03-03 18:23:02 -08:00
Parker Moore
5af8e1f40c Applying a more 'Ruby' style to post_url.rb 2013-03-04 03:20:59 +01:00
Parker Moore
800bd290ec Update history to reflect merge of #831 2013-03-04 03:19:57 +01:00
Parker Moore
e98053ea8a Merge pull request #831 from dhilgarth/feature/fix_post_url
Fix broken post_url with posts with a time in their YAML front matter.
2013-03-03 18:17:24 -08:00
Parker Moore
6cef28ed58 Add features:html task to Rakefile, use cucumber profiles 2013-03-04 03:13:06 +01:00
Parker Moore
a4e37c9d0a Change default format to pretty and create travis profile 2013-03-04 03:12:31 +01:00
Tom Preston-Werner
ef9388684b Turn off debug mode on feature to suppress output. 2013-03-03 18:04:31 -08:00
Tom Preston-Werner
4caf613be8 Merge branch 'drafts' of https://github.com/scribu/jekyll into scribu-drafts 2013-03-03 12:57:55 -08:00
Tom Preston-Werner
197f52b0e6 Fix jekyll-import LoadError message. 2013-03-03 12:51:25 -08:00
Daniel Hilgarth
87f6f8c971 Fix invalid ordering of posts published on the same day and move post_url specific comparison of posts where it belongs: Into post_url 2013-03-03 15:36:16 +01:00
Daniel Hilgarth
ce8e1afba6 Add support for Ruby < 1.9 2013-03-03 15:12:21 +01:00
Daniel Hilgarth
cc83501489 Fix broken post_url with posts with a time in their YAML front matter. 2013-03-03 14:56:18 +01:00
scribu
1a351284ca rename get_base() to containing_dir() 2013-03-03 12:56:12 +02:00
Parker Moore
17c875f6f5 Fixed plugin test error. 2013-03-02 18:51:42 +01:00
Marcus Stollsteimer
053373de27 Update Readme to link to the Plugins wiki page 2013-03-02 13:00:37 +01:00
Parker Moore
7258b10f88 We don't need YAML in the new command. 2013-02-28 22:19:38 +01:00
Parker Moore
149b95d767 Typos in sample post. 2013-02-28 22:17:24 +01:00
Parker Moore
5c788582a8 Update history to reflect merge of #826. 2013-02-28 21:57:01 +01:00
Parker Moore
e827797440 Merge pull request #826 from chapmajs/patch-1
Explicitly require HTTPS rubygems source
2013-02-28 12:55:56 -08:00
Fotos Georgiadis
441eddf1ca Fix pretty url style paths.
Ignore the basename if the page is an index page, preserve it if it's just an
html page and use the full path in every other case.
2013-02-28 03:49:39 +02:00
chapmajs
3a34957b41 Explicitly require HTTPS rubygems source
Use HTTPS rubygems.org source to help prevent MITM attacks
2013-02-27 20:28:09 -05:00
Parker Moore
c648bc1157 Update history to reflect merge of #785. 2013-02-27 01:59:36 +01:00
Parker Moore
bd9a112ff1 Merge pull request #785 from lenniboy/master
Improve debugability of error message for a malformed highlight tag
2013-02-26 16:58:36 -08:00
Parker Moore
3fbb615d19 Update history to reflect merge of #824. 2013-02-27 01:56:06 +01:00
Parker Moore
63d0eef646 Merge pull request #824 from sinamt/symlinked_folders
Allow symlinked folders in unsafe mode (with tests). Closes #796, resolves #233.
2013-02-26 16:54:52 -08:00
Paul Leitmanis
849c34e913 Add tests for filtering symlink entries when safe mode enabled 2013-02-27 10:39:46 +11:00
Parker Moore
3253e4132e Update history to reflect merge of #654 2013-02-26 21:35:48 +01:00
Parker Moore
465e25021b Merge pull request #654 from mattr-/issue-653
Look for plugins under the source directory. Fixes #653.
2013-02-26 12:34:11 -08:00
Matt Rogers
d58859570d Fix up the whitespace.
Remove an extra blank line and fix another whitespace error pointed out
by git diff
2013-02-25 13:24:37 -06:00
Matt Rogers
5a9c20983d Rename setup_plugins to plugins_path 2013-02-25 13:20:32 -06:00
Matt Rogers
ffc42310b4 Add back a test that was mistakenly removed. 2013-02-25 13:19:45 -06:00
Matt Rogers
d2c79a8841 Merge branch 'master' into issue-653 2013-02-25 13:08:23 -06:00
Parker Moore
83675ee095 Updated history to reflect merge of #822. 2013-02-24 02:01:10 +01:00
Parker Moore
e0870fa178 Merge pull request #822 from mojombo/gist-tag
Add 'gist' liquid tag to master
2013-02-23 16:59:53 -08:00
Parker Moore
f8a90d711f Using https protocol instead of http. 2013-02-24 01:54:13 +01:00
Parker Moore
cdd3c0ef0c Remove 'type' attribute from script tag in gist liquid tag. 2013-02-24 01:30:41 +01:00
Parker Moore
7e7cee6e56 Strip space from the gist number, add test for gist tag 2013-02-24 00:58:13 +01:00
sterebooster
425f466842 'gist' liquid tag by @stereobooster. Fixes #463. 2013-02-24 00:38:19 +01:00
Parker Moore
cc0f84197a Updated history to reflect merge of #820. 2013-02-22 14:20:05 +01:00
Parker Moore
f2299a2bf5 Merge pull request #820 from mojombo/fix-autoregen-loop
Fix issue with watching (auto-regeneration) continuously running
2013-02-22 05:19:11 -08:00
Parker Moore
7457cbae25 Fix issue with watching (auto-regeneration) continuously running if destination is not '_site'. #457. 2013-02-22 00:59:44 +01:00
Parker Moore
a22527c7ff Update history to reflect merge of #795. Fixes #790. 2013-02-20 23:16:56 +01:00
Parker Moore
02da17b769 Merge pull request #795 from mojombo/new-log-format
New log format
2013-02-20 14:15:36 -08:00
Parker Moore
db5d27639e Fixed merge conflicts: rebasing on master. 2013-02-20 23:14:58 +01:00
Parker Moore
a19bb1815a Fixed merge conflicts in test/test_configuration.rb 2013-02-20 23:13:06 +01:00
Parker Moore
5d8e012899 Fixed merge with new log output in lib/jekyll.rb 2013-02-20 23:10:42 +01:00
Parker Moore
9eb79ff135 Improved output for auto-regeneration. 2013-02-20 23:09:54 +01:00
Parker Moore
bf79b0ac37 Fixed merge with new log output in lib/jekyll.rb 2013-02-20 23:09:34 +01:00
Parker Moore
388e0c8077 Fixed typo in History file 2013-02-20 22:15:23 +01:00
Parker Moore
090bbbe4f6 Update history to reflect merge of #788. 2013-02-20 22:15:03 +01:00
Parker Moore
c042a77496 Merge pull request #788 from mojombo/add-opts
Add 2 opts back into bin/jekyll
2013-02-20 13:13:42 -08:00
Parker Moore
d0d947995a Update history to reflect merge of #815. 2013-02-20 22:01:12 +01:00
Parker Moore
3b156d21af Merge pull request #815 from bhardin/fixing_help
Changing help message to reflect what actually happens
2013-02-20 12:17:19 -08:00
Brett Hardin
03e2e8d063 Changing help message to reflect what actually happens when running build and serve 2013-02-20 09:37:19 -08:00
Parker Moore
151ec1a487 Update history to reflect merge of #807. 2013-02-19 12:02:10 +01:00
Parker Moore
d361a70391 Merge pull request #807 from mojombo/safeyaml-warnings
Fix SafeYAML Warnings
2013-02-19 03:01:27 -08:00
Parker Moore
ac8c7a0944 Relax Kramdown version to 0.14. Fixes #808. 2013-02-19 02:38:18 +01:00
Parker Moore
35c3ef05bf Update history to reflect merge of #801. 2013-02-10 21:38:02 +01:00
Parker Moore
ac502d175a Merge pull request #801 from kevinSuttle/master
Bump .ruby-version to 1.9.3-p374
2013-02-10 12:36:38 -08:00
Parker Moore
c7c0a9432c Updating tests for safe_yaml. 2013-02-10 19:09:36 +01:00
Parker Moore
11eb1ecae1 Safe loading of files and YAML. 2013-02-10 19:07:38 +01:00
Parker Moore
0c6d56365a Upgrading to safe_yaml v0.7 2013-02-10 19:07:05 +01:00
Parker Moore
382b1b5a11 Updated History to reflect merge of #806 2013-02-10 17:06:46 +01:00
Parker Moore
78c37180f2 Merge pull request #806 from scribu/patch-1
Explicitly mention defacto styleguide
2013-02-10 08:05:32 -08:00
Cristi Burcă
311bcbb7ed mention styleguide to new contributors 2013-02-10 17:19:22 +02:00
scribu
538c2086a5 whitespace fixes 2013-02-10 04:49:27 +02:00
scribu
3e164d6daf don't check if draft is published or if its date is in the future 2013-02-09 23:48:38 +02:00
scribu
2588d681c9 fix draft filename processing 2013-02-09 23:38:13 +02:00
scribu
78831d94cd don't mess with dir parameter 2013-02-09 23:19:35 +02:00
scribu
642349f797 implement and use Draft.valid? 2013-02-09 22:41:47 +02:00
scribu
1ac46b17c4 Don't require date in draft filenames. 2013-02-09 21:35:41 +02:00
Parker Moore
372628c22a Merge pull request #799 from apodlaski/remove-migrators-from-gemspec
Remove migrator files from jekyll.gemspec
2013-02-07 14:36:05 -08:00
Kevin Suttle
b4c5d707a5 Bump .ruby-version to 1.9.3-p374 2013-02-07 15:19:33 -05:00
Aleksander Podlaski
fae771d1a0 Remove migrator files from jekyll.gemspec
Some files no longer exists but was not removed from jekyll.gemspec:
- lib/jekyll/commands/migrate.rb 
- lib/jekyll/migrators/*.rb
2013-02-07 07:21:55 +01:00
Parker Moore
8e48848b7a Removed migrate tasks from Rakefile. 2013-02-07 00:42:37 +01:00
Alexander Ekdahl
4cd7c22ee7 Now uses the more semantically correct AND operator 2013-02-04 22:17:03 +01:00
Alexander Ekdahl
7512e6bb66 Allow symlinked folders in unsafe mode 2013-02-04 17:16:01 +01:00
Parker Moore
a3d95957dd Updating tests for new config output. 2013-02-03 21:31:05 +01:00
Parker Moore
f6d38def5a Reworking errors with configuration file. 2013-02-03 21:30:52 +01:00
Parker Moore
90fa3f2921 Improved output for auto-regeneration. 2013-02-03 20:36:34 +01:00
Parker Moore
dd7c5870d9 Cleaner output when generating site. 2013-02-03 20:29:58 +01:00
Parker Moore
e4042e56b7 Update history to reflect merge of #792. Closes #789. 2013-02-03 18:56:42 +01:00
Parker Moore
f002ee4f9f Merge pull request #792 from mojombo/alias-serve-to-server
Aliased jekyll server to jekyll serve
2013-02-03 09:55:14 -08:00
Parker Moore
7a44965c88 Updated history to reflect merge of #793. Closes #787. 2013-02-03 01:54:52 +01:00
Parker Moore
9ea1becf13 Merge pull request #793 from mojombo/remove-migrators
Remove migrators - move to jekyll-import gem.
2013-02-02 16:34:07 -08:00
Parker Moore
f5137850e4 Using abort instead of puts & exit when jekyll-import gem isn't available. 2013-02-03 01:24:38 +01:00
scribu
daa9e11994 fix whitespace in drafts.feature 2013-01-31 05:35:19 +02:00
Parker Moore
9bb0bfc0b2 Eliminating migrator tests (in this repo). 2013-01-31 01:19:56 +01:00
Parker Moore
e8384e6a97 Eliminating migrator dependencies. 2013-01-31 01:19:34 +01:00
Parker Moore
82f29bb627 The jekyll-import gem provides Jekyll::Commands::Import, not Jekyll::Commands::Migrate. 2013-01-31 00:18:54 +01:00
Parker Moore
28a074ff7a Remove Jekyll::Commands::Migrate 2013-01-31 00:18:22 +01:00
Parker Moore
b70c59667c Requiring jekyll-import gem. Printing error and exiting if it does not exist. 2013-01-30 23:43:26 +01:00
Parker Moore
221c2f4c0e Aliased jekyll server to jekyll serve 2013-01-30 23:30:04 +01:00
Parker Moore
2e73671cf4 Updated Kramdown tests to reflect numeral HTML entities. 2013-01-30 23:25:49 +01:00
Parker Moore
1cfd0c8b15 Updated history to reflect merging of #744. 2013-01-30 23:21:23 +01:00
Parker Moore
04b60ffe7f Merge pusewicz/bump-gems from #744 2013-01-30 23:20:23 +01:00
Parker Moore
62bba37c1f Update history to reflect merge of #768 2013-01-30 22:19:24 +01:00
Parker Moore
6e8202f9a6 Added in --limit-posts 2013-01-30 22:04:56 +01:00
Parker Moore
7023a5e622 Added the --future switch back to the CLI 2013-01-30 21:56:54 +01:00
Parker Moore
cff4ec72ea Using .erb file for the new post 2013-01-30 21:05:52 +01:00
Leonard Ehrenfried
a7f0d04bda Improve error message for malformed highlight tags 2013-01-29 12:16:33 +01:00
Parker Moore
704307d7fe Added very basic code snippet example to sample post 2013-01-27 23:30:32 +01:00
Parker Moore
bf78fe9b75 Move post scaffold content to a separate method. 2013-01-27 23:23:53 +01:00
Parker Moore
a68b67c65e Added newline to New command for stylistic congruence. 2013-01-27 23:21:31 +01:00
Parker Moore
ac691a1465 removed related posts segment of scaffold site. 2013-01-27 23:21:02 +01:00
Parker Moore
a8671ed52b Using modularized commands (Jekyll::Commands) as per @tombell's latest PR merge 2013-01-27 23:17:45 +01:00
Parker Moore
f3856a444a Added command to primary binary. 2013-01-27 23:16:34 +01:00
Parker Moore
2bc04e4a60 Added the site_template files to the gemspec manifest. 2013-01-27 23:16:34 +01:00
Parker Moore
272dd5ef35 Added the NewCommand class 2013-01-27 23:16:34 +01:00
Parker Moore
ce7e307cba Scaffold site, based on @mojombo's site (with permission). 2013-01-27 23:16:34 +01:00
Parker Moore
b4bea4a586 Merge branch 'code-cleanup' of git://github.com/tombell/jekyll into code-cleanup
Module Cleanup

* 'code-cleanup' of git://github.com/tombell/jekyll:
  Remove new lines between module and class
  Update tag classes moving into a module
  Update pagination classes moving into a module
  Update converter classes moving into a module
  Strip extra newlines
  Update command classes moving into a module

Conflicts:
	lib/jekyll/commands/serve.rb
2013-01-27 23:13:16 +01:00
Parker Moore
35165d19f8 Update history to reflect merge of #775. 2013-01-27 23:08:44 +01:00
Parker Moore
b736676904 Merge pull request #775 from metamatt/issue773
Address issue 773 (bugs preventing tumblr.rb from running)
2013-01-27 14:06:41 -08:00
Parker Moore
1d85664340 Update history to reflect merge of #767. 2013-01-26 22:35:13 +01:00
Parker Moore
409eedafd8 Merge pull request #767 from mojombo/string-categories
Force Categories to be Strings
2013-01-26 13:32:26 -08:00
Matt Ginzton
c95c5e3b7d Use Dir.pwd instead of "." as the source argument to Post.new, since
this has historically supplied an absolute path in this call.
2013-01-25 15:57:45 -08:00
Parker Moore
cd2f3b8dce Updated history to reflect merge of #777. 2013-01-25 17:23:40 +01:00
Parker Moore
4041579b70 Merge pull request #777 from mastahyeti/safe_yaml
Safe YAML
2013-01-25 08:22:10 -08:00
Parker Moore
2b8c85cd9d Reflect merge of #407 2013-01-25 06:22:35 +01:00
Jordon Bedwell
4f7881ba40 Add SVG support to Jekyll/Webrick. Fixes #406. 2013-01-25 06:20:07 +01:00
Parker Moore
2c76311ada Updated history to reflect merge of #776. 2013-01-25 06:06:33 +01:00
Parker Moore
130406a101 Merge pull request #776 from tombell/script-bootstrap
Add a bootstrap script
2013-01-24 21:04:46 -08:00
Ben Toews
d758d424b4 deleted junk 2013-01-23 17:19:32 -06:00
Ben Toews
d82179048e adding files 2013-01-23 11:31:59 -06:00
Ben Toews
1528cfe1cd adding safe_yaml to protect against object instantiation from yaml 2013-01-23 11:30:24 -06:00
Ben Toews
c85d834036 lets try this differently 2013-01-23 11:07:44 -06:00
Tom Bell
507f1c3995 Add a bootstrap script 2013-01-22 23:10:51 +00:00
Ben Toews
799c997b45 adding gem 2013-01-22 15:21:10 -06:00
Ben Toews
073bac6047 using sane_yaml to prevent code execution 2013-01-22 15:18:46 -06:00
Matt Ginzton
fbc9d0c663 Fix truncation of overly long post names.
Delete the old truncate_post_name; it was called too late (if url rewriting
is enabled which it is by default), didn't run (it tried to use + to concat
a Fixnum onto a String), and even with those problems fixed, didn't actually
shorten the string enough to use as a pathname.

Instead, apply simple string truncation at the point we generate the slug,
which is used in the filename and is the part that could be unboundedly
long. I arbitrarily chose 200 as the maximum length; even shorter might be
better (really long slugs are just visually ugly); it might also be nicer
to truncate at a hyphen boundary.

This fixes the rest of issue #773 (subissue 4).
2013-01-22 10:25:07 -08:00
Matt Ginzton
863643c7e8 Look for _posts directory relative to cwd, not relative to tumblr.rb.
That's where we put it earlier, so that's where we'll find it now.

This addresses part of issue #773 (subissue 3).
2013-01-22 10:24:33 -08:00
Parker Moore
adce57e9e1 Updated history to reflect merge of #771. 2013-01-21 22:20:00 -05:00
Parker Moore
8d05e1ea5a Merge pull request #771 from mojombo/fix-coverage
Fix SimpleCov Execution
2013-01-21 19:01:52 -08:00
Parker Moore
607b4c84fd Only running simplecov if RUBY_VERSION is 1.9 or greater, and COVERAGE env is set to 'true' 2013-01-20 22:16:23 -05:00
Parker Moore
914f1e834d Added simplecov-gem-adapter dev dependency. 2013-01-20 22:15:44 -05:00
scribu
c48de6b320 add drafts.feature 2013-01-20 05:23:56 +02:00
scribu
2df63e5b9d fix tests 2013-01-20 05:23:56 +02:00
scribu
0ad623fb85 first pass at --drafts flag 2013-01-20 05:23:56 +02:00
Tom Bell
517e6f81d3 Remove new lines between module and class 2013-01-20 00:00:49 +00:00
Tom Bell
2c45150545 Update tag classes moving into a module 2013-01-19 23:50:44 +00:00
Tom Bell
10d980b6e1 Update pagination classes moving into a module 2013-01-19 23:42:40 +00:00
Tom Bell
663a1321d2 Update converter classes moving into a module 2013-01-19 23:07:38 +00:00
Tom Bell
6514fe2d22 Strip extra newlines 2013-01-19 22:38:51 +00:00
Tom Bell
e03f48085a Update command classes moving into a module 2013-01-19 22:36:46 +00:00
Parker Moore
065b251383 Added note in gemspec for easy extraction of dev dependencies to migrator gem. 2013-01-18 10:35:21 -05:00
Parker Moore
f231ef7644 Merge pull request #684 from mattr-/issue-680. 2013-01-18 10:28:14 -05:00
Parker Moore
85c3bf66d0 Reflected merging of #671 in History. 2013-01-17 22:34:59 -05:00
Parker Moore
2615291e6d Printing error message in WP.com migrator. #671. 2013-01-17 22:33:37 -05:00
Parker Moore
3bca5c3297 Merge pull request #671 from fzero/master
Rescue from import errors on Wordpress.com plugin.
2013-01-17 19:30:51 -08:00
Parker Moore
ce798a5956 Added test for all-String categories. 2013-01-17 21:57:21 -05:00
Parker Moore
cd05f6be78 Ensures that categories are Strings before escaping. Fixes #759. 2013-01-17 21:55:01 -05:00
Tom Preston-Werner
ab539622dd Refine CONTRIBUTE with more detail and better formatting. 2013-01-17 12:38:27 -08:00
Tom Preston-Werner
568208ca9b Update history to reflect merge of #765. 2013-01-17 12:25:45 -08:00
Tom Preston-Werner
733587fa05 Merge pull request #765 from mattr-/fix-coverage
Fix coverage
2013-01-17 12:22:58 -08:00
Matt Rogers
5e08cddb98 filter out test files in coverage results 2013-01-16 22:27:23 -06:00
Matt Rogers
79fceedab3 add the coverage directory to .gitignore 2013-01-16 22:22:33 -06:00
Matt Rogers
00d74fa53f Add SimpleCov to the unit tests 2013-01-16 22:20:34 -06:00
Matt Rogers
06a6b8aadb Add simplecov as a dependency
Simplecov works with Ruby 1.9.x for generating test coverage
2013-01-16 22:18:10 -06:00
Matt Rogers
9007f9c851 Remove the coverage rake task
RCov does not work on Ruby 1.9.x
2013-01-16 22:15:45 -06:00
Matt Rogers
f460a6cf71 Merge branch 'master' into issue-653 2013-01-16 21:52:32 -06:00
Parker Moore
8b83feac06 Update history to reflect merge of #664 2013-01-16 21:36:48 -05:00
Parker Moore
8fb36ab064 Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Slight stylistic tweak to LSI initialisation.
  faster_lsi: Massively accelerate LSI performance.
2013-01-16 21:36:07 -05:00
Parker Moore
faf5e44c47 Merge pull request #664 from Jashank/faster_lsi
faster_lsi: Massively accelerate LSI performance.
2013-01-16 18:36:01 -08:00
Parker Moore
cbbf8b496d Update history to reflect merge of 496 2013-01-16 21:35:12 -05:00
Parker Moore
2e76edd837 Merge pull request #496 from dunsmoreb/issue/481
Truncate post slugs when importing from Tumblr.
2013-01-16 18:34:21 -08:00
Parker Moore
5848476960 Merge pull request #751 from mojombo/new-cmds-docs
Documentation for new command structure & opts
2013-01-16 16:43:38 -08:00
Parker Moore
a017f36d4b Added description to History file 2013-01-15 15:03:52 -08:00
Parker Moore
c0a6e1e5a2 Changed 'six' to 'some' on Sites page 2013-01-15 14:56:04 -08:00
Parker Moore
070f5111e1 A link to the sites page on the wiki (in addition to this curated list) 2013-01-15 14:44:06 -08:00
Parker Moore
282a3bce73 Updated history 2013-01-12 22:26:05 -08:00
Parker Moore
6a7a030eee Fixed failing Cucumber test 2013-01-12 22:25:55 -08:00
Parker Moore
963721fb46 Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  add Enumerable#glob_include?
  fixed a syntax error
  use any? instead
  update test for include,exclude glob support
  Update test/test_site.rb
  Update lib/jekyll/site.rb
  add regexp support for option 'include','exclude'
2013-01-12 22:16:28 -08:00
Parker Moore
e383bfe65d Merge pull request #743 from mccxj/master
add glob support to include, exclude option
2013-01-12 22:16:07 -08:00
Parker Moore
fbda85210a Added html_report profile to cucumber 2013-01-12 21:55:59 -08:00
Parker Moore
45f10a22da Update number of Jekyll-powered blogs on Sites page 2013-01-12 15:36:11 -08:00
Parker Moore
078972de4b Remove Octopress site from list of Jekyll-powered Sites 2013-01-12 15:35:21 -08:00
Parker Moore
4bb5158b09 New sub-titles for sub-command options table 2013-01-12 15:34:05 -08:00
Parker Moore
5a3e05dbff Ensuring that layout is only set to the default value if layout is not specified 2013-01-12 15:31:14 -08:00
Parker Moore
11ca1dfa78 Updated history to reflect merging of #580. 2013-01-12 15:15:32 -08:00
7rans
e8c74fe7a8 Layouts default to page or post depending upon type. 2013-01-12 13:49:45 -08:00
Parker Moore
d9bc6b57d5 Updated gemspec to include new command and fixture files in manifest 2013-01-12 13:19:29 -08:00
Parker Moore
e2affb2257 Added passing tests for #616 2013-01-12 00:14:00 -08:00
Parker Moore
a05b9159d9 Merge pull request #616 from hokaccha/fix_pygments_opt
fixed pygments linenos options for pygments.rb
2013-01-12 00:11:18 -08:00
Parker Moore
3d093f0035 Using new command structure in Rakefile 2013-01-11 23:59:21 -08:00
Parker Moore
42fa1046db Using internal links for homepage 2013-01-11 23:51:32 -08:00
Parker Moore
5db1bba6fd auto => watch 2013-01-11 23:51:22 -08:00
Parker Moore
64cbaa1d85 Configuration docs updated with new structure 2013-01-11 23:51:06 -08:00
Parker Moore
39b159c258 Return of the "sites" page - for learning purposes 2013-01-11 23:50:36 -08:00
Parker Moore
9fc89482b3 Using build and serve sub-commands in docs 2013-01-11 23:50:13 -08:00
Parker Moore
14cabab254 Merge pull request #690 from tombell/jekyll-command-redux
The Big Jekyll Command Cleanup
2013-01-11 21:47:59 -08:00
Tom Bell
7f072ed578 Merge branch 'master' 2013-01-12 01:18:41 +00:00
Parker Moore
9414281521 Merge pull request #750 from mojombo/update-travis-config
Updating travis configuration to explicitly run 'rake' behind bundle exec
2013-01-11 16:52:00 -08:00
Parker Moore
8b9baeee0e Revert "Specific patch version of 1.9.3: 362."
This reverts commit e4517c42af.
2013-01-11 16:45:17 -08:00
Parker Moore
e4517c42af Specific patch version of 1.9.3: 362. 2013-01-11 16:26:06 -08:00
Parker Moore
a8d07dd5f5 Updating travis configuration to explicitly run 'rake' behind bundle exec. 2013-01-11 16:21:31 -08:00
Parker Moore
36ba434115 Updated history to reflected merged PRs, #745 and #685. 2013-01-11 16:17:03 -08:00
Parker Moore
4336b6dd4e Added Travis CI badge to README 2013-01-11 15:55:14 -08:00
Parker Moore
d2e750cc74 removed extraneous whitespace in test_site.rb 2013-01-11 15:54:57 -08:00
Parker Moore
418ef419dd Merge pull request #685 from edeustace/keep_files_feature
Keep files feature
2013-01-11 15:47:26 -08:00
edeustace
0fa55418e9 merge lastest from mojombo/jekyll master 2013-01-11 12:23:53 +01:00
Piotr Usewicz
9b8b5b2bda Dont test kramdown
It should have it's own tests for that
2013-01-11 11:02:07 +00:00
Jashank Jeremy
68333cd221 Slight stylistic tweak to LSI initialisation.
Recommended-by: parkr
2013-01-11 20:02:31 +11:00
mccxj
660e5e0e14 Merge remote-tracking branch 'jekyll/master' 2013-01-11 15:45:54 +08:00
mccxj
3cf29eeee2 add Enumerable#glob_include? 2013-01-11 15:33:11 +08:00
Parker Moore
6253f79de2 Added space between arguments in Convertible errors 2013-01-10 22:11:13 -08:00
Parker Moore
824df94066 Merge pull request #745 from erictheise/master
output full path & name for files that don't parse
2013-01-10 21:44:10 -08:00
Parker Moore
c729fbb5c9 Merge pull request #746 from mattr-/contributor-guidelines
Add a CONTRIBUTING file
2013-01-10 21:35:23 -08:00
Matt Rogers
151275d09e Add TomDoc 2013-01-10 21:53:21 -06:00
Matt Rogers
7782e0b1a1 Add a CONTRIBUTING file
This uses the content of the 'Contribute' wiki page.
2013-01-10 21:44:08 -06:00
Matt Rogers
92eb926bf8 Look for plugins under the source directory by default 2013-01-10 21:24:28 -06:00
Matt Rogers
f3f181484d Merge remote-tracking branch 'upstream/master' into issue-653 2013-01-10 20:41:32 -06:00
Tom Bell
9c517c6d7d Rename migrate command to import 2013-01-11 00:32:39 +00:00
Tom Bell
e210a0603f Revert "Remove migrators"
This reverts commit b9da30bc8f.
2013-01-11 00:30:17 +00:00
Eric Theise
a5c908ac3f no good reason for making 'name' an instance variable 2013-01-10 14:13:11 -08:00
Eric Theise
cf42c56630 stick to good coding standards 2013-01-10 14:07:10 -08:00
Eric Theise
3e7f00ae19 test the path, not the parts 2013-01-10 13:01:50 -08:00
Piotr Usewicz
5d48c5390d Add test/unit 2013-01-10 20:47:55 +00:00
Eric Theise
ba48870ead outputting full path when file does not parse 2013-01-10 12:29:04 -08:00
xiaojian cai
b3e27f2c5d fixed a syntax error 2013-01-10 19:41:11 +08:00
xiaojian cai
c627cd3519 use any? instead 2013-01-10 09:16:09 +08:00
Tom Bell
e3bd250e69 Remove old jekyll command 2013-01-09 23:42:57 +00:00
Tom Bell
b70b57cb89 Merge branch 'master' into 'jekyll-command-redux' 2013-01-09 23:40:27 +00:00
Piotr Usewicz
50b4a8c0ab Bump kramdown, rake, shoulda, cucumber, redcarpet 2013-01-09 10:29:40 +00:00
xiaojian cai
adba101734 update test for include,exclude glob support 2013-01-09 16:44:53 +08:00
xiaojian cai
655cf3b3a8 Update test/test_site.rb 2013-01-09 16:23:58 +08:00
xiaojian cai
1e892678bc Update lib/jekyll/site.rb 2013-01-09 16:06:43 +08:00
edeustace
6eed91871f Changes based on @mojombo's feedback 2013-01-08 23:17:06 +01:00
xiaojian cai
44822a252e add regexp support for option 'include','exclude' 2013-01-06 21:23:31 +08:00
Tom Preston-Werner
dd0e208daa Merge branch 'patch-1' of https://github.com/jlecour/jekyll into jlecour-patch-1 2013-01-03 22:26:09 -08:00
Tom Preston-Werner
4c70c036e7 TomDoc lib/jekyll/post.rb. 2013-01-03 22:20:42 -08:00
Tom Preston-Werner
9328a1a0dd Merge branch 'docs' of https://github.com/icco/jekyll into icco-docs 2013-01-03 22:06:50 -08:00
Tom Preston-Werner
c4a43d748f Merge pull request #728 from mojombo/ruby-version-file
Added support for .ruby-version to ensure congruent dev environment
2013-01-03 20:55:04 -08:00
Parker Moore
6ec1c45d5d Added support for .ruby-version to ensure congruent dev environment 2013-01-02 19:59:20 -05:00
Nick Quaranto
c0ae646cdc Kill sites page on the new docs site. It's a moshpit of slightly useful content, and really there should be a featured site list or an actual directory separate from the docs site 2013-01-01 19:57:06 -05:00
Nick Quaranto
0776078487 If we're going to use Launchy, let's use Dir.chdir 2013-01-01 19:46:56 -05:00
Parker Moore
f7eacb7666 Using local jekyll bin to generate docs site 2013-01-01 19:44:11 -05:00
Tom Preston-Werner
72c8ceba4e Merge pull request #651 from alagu/master
Posterous importer update
2012-12-31 18:24:43 -08:00
Tom Preston-Werner
ff04018275 Update history. 2012-12-31 16:41:38 -08:00
Tom Preston-Werner
b36c9788ac Merge branch 'master' of https://github.com/enure/jekyll into enure-master 2012-12-31 14:22:24 -08:00
Tom Preston-Werner
a041d7a19a Merge pull request #721 from mrueg/patch-1
Update Dependencies in Readme, alphabetize
2012-12-31 14:09:46 -08:00
Tom Preston-Werner
d32f655716 Update history. 2012-12-31 14:04:02 -08:00
Tom Preston-Werner
2c0b3b33d9 Merge branch 'message-for-yaml-error' of https://github.com/stereobooster/jekyll into stereobooster-message-for-yaml-error 2012-12-31 13:25:05 -08:00
Tom Preston-Werner
a6c79396ab Merge pull request #699 from nitoyon/0-12-0-history
Add pull request #569 to history
2012-12-31 13:11:16 -08:00
Tom Preston-Werner
43216ac629 Make sure we do not forget to merge #583 in the future. 2012-12-31 13:10:15 -08:00
Tom Preston-Werner
00d979759e Update history. 2012-12-31 13:01:40 -08:00
Tom Preston-Werner
cc73f04eb7 Update site dir with contents of #583 at rev cb19367.
This is the big site redesign by @cobyism. To work with the new
site deployment mechanism, it is being copied from the gh-pages
branch of that PR into the existing site dir. Before we finally
deploy the new site, we should remember to merge #583 so that we
keep all the history from that PR.
2012-12-31 12:48:04 -08:00
Tom Preston-Werner
62c8ba089a Update history. 2012-12-31 12:18:03 -08:00
Manuel Rüger
ea0d111362 Update Dependencies in Readme, alphabetize 2012-12-31 03:14:30 +01:00
stereobooster
da096f307b Add testcases for YAML syntax error and non UTF-8 encoding 2012-12-30 02:39:02 +02:00
Tom Preston-Werner
83b3b2a340 More robust site:publish. 2012-12-29 16:24:26 -08:00
Tom Preston-Werner
95b07a3c2b Use Launchy for cross platform site:preview. Thx @ixti. 2012-12-29 15:29:56 -08:00
stereobooster
a5a6900948 fix error for case with broken encoding 2012-12-30 00:07:21 +02:00
stereobooster
2dbce8ca9f fix error for case with wrong encoding or error in YAML 2012-12-29 23:32:34 +02:00
Tom Preston-Werner
88bdb15338 Add site namespace and rename site preview/publish rake tasks. 2012-12-28 16:09:42 -06:00
Tom Preston-Werner
6c02483255 Do not copy _site dir to gh-pages dir on release. 2012-12-26 15:42:39 -07:00
Tom Preston-Werner
708ae28d8a A better way to preview and release the Jekyll site. 2012-12-26 15:13:57 -07:00
Tom Preston-Werner
b56a2d1ab1 Update history. 2012-12-26 14:21:22 -07:00
Tom Preston-Werner
c23302f4fa Merge branch 'deletion_protection' of https://github.com/jasonroelofs/jekyll into jasonroelofs-deletion_protection 2012-12-26 14:02:41 -07:00
Fabio Neves
12a19eaf3a Merge branch 'master' of git://github.com/mojombo/jekyll 2012-12-26 14:23:32 -05:00
nitoyon
6a78eb9f5b Add pull request #569 to history 2012-12-24 00:43:06 +09:00
Tom Preston-Werner
d58a0c1088 Release 0.12.0 2012-12-22 16:46:30 -07:00
Tom Bell
b9da30bc8f Remove migrators 2012-12-22 17:49:33 +00:00
Tom Bell
a151a16f09 Remove command options from default config
Removing command line options from the config is a path towards cleaning up the
configuration file and not including options which don't really belong there.
2012-12-19 18:23:34 +00:00
Tom Bell
e24bb02576 Update the Jekyll command for features testing
 🤘 🌟
2012-12-19 17:54:58 +00:00
Tom Bell
b7944c5274 Add initial MigrateCommand
Not all migrators can actually be calld from the comand line. Some require
options which are not passed in and have to be called by other means.
2012-12-19 17:50:21 +00:00
Tom Bell
9c65ceb22d Remove comments 2012-12-19 16:56:08 +00:00
Tom Bell
d298e2bd57 Add LSI option for build and serve commands 2012-12-19 16:44:03 +00:00
Tom Bell
4578c15a24 Add TODOs for current switches 2012-12-19 16:34:03 +00:00
Tom Bell
053c2eb0a7 Rename Args to Options in command docs 2012-12-19 14:13:32 +00:00
Tom Bell
be20a03bb9 Update to make the help command default 2012-12-19 14:09:02 +00:00
Nat Welch
934495b272 Adds some random docs for stuff I saw while skimming the code. 2012-12-18 22:42:42 -08:00
Tom Bell
dc139e2ac9 Update the sym->str key conversion 2012-12-18 22:13:17 +00:00
Tom Bell
bd1c8fe760 Update Jekyll.configuration to convert symbol keys
Because Commander uses symbol keys in the options hash and I don't want to go
back backport every hash string key to symbols in Jekyll. 
2012-12-18 21:55:00 +00:00
Tom Bell
5b2e95b443 Add missing ] in self.watch string 2012-12-18 21:54:01 +00:00
Tom Bell
d8f328b87c Update loop position so trap handler is used 2012-12-18 21:41:18 +00:00
Tom Bell
72f99eb8a7 Update global options and command descriptions 2012-12-18 21:18:05 +00:00
Tom Bell
3b4feb41f0 Add initial serve command
The `ServeCommand` will let you serve your site locally for development. You
can specify `--port`, `--host` and `--baseurl` options if you wish to change the
defaults.

Additionally the `BuildCommand` will be called before the processing of the
serve command, this makes sure that the site is actually built. This means you
are able to pass the `--watch` option to auto-regenerate your site, even while
serving it locally.
2012-12-18 21:00:24 +00:00
Tom Bell
14766497c8 Add bin/jekyll2 and initial BuildCommand
The `BuildCommand` class is responsible for handling the building of the site.
It can also optionally watch for changes to files and regenerate the site if
needed.

The `Command` class holds any methods which are used by any command
implementation.
2012-12-18 20:34:09 +00:00
Tom Bell
6c0c5b6187 Add commander dependency 2012-12-16 21:53:44 +00:00
Tom Preston-Werner
ffc68bdd48 Update history. 2012-12-15 22:21:25 -08:00
Tom Preston-Werner
3a8ebb4b71 Merge branch 'fix/front-matter-regexp' of https://github.com/zimbatm/jekyll into zimbatm-fix/front-matter-regexp 2012-12-15 22:09:41 -08:00
Tom Preston-Werner
22f4b12836 Clean up default config spec. 2012-12-15 22:09:21 -08:00
Tom Preston-Werner
583f9e0019 Merge branch 'master' of https://github.com/Neil-Smithline/jekyll into Neil-Smithline-master 2012-12-15 16:42:26 -08:00
Tom Preston-Werner
e8d68551af Update history. 2012-12-15 16:38:20 -08:00
Tom Preston-Werner
26f8d60542 Merge branch 'master' of https://github.com/wbrady/jekyll into wbrady-master 2012-12-15 16:35:45 -08:00
Tom Preston-Werner
0b62b37122 Remove newline to fix failing Redcarpet test. 2012-12-15 16:34:32 -08:00
Tom Preston-Werner
db96a88cee Update history. 2012-12-15 14:25:37 -08:00
Tom Preston-Werner
098da3d3fa Merge branch 'redcarpet-update' of https://github.com/tombell/jekyll into tombell-redcarpet-update 2012-12-15 14:09:55 -08:00
Tom Preston-Werner
5b5341ff9f Merge pull request #683 from petedmarsh/master
Add license to gemspec
2012-12-15 11:25:17 -08:00
edeustace
4bae42a671 use Array.join instead of Array.inject, add .svn to defaults 2012-12-09 11:43:49 +01:00
petedmarsh
a2dd4bf203 Add license to gemspec 2012-12-07 15:24:33 +00:00
Matt Rogers
8fb4e8fcca Convert slashes in titles to dashes when migrating from WordPress
When a post has a title that contains a slash, such as 'This is my cool
blog post part 1/2', convert the slash to a dash so that the post
filename is created correctly.

Fixes issue #680
2012-12-04 20:45:20 -06:00
Tom Bell
38ac55381b Only pass first class to Pygments
This prevents an exception if something like the following is used:

~~~ {foo bar}
some code
~~~
2012-11-13 07:59:36 +00:00
Tom Bell
a78b587e25 Update pygments.rb version 2012-11-13 07:54:53 +00:00
Fabio Neves
20ac62d30e Making sure errors don't halt the import.
Wrapped file operations in a begin/rescue block.
2012-11-11 23:28:10 -05:00
Jashank Jeremy
85f2dfffa6 faster_lsi: Massively accelerate LSI performance.
Currently, Classifier::LSI rebuilds the index every time an entry is
added.  This runs into massive performance overheads on my website;
theoretically, disabling automatic index rebuilds, and explicitly
rebuilding the LSI index at the end of the LSI repopulation should
speed things up nicely.

As a side note, here, I use pandoc-ruby to provide a more featureful
Markdown transformer, so be mindful that the numbers I quote here have
artifically imposed I/O overheads.

With just the 76 posts I wrote this year (abysmal, I know), I come up
with the following figures:

    Without faster_lsi:
      jekyll --lsi  16.91s user 0.88s system 97% cpu 18.302 total
    With faster_lsi:
      jekyll --lsi  2.72s user 0.77s system 88% cpu 3.940 total

With 109 posts, we begin to see even better improvements:

    Without faster_lsi:
      jekyll --lsi  51.00s user 1.47s system 98% cpu 53.060 total
    With faster_lsi:
      jekyll --lsi  5.04s user 1.12s system 91% cpu 6.735 total

At this point, we begin to see I/O overheads being slower than LSI
when faster_lsi is active.  I call that fairly conclusive.  But wait,
there's more.  I have 273 posts lying around... I wonder what happens
if I feed them all in.  With faster_lsi, it was nice and clippy.
Without it, I simply gave up, and went and refilled my cup of tea.
And it was still going.

    Without faster_lsi:
      jekyll --lsi  1277.86s user 10.90s system 99% cpu 21:30.29 total
    With faster_lsi:
      jekyll --lsi  34.62s user 4.43s system 96% cpu 40.430 total

That is, in anyone's books, a major improvement.  Note, however, that
I don't know just how well this will perform with `jekyll --auto`
because I don't know how it does the LSI rebuilds.  I _think_ (but
please, don't commit me on this) that the LSI is rebuilt every time
Jekyll picks up a file change.

So, all up, the performance improvement is massive, and scales
depending on how many files you have.  At the last point, the
improvement is just on 3200%.

A more optimal solution would be to cache the LSI index and/or content
data somehow.  I'll leave that to when faster_lsi takes over ten
minutes to run.
2012-10-31 22:19:59 +11:00
Matt Rogers
bab29f64f7 Look for plugins under the source directory
When generating the site, Jekyll will now look for plugins under the
source directory by default. The plugin location can still be changed in
_config.yml
2012-10-12 22:43:20 -05:00
Alagu
2726a5f27c Merge branch 'master' of git://github.com/mojombo/jekyll 2012-10-03 19:33:21 -07:00
Alagu
67f403a9d6 Merge branch 'alagu-posterous-importer-rebased' of git://github.com/simensen/jekyll 2012-10-03 19:33:01 -07:00
edeustace
3da0bb3a74 removed puts 2012-08-23 12:13:04 +02:00
edeustace
7c800d3b07 Added a configuration variable: keep_files (default: ['.git']), based on this pull request: https://github.com/mojombo/jekyll/pull/556 2012-08-23 12:07:30 +02:00
Will Brady
336ea66983 Better error reporting on Liquid exceptions 2012-08-14 17:35:41 -04:00
Tom Bell
7f706f47fc Update redcarpet support to version 2 2012-08-13 15:03:33 +01:00
hokaccha
3d2664d983 pygments options for pygments.rb 2012-08-09 00:34:44 +09:00
Neil-Smithline
3904fd9257 make yaml parsing errors more informative 2012-06-29 12:08:57 -04:00
Tom Preston-Werner
fa8400ab61 Merge pull request #574 from tombell/remove-rbx-travisci
Update travis-ci configuration file
2012-06-11 16:53:45 -07:00
Tom Bell
49a4be44cd Update travis-ci configuration file 2012-06-12 00:35:21 +01:00
Tom Preston-Werner
ee402dd18a Merge branch 'switch-to-pygmentsrb' of https://github.com/tombell/jekyll into tombell-switch-to-pygmentsrb 2012-06-11 15:53:44 -07:00
Tom Preston-Werner
88428a8eb1 Merge pull request #568 from tombell/travis-ci
Add travis-ci configuration file
2012-06-11 15:52:58 -07:00
Tom Preston-Werner
202894c196 Merge branch 'custom-layout-directory' of https://github.com/tombell/jekyll into tombell-custom-layout-directory
Conflicts:
	lib/jekyll/site.rb
2012-06-11 15:40:22 -07:00
Tom Preston-Werner
47090ffd2a Fix up a few TomDocs. 2012-06-06 11:59:49 -07:00
Tom Preston-Werner
0e9e7fbc85 Simplify Site#read_layouts. 2012-06-06 11:59:49 -07:00
Tom Bell
58654176de No longer need pygments locally 2012-05-31 16:06:49 -04:00
Tom Bell
b2a1d61c04 Swap out albino for pygments.rb 2012-05-31 15:51:34 -04:00
Tom Bell
c71d7d5290 Add travis-ci configuration file
* Tests against: 1.9.3, 1.9.2, 1.8.7, rbx-18mode
* Fixes #387
2012-05-31 14:55:16 -04:00
Tom Bell
df2ad2ac59 Allow a custom 'layouts' directory
* Add 'layouts' option to change the dir from '_layouts' to anything relative
  to the source directory
* Add cucumber scenario for testing an alternative directory '_theme'
* Closes #563
2012-05-30 21:39:43 -04:00
Jonas Pfenniger
da4e8f2ee1 Front-matter should be at start of file
It's the theme of the moment ; regexp checking.

Just in case we have two line start with --- in the file, we want to
make sure it's not interpreted as a front-matter.
2012-05-25 18:59:26 +01:00
Luca Grulla
7d88f72409 avoiding to call site_payload one time per each post and page. Speed site creation up of a 20%. 2012-04-29 00:27:11 -07:00
Tom Preston-Werner
305695398c Update History. 2012-04-23 17:23:11 -07:00
Tom Preston-Werner
4533e60489 Merge branch 'master' of https://github.com/daneharrigan/jekyll into daneharrigan-master
Conflicts:
	lib/jekyll.rb
2012-04-23 16:48:18 -07:00
Tom Preston-Werner
8a0fbf02f5 Cleanup for RDiscount TOC support. Closes #333. 2012-04-23 16:15:55 -07:00
Michishige Kaito
6471ebf0ef Fixed helper inclusion in redcarpet test 2012-04-23 15:57:06 -07:00
Michishige Kaito
fd5447a6e6 Added a test case for rdiscount toc rendering. 2012-04-23 15:56:46 -07:00
Michishige Kaito
f5b2acf8cd Added support for inline TOCs with RDiscount 2012-04-23 15:56:28 -07:00
Tom Preston-Werner
e29490c1c6 Allow setting of Kramdown smart_quotes. Fixes #482. 2012-04-23 15:34:54 -07:00
Fotos Georgiadis
4090500c5a Added path in url.
Page#dir was returning the wrong dir ('/') for pages in directories.
2012-04-09 03:08:41 +03:00
Jason Roelofs
604b60c9ba Add checks to prevent accidental deletion of the source directory 2012-04-03 22:05:18 -05:00
Jason Roelofs
8368485fa0 Remove deletion of dot files on cleanup.
This is a potentially very dangerous action that's impossible to test that it's correct.
If the '..' check line ever disappears, even running the tests will start deleting
everything accessible on the person's computer.

All dot-files that are generated are already known by Jekyll as either a static file or
a page (yaml front matter), only remove those files.
2012-04-03 21:33:35 -05:00
Charles Stuart
cb336dbb71 fix issue 457: Custom destination in _config.yml causes jekyll server to auto-regenerate continuously 2012-03-20 13:58:32 -06:00
Dane Harrigan
316cc8559c moved paginate_path to default config 2012-02-26 20:58:14 -08:00
Jérémy Lecour
41f2805b7f No need to have a variable assignment, especially if it has the same name as the method parameter. 2012-02-11 09:05:59 +01:00
dunsmoreb
5fb801474e Truncate post slugs when importing from Tumblr.
Fixes #481.
2012-02-01 06:44:01 -06:00
Tom Preston-Werner
4499df8033 Shorten plugin loading code and update history. 2012-01-29 12:49:57 -08:00
Tom Preston-Werner
02366ae5ff Merge branch 'PluginsAsArray' of https://github.com/simensen/jekyll into simensen-PluginsAsArray 2012-01-29 12:32:59 -08:00
Tom Preston-Werner
9d70088f01 Properly select dotfiles during directory scan.
Fixes #363.
Fixes #431.
Fixes #377.
2012-01-23 00:21:08 -08:00
Beau Simensen
e6d89c6a0f More testing, whitespace and comment cleanup. 2012-01-22 22:17:25 -08:00
Beau Simensen
dcf546275b Tweaked plugin directory handling, tests. 2012-01-22 22:10:12 -08:00
Beau Simensen
0284b8b22f Handle Posterous rate limiting 2012-01-22 20:58:56 -08:00
Beau Simensen
5d6e87bbf3 Merge remote-tracking branch 'origin/alagu-master' into alagu-posterous-importer-rebased
Conflict created due to #472.

Conflicts:
	lib/jekyll/migrators/posterous.rb
2012-01-22 19:35:25 -08:00
Tom Preston-Werner
e27e2554d9 Merge pull request #472 from nfm/patch-1
Update Posterous migrator to take an api_token
2012-01-22 16:27:32 -08:00
Tom Preston-Werner
2da64d9c44 Update history. 2012-01-22 16:25:15 -08:00
Tom Preston-Werner
16a4855200 Merge branch 'post_url' of https://github.com/thatguystone/jekyll into thatguystone-post_url 2012-01-22 16:03:10 -08:00
Tom Preston-Werner
c04a9549ea Make note of self.name requirement for Convertible. 2012-01-22 15:02:41 -08:00
Tom Preston-Werner
ac41b459fc Merge pull request #446 from ossxp-com/patch-1
Invalid migrator for WordPress because of a typo.
2012-01-22 15:02:09 -08:00
Tom Preston-Werner
3c2519f07d Merge pull request #419 from vjt/master
Exception handler in Convertible references nonexisting method .name
2012-01-22 00:25:55 -08:00
Tom Preston-Werner
613a7a46a3 Merge pull request #460 from kendagriff/master
RSS Migrator
2012-01-22 00:20:33 -08:00
Tom Preston-Werner
8adfaea339 Merge pull request #426 from joshbrown/master
Added a Joomla migrator
2012-01-22 00:19:35 -08:00
Tom Preston-Werner
22159b3d61 Merge pull request #368 from jacius/wordpress
Greatly improved and extended the wordpress.rb migrator.
2012-01-22 00:18:33 -08:00
Tom Preston-Werner
1292c02ec0 Merge pull request #384 from voxpelli/drupal-alias-redirect
Added redirects for Drupal posts' URL-aliases
2012-01-21 20:04:40 -08:00
Tom Preston-Werner
6e921c5852 Merge pull request #383 from voxpelli/drupal-db-prefix
Added table prefix option to Drupal migration
2012-01-21 20:03:09 -08:00
Tom Preston-Werner
574e933d81 Merge branch 'master' of https://github.com/jpravetz/jekyll into jpravetz-master 2012-01-21 19:59:05 -08:00
Tom Preston-Werner
d36a1064a7 Merge pull request #437 from stephenmcd/master
Improved Tumblr Support
2012-01-21 19:54:00 -08:00
Tom Preston-Werner
456a9f3574 Update history. 2012-01-21 19:49:41 -08:00
Tom Preston-Werner
d00bc8e8fe Merge branch 'master' of https://github.com/tmtk75/jekyll into tmtk75-master 2012-01-21 19:49:08 -08:00
Tom Preston-Werner
8d48992f22 Merge pull request #447 from mking/master
Fix comment typo
2012-01-21 19:46:27 -08:00
Tom Preston-Werner
c797d420c4 Merge branch 'patch-1' of https://github.com/hypertexthero/jekyll into hypertexthero-patch-1 2012-01-21 19:45:24 -08:00
Tom Preston-Werner
03ad973523 Update history. 2012-01-21 19:43:32 -08:00
Tom Preston-Werner
65890da3d1 Merge branch 'categories_with_space' of https://github.com/spk/jekyll into spk-categories_with_space 2012-01-21 19:36:09 -08:00
Nicholas Firth-McCoy
19fc8cb488 Oops, still need email and pass. Update usage comment 2012-01-18 11:08:02 +11:00
Nicholas Firth-McCoy
c3b12457a0 Update Posterous migrator to take an api_token instead of email and pass
The Posterous API call for retrieving a user's API token (`/api/2/auth/token`) is no longer supported and returns 410 GONE. This patch updates the #process method to accept an API token instead of an email address and password. A user's API token can be retrieved from http://posterous.com/api.
2012-01-18 10:55:58 +11:00
Tom Preston-Werner
fa6d013791 Update history. 2012-01-15 21:08:21 -08:00
Tom Preston-Werner
d0d143452a Merge branch 'master' of https://github.com/laumann/jekyll 2012-01-15 20:39:55 -08:00
Tom Preston-Werner
c14eb346a3 Allow [+.#-] in highlight lang shortnames. Fixes #282. 2012-01-15 20:35:09 -08:00
Tom Preston-Werner
4fe5e6ba99 Update history and fix up style. 2012-01-14 20:17:35 -08:00
Tom Preston-Werner
1f44e1ad64 Merge branch 'master' of https://github.com/RJ/jekyll into RJ-master 2012-01-14 20:15:31 -08:00
Tom Preston-Werner
89180169a4 Merge branch 'include' of https://github.com/lukebayes/jekyll into lukebayes-include
Conflicts:
	lib/jekyll.rb
	lib/jekyll/site.rb
2012-01-14 19:48:04 -08:00
Stephen McDonald
f2502dfab2 Added handling for Tumblr missing image extensions. 2011-12-30 23:25:09 +11:00
Stephen McDonald
c26bd30318 Fix photo link URL. 2011-12-29 11:58:11 +11:00
Stephen McDonald
bab178d9f8 Strip HTML from any caption-based titles. 2011-12-29 11:37:46 +11:00
Stephen McDonald
743e01f231 Fixed a change in Tumblr's API whereby photos no longer have a single URL field. 2011-12-29 11:37:06 +11:00
Tom Preston-Werner
b66840ca46 Release 0.11.2 2011-12-27 17:53:50 -07:00
Tom Preston-Werner
4ece77300b Gah, did not commit these for v0.11.1 version release. 2011-12-27 17:48:00 -07:00
Stephen McDonald
3ab7658d1f Fixed Tumblr URL redirects. 2011-12-28 08:16:19 +11:00
Tom Preston-Werner
febb31ba3e Release 0.11.1 2011-12-27 10:59:18 -07:00
Tom Preston-Werner
8754a024b5 Update history. 2011-12-27 10:57:20 -07:00
Stephen McDonald
886b9740f2 Fixed grab_images handling. 2011-12-27 10:09:59 +11:00
Kendall Buchanan
9523c3990e Adding migrator for RSS feeds. 2011-12-22 12:33:15 -07:00
Simon Griffee
06d9446ade Added missing <code>require 'yaml'</code>, without which the TextPattern migrator script was failing. 2011-12-04 23:35:36 +01:00
jpravetz
9a3429dc74 Update lib/jekyll/convertible.rb 2011-12-04 08:37:42 -08:00
Matthew King
14d51bfd25 Fix typo "destintation" => "destination" 2011-12-03 22:36:18 -05:00
Stephen McDonald
0f51c81cfa Added support for rewriting Tumblr URLs to Jekyll URLs in posts, meta redirects for Github pages, and automatic addition of Pygments highlight tags. 2011-12-04 12:01:37 +11:00
OpenSourceXpress
b18bdee6f1 Invalid migrator for WordPress because of a typo.
WordPress importer name should be WordPress not Wordpress.
2011-12-01 09:42:12 +08:00
Thomas Laumann
d80c773b01 New solution for passing restrictions to RedCloth - all tests pass with ruby 1.8 (just invoking rake) 2011-11-28 14:05:34 +01:00
Tomotaka Sakuma
76fa7f016b Fix an issue NoMethodError happens in case number of files under _posts is less than limit_posts. 2011-11-28 16:32:20 +09:00
Tom Preston-Werner
1da88bb30a Update and clarify dependencies. 2011-11-26 18:48:51 -08:00
Tom Preston-Werner
3fa51d5da9 Ignore .DS_Store files. 2011-11-26 10:05:46 -08:00
Tom Preston-Werner
ebc8ab5b53 Remove accidentally added doc stuff and change rakefile to prevent this. 2011-11-26 10:05:15 -08:00
Alagu
20385b54ed Merge pull request #1 from simensen/alagu-master
Fixed critical bug, added a few minor features
2011-11-25 17:44:37 -08:00
Beau Simensen
840b0c14ae YAML front matter fix, cleaned up slug generation, added tags and store some posterous information from the original post. 2011-11-25 19:06:16 -06:00
Stephen McDonald
bc20ba9be9 Preserve HTML tables as per markdown's support for tables. 2011-11-25 06:11:09 +11:00
Stephen McDonald
ab85c82356 Use Tumblr's JSON format instead of XML, to correctly preserve white-space when converting to markdown. 2011-11-24 06:11:57 +11:00
Beau Simensen
ab08acace9 Support plugins being a list of directories to scan. 2011-11-21 21:09:39 -06:00
Stephen McDonald
1b3abb61d8 Clean up extraneous newlines left by html2text. 2011-11-21 05:49:49 +11:00
Stephen McDonald
b762a1d5c5 Add a format option for converting posts to markdown via Python's html2text. 2011-11-20 22:15:36 +11:00
Stephen McDonald
87316894cc Quote the post's title so reserved yaml chars don't blow up. 2011-11-20 22:13:01 +11:00
Stephen McDonald
6826317e00 Use the post's title for the filename rather than its ID, as per Jekyll's naming convention. 2011-11-20 22:09:43 +11:00
Stephen McDonald
06f5b7d2e3 Fixed cgi module name. 2011-11-20 22:07:56 +11:00
Thomas Laumann
ab3927499f Forgot to remove debugging code :-/ 2011-11-04 17:41:47 +01:00
Thomas Laumann
8c4edb655e Have TextileConverter pass any arguments set to true in config's redcloth section to RedCloth constructor as an array of symbols.
This means explicitly setting (for example):

  redcloth:
    hard_breaks: false
    lite_mode: true
    no_span_caps: true

will cause RedCloth to be invoked thusly:

  RedCloth.new(content, [:lite_mode, :no_span_caps])

(Notice that hard_breaks is ignored.) This means, however, anything set to true in the redcloth section in _config.yml _will_ be passed to RedCloth. Mayhem may ensue.
2011-11-04 17:33:53 +01:00
Thomas Jespersen
bb9f1064d3 Merge pull request #1 from cgroner/master
(cgroner) Missing test cases for defaults.
2011-11-04 09:24:30 -07:00
Carl Groner
69e7f4abef Add test cases for default values with no explicit config. for hard_breaks. 2011-11-03 11:54:49 -07:00
Thomas Laumann
a78f86f1ac Merge github.com:mojombo/jekyll 2011-11-03 11:47:47 +01:00
Josh Brown
bb37858e67 Added a sweet Joomla 1.5 migrator 2011-10-24 14:09:22 -04:00
Marcello Barnaba
f0f99eae8a Fix exception thrown in exception handler at convertible.rb:81 2011-10-18 23:05:39 +02:00
Aman Gupta
9fbf90ce59 Merge pull request #409 from wagenet/master
Fix non-pygments code highlighting
2011-09-27 07:06:38 -07:00
Peter Wagenet
4a9094f2d4 Fix non-pygments code highlighting 2011-09-26 23:47:04 -07:00
Seth Ladd
e09f058a06 add page variable to liquid custom tags and blocks. thx to mike west for the patch 2011-09-20 13:03:31 -07:00
Alagu
ddd5dbb5fb Change to new posterous API 2011-09-16 15:31:01 -07:00
Pelle Wessman
2ce0eb00e7 Added redirects for Drupal posts' URL-aliases 2011-08-08 16:19:02 +02:00
Pelle Wessman
e8f604b5ae Added table prefix option to Drupal migration
It's good practice in the Drupal community to always prefix the tables with something so that if you ever need to host two sites in the same database then you will easily know which tables belongs to which site.

This commit adds an option to the Drupal migration scripts that makes it possible to add such a prefix to the migration query.
2011-08-08 15:22:25 +02:00
Andrew Stone
5cffe5ecb5 Adding in the ability to link to posts internally. Syntax: {% post_url 2010-07-21-name-of-post %}; useful for: [Some Link]({% post_url 2010-07-21-name-of-post %}) 2011-07-21 19:49:09 -04:00
John Croisant
1b2b5ff278 Greatly improved and extended the wordpress.rb migrator.
* It can now export comments, categories, and tags.
* It can convert non-ASCII chars into HTML entities.
* It can export published, draft, private, and/or revision posts.
* It can process "<!-- more -->" tags to automatically generate
  a post excerpt and #anchors.

Read the big documentation comment for all the available options.
2011-07-17 17:00:55 -05:00
Tom Preston-Werner
72b7b1f056 Release 0.11.0 2011-07-10 15:14:25 -07:00
Laurent Arnoud
1356e75811 Generate escaped url for categories with space.
Space in URLs should be encoded.

Signed-off-by: Laurent Arnoud <laurent@spkdev.net>
2011-07-10 23:56:56 +02:00
Thomas Laumann
ed7f914459 removed unused code 2011-07-07 11:29:40 +02:00
Thomas Laumann
0aab73e156 Merge https://github.com/mojombo/jekyll 2011-07-07 11:14:32 +02:00
Tom Preston-Werner
3241d882b5 Merge remote-tracking branch 'kou/fix-error-message' 2011-07-05 22:31:25 -07:00
Tom Preston-Werner
3c94ff3480 Merge remote-tracking branch 'richbecks/master' 2011-07-05 22:25:51 -07:00
Richard Jones
00a0d14702 Tidied up indentation 2011-07-04 05:09:50 -07:00
Richard Jones
8c35cc957b Create import_hash with .new(0) so that we don't have to check if
a hash exists before incrementing it.
2011-07-04 04:59:40 -07:00
Aman Gupta
f6b5d827e7 Merge pull request #356 from mpalmer/yaml-exception-message
Give name of file that generated YAML exception message
2011-07-01 17:42:49 -07:00
Matt Palmer
eebeaf5dfb Give name of file that generated YAML exception message
It's not much good saying "hey, there was a problem" if you don't know where
the problem *is*.  Hunting through several hundred YAML files is no fun.
2011-07-02 10:35:41 +10:00
Thomas Laumann
fccb6c7f74 Merge git://github.com/mojombo/jekyll 2011-06-29 12:07:21 +02:00
Richard Jones
eb6a2b9bd0 Now creates _<directory> for each post type (e.g. _posts, _pages, _attachments) 2011-06-28 07:21:45 -07:00
Richard Jones
29c4808f2a Drafts are now marked as published:false 2011-06-28 06:31:03 -07:00
Richard Jones
3389c6d508 Sometimes wp:post_name can be empty (e.g. when a post is still draft), in this case we make up an appropriate permalink_title that will be used as the filename. The importer can always rename the file later on, and at least the file is unlikely to have been overwritten by another draft on the same day. 2011-06-28 02:31:42 -07:00
Richard Jones
365f57e8b3 Added meta tag import goodness. This for instance allows you to preserve all your hard-worked on WP SEO keywords, images, alternative images and other yummy-ness.
Replaced PubDate with wp:post_date, this is better than PubDate since some of the posts you import could be a draft (in this case the pubDate is invalid and contains a non-sensical value).
Added wp:status so we now know whether the post is published, draft or in the trash.
Added wp:post_type so we differentiate between posts and image or other post types
2011-06-28 02:05:51 -07:00
Aman Gupta
e679729ac7 Merge pull request #354 from juliangruber/patch-1
fixed redcarpet typo
2011-06-26 14:11:35 -07:00
Julian Gruber
89f48927ad fixed redcarpet typo 2011-06-26 07:09:01 -07:00
Kouhei Sutou
70aaded1e9 fix path name in syntax error message. 2011-06-20 22:46:38 +09:00
Dane Harrigan
58d8fef7ec added command-line option --paginate_path 2011-06-05 15:11:35 -04:00
Dane Harrigan
2b8017dfdc can now set a custom pagination location with pagination_path 2011-06-05 14:57:53 -04:00
Dane Harrigan
b2ab245835 gave the assertion a failure message 2011-06-05 14:57:53 -04:00
Lee Jarvis
6a756881f9 clean up some warnings 2011-06-03 23:38:39 +01:00
Tom Preston-Werner
851172b5ef Replace rdiscount filter with config-aware markdownify. 2011-05-31 14:40:21 -07:00
Tom Preston-Werner
cae0eaf19c Merge remote-tracking branch 'mjschultz/master'
Conflicts:
	lib/jekyll/filters.rb
2011-05-30 12:27:11 -07:00
Tom Preston-Werner
70b1112cca Update history. 2011-05-30 11:45:30 -07:00
Tom Preston-Werner
da9930657e Merge remote-tracking branch 'derekprior/configurable_coverter_file_extensions' 2011-05-30 11:38:59 -07:00
Tom Preston-Werner
13f1cf5832 Merge pull request #328 from shoaibkamil/master
Bugfix in tumblr importer
2011-05-30 11:22:23 -07:00
Tom Preston-Werner
5568e5698c Merge remote-tracking branch 'vazexqi/patch-1' 2011-05-30 11:20:29 -07:00
Tom Preston-Werner
14f371c792 Update gemspec so bundler installs work. 2011-05-30 11:18:15 -07:00
Tom Preston-Werner
56ddf6a3c8 Merge branch 'next' 2011-05-29 22:46:10 -07:00
Tom Preston-Werner
897d3e4e30 Update history. 2011-05-29 22:44:04 -07:00
Tom Preston-Werner
e7135a669f Require cucumber 0.10.3 to fix tests with Ruby 1.9.2. 2011-05-29 22:43:36 -07:00
Tom Preston-Werner
2ad0fbc8ff Merge remote-tracking branch 'MattHall/redcarpet' 2011-05-29 21:38:34 -07:00
Aman Gupta
22585d4b7f avoid infinite recursion while rendering layouts 2011-05-23 17:23:21 -04:00
Nicholas Chen
5788ca88f8 Changed [:state] check RE and required YAML
1) The published state is actually stored as "published" in the database but the regular expression checks for "Published" and thus will actually skip all published posts.

2) The to_yaml method is not immediately available without the "require 'yaml'" directive. This caused the migration script to fail while executing it following the instructions. 

Tested with Typo 5.3
2011-05-14 10:09:59 -07:00
shoaibkamil
1f4dd4ed61 Fixed bug in "conversation" importing where <section> and <dialog> tags were not being closed. 2011-05-11 22:06:53 -07:00
Thomas Laumann
20d1bd1f10 Merge https://github.com/mojombo/jekyll 2011-05-09 12:01:17 +02:00
Tom Preston-Werner
f808c98232 Clean up Enki importer and update History. 2011-05-09 00:59:40 -07:00
Tom Preston-Werner
0dc55aacff Merge remote-tracking branch 'rodrigopinto/master' 2011-05-09 00:55:55 -07:00
Tom Preston-Werner
b86bc97c5f Clean up Tumblr importer and update History. 2011-05-09 00:54:26 -07:00
Tom Preston-Werner
9cc9c233d0 Merge remote-tracking branch 'tonycosentini/master' 2011-05-09 00:41:07 -07:00
Tom Preston-Werner
2de18d31ab Merge remote-tracking branch 'guilleiguaran/patch-1' into devel 2011-05-09 00:35:06 -07:00
Guillermo Iguaran
02b1d996d2 default_executable= have been deprecated 2011-05-09 00:11:52 -07:00
Tom Preston-Werner
0ce425443f Better Pager.calculate_pages implementation. 2011-05-08 23:44:20 -07:00
Tom Preston-Werner
82bd83fe7f More TomDoc and formatting cleanup. 2011-05-08 23:40:35 -07:00
Tom Preston-Werner
aa0d82fa96 Clean up migrators formatting. 2011-05-08 15:08:53 -07:00
Tom Preston-Werner
a428acec1c TomDoc some things. 2011-05-08 14:49:19 -07:00
Tony Cosentini
e12cbdbea2 Added Tumblr migrator. 2011-05-02 14:31:01 -04:00
Rodrigo Pinto
55f42d26be adding enki migrator 2011-04-28 21:28:13 -03:00
Tom Preston-Werner
155cbd1463 All tests/features run in 1.8 and 1.9. 2011-04-24 19:16:13 +08:00
Tom Preston-Werner
6a31e650f3 Tests and specs run under 1.9. 2011-04-24 18:39:27 +08:00
Tom Preston-Werner
093a5efbe1 Merge remote-tracking branch 'jbw/ruby-v1.9' into devel 2011-04-23 18:08:34 +08:00
MattHall
cf779b2760 Added Redcarpet for MD conversion 2011-04-20 10:04:42 +01:00
Derek Prior
d2377b2581 Fixed mistake in default markdown extensions 2011-04-12 17:30:56 -04:00
Derek Prior
5801220a98 Added the ability to configure the file extensions to be processed by each converter. Test cases included. 2011-04-12 17:03:28 -04:00
Thomas Laumann
ef7b4aa57a added test_redcloth to gemspec 2011-04-06 14:18:55 +02:00
Thomas Laumann
3f889ef077 added test case to hard_breaks (disable/enable in _config.yml) 2011-03-23 18:17:14 +01:00
Michael J Schultz
9e3ad69922 - added rdiscount filter for templating system (like the textilize filter, but for markdown) 2011-03-03 08:14:52 -06:00
laumann
3468f0a2c3 expanded config yaml to allow setting hard_breaks=false on RedCloth, modified textile converter to take this option into account 2011-02-09 01:37:30 +01:00
Richard Jones
2f9d4f5be6 Allow setting default mimetype for --server. Useful if permalinks don't end in .html 2011-02-05 12:25:32 +00:00
lukebayes
717a2540e1 Added support for 'include' configuration parameter. This parameter
should work just like 'exclude', except it gives us the ability
to enumerate any files that should not be ignored - even if they
begin with the dastardly dot or underscore.
2010-12-30 16:41:34 -08:00
Jason Watson
de7e0011f9 Add some colouring to the unit tests. 2010-08-31 03:41:00 +01:00
Jason Watson
75b93e3fa5 RDiscount is required to run the test suite. 2010-08-30 23:11:16 +01:00
Jason Watson
dc7a7d0090 Updated for 1.9 encoding support. 2010-08-30 23:03:04 +01:00
Jason Watson
4aae2a7bc7 RedGreen is broken in 1.9.2. Test::Unit has colouring ability now. 2010-08-30 22:57:13 +01:00
Jason Watson
e53a5407b9 Test::Unit is no longer ships with Ruby. 2010-08-30 22:55:39 +01:00
Jason Watson
e054202c2b fix load errors in ruby 1.9.2. 2010-08-30 22:35:15 +01:00
175 changed files with 11070 additions and 2360 deletions

6
.gitignore vendored
View File

@@ -6,3 +6,9 @@ pkg/
*~
_site/
.bundle/
.DS_Store
bbin/
gh-pages/
site/_site/
coverage
.ruby-version

14
.travis.yml Normal file
View File

@@ -0,0 +1,14 @@
language: ruby
before_install:
- gem install bundler
rvm:
- 2.0.0
- 1.9.3
- 1.9.2
- 1.8.7
script: bundle exec rake
notifications:
irc: "irc.freenode.org#jekyll"
email:
on_success: never
on_failure: never

68
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,68 @@
Contribute
==========
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
* **Contributions will not be accepted without tests.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](http://github.com/thoughtbot/shoulda/tree/master) and
[RR](http://github.com/btakita/rr/tree/master).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
where appropriate. Also, whipping up some documentation in your fork's wiki
would be appreciated, and once merged it will be transferred over to the main
wiki.
* If your contribution changes any Jekyll behavior, make sure to update the
documentation. It lives in `site/_posts`. If the docs are missing information,
please feel free to add it in. Great docs make a great project!
* Please follow the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
when modifying Ruby code.
Test Dependencies
-----------------
To run the test suite and build the gem you'll need to install Jekyll's
dependencies. Jekyll uses Bundler, so a quick run of the bundle command and
you're all set!
$ bundle
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
$ rake test
$ rake features
Workflow
--------
Here's the most direct way to get your work merged into the project:
* Fork the project.
* Clone down your fork ( `git clone git@github.com:<username>/jekyll.git` ).
* Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ).
* Hack away, add tests. Not necessarily in that order.
* Make sure everything still passes by running `rake`.
* If necessary, rebase your commits into logical chunks, without errors.
* Push the branch up ( `git push origin my_awesome_feature` ).
* Create a pull request against mojombo/jekyll and describe what your change
does and the why you think it should be merged.
Gotchas
-------
* If you want to bump the gem version, please put that in a separate commit.
This way, the maintainers can control when the gem gets released.
* Try to keep your patch(es) based from the latest commit on mojombo/jekyll.
The easier it is to apply your work, the less work the maintainers have to do,
which is always a good thing.
* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers
actively read the issues and will label it once they come across it.
Finally...
----------
Thanks! Hacking on Jekyll should be fun. If you find any of this hard to figure
out, let us know so we can improve our process or documentation!

View File

@@ -1,2 +1,2 @@
source :rubygems
source 'https://rubygems.org'
gemspec

542
History.markdown Normal file
View File

@@ -0,0 +1,542 @@
## 1.0.4 / 2013-07-24
### Bug Fixes
* Require Liquid 2.5.1 (#1349)
## 1.0.3 / 2013-06-07
### Minor Enhancements
* Add support to gist tag for private gists. (#1189)
* Fail loudly when MaRuKu errors out (#1190)
* Move the building of related posts into their own class (#1057)
* Removed trailing spaces in several places throughout the code (#1116)
* Add a `--force` option to `jekyll new` (#1115)
* Convert IDs in the site template to classes (#1170)
### Bug Fixes
* Fix typo in Stevenson constant "ERROR". (#1166)
* Rename Jekyll::Logger to Jekyll::Stevenson to fix inheritance issue (#1106)
* Exit with a non-zero exit code when dealing with a Liquid error (#1121)
* Make the `exclude` and `include` options backwards compatible with
versions of Jekyll prior to 1.0 (#1114)
* Fix pagination on Windows (#1063)
* Fix the application of Pygments' Generic Output style to Go code
(#1156)
### Site Enhancements
* Add a Pro Tip to docs about front matter variables being optional (#1147)
* Add changelog to site as History page in /docs/ (#1065)
* Add note to Upgrading page about new config options in 1.0.x (#1146)
* Documentation for `date_to_rfc822` and `uri_escape` (#1142)
* Documentation highlight boxes shouldn't show scrollbars if not necessary (#1123)
* Add link to jekyll-minibundle in the doc's plugins list (#1035)
* Quick patch for importers documentation
* Fix prefix for WordpressDotCom importer in docs (#1107)
* Add jekyll-contentblocks plugin to docs (#1068)
* Make code bits in notes look more natural, more readable (#1089)
* Fix logic for `relative_permalinks` instructions on Upgrading page (#1101)
* Add docs for post excerpt (#1072)
* Add docs for gist tag (#1072)
* Add docs indicating that Pygments does not need to be installed
separately (#1099, #1119)
* Update the migrator docs to be current (#1136)
* Add the Jekyll Gallery Plugin to the plugin list (#1143)
### Development Fixes
* Use Jekyll.logger instead of Jekyll::Stevenson to log things (#1149)
* Fix pesky Cucumber infinite loop (#1139)
* Do not write posts with timezones in Cucumber tests (#1124)
* Use ISO formatted dates in Cucumber features (#1150)
## 1.0.2 / 2013-05-12
### Major Enhancements
* Add `jekyll doctor` command to check site for any known compatibility problems (#1081)
* Backwards-compatibilize relative permalinks (#1081)
### Minor Enhancements
* Add a `data-lang="<lang>"` attribute to Redcarpet code blocks (#1066)
* Deprecate old config `server_port`, match to `port` if `port` isn't set (#1084)
* Update pygments.rb version to 0.5.0 (#1061)
* Update Kramdown version to 1.0.2 (#1067)
### Bug Fixes
* Fix issue when categories are numbers (#1078)
* Catching that Redcarpet gem isn't installed (#1059)
### Site Enhancements
* Add documentation about `relative_permalinks` (#1081)
* Remove pygments-installation instructions, as pygments.rb is bundled with it (#1079)
* Move pages to be Pages for realz (#985)
* Updated links to Liquid documentation (#1073)
## 1.0.1 / 2013-05-08
### Minor Enhancements
* Do not force use of toc_token when using generate_tok in RDiscount (#1048)
* Add newer `language-` class name prefix to code blocks (#1037)
* Commander error message now preferred over process abort with incorrect args (#1040)
### Bug Fixes
* Make Redcarpet respect the pygments configuration option (#1053)
* Fix the index build with LSI (#1045)
* Don't print deprecation warning when no arguments are specified. (#1041)
* Add missing `</div>` to site template used by `new` subcommand, fixed typos in code (#1032)
### Site Enhancements
* Changed https to http in the GitHub Pages link (#1051)
* Remove CSS cruft, fix typos, fix HTML errors (#1028)
* Removing manual install of Pip and Distribute (#1025)
* Updated URL for Markdown references plugin (#1022)
### Development Fixes
* Markdownify history file (#1027)
* Update links on README to point to new jekyllrb.com (#1018)
## 1.0.0 / 2013-05-06
### Major Enhancements
* Add `jekyll new` subcommand: generate a jekyll scaffold (#764)
* Refactored jekyll commands into subcommands: build, serve, and migrate. (#690)
* Removed importers/migrators from main project, migrated to jekyll-import sub-gem (#793)
* Added ability to render drafts in `_drafts` folder via command line (#833)
* Add ordinal date permalink style (/:categories/:year/:y_day/:title.html) (#928)
### Minor Enhancements
* Site template HTML5-ified (#964)
* Use post's directory path when matching for the post_url tag (#998)
* Loosen dependency on Pygments so it's only required when it's needed (#1015)
* Parse strings into Time objects for date-related Liquid filters (#1014)
* Tell the user if there is no subcommand specified (#1008)
* Freak out if the destination of `jekyll new` exists and is non-empty (#981)
* Add `timezone` configuration option for compilation (#957)
* Add deprecation messages for pre-1.0 CLI options (#959)
* Refactor and colorize logging (#959)
* Refactor Markdown parsing (#955)
* Added application/vnd.apple.pkpass to mime.types served by WEBrick (#907)
* Move template site to default markdown renderer (#961)
* Expose new attribute to Liquid via `page`: `page.path` (#951)
* Accept multiple config files from command line (#945)
* Add page variable to liquid custom tags and blocks (#413)
* Add paginator.previous_page_path and paginator.next_page_path (#942)
* Backwards compatibility for 'auto' (#821, #934)
* Added date_to_rfc822 used on RSS feeds (#892)
* Upgrade version of pygments.rb to 0.4.2 (#927)
* Added short month (e.g. "Sep") to permalink style options for posts (#890)
* Expose site.baseurl to Liquid templates (#869)
* Adds excerpt attribute to posts which contains first paragraph of content (#837)
* Accept custom configuration file via CLI (#863)
* Load in GitHub Pages MIME Types on `jekyll serve` (#847, #871)
* Improve debugability of error message for a malformed highlight tag (#785)
* Allow symlinked files in unsafe mode (#824)
* Add 'gist' Liquid tag to core (#822, #861)
* New format of Jekyll output (#795)
* Reinstate --limit_posts and --future switches (#788)
* Remove ambiguity from command descriptions (#815)
* Fix SafeYAML Warnings (#807)
* Relaxed Kramdown version to 0.14 (#808)
* Aliased `jekyll server` to `jekyll serve`. (#792)
* Updated gem versions for Kramdown, Rake, Shoulda, Cucumber, and RedCarpet. (#744)
* Refactored jekyll subcommands into Jekyll::Commands submodule, which now contains them (#768)
* Rescue from import errors in Wordpress.com migrator (#671)
* Massively accelerate LSI performance (#664)
* Truncate post slugs when importing from Tumblr (#496)
* Add glob support to include, exclude option (#743)
* Layout of Page or Post defaults to 'page' or 'post', respectively (#580)
REPEALED by (#977)
* "Keep files" feature (#685)
* Output full path & name for files that don't parse (#745)
* Add source and destination directory protection (#535)
* Better YAML error message (#718)
* Bug Fixes
* Paginate in subdirectories properly (#1016)
* Ensure post and page URLs have a leading slash (#992)
* Catch all exceptions, not just StandardError descendents (#1007)
* Bullet-proof limit_posts option (#1004)
* Read in YAML as UTF-8 to accept non-ASCII chars (#836)
* Fix the CLI option --plugins to actually accept dirs and files (#993)
* Allow 'excerpt' in YAML Front-Matter to override the extracted excerpt (#946)
* Fix cascade problem with site.baseurl, site.port and site.host. (#935)
* Filter out directories with valid post names (#875)
* Fix symlinked static files not being correctly built in unsafe mode (#909)
* Fix integration with directory_watcher 1.4.x (#916)
* Accepting strings as arguments to jekyll-import command (#910)
* Force usage of older directory_watcher gem as 1.5 is broken (#883)
* Ensure all Post categories are downcase (#842, #872)
* Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors (#555)
* Patch for multibyte URI problem with jekyll serve (#723)
* Order plugin execution by priority (#864)
* Fixed Page#dir and Page#url for edge cases (#536)
* Fix broken post_url with posts with a time in their YAML Front-Matter (#831)
* Look for plugins under the source directory (#654)
* Tumblr Migrator: finds _posts dir correctly, fixes truncation of long
post names (#775)
* Force Categories to be Strings (#767)
* Safe YAML plugin to prevent vulnerability (#777)
* Add SVG support to Jekyll/WEBrick. (#407, #406)
* Prevent custom destination from causing continuous regen on watch (#528, #820, #862)
### Site Enhancements
* Responsify (#860)
* Fix spelling, punctuation and phrasal errors (#989)
* Update quickstart instructions with `new` command (#966)
* Add docs for page.excerpt (#956)
* Add docs for page.path (#951)
* Clean up site docs to prepare for 1.0 release (#918)
* Bring site into master branch with better preview/deploy (#709)
* Redesigned site (#583)
### Development Fixes
* Exclude Cucumber 1.2.4, which causes tests to fail in 1.9.2 (#938)
* Added "features:html" rake task for debugging purposes, cleaned up
cucumber profiles (#832)
* Explicitly require HTTPS rubygems source in Gemfile (#826)
* Changed Ruby version for development to 1.9.3-p374 from p362 (#801)
* Including a link to the GitHub Ruby style guide in CONTRIBUTING.md (#806)
* Added script/bootstrap (#776)
* Running Simplecov under 2 conditions: ENV(COVERAGE)=true and with Ruby version
of greater than 1.9 (#771)
* Switch to Simplecov for coverage report (#765)
## 0.12.1 / 2013-02-19
### Minor Enhancements
* Update Kramdown version to 0.14.1 (#744)
* Test Enhancements
* Update Rake version to 10.0.3 (#744)
* Update Shoulda version to 3.3.2 (#744)
* Update Redcarpet version to 2.2.2 (#744)
## 0.12.0 / 2012-12-22
### Minor Enhancements
* Add ability to explicitly specify included files (#261)
* Add --default-mimetype option (#279)
* Allow setting of RedCloth options (#284)
* Add post_url Liquid tag for internal post linking (#369)
* Allow multiple plugin dirs to be specified (#438)
* Inline TOC token support for RDiscount (#333)
* Add the option to specify the paginated url format (#342)
* Swap out albino for pygments.rb (#569)
* Support Redcarpet 2 and fenced code blocks (#619)
* Better reporting of Liquid errors (#624)
* Bug Fixes
* Allow some special characters in highlight names
* URL escape category names in URL generation (#360)
* Fix error with limit_posts (#442)
* Properly select dotfile during directory scan (#363, #431, #377)
* Allow setting of Kramdown smart_quotes (#482)
* Ensure front-matter is at start of file (#562)
## 0.11.2 / 2011-12-27
* Bug Fixes
* Fix gemspec
## 0.11.1 / 2011-12-27
* Bug Fixes
* Fix extra blank line in highlight blocks (#409)
* Update dependencies
## 0.11.0 / 2011-07-10
### Major Enhancements
* Add command line importer functionality (#253)
* Add Redcarpet Markdown support (#318)
* Make markdown/textile extensions configurable (#312)
* Add `markdownify` filter
### Minor Enhancements
* Switch to Albino gem
* Bundler support
* Use English library to avoid hoops (#292)
* Add Posterous importer (#254)
* Fixes for Wordpress importer (#274, #252, #271)
* Better error message for invalid post date (#291)
* Print formatted fatal exceptions to stdout on build failure
* Add Tumblr importer (#323)
* Add Enki importer (#320)
* Bug Fixes
* Secure additional path exploits
## 0.10.0 / 2010-12-16
* Bug Fixes
* Add --no-server option.
## 0.9.0 / 2010-12-15
### Minor Enhancements
* Use OptionParser's [no-] functionality for better boolean parsing.
* Add Drupal migrator (#245)
* Complain about YAML and Liquid errors (#249)
* Remove orphaned files during regeneration (#247)
* Add Marley migrator (#28)
## 0.8.0 / 2010-11-22
### Minor Enhancements
* Add wordpress.com importer (#207)
* Add --limit-posts cli option (#212)
* Add uri_escape filter (#234)
* Add --base-url cli option (#235)
* Improve MT migrator (#238)
* Add kramdown support (#239)
* Bug Fixes
* Fixed filename basename generation (#208)
* Set mode to UTF8 on Sequel connections (#237)
* Prevent _includes dir from being a symlink
## 0.7.0 / 2010-08-24
### Minor Enhancements
* Add support for rdiscount extensions (#173)
* Bug Fixes
* Highlight should not be able to render local files
* The site configuration may not always provide a 'time' setting (#184)
## 0.6.2 / 2010-06-25
* Bug Fixes
* Fix Rakefile 'release' task (tag pushing was missing origin)
* Ensure that RedCloth is loaded when textilize filter is used (#183)
* Expand source, destination, and plugin paths (#180)
* Fix page.url to include full relative path (#181)
## 0.6.1 / 2010-06-24
* Bug Fixes
* Fix Markdown Pygments prefix and suffix (#178)
## 0.6.0 / 2010-06-23
### Major Enhancements
* Proper plugin system (#19, #100)
* Add safe mode so unsafe converters/generators can be added
* Maruku is now the only processor dependency installed by default.
Other processors will be lazy-loaded when necessary (and prompt the
user to install them when necessary) (#57)
### Minor Enhancements
* Inclusion/exclusion of future dated posts (#59)
* Generation for a specific time (#59)
* Allocate site.time on render not per site_payload invocation (#59)
* Pages now present in the site payload and can be used through the
site.pages and site.html_pages variables
* Generate phase added to site#process and pagination is now a generator
* Switch to RakeGem for build/test process
* Only regenerate static files when they have changed (#142)
* Allow arbitrary options to Pygments (#31)
* Allow URL to be set via command line option (#147)
* Bug Fixes
* Render highlighted code for non markdown/textile pages (#116)
* Fix highlighting on Ruby 1.9 (#65)
* Fix extension munging when pretty permalinks are enabled (#64)
* Stop sorting categories (#33)
* Preserve generated attributes over front matter (#119)
* Fix source directory binding using Dir.pwd (#75)
## 0.5.7 / 2010-01-12
### Minor Enhancements
* Allow overriding of post date in the front matter (#62, #38)
* Bug Fixes
* Categories isn't always an array (#73)
* Empty tags causes error in read_posts (#84)
* Fix pagination to adhere to read/render/write paradigm
* Test Enhancement
* cucumber features no longer use site.posts.first where a better
alternative is available
## 0.5.6 / 2010-01-08
* Bug Fixes
* Require redcloth >= 4.2.1 in tests (#92)
* Don't break on triple dashes in yaml frontmatter (#93)
### Minor Enhancements
* Allow .mkd as markdown extension
* Use $stdout/err instead of constants (#99)
* Properly wrap code blocks (#91)
* Add javascript mime type for webrick (#98)
## 0.5.5 / 2010-01-08
* Bug Fixes
* Fix pagination % 0 bug (#78)
* Ensure all posts are processed first (#71)
## NOTE
* After this point I will no longer be giving credit in the history;
that is what the commit log is for.
## 0.5.4 / 2009-08-23
* Bug Fixes
* Do not allow symlinks (security vulnerability)
## 0.5.3 / 2009-07-14
* Bug Fixes
* Solving the permalink bug where non-html files wouldn't work
[github.com/jeffrydegrande]
## 0.5.2 / 2009-06-24
* Enhancements
* Added --paginate option to the executable along with a paginator object
for the payload [github.com/calavera]
* Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once
again.
* Configuration options set in config.yml are now available through the
site payload [github.com/vilcans]
* Posts can now have an empty YAML front matter or none at all
[github.com/bahuvrihi]
* Bug Fixes
* Fixing Ruby 1.9 issue that requires to_s on the err object
[github.com/Chrononaut]
* Fixes for pagination and ordering posts on the same day [github.com/ujh]
* Made pages respect permalinks style and permalinks in yml front matter
[github.com/eugenebolshakov]
* Index.html file should always have index.html permalink
[github.com/eugenebolshakov]
* Added trailing slash to pretty permalink style so Apache is happy
[github.com/eugenebolshakov]
* Bad markdown processor in config fails sooner and with better message
[github.com/gcnovus]
* Allow CRLFs in yaml frontmatter [github.com/juretta]
* Added Date#xmlschema for Ruby versions < 1.9
## 0.5.1 / 2009-05-06
### Major Enhancements
* Next/previous posts in site payload [github.com/pantulis,
github.com/tomo]
* Permalink templating system
* Moved most of the README out to the GitHub wiki
* Exclude option in configuration so specified files won't be brought over
with generated site [github.com/duritong]
* Bug Fixes
* Making sure config.yaml references are all gone, using only config.yml
* Fixed syntax highlighting breaking for UTF-8 code [github.com/henrik]
* Worked around RDiscount bug that prevents Markdown from getting parsed
after highlight [github.com/henrik]
* CGI escaped post titles [github.com/Chrononaut]
## 0.5.0 / 2009-04-07
### Minor Enhancements
* Ability to set post categories via YAML [github.com/qrush]
* Ability to set prevent a post from publishing via YAML
[github.com/qrush]
* Add textilize filter [github.com/willcodeforfoo]
* Add 'pretty' permalink style for wordpress-like urls
[github.com/dysinger]
* Made it possible to enter categories from YAML as an array
[github.com/Chrononaut]
* Ignore Emacs autosave files [github.com/Chrononaut]
* Bug Fixes
* Use block syntax of popen4 to ensure that subprocesses are properly
disposed [github.com/jqr]
* Close open4 streams to prevent zombies [github.com/rtomayko]
* Only query required fields from the WP Database [github.com/ariejan]
* Prevent _posts from being copied to the destination directory
[github.com/bdimcheff]
* Refactors
* Factored the filtering code into a method [github.com/Chrononaut]
* Fix tests and convert to Shoulda [github.com/qrush,
github.com/technicalpickles]
* Add Cucumber acceptance test suite [github.com/qrush,
github.com/technicalpickles]
## 0.4.1
### Minor Enhancements
* Changed date format on wordpress converter (zeropadding)
[github.com/dysinger]
* Bug Fixes
* Add jekyll binary as executable to gemspec [github.com/dysinger]
## 0.4.0 / 2009-02-03
### Major Enhancements
* Switch to Jeweler for packaging tasks
### Minor Enhancements
* Type importer [github.com/codeslinger]
* site.topics accessor [github.com/baz]
* Add array_to_sentence_string filter [github.com/mchung]
* Add a converter for textpattern [github.com/PerfectlyNormal]
* Add a working Mephisto / MySQL converter [github.com/ivey]
* Allowing .htaccess files to be copied over into the generated site
[github.com/briandoll]
* Add option to not put file date in permalink URL [github.com/mreid]
* Add line number capabilities to highlight blocks [github.com/jcon]
* Bug Fixes
* Fix permalink behavior [github.com/cavalle]
* Fixed an issue with pygments, markdown, and newlines
[github.com/zpinter]
* Ampersands need to be escaped [github.com/pufuwozu, github.com/ap]
* Test and fix the site.categories hash [github.com/zzot]
* Fix site payload available to files [github.com/matrix9180]
## 0.3.0 / 2008-12-24
### Major Enhancements
* Added --server option to start a simple WEBrick server on destination
directory [github.com/johnreilly and github.com/mchung]
### Minor Enhancements
* Added post categories based on directories containing _posts
[github.com/mreid]
* Added post topics based on directories underneath _posts
* Added new date filter that shows the full month name [github.com/mreid]
* Merge Post's YAML front matter into its to_liquid payload
[github.com/remi]
* Restrict includes to regular files underneath _includes
* Bug Fixes
* Change YAML delimiter matcher so as to not chew up 2nd level markdown
headers [github.com/mreid]
* Fix bug that meant page data (such as the date) was not available in
templates [github.com/mreid]
* Properly reject directories in _layouts
## 0.2.1 / 2008-12-15
* Major Changes
* Use Maruku (pure Ruby) for Markdown by default [github.com/mreid]
* Allow use of RDiscount with --rdiscount flag
### Minor Enhancements
* Don't load directory_watcher unless it's needed [github.com/pjhyett]
## 0.2.0 / 2008-12-14
* Major Changes
* related_posts is now found in site.related_posts
## 0.1.6 / 2008-12-13
* Major Features
* Include files in _includes with {% include x.textile %}
## 0.1.5 / 2008-12-12
### Major Enhancements
* Code highlighting with Pygments if --pygments is specified
* Disable true LSI by default, enable with --lsi
### Minor Enhancements
* Output informative message if RDiscount is not available
[github.com/JackDanger]
* Bug Fixes
* Prevent Jekyll from picking up the output directory as a source
[github.com/JackDanger]
* Skip related_posts when there is only one post [github.com/JackDanger]
## 0.1.4 / 2008-12-08
* Bug Fixes
* DATA does not work properly with rubygems
## 0.1.3 / 2008-12-06
* Major Features
* Markdown support [github.com/vanpelt]
* Mephisto and CSV converters [github.com/vanpelt]
* Code hilighting [github.com/vanpelt]
* Autobuild
* Bug Fixes
* Accept both \r\n and \n in YAML header [github.com/vanpelt]
## 0.1.2 / 2008-11-22
* Major Features
* Add a real "related posts" implementation using Classifier
* Command Line Changes
* Allow cli to be called with 0, 1, or 2 args intuiting dir paths
if they are omitted
## 0.1.1 / 2008-11-22
* Minor Additions
* Posts now support introspectional data e.g. {{ page.url }}
## 0.1.0 / 2008-11-05
* First release
* Converts posts written in Textile
* Converts regular site pages
* Simple copy of binary files
## 0.0.0 / 2008-10-19
* Birthday!

View File

@@ -1,294 +0,0 @@
== HEAD
* Major Enhancements
* Add command line importer functionality (#253)
* Minor Enhancements
* Switch to Albino gem
* Bundler support
* Use English library to avoid hoops (#292)
* Add Posterous importer (#254)
* Fixes for Wordpress importer (#274, #252, #271)
* Better error message for invalid post date (#291)
* Print formatted fatal exceptions to stdout on build failure
* Bug Fixes
* Secure additional path exploits
== 0.10.0 / 2010-12-16
* Bug Fixes
* Add --no-server option.
== 0.9.0 / 2010-12-15
* Minor Enhancements
* Use OptionParser's [no-] functionality for better boolean parsing.
* Add Drupal migrator (#245)
* Complain about YAML and Liquid errors (#249)
* Remove orphaned files during regeneration (#247)
* Add Marley migrator (#28)
== 0.8.0 / 2010-11-22
* Minor Enhancements
* Add wordpress.com importer (#207)
* Add --limit-posts cli option (#212)
* Add uri_escape filter (#234)
* Add --base-url cli option (#235)
* Improve MT migrator (#238)
* Add kramdown support (#239)
* Bug Fixes
* Fixed filename basename generation (#208)
* Set mode to UTF8 on Sequel connections (#237)
* Prevent _includes dir from being a symlink
== 0.7.0 / 2010-08-24
* Minor Enhancements
* Add support for rdiscount extensions (#173)
* Bug Fixes
* Highlight should not be able to render local files
* The site configuration may not always provide a 'time' setting (#184)
== 0.6.2 / 2010-06-25
* Bug Fixes
* Fix Rakefile 'release' task (tag pushing was missing origin)
* Ensure that RedCloth is loaded when textilize filter is used (#183)
* Expand source, destination, and plugin paths (#180)
* Fix page.url to include full relative path (#181)
== 0.6.1 / 2010-06-24
* Bug Fixes
* Fix Markdown Pygments prefix and suffix (#178)
== 0.6.0 / 2010-06-23
* Major Enhancements
* Proper plugin system (#19, #100)
* Add safe mode so unsafe converters/generators can be added
* Maruku is now the only processor dependency installed by default.
Other processors will be lazy-loaded when necessary (and prompt the
user to install them when necessary) (#57)
* Minor Enhancements
* Inclusion/exclusion of future dated posts (#59)
* Generation for a specific time (#59)
* Allocate site.time on render not per site_payload invocation (#59)
* Pages now present in the site payload and can be used through the
site.pages and site.html_pages variables
* Generate phase added to site#process and pagination is now a generator
* Switch to RakeGem for build/test process
* Only regenerate static files when they have changed (#142)
* Allow arbitrary options to Pygments (#31)
* Allow URL to be set via command line option (#147)
* Bug Fixes
* Render highlighted code for non markdown/textile pages (#116)
* Fix highlighting on Ruby 1.9 (#65)
* Fix extension munging when pretty permalinks are enabled (#64)
* Stop sorting categories (#33)
* Preserve generated attributes over front matter (#119)
* Fix source directory binding using Dir.pwd (#75)
== 0.5.7 / 2010-01-12
* Minor Enhancements
* Allow overriding of post date in the front matter (#62, #38)
* Bug Fixes
* Categories isn't always an array (#73)
* Empty tags causes error in read_posts (#84)
* Fix pagination to adhere to read/render/write paradigm
* Test Enhancement
* cucumber features no longer use site.posts.first where a better
alternative is available
== 0.5.6 / 2010-01-08
* Bug Fixes
* Require redcloth >= 4.2.1 in tests (#92)
* Don't break on triple dashes in yaml frontmatter (#93)
* Minor Enhancements
* Allow .mkd as markdown extension
* Use $stdout/err instead of constants (#99)
* Properly wrap code blocks (#91)
* Add javascript mime type for webrick (#98)
== 0.5.5 / 2010-01-08
* Bug Fixes
* Fix pagination % 0 bug (#78)
* Ensure all posts are processed first (#71)
== NOTE
* After this point I will no longer be giving credit in the history;
that is what the commit log is for.
== 0.5.4 / 2009-08-23
* Bug Fixes
* Do not allow symlinks (security vulnerability)
== 0.5.3 / 2009-07-14
* Bug Fixes
* Solving the permalink bug where non-html files wouldn't work
[github.com/jeffrydegrande]
== 0.5.2 / 2009-06-24
* Enhancements
* Added --paginate option to the executable along with a paginator object
for the payload [github.com/calavera]
* Upgraded RedCloth to 4.2.1, which makes <notextile> tags work once
again.
* Configuration options set in config.yml are now available through the
site payload [github.com/vilcans]
* Posts can now have an empty YAML front matter or none at all
[github.com/bahuvrihi]
* Bug Fixes
* Fixing Ruby 1.9 issue that requires to_s on the err object
[github.com/Chrononaut]
* Fixes for pagination and ordering posts on the same day [github.com/ujh]
* Made pages respect permalinks style and permalinks in yml front matter
[github.com/eugenebolshakov]
* Index.html file should always have index.html permalink
[github.com/eugenebolshakov]
* Added trailing slash to pretty permalink style so Apache is happy
[github.com/eugenebolshakov]
* Bad markdown processor in config fails sooner and with better message
[github.com/gcnovus]
* Allow CRLFs in yaml frontmatter [github.com/juretta]
* Added Date#xmlschema for Ruby versions < 1.9
== 0.5.1 / 2009-05-06
* Major Enhancements
* Next/previous posts in site payload [github.com/pantulis,
github.com/tomo]
* Permalink templating system
* Moved most of the README out to the GitHub wiki
* Exclude option in configuration so specified files won't be brought over
with generated site [github.com/duritong]
* Bug Fixes
* Making sure config.yaml references are all gone, using only config.yml
* Fixed syntax highlighting breaking for UTF-8 code [github.com/henrik]
* Worked around RDiscount bug that prevents Markdown from getting parsed
after highlight [github.com/henrik]
* CGI escaped post titles [github.com/Chrononaut]
== 0.5.0 / 2009-04-07
* Minor Enhancements
* Ability to set post categories via YAML [github.com/qrush]
* Ability to set prevent a post from publishing via YAML
[github.com/qrush]
* Add textilize filter [github.com/willcodeforfoo]
* Add 'pretty' permalink style for wordpress-like urls
[github.com/dysinger]
* Made it possible to enter categories from YAML as an array
[github.com/Chrononaut]
* Ignore Emacs autosave files [github.com/Chrononaut]
* Bug Fixes
* Use block syntax of popen4 to ensure that subprocesses are properly
disposed [github.com/jqr]
* Close open4 streams to prevent zombies [github.com/rtomayko]
* Only query required fields from the WP Database [github.com/ariejan]
* Prevent _posts from being copied to the destination directory
[github.com/bdimcheff]
* Refactors
* Factored the filtering code into a method [github.com/Chrononaut]
* Fix tests and convert to Shoulda [github.com/qrush,
github.com/technicalpickles]
* Add Cucumber acceptance test suite [github.com/qrush,
github.com/technicalpickles]
== 0.4.1
* Minor Enhancements
* Changed date format on wordpress converter (zeropadding)
[github.com/dysinger]
* Bug Fixes
* Add jekyll binary as executable to gemspec [github.com/dysinger]
== 0.4.0 / 2009-02-03
* Major Enhancements
* Switch to Jeweler for packaging tasks
* Minor Enhancements
* Type importer [github.com/codeslinger]
* site.topics accessor [github.com/baz]
* Add array_to_sentence_string filter [github.com/mchung]
* Add a converter for textpattern [github.com/PerfectlyNormal]
* Add a working Mephisto / MySQL converter [github.com/ivey]
* Allowing .htaccess files to be copied over into the generated site
[github.com/briandoll]
* Add option to not put file date in permalink URL [github.com/mreid]
* Add line number capabilities to highlight blocks [github.com/jcon]
* Bug Fixes
* Fix permalink behavior [github.com/cavalle]
* Fixed an issue with pygments, markdown, and newlines
[github.com/zpinter]
* Ampersands need to be escaped [github.com/pufuwozu, github.com/ap]
* Test and fix the site.categories hash [github.com/zzot]
* Fix site payload available to files [github.com/matrix9180]
== 0.3.0 / 2008-12-24
* Major Enhancements
* Added --server option to start a simple WEBrick server on destination
directory [github.com/johnreilly and github.com/mchung]
* Minor Enhancements
* Added post categories based on directories containing _posts
[github.com/mreid]
* Added post topics based on directories underneath _posts
* Added new date filter that shows the full month name [github.com/mreid]
* Merge Post's YAML front matter into its to_liquid payload
[github.com/remi]
* Restrict includes to regular files underneath _includes
* Bug Fixes
* Change YAML delimiter matcher so as to not chew up 2nd level markdown
headers [github.com/mreid]
* Fix bug that meant page data (such as the date) was not available in
templates [github.com/mreid]
* Properly reject directories in _layouts
== 0.2.1 / 2008-12-15
* Major Changes
* Use Maruku (pure Ruby) for Markdown by default [github.com/mreid]
* Allow use of RDiscount with --rdiscount flag
* Minor Enhancements
* Don't load directory_watcher unless it's needed [github.com/pjhyett]
== 0.2.0 / 2008-12-14
* Major Changes
* related_posts is now found in site.related_posts
== 0.1.6 / 2008-12-13
* Major Features
* Include files in _includes with {% include x.textile %}
== 0.1.5 / 2008-12-12
* Major Features
* Code highlighting with Pygments if --pygments is specified
* Disable true LSI by default, enable with --lsi
* Minor Enhancements
* Output informative message if RDiscount is not available
[github.com/JackDanger]
* Bug Fixes
* Prevent Jekyll from picking up the output directory as a source
[github.com/JackDanger]
* Skip related_posts when there is only one post [github.com/JackDanger]
== 0.1.4 / 2008-12-08
* Bug Fixes
* DATA does not work properly with rubygems
== 0.1.3 / 2008-12-06
* Major Features
* Markdown support [github.com/vanpelt]
* Mephisto and CSV converters [github.com/vanpelt]
* Code hilighting [github.com/vanpelt]
* Autobuild
* Bug Fixes
* Accept both \r\n and \n in YAML header [github.com/vanpelt]
== 0.1.2 / 2008-11-22
* Major Features
* Add a real "related posts" implementation using Classifier
* Command Line Changes
* Allow cli to be called with 0, 1, or 2 args intuiting dir paths
if they are omitted
== 0.1.1 / 2008-11-22
* Minor Additions
* Posts now support introspectional data e.g. {{ page.url }}
== 0.1.0 / 2008-11-05
* First release
* Converts posts written in Textile
* Converts regular site pages
* Simple copy of binary files
== 0.0.0 / 2008-10-19
* Birthday!

View File

@@ -1,40 +1,45 @@
h1. Jekyll
!https://travis-ci.org/mojombo/jekyll.png?branch=master!:https://travis-ci.org/mojombo/jekyll
"!https://codeclimate.com/github/mojombo/jekyll.png!":https://codeclimate.com/github/mojombo/jekyll
By Tom Preston-Werner, Nick Quaranto, and many awesome contributors!
Jekyll is a simple, blog aware, static site generator. It takes a template directory (representing the raw form of a website), runs it through Textile or Markdown and Liquid converters, and spits out a complete, static website suitable for serving with Apache or your favorite web server. This is also the engine behind "GitHub Pages":http://pages.github.com, which you can use to host your project's page or blog right here from GitHub.
h2. Getting Started
* "Install":http://wiki.github.com/mojombo/jekyll/install the gem
* Read up about its "Usage":http://wiki.github.com/mojombo/jekyll/usage and "Configuration":http://wiki.github.com/mojombo/jekyll/configuration
* "Install":http://jekyllrb.com/docs/installation/ the gem
* Read up about its "Usage":http://jekyllrb.com/docs/usage/ and "Configuration":http://jekyllrb.com/docs/configuration/
* Take a gander at some existing "Sites":http://wiki.github.com/mojombo/jekyll/sites
* Fork and "Contribute":http://wiki.github.com/mojombo/jekyll/contribute your own modifications
* Fork and "Contribute":https://github.com/mojombo/jekyll/blob/master/CONTRIBUTING.md your own modifications
* Have questions? Post them on the "Mailing List":http://groups.google.com/group/jekyll-rb
h2. Diving In
* "Migrate":http://wiki.github.com/mojombo/jekyll/blog-migrations from your previous system
* Learn how the "YAML Front Matter":http://wiki.github.com/mojombo/jekyll/yaml-front-matter works
* Put information on your site with "Template Data":http://wiki.github.com/mojombo/jekyll/template-data
* Customize the "Permalinks":http://wiki.github.com/mojombo/jekyll/permalinks your posts are generated with
* Use the built-in "Liquid Extensions":http://wiki.github.com/mojombo/jekyll/liquid-extensions to make your life easier
* "Migrate":http://jekyllrb.com/docs/migrations/ from your previous system
* Learn how the "YAML Front Matter":http://jekyllrb.com/docs/frontmatter/ works
* Put information on your site with "Variables":http://jekyllrb.com/docs/variables/
* Customize the "Permalinks":http://jekyllrb.com/docs/permalinks/ your posts are generated with
* Use the built-in "Liquid Extensions":http://jekyllrb.com/docs/templates/ to make your life easier
* Use custom "Plugins":http://jekyllrb.com/docs/plugins/ to generate content specific to your site
h2. Runtime Dependencies
* RedCloth: Textile support (Ruby)
* Liquid: Templating system (Ruby)
* Classifier: Generating related posts (Ruby)
* Maruku: Default markdown engine (Ruby)
* Directory Watcher: Auto-regeneration of sites (Ruby)
* Pygments: Syntax highlighting (Python)
* Kramdown: Markdown-superset converter (Ruby)
* Liquid: Templating system (Ruby)
* Maruku: Default markdown engine (Ruby)
h2. Developer Dependencies
* Shoulda: Test framework (Ruby)
* RR: Mocking (Ruby)
* RDiscount: Discount Markdown Processor (Ruby)
* RedCloth: Textile support (Ruby)
* RedGreen: Nicer test output (Ruby)
* RR: Mocking (Ruby)
* Shoulda: Test framework (Ruby)
h2. License
See LICENSE.
See "LICENSE":https://github.com/mojombo/jekyll/blob/master/LICENSE.

141
Rakefile
View File

@@ -1,7 +1,10 @@
require 'rubygems'
require 'rake'
require 'rdoc'
require 'date'
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
#############################################################################
#
# Helper functions
@@ -21,6 +24,10 @@ def date
Date.today.to_s
end
def file_date
Date.today.strftime("%F")
end
def rubyforge_project
name
end
@@ -52,15 +59,7 @@ Rake::TestTask.new(:test) do |test|
test.verbose = true
end
desc "Generate RCov test coverage and open in your browser"
task :coverage do
require 'rcov'
sh "rm -fr coverage"
sh "rcov test/test_*.rb"
sh "open coverage/index.html"
end
require 'rake/rdoctask'
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "#{name} #{version}"
@@ -68,6 +67,21 @@ Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include('lib/**/*.rb')
end
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.profile = "travis"
end
Cucumber::Rake::Task.new(:"features:html", "Run Cucumber features and produce HTML output") do |t|
t.profile = "html_report"
end
rescue LoadError
desc 'Cucumber rake task not available'
task :features do
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
end
end
desc "Open an irb session preloaded with this library"
task :console do
sh "irb -rubygems -r ./lib/#{name}.rb"
@@ -75,34 +89,93 @@ end
#############################################################################
#
# Custom tasks (add your own tasks here)
# Site tasks - http://jekyllrb.com
#
#############################################################################
namespace :migrate do
desc "Migrate from mephisto in the current directory"
task :mephisto do
sh %q(ruby -r './lib/jekyll/migrators/mephisto' -e 'Jekyll::Mephisto.postgres(:database => "#{ENV["DB"]}")')
end
desc "Migrate from Movable Type in the current directory"
task :mt do
sh %q(ruby -r './lib/jekyll/migrators/mt' -e 'Jekyll::MT.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
end
desc "Migrate from Typo in the current directory"
task :typo do
sh %q(ruby -r './lib/jekyll/migrators/typo' -e 'Jekyll::Typo.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")')
end
end
namespace :site do
desc "Generate and view the site locally"
task :preview do
require "launchy"
begin
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format progress"
# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
# then open it in a browser. Someday we can do better than this, I hope.
Thread.new do
sleep 4
puts "Opening in browser..."
Launchy.open("http://localhost:4000")
end
# Generate the site in server mode.
puts "Running Jekyll..."
Dir.chdir("site") do
sh "#{File.expand_path('bin/jekyll', File.dirname(__FILE__))} serve --watch"
end
end
rescue LoadError
desc 'Cucumber rake task not available'
task :features do
abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
task :publish => [:history] do
# Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages")
puts "No gh-pages directory found. Run the following commands first:"
puts " `git clone git@github.com:mojombo/jekyll gh-pages"
puts " `cd gh-pages"
puts " `git checkout gh-pages`"
exit(1)
end
# Ensure gh-pages branch is up to date.
Dir.chdir('gh-pages') do
sh "git pull origin gh-pages"
end
# Copy to gh-pages dir.
puts "Copying site to gh-pages branch..."
Dir.glob("site/*") do |path|
next if path == "_site"
sh "cp -R #{path} gh-pages/"
end
# Commit and push.
puts "Committing and pushing to GitHub Pages..."
sha = `git log`.match(/[a-z0-9]{40}/)[0]
Dir.chdir('gh-pages') do
sh "git add ."
sh "git commit -m 'Updating to #{sha}.'"
sh "git push origin gh-pages"
end
puts 'Done.'
end
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
task :history do
# First lets go ahead and format the file correctly (mainly bullet points)
puts "Generating the History doc"
# Checking to make sure the History file exists in the root of the repo
if File.exist?("History.markdown")
# Read the file and save to a variable so we can do the replacements
file_time = File.read("History.markdown")
# Replacing the contents of the file for the markdown bullets & issue links
rep_bullets = file_time.gsub(/\s{2}\*{1}/, "-")
rep_links = rep_bullets.gsub(/#(\d+)/) do |word|
"[#{word}](https://github.com/mojombo/jekyll/issues/#{word.delete("#")})"
end
# Create a hash for the front matter that is to be included
front_matter = {"layout" => "docs", "title" => "History",
"permalink" => "/docs/history/",
"prev_section" => "upgrading"}
# Finally we need to copy the file to the /history directory
Dir.chdir('site/docs/') do
File.open("history.md", "w") do |file|
file.write("#{front_matter.to_yaml}---\n\n")
file.write(rep_links)
end
end
else
puts "Something went wrong"
end
puts "Done"
end
end
@@ -117,7 +190,7 @@ task :release => :build do
puts "You must be on the master branch to release!"
exit!
end
sh "git commit --allow-empty -a -m 'Release #{version}'"
sh "git commit --allow-empty -m 'Release #{version}'"
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
@@ -156,4 +229,4 @@ task :gemspec do
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
File.open(gemspec_file, 'w') { |io| io.write(spec) }
puts "Updated #{gemspec_file}"
end
end

View File

@@ -1,276 +1,127 @@
#!/usr/bin/env ruby
STDOUT.sync = true
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
$:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
help = <<HELP
Jekyll is a blog-aware, static site generator.
Basic Command Line Usage:
jekyll # . -> ./_site
jekyll <path to write generated site> # . -> <path>
jekyll <path to source> <path to write generated site> # <path> -> <path>
jekyll import <importer name> <options> # imports posts using named import script
Configuration is read from '<source>/_config.yml' but can be overriden
using the following options:
HELP
require 'optparse'
require 'commander/import'
require 'jekyll'
Jekyll::Deprecator.process(ARGV)
exec = {}
options = {}
opts = OptionParser.new do |opts|
opts.banner = help
program :name, 'jekyll'
program :version, Jekyll::VERSION
program :description, 'Jekyll is a blog-aware, static site generator in Ruby'
opts.on("--file [PATH]", "File to import from") do |import_file|
options['file'] = import_file
end
opts.on("--dbname [TEXT]", "DB to import from") do |import_dbname|
options['dbname'] = import_dbname
end
opts.on("--user [TEXT]", "Username to use when importing") do |import_user|
options['user'] = import_user
end
opts.on("--pass [TEXT]", "Password to use when importing") do |import_pass|
options['pass'] = import_pass
end
opts.on("--host [HOST ADDRESS]", "Host to import from") do |import_host|
options['host'] = import_host
end
opts.on("--site [SITE NAME]", "Site to import from") do |import_site|
options['site'] = import_site
end
default_command :help
opts.on("--[no-]safe", "Safe mode (default unsafe)") do |safe|
options['safe'] = safe
end
global_option '-s', '--source [DIR]', 'Source directory (defaults to ./)'
global_option '-d', '--destination [DIR]', 'Destination directory (defaults to ./_site)'
global_option '--safe', 'Safe mode (defaults to false)'
global_option '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
global_option '--layouts', 'Layouts directory (defaults to ./_layouts)'
opts.on("--[no-]auto", "Auto-regenerate") do |auto|
options['auto'] = auto
# Option names don't always directly match the configuration value we'd like.
# This method will rename options to match what Jekyll configuration expects.
#
# options - The Hash of options from Commander.
#
# Returns the normalized Hash.
def normalize_options(options)
if drafts_state = options.delete(:drafts)
options[:show_drafts] = drafts_state
end
options
end
opts.on("--server [PORT]", "Start web server (default port 4000)") do |port|
options['server'] = true
options['server_port'] = port unless port.nil?
end
command :new do |c|
c.syntax = 'jekyll new PATH'
c.description = 'Creates a new Jekyll site scaffold in PATH'
opts.on("--no-server", "Do not start a web server") do |part|
options['server'] = false
end
c.option '--force', 'Force creation even if PATH already exists'
opts.on("--base-url [BASE_URL]", "Serve website from a given base URL (default '/'") do |baseurl|
options['baseurl'] = baseurl
c.action do |args, options|
Jekyll::Commands::New.process(args, options.__hash__)
end
end
opts.on("--[no-]lsi", "Use LSI for better related posts") do |lsi|
options['lsi'] = lsi
end
command :build do |c|
c.syntax = 'jekyll build [options]'
c.description = 'Build your site'
opts.on("--[no-]pygments", "Use pygments to highlight code") do |pygments|
options['pygments'] = pygments
end
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.option '--future', 'Publishes posts with a future date'
c.option '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
c.option '-w', '--watch', 'Watch for changes and rebuild'
c.option '--lsi', 'Use LSI for improved related posts'
c.option '--drafts', 'Render posts in the _drafts folder'
opts.on("--rdiscount", "Use rdiscount gem for Markdown") do
options['markdown'] = 'rdiscount'
c.action do |args, options|
options = normalize_options(options.__hash__)
options = Jekyll.configuration(options)
Jekyll::Commands::Build.process(options)
end
end
opts.on("--kramdown", "Use kramdown gem for Markdown") do
options['markdown'] = 'kramdown'
end
command :serve do |c|
c.syntax = 'jekyll serve [options]'
c.description = 'Serve your site locally'
opts.on("--time [TIME]", "Time to generate the site for") do |time|
options['time'] = Time.parse(time)
end
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.option '--future', 'Publishes posts with a future date'
c.option '--limit_posts MAX_POSTS', Integer, 'Limits the number of posts to parse and publish'
c.option '-w', '--watch', 'Watch for changes and rebuild'
c.option '--lsi', 'Use LSI for improved related posts'
c.option '--drafts', 'Render posts in the _drafts folder'
opts.on("--[no-]future", "Render future dated posts") do |future|
options['future'] = future
end
c.option '-P', '--port [PORT]', 'Port to listen on'
c.option '-H', '--host [HOST]', 'Host to bind to'
c.option '-b', '--baseurl [URL]', 'Base URL'
opts.on("--permalink [TYPE]", "Use 'date' (default) for YYYY/MM/DD") do |style|
options['permalink'] = style unless style.nil?
c.action do |args, options|
options.default :serving => true
options = normalize_options(options.__hash__)
options = Jekyll.configuration(options)
Jekyll::Commands::Build.process(options)
Jekyll::Commands::Serve.process(options)
end
opts.on("--paginate [POSTS_PER_PAGE]", "Paginate a blog's posts") do |per_page|
end
alias_command :server, :serve
command :doctor do |c|
c.syntax = 'jekyll doctor'
c.description = 'Search site and print specific deprecation warnings'
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.action do |args, options|
options = normalize_options(options.__hash__)
options = Jekyll.configuration(options)
Jekyll::Commands::Doctor.process(options)
end
end
alias_command :hyde, :doctor
command :import do |c|
c.syntax = 'jekyll import <platform> [options]'
c.description = 'Import your old blog to Jekyll'
c.option '--source STRING', 'Source file or URL to migrate from'
c.option '--file STRING', 'File to migrate from'
c.option '--dbname STRING', 'Database name to migrate from'
c.option '--user STRING', 'Username to use when migrating'
c.option '--pass STRING', 'Password to use when migrating'
c.option '--host STRING', 'Host address to use when migrating'
c.action do |args, options|
begin
options['paginate'] = per_page.to_i
raise ArgumentError if options['paginate'] == 0
rescue
puts 'you must specify a number of posts by page bigger than 0'
exit 0
require 'jekyll-import'
rescue LoadError
msg = "You must install the 'jekyll-import' gem before continuing.\n"
msg += "* Do this by running `gem install jekyll-import`.\n"
msg += "* Or if you need root privileges, run `sudo gem install jekyll-import`."
abort msg
end
end
opts.on("--limit_posts [MAX_POSTS]", "Limit the number of posts to publish") do |limit_posts|
begin
options['limit_posts'] = limit_posts.to_i
raise ArgumentError if options['limit_posts'] < 1
rescue
puts 'you must specify a number of posts by page bigger than 0'
exit 0
end
end
opts.on("--url [URL]", "Set custom site.url") do |url|
options['url'] = url
end
opts.on("--version", "Display current version") do
puts "Jekyll " + Jekyll::VERSION
exit 0
Jekyll::Commands::Import.process(args.first, options)
end
end
# Read command line options into `options` hash
opts.parse!
# Check for import stuff
if ARGV.size > 0
if ARGV[0] == 'import'
migrator = ARGV[1]
if migrator.nil?
puts "Invalid options. Run `jekyll --help` for assistance."
exit(1)
else
migrator = migrator.downcase
end
cmd_options = []
['file', 'dbname', 'user', 'pass', 'host', 'site'].each do |p|
cmd_options << "\"#{options[p]}\"" unless options[p].nil?
end
# It's import time
puts "Importing..."
# Ideally, this shouldn't be necessary. Maybe parse the actual
# src files for the migrator name?
migrators = {
:posterous => 'Posterous',
:wordpressdotcom => 'WordpressDotCom',
:wordpress => 'Wordpress',
:csv => 'CSV',
:drupal => 'Drupal',
:mephisto => 'Mephisto',
:mt => 'MT',
:textpattern => 'TextPattern',
:typo => 'Typo'
}
app_root = File.join(File.dirname(__FILE__), '..')
require "#{app_root}/lib/jekyll/migrators/#{migrator}"
if Jekyll.const_defined?(migrators[migrator.to_sym])
migrator_class = Jekyll.const_get(migrators[migrator.to_sym])
migrator_class.process(*cmd_options)
else
puts "Invalid migrator. Run `jekyll --help` for assistance."
exit(1)
end
exit(0)
end
end
# Get source and destintation from command line
case ARGV.size
when 0
when 1
options['destination'] = ARGV[0]
when 2
options['source'] = ARGV[0]
options['destination'] = ARGV[1]
else
puts "Invalid options. Run `jekyll --help` for assistance."
exit(1)
end
options = Jekyll.configuration(options)
# Get source and destination directories (possibly set by config file)
source = options['source']
destination = options['destination']
# Files to watch
def globs(source)
Dir.chdir(source) do
dirs = Dir['*'].select { |x| File.directory?(x) }
dirs -= ['_site']
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
end
# Create the Site
site = Jekyll::Site.new(options)
# Run the directory watcher for auto-generation, if required
if options['auto']
require 'directory_watcher'
puts "Auto-regenerating enabled: #{source} -> #{destination}"
dw = DirectoryWatcher.new(source)
dw.interval = 1
dw.glob = globs(source)
dw.add_observer do |*args|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
puts "[#{t}] regeneration: #{args.size} files changed"
site.process
end
dw.start
unless options['server']
loop { sleep 1000 }
end
else
puts "Building site: #{source} -> #{destination}"
begin
site.process
rescue Jekyll::FatalException => e
puts
puts "ERROR: YOUR SITE COULD NOT BE BUILT:"
puts "------------------------------------"
puts e.message
exit(1)
end
puts "Successfully generated site: #{source} -> #{destination}"
end
# Run the server on the specified port, if required
if options['server']
require 'webrick'
include WEBrick
FileUtils.mkdir_p(destination)
mime_types = WEBrick::HTTPUtils::DefaultMimeTypes
mime_types.store 'js', 'application/javascript'
s = HTTPServer.new(
:Port => options['server_port'],
:MimeTypes => mime_types
)
s.mount(options['baseurl'], HTTPServlet::FileHandler, destination)
t = Thread.new {
s.start
}
trap("INT") { s.shutdown }
t.join()
end

View File

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

1
doc/.gitignore vendored
View File

@@ -1 +0,0 @@
output

View File

@@ -1,7 +0,0 @@
---
publish: true
edition: 0.1
language: en
version: 1.0
author: Your Name
cover: image/cover.jpg

View File

@@ -1,9 +0,0 @@
This Book
=========
This book is written using using the git-scribe toolchain, which can be found at:
http://github.com/schacon/git-scribe
Instructions on how to install the tool and use it for things like editing this book,
submitting errata and providing translations can be found at that site.

View File

@@ -1,10 +0,0 @@
Jekyll
======
:Author: Tom Preston-Werner
:Email: <tom@mojombo.com>
include::ch00-preface.asc[]
include::ch01-quick-start.asc[]
include::ch02-directory-layout.asc[]

View File

@@ -1,41 +0,0 @@
== Preface
Jekyll was born out the desire to create a blog engine that would make it
possible to write posts in my local text editor, version those posts with Git,
and keep up with my desire to tweak the styles and layout of my site.
In other words, I wanted something that fit into my existing software
development workflow and toolchain. Jekyll handles not only this case, but a
wide variety of other situations that call for static site generation based on
converted content and layout templates.
At its core, Jekyll is a text transformation engine. The concept behind the
system is this: you give it text written in your favorite markup language, be
that Markdown, Textile, or just plain HTML, and it churns that through a
layout or series of layout files. Throughout that process you can tweak how
you want the site URLs to look, what data gets displayed on the layout and
much more.
If you're looking for a simple, yet powerful solution to your blogging or
static site needs, Jekyll may be just what you've been looking for.
=== What this book covers
_Chapter 1, Quick Start_ covers installation, introduces the Jekyll command
line interface, and runs through a quick example demonstrating the site
generator, post generator and how to convert your Jekyll site into a static
site.
_Chapter 2, Directory Layout_ covers the various files and directories that
comprise a Jekyll site.
_Chapter 3, Tags and Filters_
_Chapter X, Deploying your Jekyll Site_
_Chapter X, Customizing Jekyll with Plugins_
_Chapter X, Migrating to Jekyll from your Existing Blog_
_Chapter X, Configuration Reference_

View File

@@ -1,153 +0,0 @@
== Chapter 1: Quick Start
This chapter is designed to get you up and running with Jekyll as quickly as
possible.
=== Installation
The best way to install Jekyll is via RubyGems:
----
gem install jekyll
----
This is all you need in order to get started with a basic Jekyll site. Some
options require additional packages to be installed.
If you encounter errors during gem installation, you may need to install the
header files for compiling extension modules for ruby 1.8:
.Debian
----
sudo apt-get install ruby1.8-dev
----
.Red Hat / CentOS / Fedora systems
----
sudo yum install ruby-devel
----
.NearlyFreeSpeech
----
RB_USER_INSTALL=true gem install jekyll
----
If you encounter errors like +Failed to build gem native extension+ on Windows
you may need to install http://wiki.github.com/oneclick/rubyinstaller/development-kit[RubyInstaller
DevKit].
==== LaTeX to PNG
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
(Version 0.6) which must be in your $PATH along with @dvips@.
(NOTE: "remi's fork of Maruku":http://github.com/remi/maruku/tree/master does
not assume a fixed location for @dvips@ if you need that fixed)
==== RDiscount
If you prefer to use
http://github.com/rtomayko/rdiscount/tree/master[RDiscount] instead of
http://maruku.rubyforge.org/[Maruku] for markdown, just make sure it's
installed:
----
sudo gem install rdiscount
----
And run Jekyll with the following option:
----
jekyll --rdiscount
----
Or, in your @_config.yml@ file put the following so you don't have to specify the flag:
----
markdown: rdiscount
----
==== Pygments
If you want syntax highlighting via the @{% highlight %}@ tag in your posts,
you'll need to install http://pygments.org/[Pygments].
.On OSX with Homebrew
----
brew install pip && pip install pygments
----
.On OSX with MacPorts
----
sudo port install python25 py25-pygments
----
.Bare OS X Leopard
----
sudo easy_install Pygments
----
.Archlinux
----
sudo pacman -S python-pygments
----
.Archlinux python2 for Pygments
----
$ sudo pacman -S python2-pygments
----
NOTE: python2 pygments version creates a `pygmentize2` executable, while
Jekyll tries to find `pygmentize`. Either create a symlink `# ln -s
/usr/bin/pygmentize2 /usr/bin/pygmentize` or use the python3 version.
.Ubuntu and Debian
----
sudo apt-get install python-pygments
----
.Gentoo
----
$ sudo emerge -av dev-python/pygments
----
=== Creating your First Site
Jekyll comes with a handy generator that will create a barebones skeleton site
to help you get up and running in no time. Simply create an empty directory to
contain your site, navigate to it, and run the generator command:
----
$ mkdir mysite
$ cd mysite
$ jekyll gen
----
Make sure the directory is empty or Jekyll will refuse to run. If everything
was successful, you'll be left with a complete, valid Jekyll site that's ready
to be converted into a static site.
To perform the conversion, make sure you're in the root of your Jekyll site
directory and run:
----
$ jekyll --server
----
If all goes well, you should get a few lines with information about config
file detection, source and destination paths, and a success message.
The `--server` command line option fires up a simple web server that will
serve the static site we just generated so that we can easily preview what it
will look like once we deploy it to a production environment.
Open up your favorite web browser and navigate to:
----
http://localhost:4000
----
Congratulations! You have now successfully created and converted your first
Jekyll site!

View File

@@ -1,90 +0,0 @@
== Chapter 2: Directory Layout
If you followed the Quick Start in the last chapter, you have a Jekyll site on
your local machine. Let's take a closer look at it and see what makes it tick.
The file layout should look something like this:
----
.
|-- _config.yml
|-- _layouts
| |-- default.html
| `-- post.html
|-- _posts
| |-- 2007-10-29-why-every-programmer-should-play-nethack.textile
| `-- 2009-04-26-barcamp-boston-4-roundup.textile
|-- _site
|-- images
| `-- logo.png
`-- index.html
----
Notice that some of the files and directories begin with an underscore. These
have special meaning to Jekyll. The underscore ensures that they will not
interfere with the rest of your site's normal content. It also means that if
any of your normal files start with an underscore, they will cause problems,
so try to avoid this.
=== _config.yml
This file stores configuration data. A majority of these options can be
specified from the command line executable but it's easier to throw them in
here so you don't have to type them out every time. Detailed explanations of
configuration directives can be found in Chapter X.
=== _layouts
Files in this directory represent templates that can be used to wrap converted
pages. Layouts are defined on a page-by-page basis in the YAML front matter.
The liquid tag +{{ content }}+ specifies where the content will be placed
during the conversion process.
=== _posts
If you're using Jekyll as a blog engine, this is where you'll place your blog
posts. A post's filename contains several pieces of data, so you must be very
careful about how these files are named. The filename format is:
+YEAR-MONTH-DATE-SLUG.MARKUP+. The YEAR must be four numbers and the MONTH and
DATE must be two numbers each. The SLUG is what will appear in the URL. The
MARKUP tells Jekyll the format of the post. The date and slug will be used
along with any permalink options you specify (See Chapter X) to construct the
final URL of the post.
=== _site
This is where the generated site will be placed (by default) once Jekyll is
done transforming it. If you're using version control, you'll want to add this
directory to the list of files to be ignored.
=== Normal Files with YAML Front Matter
All files outside of the special underscore directories and that do not
themselves begin with an underscore will be scanned by Jekyll and subjected to
conversion if they contain any YAML front matter.
=== Everything Else
Any files and directories that do not fall into one of the above categories
will be copied to the static site as-is without modification. In this example,
+images/logo.png+ will be copied to the same location in the generated site.
h2. Running Jekyll
Usually this is done through the @jekyll@ executable, which is installed with
the gem. In order to get a server up and running with your Jekyll site, run:
@jekyll --server@
and then browse to http://0.0.0.0:4000. There's plenty of [[configuration
options|Configuration]] available to you as well.
On Debian or Ubuntu, you may need to add @/var/lib/gems/1.8/bin/@ to your path.
h2. Deployment
Since Jekyll simply generates a folder filled with HTML files, it can be
served using practically any available web server out there. Please check the
[[Deployment]] page for more information regarding specific scenarios.

View File

@@ -13,7 +13,7 @@ Feature: Create sites
Given I have a _posts directory
And I have the following post:
| title | date | content |
| Hackers | 3/27/2009 | My First Exploit |
| Hackers | 2009-03-27 | My First Exploit |
When I run jekyll
Then the _site directory should exist
And I should see "My First Exploit" in "_site/2009/03/27/hackers.html"
@@ -31,7 +31,7 @@ Feature: Create sites
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| Wargames | 3/27/2009 | default | The only winning move is not to play. |
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
And I have a default layout that contains "Post Layout: {{ content }}"
When I run jekyll
Then the _site directory should exist
@@ -49,13 +49,13 @@ Feature: Create sites
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 3/27/2009 | post | content for entry1. |
| entry2 | 4/27/2009 | post | content for entry2. |
| entry1 | 2009-03-27 | post | content for entry1. |
| entry2 | 2009-04-27 | post | content for entry2. |
And I have a category/_posts directory
And I have the following posts in "category":
| title | date | layout | content |
| entry3 | 5/27/2009 | post | content for entry3. |
| entry4 | 6/27/2009 | post | content for entry4. |
| entry3 | 2009-05-27 | post | content for entry3. |
| entry4 | 2009-06-27 | post | content for entry4. |
When I run jekyll
Then the _site directory should exist
And I should see "Page : Site contains 2 pages and 4 posts" in "_site/index.html"
@@ -89,6 +89,24 @@ Feature: Create sites
And I have an "_includes/about.textile" file that contains "Generated by {% include jekyll.textile %}"
And I have an "_includes/jekyll.textile" file that contains "Jekyll"
And I have an "index.html" page that contains "Basic Site with include tag: {% include about.textile %}"
When I debug jekyll
When I run jekyll
Then the _site directory should exist
And I should see "Basic Site with include tag: Generated by Jekyll" in "_site/index.html"
Scenario: Basic site with internal post linking
Given I have an "index.html" page that contains "URL: {% post_url 2020-01-31-entry2 %}"
And I have a configuration file with "permalink" set to "pretty"
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "URL: /2020/01/31/entry2/" in "_site/index.html"
Scenario: Basic site with whitelisted dotfile
Given I have an ".htaccess" file that contains "SomeDirective"
When I run jekyll
Then the _site directory should exist
And I should see "SomeDirective" in "_site/.htaccess"

25
features/drafts.feature Normal file
View File

@@ -0,0 +1,25 @@
Feature: Draft Posts
As a hacker who likes to blog
I want to be able to preview drafts locally
In order to see if they look alright before publishing
Scenario: Preview a draft
Given I have a configuration file with "permalink" set to "none"
And I have a _drafts directory
And I have the following draft:
| title | date | layout | content |
| Recipe | 2009-03-27 | default | Not baked yet. |
When I run jekyll with drafts
Then the _site directory should exist
And I should see "Not baked yet." in "_site/recipe.html"
Scenario: Don't preview a draft
Given I have a configuration file with "permalink" set to "none"
And I have an "index.html" page that contains "Totally index"
And I have a _drafts directory
And I have the following draft:
| title | date | layout | content |
| Recipe | 2009-03-27 | default | Not baked yet. |
When I run jekyll
Then the _site directory should exist
And the "_site/recipe.html" file should not exist

View File

@@ -8,7 +8,7 @@ Feature: Embed filters
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ site.time | date_to_xmlschema }}"
When I run jekyll
Then the _site directory should exist
@@ -19,7 +19,7 @@ Feature: Embed filters
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star & Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
| Star & Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ page.title | xml_escape }}"
When I run jekyll
Then the _site directory should exist
@@ -30,7 +30,7 @@ Feature: Embed filters
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ content | xml_escape }}"
When I run jekyll
Then the _site directory should exist
@@ -41,7 +41,7 @@ Feature: Embed filters
And I have a _layouts directory
And I have the following post:
| title | date | layout | tags | content |
| Star Wars | 3/27/2009 | default | [scifi, movies, force] | These aren't the droids you're looking for. |
| Star Wars | 2009-03-27 | default | [scifi, movies, force] | These aren't the droids you're looking for. |
And I have a default layout that contains "{{ page.tags | array_to_sentence_string }}"
When I run jekyll
Then the _site directory should exist
@@ -52,7 +52,7 @@ Feature: Embed filters
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | default | These aren't the droids you're looking for. |
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "By {{ '_Obi-wan_' | textilize }}"
When I run jekyll
Then the _site directory should exist

View File

@@ -9,7 +9,7 @@ Feature: Markdown
And I have a _posts directory
And I have the following post:
| title | date | content | type |
| Hackers | 3/27/2009 | # My Title | markdown |
| Hackers | 2009-03-27 | # My Title | markdown |
When I run jekyll
Then the _site directory should exist
And I should see "Index" in "_site/index.html"
@@ -22,7 +22,7 @@ Feature: Markdown
And I have a _posts directory
And I have the following post:
| title | date | content | type |
| Hackers | 3/27/2009 | # My Title | markdown |
| Hackers | 2009-03-27 | # My Title | markdown |
When I run jekyll
Then the _site directory should exist
And I should see "Index" in "_site/index.html"

View File

@@ -2,26 +2,53 @@ Feature: Site pagination
In order to paginate my blog
As a blog's user
I want divide the posts in several pages
Scenario Outline: Paginate with N posts per page
Given I have a configuration file with "paginate" set to "<num>"
And I have a _layouts directory
And I have an "index.html" page that contains "{{ paginator.posts.size }}"
And I have a _posts directory
And I have the following post:
And I have the following posts:
| title | date | layout | content |
| Wargames | 3/27/2009 | default | The only winning move is not to play. |
| Wargames2 | 4/27/2009 | default | The only winning move is not to play2. |
| Wargames3 | 5/27/2009 | default | The only winning move is not to play3. |
| Wargames4 | 6/27/2009 | default | The only winning move is not to play4. |
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
| Wargames2 | 2009-04-27 | default | The only winning move is not to play2. |
| Wargames3 | 2009-05-27 | default | The only winning move is not to play3. |
| Wargames4 | 2009-06-27 | default | The only winning move is not to play4. |
When I run jekyll
Then the _site/page<exist> directory should exist
And the "_site/page<exist>/index.html" file should exist
And I should see "<posts>" in "_site/page<exist>/index.html"
And the "_site/page<not_exist>/index.html" file should not exist
Examples:
| num | exist | posts | not_exist |
| 1 | 4 | 1 | 5 |
| 2 | 2 | 2 | 3 |
| 3 | 2 | 1 | 3 |
Scenario Outline: Setting a custom pagination path
Given I have a configuration file with:
| key | value |
| paginate | 1 |
| paginate_path | /blog/page-:num |
| permalink | /blog/:year/:month/:day/:title |
And I have a blog directory
And I have an "blog/index.html" page that contains "{{ paginator.posts.size }}"
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| Wargames | 2009-03-27 | default | The only winning move is not to play. |
| Wargames2 | 2009-04-27 | default | The only winning move is not to play2. |
| Wargames3 | 2009-05-27 | default | The only winning move is not to play3. |
| Wargames4 | 2009-06-27 | default | The only winning move is not to play4. |
When I run jekyll
Then the _site/blog/page-<exist> directory should exist
And the "_site/blog/page-<exist>/index.html" file should exist
And I should see "<posts>" in "_site/blog/page-<exist>/index.html"
And the "_site/blog/page-<not_exist>/index.html" file should not exist
Examples:
| exist | posts | not_exist |
| 2 | 1 | 5 |
| 3 | 1 | 6 |
| 4 | 1 | 7 |

View File

@@ -7,7 +7,7 @@ Feature: Fancy permalinks
Given I have a _posts directory
And I have the following post:
| title | date | content |
| None Permalink Schema | 3/27/2009 | Totally nothing. |
| None Permalink Schema | 2009-03-27 | Totally nothing. |
And I have a configuration file with "permalink" set to "none"
When I run jekyll
Then the _site directory should exist
@@ -17,7 +17,7 @@ Feature: Fancy permalinks
Given I have a _posts directory
And I have the following post:
| title | date | content |
| Pretty Permalink Schema | 3/27/2009 | Totally wordpress. |
| Pretty Permalink Schema | 2009-03-27 | Totally wordpress. |
And I have a configuration file with "permalink" set to "pretty"
When I run jekyll
Then the _site directory should exist
@@ -38,7 +38,7 @@ Feature: Fancy permalinks
Given I have a _posts directory
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/blog/:year/:month/:day/:title"
When I run jekyll
Then the _site directory should exist
@@ -48,7 +48,7 @@ Feature: Fancy permalinks
Given I have a _posts directory
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/:categories/:title.html"
When I run jekyll
Then the _site directory should exist
@@ -58,7 +58,7 @@ Feature: Fancy permalinks
Given I have a _posts directory
And I have the following post:
| title | category | date | content |
| Custom Permalink Schema | stuff | 3/27/2009 | Totally custom. |
| Custom Permalink Schema | stuff | 2009-03-27 | Totally custom. |
And I have a configuration file with "permalink" set to "/:month-:day-:year/:title.html"
When I run jekyll
Then the _site directory should exist

View File

@@ -8,7 +8,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post title: {{ page.title }}"
When I run jekyll
Then the _site directory should exist
@@ -19,7 +19,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post url: {{ page.url }}"
When I run jekyll
Then the _site directory should exist
@@ -30,18 +30,18 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post date: {{ page.date }}"
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post date: {{ page.date | date_to_string }}"
When I run jekyll
Then the _site directory should exist
And I should see "Post date: Fri Mar 27" in "_site/2009/03/27/star-wars.html"
And I should see "Post date: 27 Mar 2009" in "_site/2009/03/27/star-wars.html"
Scenario: Use post.id variable
Given I have a _posts directory
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post id: {{ page.id }}"
When I run jekyll
Then the _site directory should exist
@@ -52,7 +52,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post content: {{ content }}"
When I run jekyll
Then the _site directory should exist
@@ -64,7 +64,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post in "movies":
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Luke, I am your father. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll
Then the _site directory should exist
@@ -75,7 +75,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | tag | content |
| Star Wars | 5/18/2009 | simple | twist | Luke, I am your father. |
| Star Wars | 2009-05-18 | simple | twist | Luke, I am your father. |
And I have a simple layout that contains "Post tags: {{ page.tags }}"
When I run jekyll
Then the _site directory should exist
@@ -88,7 +88,20 @@ Feature: Post data
And I have a _layouts directory
And I have the following post in "scifi/movies":
| title | date | layout | content |
| Star Wars | 3/27/2009 | simple | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | 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
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 folders with mixed case
Given I have a scifi directory
And I have a scifi/Movies directory
And I have a scifi/Movies/_posts directory
And I have a _layouts directory
And I have the following post in "scifi/Movies":
| title | date | layout | content |
| Star Wars | 2009-03-27 | simple | 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
Then the _site directory should exist
@@ -99,29 +112,77 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | category | content |
| Star Wars | 3/27/2009 | simple | movies | Luke, I am your father. |
| 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
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 categories are in YAML
Scenario: Use post.categories variable when category is in YAML and is mixed-case
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 | 3/27/2009 | simple | ['scifi', 'movies'] | Luke, I am your father. |
| 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
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
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. |
And I have a simple layout that contains "Post category: {{ page.categories }}"
When I run jekyll
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 categories are in YAML with mixed case
Given I have a _posts directory
And I have a _layouts directory
And I have the following posts:
| title | date | layout | categories | content |
| Star Wars | 2009-03-27 | simple | ['scifi', 'Movies'] | Luke, I am your father. |
| Star Trek | 2013-03-17 | simple | ['SciFi', 'movies'] | Jean Luc, I am your father. |
And I have a simple layout that contains "Post categories: {{ page.categories | array_to_sentence_string }}"
When I run jekyll
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"
And I should see "Post categories: scifi and movies" in "_site/scifi/movies/2013/03/17/star-trek.html"
Scenario Outline: Use page.path variable
Given I have a <dir>/_posts directory
And I have the following post in "<dir>":
| title | type | date | content |
| my-post | html | 2013-04-12 | Source path: {{ page.path }} |
When I run jekyll
Then the _site directory should exist
And I should see "Source path: <path_prefix>_posts/2013-04-12-my-post.html" in "_site/<dir>/2013/04/12/my-post.html"
Examples:
| dir | path_prefix |
| . | |
| dir | dir/ |
| dir/nested | dir/nested/ |
Scenario: Override page.path variable
Given I have a _posts directory
And I have the following post:
| title | date | path | content |
| override | 2013-04-12 | override-path.html | Custom path: {{ page.path }} |
When I run jekyll
Then the _site directory should exist
And I should see "Custom path: override-path.html" in "_site/2013/04/12/override.html"
Scenario: Disable a post from being published
Given I have a _posts directory
And I have an "index.html" file that contains "Published!"
And I have the following post:
| title | date | layout | published | content |
| Star Wars | 3/27/2009 | simple | false | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | false | Luke, I am your father. |
When I run jekyll
Then the _site directory should exist
And the "_site/2009/03/27/star-wars.html" file should not exist
@@ -132,7 +193,7 @@ Feature: Post data
And I have a _layouts directory
And I have the following post:
| title | date | layout | author | content |
| Star Wars | 3/27/2009 | simple | Darth Vader | Luke, I am your father. |
| Star Wars | 2009-03-27 | simple | Darth Vader | Luke, I am your father. |
And I have a simple layout that contains "Post author: {{ page.author }}"
When I run jekyll
Then the _site directory should exist
@@ -143,9 +204,9 @@ Feature: Post data
And I have a _layouts directory
And I have the following posts:
| title | date | layout | author | content |
| Star Wars | 3/27/2009 | ordered | Darth Vader | Luke, I am your father. |
| Some like it hot | 4/27/2009 | ordered | Osgood | Nobody is perfect. |
| Terminator | 5/27/2009 | ordered | Arnold | Sayonara, baby |
| Star Wars | 2009-03-27 | ordered | Darth Vader | Luke, I am your father. |
| Some like it hot | 2009-04-27 | ordered | Osgood | Nobody is perfect. |
| Terminator | 2009-05-27 | ordered | Arnold | Sayonara, baby |
And I have a ordered layout that contains "Previous post: {{ page.previous.title }} and next post: {{ page.next.title }}"
When I run jekyll
Then the _site directory should exist

View File

@@ -3,7 +3,7 @@ Feature: Site configuration
I want to be able to configure jekyll
In order to make setting up a site easier
Scenario: Change destination directory
Scenario: Change source directory
Given I have a blank site in "_sourcedir"
And I have an "_sourcedir/index.html" file that contains "Changing source directory"
And I have a configuration file with "source" set to "_sourcedir"
@@ -22,7 +22,7 @@ Feature: Site configuration
Given I have an "Rakefile" file that contains "I want to be excluded"
And I have an "README" file that contains "I want to be excluded"
And I have an "index.html" file that contains "I want to be included"
And I have a configuration file with "exclude" set to "Rakefile", "README"
And I have a configuration file with "exclude" set to "['Rakefile', 'README']"
When I run jekyll
Then I should see "I want to be included" in "_site/index.html"
And the "_site/Rakefile" file should not exist
@@ -55,6 +55,13 @@ Feature: Site configuration
Then the _site directory should exist
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
Scenario: Use Redcarpet for markup
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "redcarpet"
When I run jekyll
Then the _site directory should exist
And I should see "<a href="http://google.com">Google</a>" in "_site/index.html"
Scenario: Use Maruku for markup
Given I have an "index.markdown" page that contains "[Google](http://google.com)"
And I have a configuration file with "markdown" set to "maruku"
@@ -81,8 +88,8 @@ Feature: Site configuration
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 12/31/2007 | post | content for entry1. |
| entry2 | 01/31/2020 | post | content for entry2. |
| entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "Page Layout: 1 on 2010-01-01" in "_site/index.html"
@@ -101,14 +108,54 @@ Feature: Site configuration
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 12/31/2007 | post | content for entry1. |
| entry2 | 01/31/2020 | post | content for entry2. |
| entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"
Scenario: Generate proper dates with explicitly set timezone (same as posts' time)
Given I have a _layouts directory
And I have a page layout that contains "Page Layout: {{ site.posts.size }}"
And I have a post layout that contains "Post Layout: {{ content }} built at {{ page.date | date_to_xmlschema }}"
And I have an "index.html" page with layout "page" that contains "site index page"
And I have a configuration file with:
| key | value |
| timezone | America/New_York |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2013-04-09 23:22 -0400 | post | content for entry1. |
| entry2 | 2013-04-10 03:14 -0400 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "Page Layout: 2" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p> built at 2013-04-09T23:22:00-04:00" in "_site/2013/04/09/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p> built at 2013-04-10T03:14:00-04:00" in "_site/2013/04/10/entry2.html"
Scenario: Generate proper dates with explicitly set timezone (different than posts' time)
Given I have a _layouts directory
And I have a page layout that contains "Page Layout: {{ site.posts.size }}"
And I have a post layout that contains "Post Layout: {{ content }} built at {{ page.date | date_to_xmlschema }}"
And I have an "index.html" page with layout "page" that contains "site index page"
And I have a configuration file with:
| key | value |
| timezone | Australia/Melbourne |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2013-04-09 23:22 -0400 | post | content for entry1. |
| entry2 | 2013-04-10 03:14 -0400 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "Page Layout: 2" in "_site/index.html"
And the "_site/2013/04/10/entry1.html" file should exist
And the "_site/2013/04/10/entry2.html" file should exist
And I should see escaped "Post Layout: <p>content for entry1.</p> built at 2013-04-10T13:22:00+10:00" in "_site/2013/04/10/entry1.html"
And I should see escaped "Post Layout: <p>content for entry2.</p> built at 2013-04-10T17:14:00+10:00" in "_site/2013/04/10/entry2.html"
Scenario: Limit the number of posts generated by most recent date
Given I have a _posts directory
And I have a configuration file with:
@@ -116,11 +163,44 @@ Feature: Site configuration
| limit_posts | 2 |
And I have the following posts:
| title | date | content |
| Apples | 3/27/2009 | An article about apples |
| Oranges | 4/1/2009 | An article about oranges |
| Bananas | 4/5/2009 | An article about bananas |
| Apples | 2009-03-27 | An article about apples |
| Oranges | 2009-04-01 | An article about oranges |
| Bananas | 2009-04-05 | An article about bananas |
When I run jekyll
Then the _site directory should exist
And the "_site/2009/04/05/bananas.html" file should exist
And the "_site/2009/04/01/oranges.html" file should exist
And the "_site/2009/03/27/apples.html" file should not exist
Scenario: Copy over normally excluded files when they are explicitly included
Given I have a ".gitignore" file that contains ".DS_Store"
And I have an ".htaccess" file that contains "SomeDirective"
And I have a configuration file with "include" set to:
| value |
| .gitignore |
| .foo |
When I run jekyll
Then the _site directory should exist
And I should see ".DS_Store" in "_site/.gitignore"
And the "_site/.htaccess" file should not exist
Scenario: Using a different layouts directory
Given I have a _theme directory
And I have a page theme that contains "Page Layout: {{ site.posts.size }} on {{ site.time | date: "%Y-%m-%d" }}"
And I have a post theme that contains "Post Layout: {{ content }}"
And I have an "index.html" page with layout "page" that contains "site index page"
And I have a configuration file with:
| key | value |
| time | 2010-01-01 |
| future | true |
| layouts | _theme |
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2007-12-31 | post | content for entry1. |
| entry2 | 2020-01-31 | post | content for entry2. |
When I run jekyll
Then the _site directory should exist
And I should see "Page Layout: 2 on 2010-01-01" in "_site/index.html"
And I should see "Post Layout: <p>content for entry1.</p>" in "_site/2007/12/31/entry1.html"
And I should see "Post Layout: <p>content for entry2.</p>" in "_site/2020/01/31/entry2.html"

View File

@@ -9,6 +9,25 @@ Feature: Site data
Then the _site directory should exist
And I should see "Contact: email@me.com" in "_site/contact.html"
Scenario Outline: Use page.path variable in a page
Given I have a <dir> directory
And I have a "<path>" page that contains "Source path: {{ page.path }}"
When I run jekyll
Then the _site directory should exist
And I should see "Source path: <path>" in "_site/<path>"
Examples:
| dir | path |
| . | index.html |
| dir | dir/about.html |
| dir/nested | dir/nested/page.html |
Scenario: Override page.path
Given I have an "override.html" page with path "custom-override.html" that contains "Custom path: {{ page.path }}"
When I run jekyll
Then the _site directory should exist
And I should see "Custom path: custom-override.html" in "_site/override.html"
Scenario: Use site.time variable
Given I have an "index.html" page that contains "{{ site.time }}"
When I run jekyll
@@ -20,9 +39,9 @@ Feature: Site data
And I have an "index.html" page that contains "{{ site.posts.first.title }}: {{ site.posts.first.url }}"
And I have the following posts:
| title | date | content |
| First Post | 3/25/2009 | My First Post |
| Second Post | 3/26/2009 | My Second Post |
| Third Post | 3/27/2009 | My Third Post |
| First Post | 2009-03-25 | My First Post |
| Second Post | 2009-03-26 | My Second Post |
| Third Post | 2009-03-27 | My Third Post |
When I run jekyll
Then the _site directory should exist
And I should see "Third Post: /2009/03/27/third-post.html" in "_site/index.html"
@@ -32,9 +51,9 @@ Feature: Site data
And I have an "index.html" page that contains "{% for post in site.posts %} {{ post.title }} {% endfor %}"
And I have the following posts:
| title | date | content |
| First Post | 3/25/2009 | My First Post |
| Second Post | 3/26/2009 | My Second Post |
| Third Post | 3/27/2009 | My Third Post |
| First Post | 2009-03-25 | My First Post |
| Second Post | 2009-03-26 | My Second Post |
| Third Post | 2009-03-27 | My Third Post |
When I run jekyll
Then the _site directory should exist
And I should see "Third Post Second Post First Post" in "_site/index.html"
@@ -44,8 +63,8 @@ Feature: Site data
And I have an "index.html" page that contains "{% for post in site.categories.code %} {{ post.title }} {% endfor %}"
And I have the following posts:
| title | date | category | content |
| Awesome Hack | 3/26/2009 | code | puts 'Hello World' |
| Delicious Beer | 3/26/2009 | food | 1) Yuengling |
| Awesome Hack | 2009-03-26 | code | puts 'Hello World' |
| Delicious Beer | 2009-03-26 | food | 1) Yuengling |
When I run jekyll
Then the _site directory should exist
And I should see "Awesome Hack" in "_site/index.html"
@@ -55,7 +74,7 @@ Feature: Site data
And I have an "index.html" page that contains "{% for post in site.tags.beer %} {{ post.content }} {% endfor %}"
And I have the following posts:
| title | date | tag | content |
| Delicious Beer | 3/26/2009 | beer | 1) Yuengling |
| Delicious Beer | 2009-03-26 | beer | 1) Yuengling |
When I run jekyll
Then the _site directory should exist
And I should see "Yuengling" in "_site/index.html"
@@ -65,11 +84,11 @@ Feature: Site data
And I have an "index.html" page that contains "{% for post in site.posts %}{{ post.title }}:{{ post.previous.title}},{{ post.next.title}} {% endfor %}"
And I have the following posts:
| title | date | content |
| first | 2/26/2009 | first |
| A | 3/26/2009 | A |
| B | 3/26/2009 | B |
| C | 3/26/2009 | C |
| last | 4/26/2009 | last |
| first | 2009-02-26 | first |
| A | 2009-03-26 | A |
| B | 2009-03-26 | B |
| C | 2009-03-26 | C |
| last | 2009-04-26 | last |
When I run jekyll
Then the _site directory should exist
And I should see "last:C, C:B,last B:A,C A:first,B first:,A" in "_site/index.html"

View File

@@ -1,10 +1,11 @@
Before do
FileUtils.rm_rf(TEST_DIR)
FileUtils.mkdir(TEST_DIR)
Dir.chdir(TEST_DIR)
end
After do
Dir.chdir(TEST_DIR)
Dir.chdir(File.expand_path("..", TEST_DIR))
FileUtils.rm_rf(TEST_DIR)
end
@@ -21,21 +22,24 @@ Given /^I have an? "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$/ do |
---
#{text}
EOF
f.close
end
end
Given /^I have an? "(.*)" file that contains "(.*)"$/ do |file, text|
File.open(file, 'w') do |f|
f.write(text)
f.close
end
end
Given /^I have a (.*) layout that contains "(.*)"$/ do |layout, text|
File.open(File.join('_layouts', layout + '.html'), 'w') do |f|
f.write(text)
f.close
end
end
Given /^I have a (.*) theme that contains "(.*)"$/ do |layout, text|
File.open(File.join('_theme', layout + '.html'), 'w') do |f|
f.write(text)
end
end
@@ -43,28 +47,33 @@ Given /^I have an? (.*) directory$/ do |dir|
FileUtils.mkdir_p(dir)
end
Given /^I have the following posts?(?: (.*) "(.*)")?:$/ do |direction, folder, table|
Given /^I have the following (draft|post)s?(?: (in|under) "([^"]+)")?:$/ do |status, direction, folder, table|
table.hashes.each do |post|
date = Date.strptime(post['date'], '%m/%d/%Y').strftime('%Y-%m-%d')
title = post['title'].downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
title = slug(post['title'])
ext = post['type'] || 'textile'
before, after = location(folder, direction)
if direction && direction == "in"
before = folder || '.'
elsif direction && direction == "under"
after = folder || '.'
if "draft" == status
folder_post = '_drafts'
filename = "#{title}.#{ext}"
elsif "post" == status
parsed_date = Time.xmlschema(post['date']) rescue Time.parse(post['date'])
folder_post = '_posts'
filename = "#{parsed_date.strftime('%Y-%m-%d')}-#{title}.#{ext}"
end
path = File.join(before || '.', '_posts', after || '.', "#{date}-#{title}.#{post['type'] || 'textile'}")
path = File.join(before, folder_post, after, filename)
matter_hash = {}
%w(title layout tag tags category categories published author).each do |key|
%w(title layout tag tags category categories published author path date).each do |key|
matter_hash[key] = post[key] if post[key]
end
matter = matter_hash.map { |k, v| "#{k}: #{v}\n" }.join.chomp
content = post['content']
if post['input'] && post['filter']
content = "{{ #{post['input']} | #{post['filter']} }}"
content = if post['input'] && post['filter']
"{{ #{post['input']} | #{post['filter']} }}"
else
post['content']
end
File.open(path, 'w') do |f|
@@ -74,7 +83,6 @@ Given /^I have the following posts?(?: (.*) "(.*)")?:$/ do |direction, folder, t
---
#{content}
EOF
f.close
end
end
end
@@ -82,7 +90,6 @@ end
Given /^I have a configuration file with "(.*)" set to "(.*)"$/ do |key, value|
File.open('_config.yml', 'w') do |f|
f.write("#{key}: #{value}\n")
f.close
end
end
@@ -91,7 +98,6 @@ Given /^I have a configuration file with:$/ do |table|
table.hashes.each do |row|
f.write("#{row["key"]}: #{row["value"]}\n")
end
f.close
end
end
@@ -101,7 +107,6 @@ Given /^I have a configuration file with "([^\"]*)" set to:$/ do |key, table|
table.hashes.each do |row|
f.write("- #{row["value"]}\n")
end
f.close
end
end
@@ -110,6 +115,10 @@ When /^I run jekyll$/ do
run_jekyll
end
When /^I run jekyll with drafts$/ do
run_jekyll(:drafts => true)
end
When /^I debug jekyll$/ do
run_jekyll(:debug => true)
end
@@ -121,11 +130,15 @@ When /^I change "(.*)" to contain "(.*)"$/ do |file, text|
end
Then /^the (.*) directory should exist$/ do |dir|
assert File.directory?(dir)
assert File.directory?(dir), "The directory \"#{dir}\" does not exist"
end
Then /^I should see "(.*)" in "(.*)"$/ do |text, file|
assert_match Regexp.new(text), File.open(file).readlines.join
assert Regexp.new(text).match(File.open(file).readlines.join)
end
Then /^I should see escaped "(.*)" in "(.*)"$/ do |text, file|
assert Regexp.new(Regexp.escape(text)).match(File.open(file).readlines.join)
end
Then /^the "(.*)" file should exist$/ do |file|

View File

@@ -1,19 +1,30 @@
require 'fileutils'
require 'rr'
require 'test/unit'
World do
include Test::Unit::Assertions
end
require 'time'
TEST_DIR = File.join('/', 'tmp', 'jekyll')
JEKYLL_PATH = File.join(ENV['PWD'], 'bin', 'jekyll')
JEKYLL_PATH = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'jekyll')
def run_jekyll(opts = {})
command = JEKYLL_PATH
command = JEKYLL_PATH.clone
command << " build"
command << " --drafts" if opts[:drafts]
command << " >> /dev/null 2>&1" if opts[:debug].nil?
system command
end
def slug(title)
title.downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
end
def location(folder, direction)
if folder
before = folder if direction == "in"
after = folder if direction == "under"
end
[before || '.', after || '.']
end
# work around "invalid option: --format" cucumber bug (see #296)
Test::Unit.run = true
Test::Unit.run = true if RUBY_VERSION < '1.9'

View File

@@ -4,8 +4,9 @@ Gem::Specification.new do |s|
s.rubygems_version = '1.3.5'
s.name = 'jekyll'
s.version = '0.10.0'
s.date = '2010-12-16'
s.version = '1.0.4'
s.license = 'MIT'
s.date = '2013-07-25'
s.rubyforge_project = 'jekyll'
s.summary = "A simple, blog aware, static site generator."
@@ -18,34 +19,45 @@ Gem::Specification.new do |s|
s.require_paths = %w[lib]
s.executables = ["jekyll"]
s.default_executable = 'jekyll'
s.rdoc_options = ["--charset=UTF-8"]
s.extra_rdoc_files = %w[README.textile LICENSE]
s.add_runtime_dependency('liquid', ">= 1.9.0")
s.add_runtime_dependency('classifier', ">= 1.3.1")
s.add_runtime_dependency('directory_watcher', ">= 1.1.1")
s.add_runtime_dependency('maruku', ">= 0.5.9")
s.add_runtime_dependency('kramdown', ">= 0.13.2")
s.add_runtime_dependency('albino', ">= 1.3.2")
s.add_runtime_dependency('liquid', "~> 2.5.1")
s.add_runtime_dependency('classifier', "~> 1.3")
s.add_runtime_dependency('directory_watcher', "~> 1.4.1")
s.add_runtime_dependency('maruku', "~> 0.5")
s.add_runtime_dependency('kramdown', "~> 1.0.2")
s.add_runtime_dependency('pygments.rb', "~> 0.5.0")
s.add_runtime_dependency('commander', "~> 4.1.3")
s.add_runtime_dependency('safe_yaml', "~> 0.7.0")
s.add_runtime_dependency('colorator', "~> 0.1")
s.add_development_dependency('redgreen', ">= 1.2.2")
s.add_development_dependency('shoulda', ">= 2.11.3")
s.add_development_dependency('rr', ">= 1.0.2")
s.add_development_dependency('cucumber', ">= 0.10.0")
s.add_development_dependency('RedCloth', ">= 4.2.1")
s.add_development_dependency('rdiscount', ">= 1.6.5")
s.add_development_dependency('rake', "~> 10.0.3")
s.add_development_dependency('rdoc', "~> 3.11")
s.add_development_dependency('redgreen', "~> 1.2")
s.add_development_dependency('shoulda', "~> 3.3.2")
s.add_development_dependency('rr', "~> 1.0.0")
s.add_development_dependency('cucumber', "~> 1.2.1", '!= 1.2.4')
s.add_development_dependency('RedCloth', "~> 4.2")
s.add_development_dependency('rdiscount', "~> 1.6")
s.add_development_dependency('redcarpet', "~> 2.2.2")
s.add_development_dependency('launchy', "~> 2.1.2")
s.add_development_dependency('simplecov', "~> 0.7")
s.add_development_dependency('simplecov-gem-adapter', "~> 1.0.1")
# = MANIFEST =
s.files = %w[
History.txt
CONTRIBUTING.md
Gemfile
History.markdown
LICENSE
README.textile
Rakefile
bin/jekyll
cucumber.yml
features/create_sites.feature
features/drafts.feature
features/embed_filters.feature
features/markdown.feature
features/pagination.feature
@@ -57,39 +69,113 @@ Gem::Specification.new do |s|
features/support/env.rb
jekyll.gemspec
lib/jekyll.rb
lib/jekyll/albino.rb
lib/jekyll/command.rb
lib/jekyll/commands/build.rb
lib/jekyll/commands/doctor.rb
lib/jekyll/commands/new.rb
lib/jekyll/commands/serve.rb
lib/jekyll/configuration.rb
lib/jekyll/converter.rb
lib/jekyll/converters/identity.rb
lib/jekyll/converters/markdown.rb
lib/jekyll/converters/markdown/kramdown_parser.rb
lib/jekyll/converters/markdown/maruku_parser.rb
lib/jekyll/converters/markdown/rdiscount_parser.rb
lib/jekyll/converters/markdown/redcarpet_parser.rb
lib/jekyll/converters/textile.rb
lib/jekyll/convertible.rb
lib/jekyll/core_ext.rb
lib/jekyll/deprecator.rb
lib/jekyll/draft.rb
lib/jekyll/errors.rb
lib/jekyll/filters.rb
lib/jekyll/generator.rb
lib/jekyll/generators/pagination.rb
lib/jekyll/layout.rb
lib/jekyll/migrators/csv.rb
lib/jekyll/migrators/drupal.rb
lib/jekyll/migrators/marley.rb
lib/jekyll/migrators/mephisto.rb
lib/jekyll/migrators/mt.rb
lib/jekyll/migrators/textpattern.rb
lib/jekyll/migrators/typo.rb
lib/jekyll/migrators/wordpress.com.rb
lib/jekyll/migrators/wordpress.rb
lib/jekyll/mime.types
lib/jekyll/page.rb
lib/jekyll/plugin.rb
lib/jekyll/post.rb
lib/jekyll/related_posts.rb
lib/jekyll/site.rb
lib/jekyll/static_file.rb
lib/jekyll/stevenson.rb
lib/jekyll/tags/gist.rb
lib/jekyll/tags/highlight.rb
lib/jekyll/tags/include.rb
lib/jekyll/tags/post_url.rb
lib/site_template/.gitignore
lib/site_template/_config.yml
lib/site_template/_layouts/default.html
lib/site_template/_layouts/post.html
lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb
lib/site_template/css/main.css
lib/site_template/css/syntax.css
lib/site_template/index.html
script/bootstrap
site/.gitignore
site/CNAME
site/README
site/_config.yml
site/_includes/analytics.html
site/_includes/docs_contents.html
site/_includes/docs_contents_mobile.html
site/_includes/footer.html
site/_includes/header.html
site/_includes/primary-nav-items.html
site/_includes/section_nav.html
site/_includes/top.html
site/_layouts/default.html
site/_layouts/docs.html
site/css/gridism.css
site/css/normalize.css
site/css/pygments.css
site/css/style.css
site/docs/configuration.md
site/docs/contributing.md
site/docs/deployment-methods.md
site/docs/extras.md
site/docs/frontmatter.md
site/docs/github-pages.md
site/docs/heroku.md
site/docs/history.md
site/docs/index.md
site/docs/installation.md
site/docs/migrations.md
site/docs/pages.md
site/docs/pagination.md
site/docs/permalinks.md
site/docs/plugins.md
site/docs/posts.md
site/docs/resources.md
site/docs/sites.md
site/docs/structure.md
site/docs/templates.md
site/docs/troubleshooting.md
site/docs/upgrading.md
site/docs/usage.md
site/docs/variables.md
site/favicon.png
site/img/article-footer.png
site/img/footer-arrow.png
site/img/footer-logo.png
site/img/logo-2x.png
site/img/octojekyll.png
site/img/tube.png
site/img/tube1x.png
site/index.html
site/js/modernizr-2.5.3.min.js
test/fixtures/broken_front_matter1.erb
test/fixtures/broken_front_matter2.erb
test/fixtures/broken_front_matter3.erb
test/fixtures/exploit_front_matter.erb
test/fixtures/front_matter.erb
test/helper.rb
test/source/.htaccess
test/source/_includes/sig.markdown
test/source/_layouts/default.html
test/source/_layouts/simple.html
test/source/_plugins/dummy.rb
test/source/_posts/2008-02-02-not-published.textile
test/source/_posts/2008-02-02-published.textile
test/source/_posts/2008-10-18-foo-bar.textile
@@ -113,26 +199,45 @@ Gem::Specification.new do |s|
test/source/_posts/2010-01-09-time-override.textile
test/source/_posts/2010-01-09-timezone-override.textile
test/source/_posts/2010-01-16-override-data.textile
test/source/_posts/2011-04-12-md-extension.md
test/source/_posts/2011-04-12-text-extension.text
test/source/_posts/2013-01-02-post-excerpt.markdown
test/source/_posts/2013-01-12-nil-layout.textile
test/source/_posts/2013-01-12-no-layout.textile
test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep
test/source/_posts/2013-04-11-custom-excerpt.markdown
test/source/_posts/2013-05-10-number-category.textile
test/source/_posts/es/2008-11-21-nested.textile
test/source/about.html
test/source/category/_posts/2008-9-23-categories.textile
test/source/contacts.html
test/source/contacts/bar.html
test/source/contacts/index.html
test/source/css/screen.css
test/source/deal.with.dots.html
test/source/foo/_posts/bar/2008-12-12-topical-post.textile
test/source/index.html
test/source/sitemap.xml
test/source/symlink-test/symlinked-dir
test/source/symlink-test/symlinked-file
test/source/win/_posts/2009-05-24-yaml-linebreak.markdown
test/source/z_category/_posts/2008-9-23-categories.textile
test/suite.rb
test/test_command.rb
test/test_configuration.rb
test/test_convertible.rb
test/test_core_ext.rb
test/test_filters.rb
test/test_generated_site.rb
test/test_kramdown.rb
test/test_new_command.rb
test/test_page.rb
test/test_pager.rb
test/test_post.rb
test/test_rdiscount.rb
test/test_redcarpet.rb
test/test_redcloth.rb
test/test_related_posts.rb
test/test_site.rb
test/test_tags.rb
]

View File

@@ -18,109 +18,77 @@ require 'rubygems'
# stdlib
require 'fileutils'
require 'time'
require 'yaml'
require 'safe_yaml'
require 'English'
# 3rd party
require 'liquid'
require 'maruku'
require 'albino'
require 'colorator'
# internal requires
require 'jekyll/core_ext'
require 'jekyll/stevenson'
require 'jekyll/deprecator'
require 'jekyll/configuration'
require 'jekyll/site'
require 'jekyll/convertible'
require 'jekyll/layout'
require 'jekyll/page'
require 'jekyll/post'
require 'jekyll/draft'
require 'jekyll/filters'
require 'jekyll/static_file'
require 'jekyll/errors'
require 'jekyll/related_posts'
# extensions
require 'jekyll/plugin'
require 'jekyll/converter'
require 'jekyll/generator'
require 'jekyll/command'
require_all 'jekyll/commands'
require_all 'jekyll/converters'
require_all 'jekyll/converters/markdown'
require_all 'jekyll/generators'
require_all 'jekyll/tags'
SafeYAML::OPTIONS[:suppress_warnings] = true
module Jekyll
VERSION = '0.10.0'
VERSION = '1.0.4'
# Default options. Overriden by values in _config.yml or command-line opts.
# (Strings rather symbols used for compatability with YAML).
DEFAULTS = {
'safe' => false,
'auto' => false,
'server' => false,
'server_port' => 4000,
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => File.join(Dir.pwd, '_plugins'),
'future' => true,
'lsi' => false,
'pygments' => false,
'markdown' => 'maruku',
'permalink' => 'date',
'maruku' => {
'use_tex' => false,
'use_divs' => false,
'png_engine' => 'blahtex',
'png_dir' => 'images/latex',
'png_url' => '/images/latex'
},
'rdiscount' => {
'extensions' => []
},
'kramdown' => {
'auto_ids' => true,
'footnote_nr' => 1,
'entity_output' => 'as_char',
'toc_levels' => '1..6',
'use_coderay' => false,
'coderay' => {
'coderay_wrap' => 'div',
'coderay_line_numbers' => 'inline',
'coderay_line_number_start' => 1,
'coderay_tab_width' => 4,
'coderay_bold_every' => 10,
'coderay_css' => 'style'
}
}
}
# Generate a Jekyll configuration Hash by merging the default options
# with anything in _config.yml, and adding the given options on top.
# Public: Generate a Jekyll configuration Hash by merging the default
# options with anything in _config.yml, and adding the given options on top.
#
# override - A Hash of config directives that override any options in both
# the defaults and the config file. See Jekyll::DEFAULTS for a
# the defaults and the config file. See Jekyll::Configuration::DEFAULTS for a
# list of option names and their defaults.
#
# Returns the final configuration Hash.
def self.configuration(override)
# _config.yml may override default source location, but until
# then, we need to know where to look for _config.yml
source = override['source'] || Jekyll::DEFAULTS['source']
# Get configuration from <source>/_config.yml
config_file = File.join(source, '_config.yml')
begin
config = YAML.load_file(config_file)
raise "Invalid configuration - #{config_file}" if !config.is_a?(Hash)
$stdout.puts "Configuration from #{config_file}"
rescue => err
$stderr.puts "WARNING: Could not read configuration. " +
"Using defaults (and options)."
$stderr.puts "\t" + err.to_s
config = {}
end
config = Configuration[Configuration::DEFAULTS]
override = Configuration[override].stringify_keys
config = config.read_config_files(config.config_files(override))
# Merge DEFAULTS < _config.yml < override
Jekyll::DEFAULTS.deep_merge(config).deep_merge(override)
config = config.deep_merge(override).stringify_keys
set_timezone(config['timezone']) if config['timezone']
config
end
# Static: Set the TZ environment variable to use the timezone specified
#
# timezone - the IANA Time Zone
#
# Returns nothing
def self.set_timezone(timezone)
ENV['TZ'] = timezone
end
def self.logger
@logger ||= Stevenson.new
end
end

27
lib/jekyll/command.rb Normal file
View File

@@ -0,0 +1,27 @@
module Jekyll
class Command
def self.globs(source, destination)
Dir.chdir(source) do
dirs = Dir['*'].select { |x| File.directory?(x) }
dirs -= [destination, File.expand_path(destination), File.basename(destination)]
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
end
# Static: Run Site#process and catch errors
#
# site - the Jekyll::Site object
#
# Returns nothing
def self.process_site(site)
site.process
rescue Jekyll::FatalException => e
puts
Jekyll.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
Jekyll.logger.error "", "------------------------------------"
Jekyll.logger.error "", e.message
exit(1)
end
end
end

View File

@@ -0,0 +1,64 @@
module Jekyll
module Commands
class Build < Command
def self.process(options)
site = Jekyll::Site.new(options)
self.build(site, options)
self.watch(site, options) if options['watch']
end
# Private: Build the site from source into destination.
#
# site - A Jekyll::Site instance
# options - A Hash of options passed to the command
#
# Returns nothing.
def self.build(site, options)
source = options['source']
destination = options['destination']
Jekyll.logger.info "Source:", source
Jekyll.logger.info "Destination:", destination
print Jekyll.logger.formatted_topic "Generating..."
self.process_site(site)
puts "done."
end
# Private: Watch for file changes and rebuild the site.
#
# site - A Jekyll::Site instance
# options - A Hash of options passed to the command
#
# Returns nothing.
def self.watch(site, options)
require 'directory_watcher'
source = options['source']
destination = options['destination']
Jekyll.logger.info "Auto-regeneration:", "enabled"
dw = DirectoryWatcher.new(source, :glob => self.globs(source, destination), :pre_load => true)
dw.interval = 1
dw.add_observer do |*args|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")
print Jekyll.logger.formatted_topic("Regenerating:") + "#{args.size} files at #{t} "
self.process_site(site)
puts "...done."
end
dw.start
unless options['serving']
trap("INT") do
puts " Halting auto-regeneration."
exit 0
end
loop { sleep 1000 }
end
end
end
end
end

View File

@@ -0,0 +1,29 @@
module Jekyll
module Commands
class Doctor < Command
class << self
def process(options)
site = Jekyll::Site.new(options)
site.read
unless deprecated_relative_permalinks(site)
Jekyll.logger.info "Your test results", "are in. Everything looks fine."
end
end
def deprecated_relative_permalinks(site)
contains_deprecated_pages = false
site.pages.each do |page|
if page.uses_relative_permalinks
Jekyll.logger.warn "Deprecation:", "'#{page.path}' uses relative" +
" permalinks which will be deprecated in" +
" Jekyll v1.1 and beyond."
contains_deprecated_pages = true
end
end
contains_deprecated_pages
end
end
end
end
end

View File

@@ -0,0 +1,55 @@
require 'erb'
module Jekyll
module Commands
class New < Command
def self.process(args, options = {})
raise ArgumentError.new('You must specify a path.') if args.empty?
new_blog_path = File.expand_path(args.join(" "), Dir.pwd)
FileUtils.mkdir_p new_blog_path
if preserve_source_location?(new_blog_path, options)
Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
exit(1)
end
create_sample_files new_blog_path
File.open(File.expand_path(self.initialized_post_name, new_blog_path), "w") do |f|
f.write(self.scaffold_post_content(site_template))
end
puts "New jekyll site installed in #{new_blog_path}."
end
def self.scaffold_post_content(template_site)
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
end
# Internal: Gets the filename of the sample post to be created
#
# Returns the filename of the sample post, as a String
def self.initialized_post_name
"_posts/#{Time.now.strftime('%Y-%m-%d')}-welcome-to-jekyll.markdown"
end
private
def self.preserve_source_location?(path, options)
!options[:force] && !Dir["#{path}/**/*"].empty?
end
def self.create_sample_files(path)
FileUtils.cp_r site_template + '/.', path
FileUtils.rm File.expand_path(scaffold_path, path)
end
def self.site_template
File.expand_path("../../site_template", File.dirname(__FILE__))
end
def self.scaffold_path
"_posts/0000-00-00-welcome-to-jekyll.markdown.erb"
end
end
end
end

View File

@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
module Jekyll
module Commands
class Serve < Command
def self.process(options)
require 'webrick'
include WEBrick
destination = options['destination']
FileUtils.mkdir_p(destination)
mime_types_file = File.expand_path('../mime.types', File.dirname(__FILE__))
mime_types = WEBrick::HTTPUtils::load_mime_types(mime_types_file)
# recreate NondisclosureName under utf-8 circumstance
fh_option = WEBrick::Config::FileHandler
fh_option[:NondisclosureName] = ['.ht*','~*']
s = HTTPServer.new(
:Port => options['port'],
:BindAddress => options['host'],
:MimeTypes => mime_types
)
s.mount(options['baseurl'], HTTPServlet::FileHandler, destination, fh_option)
t = Thread.new { s.start }
trap("INT") { s.shutdown }
t.join()
end
end
end
end

208
lib/jekyll/configuration.rb Normal file
View File

@@ -0,0 +1,208 @@
# encoding: UTF-8
module Jekyll
class Configuration < Hash
# Default options. Overridden by values in _config.yml.
# Strings rather than symbols are used for compatibility with YAML.
DEFAULTS = {
'source' => Dir.pwd,
'destination' => File.join(Dir.pwd, '_site'),
'plugins' => '_plugins',
'layouts' => '_layouts',
'keep_files' => ['.git','.svn'],
'timezone' => nil, # use the local timezone
'safe' => false,
'show_drafts' => nil,
'limit_posts' => 0,
'lsi' => false,
'future' => true, # remove and make true just default
'pygments' => true,
'relative_permalinks' => true, # backwards-compatibility with < 1.0
# will be set to false once 1.1 hits
'markdown' => 'maruku',
'permalink' => 'date',
'baseurl' => '/',
'include' => ['.htaccess'],
'exclude' => [],
'paginate_path' => 'page:num',
'markdown_ext' => 'markdown,mkd,mkdn,md',
'textile_ext' => 'textile',
'port' => '4000',
'host' => '0.0.0.0',
'excerpt_separator' => "\n\n",
'maruku' => {
'use_tex' => false,
'use_divs' => false,
'png_engine' => 'blahtex',
'png_dir' => 'images/latex',
'png_url' => '/images/latex'
},
'rdiscount' => {
'extensions' => []
},
'redcarpet' => {
'extensions' => []
},
'kramdown' => {
'auto_ids' => true,
'footnote_nr' => 1,
'entity_output' => 'as_char',
'toc_levels' => '1..6',
'smart_quotes' => 'lsquo,rsquo,ldquo,rdquo',
'use_coderay' => false,
'coderay' => {
'coderay_wrap' => 'div',
'coderay_line_numbers' => 'inline',
'coderay_line_number_start' => 1,
'coderay_tab_width' => 4,
'coderay_bold_every' => 10,
'coderay_css' => 'style'
}
},
'redcloth' => {
'hard_breaks' => true
}
}
# Public: Turn all keys into string
#
# Return a copy of the hash where all its keys are strings
def stringify_keys
reduce({}) { |hsh,(k,v)| hsh.merge(k.to_s => v) }
end
# Public: Directory of the Jekyll source folder
#
# override - the command-line options hash
#
# Returns the path to the Jekyll source directory
def source(override)
override['source'] || self['source'] || DEFAULTS['source']
end
# Public: Generate list of configuration files from the override
#
# override - the command-line options hash
#
# Returns an Array of config files
def config_files(override)
# Get configuration from <source>/_config.yml or <source>/<config_file>
config_files = override.delete('config')
config_files = File.join(source(override), "_config.yml") if config_files.to_s.empty?
config_files = [config_files] unless config_files.is_a? Array
config_files
end
# Public: Read configuration and return merged Hash
#
# file - the path to the YAML file to be read in
#
# Returns this configuration, overridden by the values in the file
def read_config_file(file)
next_config = YAML.safe_load_file(file)
raise "Configuration file: (INVALID) #{file}".yellow if !next_config.is_a?(Hash)
Jekyll.logger.info "Configuration file:", file
next_config
end
# Public: Read in a list of configuration files and merge with this hash
#
# files - the list of configuration file paths
#
# Returns the full configuration, with the defaults overridden by the values in the
# configuration files
def read_config_files(files)
configuration = clone
begin
files.each do |config_file|
new_config = read_config_file(config_file)
configuration = configuration.deep_merge(new_config)
end
rescue SystemCallError
# Errno:ENOENT = file not found
Jekyll.logger.warn "Configuration file:", "none"
rescue => err
Jekyll.logger.warn "WARNING:", "Error reading configuration. " +
"Using defaults (and options)."
$stderr.puts "#{err}"
end
configuration.backwards_compatibilize
end
# Public: Split a CSV string into an array containing its values
#
# csv - the string of comma-separated values
#
# Returns an array of the values contained in the CSV
def csv_to_array(csv)
csv.split(",").map(&:strip)
end
# Public: Ensure the proper options are set in the configuration to allow for
# backwards-compatibility with Jekyll pre-1.0
#
# Returns the backwards-compatible configuration
def backwards_compatibilize
config = clone
# Provide backwards-compatibility
if config.has_key?('auto') || config.has_key?('watch')
Jekyll.logger.warn "Deprecation:", "Auto-regeneration can no longer" +
" be set from your configuration file(s). Use the"+
" --watch/-w command-line option instead."
config.delete('auto')
config.delete('watch')
end
if config.has_key? 'server'
Jekyll.logger.warn "Deprecation:", "The 'server' configuration option" +
" is no longer accepted. Use the 'jekyll serve'" +
" subcommand to serve your site with WEBrick."
config.delete('server')
end
if config.has_key? 'server_port'
Jekyll.logger.warn "Deprecation:", "The 'server_port' configuration option" +
" has been renamed to 'port'. Please update your config" +
" file accordingly."
# copy but don't overwrite:
config['port'] = config['server_port'] unless config.has_key?('port')
config.delete('server_port')
end
if config.has_key?('exclude') && config['exclude'].is_a?(String)
Jekyll.logger.warn "Deprecation:", "The 'exclude' configuration option" +
" must now be specified as an array, but you specified" +
" a string. For now, we've treated the string you provided" +
" as a list of comma-separated values."
config['exclude'] = csv_to_array(config['exclude'])
end
if config.has_key?('include') && config['include'].is_a?(String)
Jekyll.logger.warn "Deprecation:", "The 'include' configuration option" +
" must now be specified as an array, but you specified" +
" a string. For now, we've treated the string you provided" +
" as a list of comma-separated values."
config['include'] = csv_to_array(config['include'])
end
config
end
end
end

View File

@@ -1,5 +1,4 @@
module Jekyll
class Converter < Plugin
# Public: Get or set the pygments prefix. When an argument is specified,
# the prefix will be set. If no argument is specified, the current prefix
@@ -46,5 +45,4 @@ module Jekyll
self.class.pygments_suffix
end
end
end
end

View File

@@ -1,22 +1,21 @@
module Jekyll
module Converters
class Identity < Converter
safe true
class IdentityConverter < Converter
safe true
priority :lowest
priority :lowest
def matches(ext)
true
end
def matches(ext)
true
def output_ext(ext)
ext
end
def convert(content)
content
end
end
def output_ext(ext)
ext
end
def convert(content)
content
end
end
end

View File

@@ -1,113 +1,43 @@
module Jekyll
module Converters
class Markdown < Converter
safe true
class MarkdownConverter < Converter
safe true
pygments_prefix "\n"
pygments_suffix "\n"
pygments_prefix "\n"
pygments_suffix "\n"
def setup
return if @setup
# Set the Markdown interpreter (and Maruku self.config, if necessary)
case @config['markdown']
when 'kramdown'
begin
require 'kramdown'
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")
end
when 'rdiscount'
begin
require 'rdiscount'
# Load rdiscount extensions
@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
when 'maruku'
begin
require 'maruku'
if @config['maruku']['use_divs']
require 'maruku/ext/div'
STDERR.puts 'Maruku: Using extended syntax for div elements.'
end
if @config['maruku']['use_tex']
require 'maruku/ext/math'
STDERR.puts "Maruku: Using LaTeX extension. Images in `#{@config['maruku']['png_dir']}`."
# Switch off MathML output
MaRuKu::Globals[:html_math_output_mathml] = false
MaRuKu::Globals[:html_math_engine] = 'none'
# Turn on math to PNG support with blahtex
# Resulting PNGs stored in `images/latex`
MaRuKu::Globals[:html_math_output_png] = true
MaRuKu::Globals[:html_png_engine] = @config['maruku']['png_engine']
MaRuKu::Globals[:html_png_dir] = @config['maruku']['png_dir']
MaRuKu::Globals[:html_png_url] = @config['maruku']['png_url']
end
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")
end
else
STDERR.puts "Invalid Markdown processor: #{@config['markdown']}"
STDERR.puts " Valid options are [ maruku | rdiscount | kramdown ]"
raise FatalException.new("Invalid Markdown process: #{@config['markdown']}")
end
@setup = true
end
def matches(ext)
ext =~ /(markdown|mkdn?|md)/i
end
def output_ext(ext)
".html"
end
def convert(content)
setup
case @config['markdown']
when 'kramdown'
# Check for use of coderay
if @config['kramdown']['use_coderay']
Kramdown::Document.new(content, {
:auto_ids => @config['kramdown']['auto_ids'],
:footnote_nr => @config['kramdown']['footnote_nr'],
:entity_output => @config['kramdown']['entity_output'],
:toc_levels => @config['kramdown']['toc_levels'],
:coderay_wrap => @config['kramdown']['coderay']['coderay_wrap'],
:coderay_line_numbers => @config['kramdown']['coderay']['coderay_line_numbers'],
:coderay_line_number_start => @config['kramdown']['coderay']['coderay_line_number_start'],
:coderay_tab_width => @config['kramdown']['coderay']['coderay_tab_width'],
:coderay_bold_every => @config['kramdown']['coderay']['coderay_bold_every'],
:coderay_css => @config['kramdown']['coderay']['coderay_css']
}).to_html
def setup
return if @setup
@parser = case @config['markdown']
when 'redcarpet'
RedcarpetParser.new @config
when 'kramdown'
KramdownParser.new @config
when 'rdiscount'
RDiscountParser.new @config
when 'maruku'
MarukuParser.new @config
else
# not using coderay
Kramdown::Document.new(content, {
:auto_ids => @config['kramdown']['auto_ids'],
:footnote_nr => @config['kramdown']['footnote_nr'],
:entity_output => @config['kramdown']['entity_output'],
:toc_levels => @config['kramdown']['toc_levels']
}).to_html
end
when 'rdiscount'
RDiscount.new(content, *@rdiscount_extensions).to_html
when 'maruku'
Maruku.new(content).to_html
STDERR.puts "Invalid Markdown processor: #{@config['markdown']}"
STDERR.puts " Valid options are [ maruku | rdiscount | kramdown | redcarpet ]"
raise FatalException.new("Invalid Markdown process: #{@config['markdown']}")
end
@setup = true
end
def matches(ext)
rgx = '(' + @config['markdown_ext'].gsub(',','|') +')'
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
end
def output_ext(ext)
".html"
end
def convert(content)
setup
@parser.convert(content)
end
end
end
end

View File

@@ -0,0 +1,44 @@
module Jekyll
module Converters
class Markdown
class KramdownParser
def initialize(config)
require 'kramdown'
@config = config
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")
end
def convert(content)
# Check for use of coderay
kramdown_configs = if @config['kramdown']['use_coderay']
base_kramdown_configs.merge({
:coderay_wrap => @config['kramdown']['coderay']['coderay_wrap'],
:coderay_line_numbers => @config['kramdown']['coderay']['coderay_line_numbers'],
:coderay_line_number_start => @config['kramdown']['coderay']['coderay_line_number_start'],
:coderay_tab_width => @config['kramdown']['coderay']['coderay_tab_width'],
:coderay_bold_every => @config['kramdown']['coderay']['coderay_bold_every'],
:coderay_css => @config['kramdown']['coderay']['coderay_css']
})
else
# not using coderay
base_kramdown_configs
end
Kramdown::Document.new(content, kramdown_configs).to_html
end
def base_kramdown_configs
{
:auto_ids => @config['kramdown']['auto_ids'],
:footnote_nr => @config['kramdown']['footnote_nr'],
:entity_output => @config['kramdown']['entity_output'],
:toc_levels => @config['kramdown']['toc_levels'],
:smart_quotes => @config['kramdown']['smart_quotes']
}
end
end
end
end
end

View File

@@ -0,0 +1,51 @@
module Jekyll
module Converters
class Markdown
class MarukuParser
def initialize(config)
require 'maruku'
@config = config
@errors = []
load_divs_library if @config['maruku']['use_divs']
load_blahtext_library if @config['maruku']['use_tex']
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")
end
def load_divs_library
require 'maruku/ext/div'
STDERR.puts 'Maruku: Using extended syntax for div elements.'
end
def load_blahtext_library
require 'maruku/ext/math'
STDERR.puts "Maruku: Using LaTeX extension. Images in `#{@config['maruku']['png_dir']}`."
# Switch off MathML output
MaRuKu::Globals[:html_math_output_mathml] = false
MaRuKu::Globals[:html_math_engine] = 'none'
# Turn on math to PNG support with blahtex
# Resulting PNGs stored in `images/latex`
MaRuKu::Globals[:html_math_output_png] = true
MaRuKu::Globals[:html_png_engine] = @config['maruku']['png_engine']
MaRuKu::Globals[:html_png_dir] = @config['maruku']['png_dir']
MaRuKu::Globals[:html_png_url] = @config['maruku']['png_url']
end
def print_errors_and_fail
print @errors.join
raise MaRuKu::Exception, "MaRuKu encountered problem(s) while converting your markup."
end
def convert(content)
converted = Maruku.new(content, :error_stream => @errors).to_html
print_errors_and_fail unless @errors.empty?
converted
end
end
end
end
end

View File

@@ -0,0 +1,35 @@
module Jekyll
module Converters
class Markdown
class RDiscountParser
def initialize(config)
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)
rd = RDiscount.new(content, *@rdiscount_extensions)
html = rd.to_html
if @config['rdiscount']['toc_token']
html = replace_generated_toc(rd, html, @config['rdiscount']['toc_token'])
end
html
end
private
def replace_generated_toc(rd, html, toc_token)
if rd.generate_toc && html.include?(toc_token)
html.gsub(toc_token, rd.toc_content.force_encoding('utf-8'))
else
html
end
end
end
end
end
end

View File

@@ -0,0 +1,70 @@
module Jekyll
module Converters
class Markdown
class RedcarpetParser
module CommonMethods
def add_code_tags(code, lang)
code = code.sub(/<pre>/, "<pre><code class=\"#{lang} language-#{lang}\" data-lang=\"#{lang}\">")
code = code.sub(/<\/pre>/,"</code></pre>")
end
end
module WithPygments
include CommonMethods
def block_code(code, lang)
require 'pygments'
lang = lang && lang.split.first || "text"
output = add_code_tags(
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
lang
)
end
end
module WithoutPygments
require 'cgi'
include CommonMethods
def code_wrap(code)
"<div class=\"highlight\"><pre>#{CGI::escapeHTML(code)}</pre></div>"
end
def block_code(code, lang)
lang = lang && lang.split.first || "text"
output = add_code_tags(code_wrap(code), lang)
end
end
def initialize(config)
require 'redcarpet'
@config = config
@redcarpet_extensions = {}
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
@renderer ||= if @config['pygments']
Class.new(Redcarpet::Render::HTML) do
include WithPygments
end
else
Class.new(Redcarpet::Render::HTML) do
include WithoutPygments
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")
end
def convert(content)
@redcarpet_extensions[:fenced_code_blocks] = !@redcarpet_extensions[:no_fenced_code_blocks]
@renderer.send :include, Redcarpet::Render::SmartyPants if @redcarpet_extensions[:smart]
markdown = Redcarpet::Markdown.new(@renderer.new(@redcarpet_extensions), @redcarpet_extensions)
markdown.render(content)
end
end
end
end
end

View File

@@ -1,33 +1,50 @@
module Jekyll
module Converters
class Textile < Converter
safe true
class TextileConverter < Converter
safe true
pygments_prefix '<notextile>'
pygments_suffix '</notextile>'
pygments_prefix '<notextile>'
pygments_suffix '</notextile>'
def setup
return if @setup
require 'redcloth'
@setup = true
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")
end
def setup
return if @setup
require 'redcloth'
@setup = true
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")
end
def matches(ext)
rgx = '(' + @config['textile_ext'].gsub(',','|') +')'
ext =~ Regexp.new(rgx, Regexp::IGNORECASE)
end
def matches(ext)
ext =~ /textile/i
end
def output_ext(ext)
".html"
end
def output_ext(ext)
".html"
end
def convert(content)
setup
def convert(content)
setup
RedCloth.new(content).to_html
# Shortcut if config doesn't contain RedCloth section
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)
attrs = ['filter_classes', 'filter_html', 'filter_ids', 'filter_styles',
'hard_breaks', 'lite_mode', 'no_span_caps', 'sanitize_html']
r = RedCloth.new(content)
# Set attributes in r if they are NOT nil in the config
attrs.each do |attr|
r.instance_variable_set("@#{attr}".to_sym, @config['redcloth'][attr]) unless @config['redcloth'][attr].nil?
end
r.to_html
end
end
end
end

View File

@@ -1,3 +1,7 @@
# encoding: UTF-8
require 'set'
# Convertible provides methods for converting a pagelike item
# from a certain type of markup into actual content
#
@@ -8,6 +12,7 @@
# self.data=
# self.ext=
# self.output=
# self.name
module Jekyll
module Convertible
# Returns the contents as a String.
@@ -22,16 +27,17 @@ module Jekyll
#
# Returns nothing.
def read_yaml(base, name)
self.content = File.read(File.join(base, name))
begin
self.content = File.read(File.join(base, name))
if self.content =~ /^(---\s*\n.*?\n?)^(---\s*$\n?)/m
self.content = $POSTMATCH
begin
self.data = YAML.load($1)
rescue => e
puts "YAML Exception: #{e.message}"
if self.content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
self.content = $POSTMATCH
self.data = YAML.safe_load($1)
end
rescue SyntaxError => e
puts "YAML Exception reading #{File.join(base, name)}: #{e.message}"
rescue Exception => e
puts "Error reading file #{File.join(base, name)}: #{e.message}"
end
self.data ||= {}
@@ -60,6 +66,49 @@ module Jekyll
@converter ||= self.site.converters.find { |c| c.matches(self.ext) }
end
# Render Liquid in the content
#
# content - the raw Liquid content to render
# payload - the payload for Liquid
# info - the info for Liquid
#
# Returns the converted content
def render_liquid(content, payload, info)
Liquid::Template.parse(content).render!(payload, info)
rescue Exception => e
Jekyll.logger.error "Liquid Exception:", "#{e.message} in #{payload[:file]}"
raise e
end
# Recursively render layouts
#
# layouts - a list of the layouts
# payload - the payload for Liquid
# info - the info for Liquid
#
# Returns nothing
def render_all_layouts(layouts, payload, info)
# recursively render layouts
layout = layouts[self.data["layout"]]
used = Set.new([layout])
while layout
payload = payload.deep_merge({"content" => self.output, "page" => layout.data})
self.output = self.render_liquid(layout.content,
payload.merge({:file => layout.name}),
info)
if layout = layouts[layout.data["layout"]]
if used.include?(layout)
layout = nil # avoid recursive chain
else
used << layout
end
end
end
end
# Add any necessary layouts to this convertible document.
#
# payload - The site payload Hash.
@@ -67,35 +116,33 @@ module Jekyll
#
# Returns nothing.
def do_layout(payload, layouts)
info = { :filters => [Jekyll::Filters], :registers => { :site => self.site } }
info = { :filters => [Jekyll::Filters], :registers => { :site => self.site, :page => payload['page'] } }
# render and transform content (this becomes the final content of the object)
payload["pygments_prefix"] = converter.pygments_prefix
payload["pygments_suffix"] = converter.pygments_suffix
begin
self.content = Liquid::Template.parse(self.content).render(payload, info)
rescue => e
puts "Liquid Exception: #{e.message} in #{self.data["layout"]}"
end
self.content = self.render_liquid(self.content,
payload.merge({:file => self.name}),
info)
self.transform
# output keeps track of what will finally be written
self.output = self.content
# recursively render layouts
layout = layouts[self.data["layout"]]
while layout
payload = payload.deep_merge({"content" => self.output, "page" => layout.data})
self.render_all_layouts(layouts, payload, info)
end
begin
self.output = Liquid::Template.parse(layout.content).render(payload, info)
rescue => e
puts "Liquid Exception: #{e.message} in #{self.data["layout"]}"
end
layout = layouts[layout.data["layout"]]
# Write the generated page file to the destination directory.
#
# dest - The String path to the destination dir.
#
# Returns nothing.
def write(dest)
path = destination(dest)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
f.write(self.output)
end
end
end

View File

@@ -24,7 +24,7 @@ class Hash
# and then the plural key, and handling any nil entries.
# +hash+ the hash to read from
# +singular_key+ the singular key
# +plural_key+ the singular key
# +plural_key+ the plural key
#
# Returns an array
def pluralized_array(singular_key, plural_key)
@@ -50,3 +50,19 @@ class Date
strftime("%Y-%m-%dT%H:%M:%S%Z")
end if RUBY_VERSION < '1.9'
end
module Enumerable
# Returns true if path matches against any glob pattern.
# Look for more detail about glob pattern in method File::fnmatch.
def glob_include?(e)
any? { |exp| File.fnmatch?(exp, e) }
end
end
if RUBY_VERSION < "1.9"
class String
def force_encoding(enc)
self
end
end
end

32
lib/jekyll/deprecator.rb Normal file
View File

@@ -0,0 +1,32 @@
module Jekyll
class Deprecator
def self.process(args)
no_subcommand(args)
deprecation_message args, "--server", "The --server command has been replaced by the \
'serve' subcommand."
deprecation_message args, "--no-server", "To build Jekyll without launching a server, \
use the 'build' subcommand."
deprecation_message args, "--auto", "The switch '--auto' has been replaced with '--watch'."
deprecation_message args, "--no-auto", "To disable auto-replication, simply leave off \
the '--watch' switch."
deprecation_message args, "--pygments", "The 'pygments' setting can only be set in \
your config files."
deprecation_message args, "--paginate", "The 'paginate' setting can only be set in your \
config files."
deprecation_message args, "--url", "The 'url' setting can only be set in your config files."
end
def self.no_subcommand(args)
if args.size > 0 && args.first =~ /^--/ && !%w[--help --version].include?(args.first)
Jekyll.logger.error "Deprecation:", "Jekyll now uses subcommands instead of just \
switches. Run `jekyll help' to find out more."
end
end
def self.deprecation_message(args, deprecated_argument, message)
if args.include?(deprecated_argument)
Jekyll.logger.error "Deprecation:", message
end
end
end
end

35
lib/jekyll/draft.rb Normal file
View File

@@ -0,0 +1,35 @@
module Jekyll
class Draft < Post
# Valid post name regex (no date)
MATCHER = /^(.*)(\.[^.]+)$/
# Draft name validator. Draft filenames must be like:
# my-awesome-post.textile
#
# Returns true if valid, false if not.
def self.valid?(name)
name =~ MATCHER
end
# Get the full path to the directory containing the draft files
def containing_dir(source, dir)
File.join(source, dir, '_drafts')
end
# Extract information from the post filename.
#
# name - The String filename of the post file.
#
# Returns nothing.
def process(name)
m, slug, ext = *name.match(MATCHER)
self.date = File.mtime(File.join(@base, name))
self.slug = slug
self.ext = ext
end
end
end

View File

@@ -1,6 +1,4 @@
module Jekyll
class FatalException < StandardError
end
end
end

View File

@@ -1,40 +1,139 @@
require 'uri'
module Jekyll
module Filters
# Convert a Textile string into HTML output.
#
# input - The Textile String to convert.
#
# Returns the HTML formatted String.
def textilize(input)
TextileConverter.new.convert(input)
site = @context.registers[:site]
converter = site.getConverterImpl(Jekyll::Converters::Textile)
converter.convert(input)
end
# Convert a Markdown string into HTML output.
#
# input - The Markdown String to convert.
#
# Returns the HTML formatted String.
def markdownify(input)
site = @context.registers[:site]
converter = site.getConverterImpl(Jekyll::Converters::Markdown)
converter.convert(input)
end
# Format a date in short format e.g. "27 Jan 2011".
#
# date - the Time to format.
#
# Returns the formatting String.
def date_to_string(date)
date.strftime("%d %b %Y")
time(date).strftime("%d %b %Y")
end
# Format a date in long format e.g. "27 January 2011".
#
# date - The Time to format.
#
# Returns the formatted String.
def date_to_long_string(date)
date.strftime("%d %B %Y")
time(date).strftime("%d %B %Y")
end
# Format a date for use in XML.
#
# date - The Time to format.
#
# Examples
#
# date_to_xmlschema(Time.now)
# # => "2011-04-24T20:34:46+08:00"
#
# Returns the formatted String.
def date_to_xmlschema(date)
date.xmlschema
time(date).xmlschema
end
# Format a date according to RFC-822
#
# date - The Time to format.
#
# Examples
#
# date_to_rfc822(Time.now)
# # => "Sun, 24 Apr 2011 12:34:46 +0000"
#
# Returns the formatted String.
def date_to_rfc822(date)
time(date).rfc822
end
# XML escape a string for use. Replaces any special characters with
# appropriate HTML entity replacements.
#
# input - The String to escape.
#
# Examples
#
# xml_escape('foo "bar" <baz>')
# # => "foo &quot;bar&quot; &lt;baz&gt;"
#
# Returns the escaped String.
def xml_escape(input)
CGI.escapeHTML(input)
end
# CGI escape a string for use in a URL. Replaces any special characters
# with appropriate %XX replacements.
#
# input - The String to escape.
#
# Examples
#
# cgi_escape('foo,bar;baz?')
# # => "foo%2Cbar%3Bbaz%3F"
#
# Returns the escaped String.
def cgi_escape(input)
CGI::escape(input)
end
# URI escape a string.
#
# input - The String to escape.
#
# Examples
#
# uri_escape('foo, bar \\baz?')
# # => "foo,%20bar%20%5Cbaz?"
#
# Returns the escaped String.
def uri_escape(input)
URI.escape(input)
end
# Count the number of words in the input string.
#
# input - The String on which to operate.
#
# Returns the Integer word count.
def number_of_words(input)
input.split.length
end
# Join an array of things into a string by separating with commes and the
# word "and" for the last one.
#
# array - The Array of Strings to join.
#
# Examples
#
# array_to_sentence_string(["apples", "oranges", "grapes"])
# # => "apples, oranges, and grapes"
#
# Returns the formatted String.
def array_to_sentence_string(array)
connector = "and"
case array.length
@@ -49,5 +148,17 @@ module Jekyll
end
end
private
def time(input)
case input
when Time
input
when String
Time.parse(input)
else
Jekyll.logger.error "Invalid Date:", "'#{input}' is not a valid datetime."
exit(1)
end
end
end
end

View File

@@ -1,7 +1,4 @@
module Jekyll
class Generator < Plugin
end
end
end

View File

@@ -1,57 +1,109 @@
module Jekyll
module Generators
class Pagination < Generator
# This generator is safe from arbitrary code execution.
safe true
class Pagination < Generator
safe true
def generate(site)
site.pages.dup.each do |page|
paginate(site, page) if Pager.pagination_enabled?(site.config, page.name)
end
end
# Paginates the blog's posts. Renders the index.html file into paginated
# directories, ie: page2/index.html, page3/index.html, etc and adds more
# site-wide data.
# +page+ is the index.html Page that requires pagination
#
# {"paginator" => { "page" => <Number>,
# "per_page" => <Number>,
# "posts" => [<Post>],
# "total_posts" => <Number>,
# "total_pages" => <Number>,
# "previous_page" => <Number>,
# "next_page" => <Number> }}
def paginate(site, page)
all_posts = site.site_payload['site']['posts']
pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
(1..pages).each do |num_page|
pager = Pager.new(site.config, num_page, all_posts, pages)
if num_page > 1
newpage = Page.new(site, site.source, page.dir, page.name)
newpage.pager = pager
newpage.dir = File.join(page.dir, "page#{num_page}")
site.pages << newpage
else
page.pager = pager
# Generate paginated pages if necessary.
#
# site - The Site.
#
# Returns nothing.
def generate(site)
site.pages.dup.each do |page|
paginate(site, page) if Pager.pagination_enabled?(site.config, page)
end
end
end
# Paginates the blog's posts. Renders the index.html file into paginated
# directories, e.g.: page2/index.html, page3/index.html, etc and adds more
# site-wide data.
#
# site - The Site.
# page - The index.html Page that requires pagination.
#
# {"paginator" => { "page" => <Number>,
# "per_page" => <Number>,
# "posts" => [<Post>],
# "total_posts" => <Number>,
# "total_pages" => <Number>,
# "previous_page" => <Number>,
# "next_page" => <Number> }}
def paginate(site, page)
all_posts = site.site_payload['site']['posts']
pages = Pager.calculate_pages(all_posts, site.config['paginate'].to_i)
(1..pages).each do |num_page|
pager = Pager.new(site.config, num_page, all_posts, pages)
if num_page > 1
newpage = Page.new(site, site.source, page.dir, page.name)
newpage.pager = pager
newpage.dir = File.join(page.dir, Pager.paginate_path(site.config, num_page))
site.pages << newpage
else
page.pager = pager
end
end
end
end
end
class Pager
attr_reader :page, :per_page, :posts, :total_posts, :total_pages, :previous_page, :next_page
attr_reader :page, :per_page, :posts, :total_posts, :total_pages,
:previous_page, :previous_page_path, :next_page, :next_page_path
# Calculate the number of pages.
#
# all_posts - The Array of all Posts.
# per_page - The Integer of entries per page.
#
# Returns the Integer number of pages.
def self.calculate_pages(all_posts, per_page)
num_pages = all_posts.size / per_page.to_i
num_pages = num_pages + 1 if all_posts.size % per_page.to_i != 0
num_pages
(all_posts.size.to_f / per_page.to_i).ceil
end
def self.pagination_enabled?(config, file)
file == 'index.html' && !config['paginate'].nil?
# Determine if pagination is enabled for a given file.
#
# config - The configuration Hash.
# page - The Jekyll::Page with which to paginate
#
# Returns true if pagination is enabled, false otherwise.
def self.pagination_enabled?(config, page)
!config['paginate'].nil? &&
page.name == 'index.html' &&
subdirectories_identical(config['paginate_path'], page.dir)
end
# Determine if the subdirectories of the two paths are the same relative to source
#
# paginate_path - the paginate_path configuration setting
# page_dir - the directory of the Jekyll::Page
#
# Returns whether the subdirectories are the same relative to source
def self.subdirectories_identical(paginate_path, page_dir)
File.dirname(paginate_path).gsub(/\A\./, '') == page_dir.gsub(/\/\z/, '')
end
# Static: Return the pagination path of the page
#
# site_config - the site config
# num_page - the pagination page number
#
# Returns the pagination path as a string
def self.paginate_path(site_config, num_page)
return nil if num_page.nil? || num_page <= 1
format = site_config['paginate_path']
format = format.sub(':num', num_page.to_s)
File.basename(format)
end
# Initialize a new Pager.
#
# config - The Hash configuration of the site.
# page - The Integer page number.
# all_posts - The Array of all the site's Posts.
# num_pages - The Integer number of pages or nil if you'd like the number
# of pages calculated.
def initialize(config, page, all_posts, num_pages = nil)
@page = page
@per_page = config['paginate'].to_i
@@ -67,9 +119,14 @@ module Jekyll
@total_posts = all_posts.size
@posts = all_posts[init..offset]
@previous_page = @page != 1 ? @page - 1 : nil
@previous_page_path = Pager.paginate_path(config, @previous_page)
@next_page = @page != @total_pages ? @page + 1 : nil
@next_page_path = Pager.paginate_path(config, @next_page)
end
# Convert this Pager's data to a Hash suitable for use by Liquid.
#
# Returns the Hash representation of this Pager.
def to_liquid
{
'page' => page,
@@ -78,10 +135,10 @@ module Jekyll
'total_posts' => total_posts,
'total_pages' => total_pages,
'previous_page' => previous_page,
'next_page' => next_page
'previous_page_path' => previous_page_path,
'next_page' => next_page,
'next_page_path' => next_page_path
}
end
end
end

View File

@@ -1,18 +1,27 @@
module Jekyll
class Layout
include Convertible
attr_accessor :site
# Gets the Site object.
attr_reader :site
# Gets the name of this layout.
attr_reader :name
# Gets/Sets the extension of this layout.
attr_accessor :ext
attr_accessor :data, :content
# Gets/Sets the Hash that holds the metadata for this layout.
attr_accessor :data
# Gets/Sets the content of this layout.
attr_accessor :content
# Initialize a new Layout.
# +site+ is the Site
# +base+ is the String path to the <source>
# +name+ is the String filename of the post file
#
# Returns <Page>
# site - The Site.
# base - The String path to the source.
# name - The String filename of the post file.
def initialize(site, base, name)
@site = site
@base = base
@@ -24,13 +33,13 @@ module Jekyll
self.read_yaml(base, name)
end
# Extract information from the layout filename
# +name+ is the String filename of the layout file
# Extract information from the layout filename.
#
# Returns nothing
# name - The String filename of the layout file.
#
# Returns nothing.
def process(name)
self.ext = File.extname(name)
end
end
end
end

View File

@@ -1,26 +0,0 @@
module Jekyll
module CSV
#Reads a csv with title, permalink, body, published_at, and filter.
#It creates a post file for each row in the csv
def self.process(file = "posts.csv")
FileUtils.mkdir_p "_posts"
posts = 0
FasterCSV.foreach(file) do |row|
next if row[0] == "title"
posts += 1
name = row[3].split(" ")[0]+"-"+row[1]+(row[4] =~ /markdown/ ? ".markdown" : ".textile")
File.open("_posts/#{name}", "w") do |f|
f.puts <<-HEADER
---
layout: post
title: #{row[0]}
---
HEADER
f.puts row[2]
end
end
"Created #{posts} posts!"
end
end
end

View File

@@ -1,86 +0,0 @@
require 'rubygems'
require 'sequel'
require 'fileutils'
require 'yaml'
# NOTE: This converter requires Sequel and the MySQL gems.
# The MySQL gem can be difficult to install on OS X. Once you have MySQL
# installed, running the following commands should work:
# $ sudo gem install sequel
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
module Jekyll
module Drupal
# Reads a MySQL database via Sequel and creates a post file for each
# post in wp_posts that has post_status = 'publish'.
# This restriction is made because 'draft' posts are not guaranteed to
# have valid dates.
QUERY = "SELECT node.nid, node.title, node_revisions.body, node.created, node.status FROM node, node_revisions WHERE (node.type = 'blog' OR node.type = 'story') AND node.vid = node_revisions.vid"
def self.process(dbname, user, pass, host = 'localhost')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
FileUtils.mkdir_p "_drafts"
# Create the refresh layout
# Change the refresh url if you customized your permalink config
File.open("_layouts/refresh.html", "w") do |f|
f.puts <<EOF
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url={{ page.refresh_to_post_id }}.html" />
</head>
</html>
EOF
end
db[QUERY].each do |post|
# Get required fields and construct Jekyll compatible name
node_id = post[:nid]
title = post[:title]
content = post[:body]
created = post[:created]
time = Time.at(created)
is_published = post[:status] == 1
dir = is_published ? "_posts" : "_drafts"
slug = title.strip.downcase.gsub(/(&|&amp;)/, ' and ').gsub(/[\s\.\/\\]/, '-').gsub(/[^\w-]/, '').gsub(/[-_]{2,}/, '-').gsub(/^[-_]/, '').gsub(/[-_]$/, '')
name = time.strftime("%Y-%m-%d-") + slug + '.md'
# Get the relevant fields as a hash, delete empty fields and convert
# to YAML for the header
data = {
'layout' => 'post',
'title' => title.to_s,
'created' => created,
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
# Write out the data and content to file
File.open("#{dir}/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
# Make a file to redirect from the old Drupal URL
if is_published
FileUtils.mkdir_p "node/#{node_id}"
File.open("node/#{node_id}/index.md", "w") do |f|
f.puts "---"
f.puts "layout: refresh"
f.puts "refresh_to_post_id: /#{time.strftime("%Y/%m/%d/") + slug}"
f.puts "---"
end
end
end
# TODO: Make dirs & files for nodes of type 'page'
# Make refresh pages for these as well
# TODO: Make refresh dirs & files according to entries in url_alias table
end
end
end

View File

@@ -1,53 +0,0 @@
require 'yaml'
require 'fileutils'
module Jekyll
module Marley
def self.regexp
{ :id => /^\d{0,4}-{0,1}(.*)$/,
:title => /^#\s*(.*)\s+$/,
:title_with_date => /^#\s*(.*)\s+\(([0-9\/]+)\)$/,
:published_on => /.*\s+\(([0-9\/]+)\)$/,
:perex => /^([^\#\n]+\n)$/,
:meta => /^\{\{\n(.*)\}\}\n$/mi # Multiline Regexp
}
end
def self.process(marley_data_dir)
raise ArgumentError, "marley dir #{marley_data_dir} not found" unless File.directory?(marley_data_dir)
FileUtils.mkdir_p "_posts"
posts = 0
Dir["#{marley_data_dir}/**/*.txt"].each do |f|
next unless File.exists?(f)
#copied over from marley's app/lib/post.rb
file_content = File.read(f)
meta_content = file_content.slice!( self.regexp[:meta] )
body = file_content.sub( self.regexp[:title], '').sub( self.regexp[:perex], '').strip
title = file_content.scan( self.regexp[:title] ).first.to_s.strip
prerex = file_content.scan( self.regexp[:perex] ).first.to_s.strip
published_on = DateTime.parse( post[:published_on] ) rescue File.mtime( File.dirname(f) )
meta = ( meta_content ) ? YAML::load( meta_content.scan( self.regexp[:meta]).to_s ) : {}
meta['title'] = title
meta['layout'] = 'post'
formatted_date = published_on.strftime('%Y-%m-%d')
post_name = File.dirname(f).split(%r{/}).last.gsub(/\A\d+-/, '')
name = "#{formatted_date}-#{post_name}"
File.open("_posts/#{name}.markdown", "w") do |f|
f.puts meta.to_yaml
f.puts "---\n"
f.puts "\n#{prerex}\n\n" if prerex
f.puts body
end
posts += 1
end
"Created #{posts} posts!"
end
end
end

View File

@@ -1,79 +0,0 @@
# Quickly hacked together my Michael Ivey
# Based on mt.rb by Nick Gerakines, open source and publically
# available under the MIT license. Use this module at your own risk.
require 'rubygems'
require 'sequel'
require 'fastercsv'
require 'fileutils'
require File.join(File.dirname(__FILE__),"csv.rb")
# NOTE: This converter requires Sequel and the MySQL gems.
# The MySQL gem can be difficult to install on OS X. Once you have MySQL
# installed, running the following commands should work:
# $ sudo gem install sequel
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
module Jekyll
module Mephisto
#Accepts a hash with database config variables, exports mephisto posts into a csv
#export PGPASSWORD if you must
def self.postgres(c)
sql = <<-SQL
BEGIN;
CREATE TEMP TABLE jekyll AS
SELECT title, permalink, body, published_at, filter FROM contents
WHERE user_id = 1 AND type = 'Article' ORDER BY published_at;
COPY jekyll TO STDOUT WITH CSV HEADER;
ROLLBACK;
SQL
command = %Q(psql -h #{c[:host] || "localhost"} -c "#{sql.strip}" #{c[:database]} #{c[:username]} -o #{c[:filename] || "posts.csv"})
puts command
`#{command}`
CSV.process
end
# This query will pull blog posts from all entries across all blogs. If
# you've got unpublished, deleted or otherwise hidden posts please sift
# through the created posts to make sure nothing is accidently published.
QUERY = "SELECT id, permalink, body, published_at, title FROM contents WHERE user_id = 1 AND type = 'Article' AND published_at IS NOT NULL ORDER BY published_at"
def self.process(dbname, user, pass, host = 'localhost')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
db[QUERY].each do |post|
title = post[:title]
slug = post[:permalink]
date = post[:published_at]
content = post[:body]
# more_content = ''
# Be sure to include the body and extended body.
# if more_content != nil
# content = content + " \n" + more_content
# end
# Ideally, this script would determine the post format (markdown, html
# , etc) and create files with proper extensions. At this point it
# just assumes that markdown will be acceptable.
name = [date.year, date.month, date.day, slug].join('-') + ".markdown"
data = {
'layout' => 'post',
'title' => title.to_s,
'mt_id' => post[:entry_id],
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
File.open("_posts/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
end
end
end
end

View File

@@ -1,77 +0,0 @@
# Created by Nick Gerakines, open source and publically available under the
# MIT license. Use this module at your own risk.
# I'm an Erlang/Perl/C++ guy so please forgive my dirty ruby.
require 'rubygems'
require 'sequel'
require 'fileutils'
require 'yaml'
# NOTE: This converter requires Sequel and the MySQL gems.
# The MySQL gem can be difficult to install on OS X. Once you have MySQL
# installed, running the following commands should work:
# $ sudo gem install sequel
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
module Jekyll
module MT
# This query will pull blog posts from all entries across all blogs. If
# you've got unpublished, deleted or otherwise hidden posts please sift
# through the created posts to make sure nothing is accidently published.
QUERY = "SELECT entry_id, entry_basename, entry_text, entry_text_more, entry_authored_on, entry_title, entry_convert_breaks FROM mt_entry"
def self.process(dbname, user, pass, host = 'localhost')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
db[QUERY].each do |post|
title = post[:entry_title]
slug = post[:entry_basename].gsub(/_/, '-')
date = post[:entry_authored_on]
content = post[:entry_text]
more_content = post[:entry_text_more]
entry_convert_breaks = post[:entry_convert_breaks]
# Be sure to include the body and extended body.
if more_content != nil
content = content + " \n" + more_content
end
# Ideally, this script would determine the post format (markdown, html
# , etc) and create files with proper extensions. At this point it
# just assumes that markdown will be acceptable.
name = [date.year, date.month, date.day, slug].join('-') + '.' + self.suffix(entry_convert_breaks)
data = {
'layout' => 'post',
'title' => title.to_s,
'mt_id' => post[:entry_id],
'date' => date
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
File.open("_posts/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
end
end
def self.suffix(entry_type)
if entry_type.nil? || entry_type.include?("markdown")
# The markdown plugin I have saves this as "markdown_with_smarty_pants", so I just look for "markdown".
"markdown"
elsif entry_type.include?("textile")
# This is saved as "textile_2" on my installation of MT 5.1.
"textile"
elsif entry_type == "0" || entry_type.include?("richtext")
# richtext looks to me like it's saved as HTML, so I include it here.
"html"
else
# Other values might need custom work.
entry_type
end
end
end
end

View File

@@ -1,73 +0,0 @@
require 'rubygems'
require 'jekyll'
require 'fileutils'
require 'net/http'
require 'uri'
require "json"
# ruby -r './lib/jekyll/migrators/posterous.rb' -e 'Jekyll::Posterous.process(email, pass, blog)'
module Jekyll
module Posterous
def self.fetch(uri_str, limit = 10)
# You should choose better exception.
raise ArgumentError, 'Stuck in a redirect loop. Please double check your email and password' if limit == 0
response = nil
Net::HTTP.start('posterous.com') {|http|
req = Net::HTTP::Get.new(uri_str)
req.basic_auth @email, @pass
response = http.request(req)
}
case response
when Net::HTTPSuccess then response
when Net::HTTPRedirection then fetch(response['location'], limit - 1)
else response.error!
end
end
def self.process(email, pass, blog = 'primary')
@email, @pass = email, pass
@api_token = JSON.parse(self.fetch("/api/2/auth/token").body)['api_token']
FileUtils.mkdir_p "_posts"
posts = JSON.parse(self.fetch("/api/v2/users/me/sites/#{blog}/posts?api_token=#{@api_token}").body)
page = 1
while posts.any?
posts.each do |post|
title = post["title"]
slug = title.gsub(/[^[:alnum:]]+/, '-').downcase
date = Date.parse(post["display_date"])
content = post["body_html"]
published = !post["is_private"]
name = "%02d-%02d-%02d-%s.html" % [date.year, date.month, date.day, slug]
# Get the relevant fields as a hash, delete empty fields and convert
# to YAML for the header
data = {
'layout' => 'post',
'title' => title.to_s,
'published' => published
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
# Write out the data and content to file
File.open("_posts/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
end
page += 1
posts = JSON.parse(self.fetch("/api/v2/users/me/sites/#{blog}/posts?api_token=#{@api_token}&page=#{page}").body)
end
end
end
end

View File

@@ -1,50 +0,0 @@
require 'rubygems'
require 'sequel'
require 'fileutils'
# NOTE: This converter requires Sequel and the MySQL gems.
# The MySQL gem can be difficult to install on OS X. Once you have MySQL
# installed, running the following commands should work:
# $ sudo gem install sequel
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
module Jekyll
module TextPattern
# Reads a MySQL database via Sequel and creates a post file for each post.
# The only posts selected are those with a status of 4 or 5, which means "live"
# and "sticky" respectively.
# Other statuses is 1 => draft, 2 => hidden and 3 => pending
QUERY = "select Title, url_title, Posted, Body, Keywords from textpattern where Status = '4' or Status = '5'"
def self.process(dbname, user, pass, host = 'localhost')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
db[QUERY].each do |post|
# Get required fields and construct Jekyll compatible name
title = post[:Title]
slug = post[:url_title]
date = post[:Posted]
content = post[:Body]
name = [date.strftime("%Y-%m-%d"), slug].join('-') + ".textile"
# Get the relevant fields as a hash, delete empty fields and convert
# to YAML for the header
data = {
'layout' => 'post',
'title' => title.to_s,
'tags' => post[:Keywords].split(',')
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
# Write out the data and content to file
File.open("_posts/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
end
end
end
end

View File

@@ -1,49 +0,0 @@
# Author: Toby DiPasquale <toby@cbcg.net>
require 'fileutils'
require 'rubygems'
require 'sequel'
module Jekyll
module Typo
# this SQL *should* work for both MySQL and PostgreSQL, but I haven't
# tested PostgreSQL yet (as of 2008-12-16)
SQL = <<-EOS
SELECT c.id id,
c.title title,
c.permalink slug,
c.body body,
c.published_at date,
c.state state,
COALESCE(tf.name, 'html') filter
FROM contents c
LEFT OUTER JOIN text_filters tf
ON c.text_filter_id = tf.id
EOS
def self.process dbname, user, pass, host='localhost'
FileUtils.mkdir_p '_posts'
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
db[SQL].each do |post|
next unless post[:state] =~ /Published/
name = [ sprintf("%.04d", post[:date].year),
sprintf("%.02d", post[:date].month),
sprintf("%.02d", post[:date].day),
post[:slug].strip ].join('-')
# Can have more than one text filter in this field, but we just want
# the first one for this
name += '.' + post[:filter].split(' ')[0]
File.open("_posts/#{name}", 'w') do |f|
f.puts({ 'layout' => 'post',
'title' => post[:title].to_s,
'typo_id' => post[:id]
}.delete_if { |k, v| v.nil? || v == '' }.to_yaml)
f.puts '---'
f.puts post[:body].delete("\r")
end
end
end
end # module Typo
end # module Jekyll

View File

@@ -1,56 +0,0 @@
require 'rubygems'
require 'sequel'
require 'fileutils'
require 'yaml'
# NOTE: This converter requires Sequel and the MySQL gems.
# The MySQL gem can be difficult to install on OS X. Once you have MySQL
# installed, running the following commands should work:
# $ sudo gem install sequel
# $ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
module Jekyll
module WordPress
def self.process(dbname, user, pass, host = 'localhost', table_prefix = 'wp_')
db = Sequel.mysql(dbname, :user => user, :password => pass, :host => host, :encoding => 'utf8')
FileUtils.mkdir_p "_posts"
# Reads a MySQL database via Sequel and creates a post file for each
# post in wp_posts that has post_status = 'publish'.
# This restriction is made because 'draft' posts are not guaranteed to
# have valid dates.
query = "select post_title, post_name, post_date, post_content, post_excerpt, ID, guid from #{table_prefix}posts where post_status = 'publish' and post_type = 'post'"
db[query].each do |post|
# Get required fields and construct Jekyll compatible name
title = post[:post_title]
slug = post[:post_name]
date = post[:post_date]
content = post[:post_content]
name = "%02d-%02d-%02d-%s.markdown" % [date.year, date.month, date.day,
slug]
# Get the relevant fields as a hash, delete empty fields and convert
# to YAML for the header
data = {
'layout' => 'post',
'title' => title.to_s,
'excerpt' => post[:post_excerpt].to_s,
'wordpress_id' => post[:ID],
'wordpress_url' => post[:guid],
'date' => date
}.delete_if { |k,v| v.nil? || v == ''}.to_yaml
# Write out the data and content to file
File.open("_posts/#{name}", "w") do |f|
f.puts data
f.puts "---"
f.puts content
end
end
end
end
end

View File

@@ -1,45 +0,0 @@
# coding: utf-8
require 'rubygems'
require 'hpricot'
require 'fileutils'
require 'yaml'
module Jekyll
# This importer takes a wordpress.xml file,
# which can be exported from your
# wordpress.com blog (/wp-admin/export.php)
module WordpressDotCom
def self.process(filename = "wordpress.xml")
FileUtils.mkdir_p "_posts"
posts = 0
doc = Hpricot::XML(File.read(filename))
(doc/:channel/:item).each do |item|
title = item.at(:title).inner_text.strip
permalink_title = item.at('wp:post_name').inner_text
date = Time.parse(item.at(:pubDate).inner_text)
tags = (item/:category).map{|c| c.inner_text}.reject{|c| c == 'Uncategorized'}.uniq
name = "#{date.strftime('%Y-%m-%d')}-#{permalink_title}.html"
header = {
'layout' => 'post',
'title' => title,
'tags' => tags
}
File.open("_posts/#{name}", "w") do |f|
f.puts header.to_yaml
f.puts '---'
f.puts item.at('content:encoded').inner_text
end
posts += 1
end
puts "Imported #{posts} posts"
end
end
end

85
lib/jekyll/mime.types Normal file
View File

@@ -0,0 +1,85 @@
# These are the same MIME types that GitHub Pages uses as of 17 Mar 2013.
text/html html htm shtml
text/css css
text/xml xml rss xsl
image/gif gif
image/jpeg jpeg jpg
application/x-javascript js
application/atom+xml atom
text/mathml mml
text/plain txt
text/vnd.sun.j2me.app-descriptor jad
text/vnd.wap.wml wml
text/x-component htc
text/cache-manifest manifest appcache
text/coffeescript coffee
text/plain pde
text/plain md markdown
image/png png
image/svg+xml svg
image/tiff tif tiff
image/vnd.wap.wbmp wbmp
image/x-icon ico
image/x-jng jng
image/x-ms-bmp bmp
application/json json
application/java-archive jar ear
application/mac-binhex40 hqx
application/msword doc
application/pdf pdf
application/postscript ps eps ai
application/rdf+xml rdf
application/rtf rtf
text/vcard vcf vcard
application/vnd.apple.pkpass pkpass
application/vnd.ms-excel xls
application/vnd.ms-powerpoint ppt
application/vnd.wap.wmlc wmlc
application/xhtml+xml xhtml
application/x-chrome-extension crx
application/x-cocoa cco
application/x-font-ttf ttf
application/x-java-archive-diff jardiff
application/x-java-jnlp-file jnlp
application/x-makeself run
application/x-ns-proxy-autoconfig pac
application/x-perl pl pm
application/x-pilot prc pdb
application/x-rar-compressed rar
application/x-redhat-package-manager rpm
application/x-sea sea
application/x-shockwave-flash swf
application/x-stuffit sit
application/x-tcl tcl tk
application/x-web-app-manifest+json webapp
application/x-x509-ca-cert der pem crt
application/x-xpinstall xpi
application/x-zip war
application/zip zip
application/octet-stream bin exe dll
application/octet-stream deb
application/octet-stream dmg
application/octet-stream eot
application/octet-stream iso img
application/octet-stream msi msp msm
audio/midi mid midi kar
audio/mpeg mp3
audio/x-realaudio ra
audio/ogg ogg
video/3gpp 3gpp 3gp
video/mpeg mpeg mpg
video/quicktime mov
video/x-flv flv
video/x-mng mng
video/x-ms-asf asx asf
video/x-ms-wmv wmv
video/x-msvideo avi
video/ogg ogv
video/webm webm

View File

@@ -1,19 +1,18 @@
module Jekyll
class Page
include Convertible
attr_writer :dir
attr_accessor :site, :pager
attr_accessor :name, :ext, :basename, :dir
attr_accessor :name, :ext, :basename
attr_accessor :data, :content, :output
# Initialize a new Page.
# +site+ is the Site
# +base+ is the String path to the <source>
# +dir+ is the String path between <source> and the file
# +name+ is the String filename of the file
#
# Returns <Page>
# site - The Site object.
# base - The String path to the source.
# dir - The String path between the source and the file.
# name - The String filename of the file.
def initialize(site, base, dir, name)
@site = site
@base = base
@@ -26,41 +25,53 @@ module Jekyll
# The generated directory into which the page will be placed
# upon generation. This is derived from the permalink or, if
# permalink is absent, set to '/'
# permalink is absent, we be '/'
#
# Returns <String>
# Returns the String destination directory.
def dir
url[-1, 1] == '/' ? url : File.dirname(url)
end
# The full path and filename of the post.
# Defined in the YAML of the post body
# (Optional)
# The full path and filename of the post. Defined in the YAML of the post
# body.
#
# Returns <String>
# Returns the String permalink or nil if none has been set.
def permalink
self.data && self.data['permalink']
end
# The template of the permalink.
#
# Returns the template String.
def template
if self.site.permalink_style == :pretty && !index? && html?
"/:basename/"
if self.site.permalink_style == :pretty
if index? && html?
"/:path/"
elsif html?
"/:path/:basename/"
else
"/:path/:basename:output_ext"
end
else
"/:basename:output_ext"
"/:path/:basename:output_ext"
end
end
# The generated relative url of this page
# e.g. /about.html
# The generated relative url of this page. e.g. /about.html.
#
# Returns <String>
# Returns the String url.
def url
return @url if @url
url = if permalink
permalink
if site.config['relative_permalinks']
File.join(@dir, permalink)
else
permalink
end
else
{
"path" => @dir,
"basename" => self.basename,
"output_ext" => self.output_ext,
}.inject(template) { |result, token|
@@ -71,23 +82,26 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A([^\/])/, '/\1')
@url
end
# Extract information from the page filename
# +name+ is the String filename of the page file
# Extract information from the page filename.
#
# Returns nothing
# name - The String filename of the page file.
#
# Returns nothing.
def process(name)
self.ext = File.extname(name)
self.basename = name[0 .. -self.ext.length-1]
end
# Add any necessary layouts to this post
# +layouts+ is a Hash of {"name" => "layout"}
# +site_payload+ is the site payload hash
#
# Returns nothing
# layouts - The Hash of {"name" => "layout"}.
# site_payload - The site payload Hash.
#
# Returns nothing.
def render(layouts, site_payload)
payload = {
"page" => self.to_liquid,
@@ -97,47 +111,53 @@ module Jekyll
do_layout(payload, layouts)
end
# Convert this Page's data to a Hash suitable for use by Liquid.
#
# Returns the Hash representation of this Page.
def to_liquid
self.data.deep_merge({
"url" => File.join(@dir, self.url),
"content" => self.content })
"url" => self.url,
"content" => self.content,
"path" => self.data['path'] || path })
end
# Obtain destination path.
# +dest+ is the String path to the destination dir
# The path to the source file
#
# Returns destination file path.
# Returns the path to the source file
def path
File.join(@dir, @name).sub(/\A\//, '')
end
# Obtain destination path.
#
# dest - The String path to the destination dir.
#
# Returns the destination file path String.
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
path = File.join(dest, @dir, CGI.unescape(self.url))
# The url needs to be unescaped in order to preserve the correct
# filename.
path = File.join(dest, CGI.unescape(self.url))
path = File.join(path, "index.html") if self.url =~ /\/$/
path
end
# Write the generated page file to the destination directory.
# +dest+ is the String path to the destination dir
#
# Returns nothing
def write(dest)
path = destination(dest)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
f.write(self.output)
end
end
# Returns the object as a debug String.
def inspect
"#<Jekyll:Page @name=#{self.name.inspect}>"
end
# Returns the Boolean of whether this Page is HTML or not.
def html?
output_ext == '.html'
end
# Returns the Boolean of whether this Page is an index file or not.
def index?
basename == 'index'
end
def uses_relative_permalinks
permalink && @dir != "" && site.config['relative_permalinks']
end
end
end

View File

@@ -1,5 +1,4 @@
module Jekyll
class Plugin
PRIORITIES = { :lowest => -100,
:low => -10,
@@ -34,6 +33,7 @@ module Jekyll
#
# Returns the Symbol priority.
def self.priority(priority = nil)
@priority ||= nil
if priority && PRIORITIES.has_key?(priority)
@priority = priority
end
@@ -72,5 +72,4 @@ module Jekyll
# no-op for default
end
end
end

View File

@@ -1,5 +1,4 @@
module Jekyll
class Post
include Comparable
include Convertible
@@ -8,57 +7,133 @@ module Jekyll
attr_accessor :lsi
end
# Valid post name regex.
MATCHER = /^(.+\/)*(\d+-\d+-\d+)-(.*)(\.[^.]+)$/
# Attributes for Liquid templates
ATTRIBUTES_FOR_LIQUID = %w[
title
url
date
id
categories
next
previous
tags
content
excerpt
path
]
# Post name validator. Post filenames must be like:
# 2008-11-05-my-awesome-post.textile
# 2008-11-05-my-awesome-post.textile
#
# Returns <Bool>
# Returns true if valid, false if not.
def self.valid?(name)
name =~ MATCHER
end
attr_accessor :site
attr_accessor :data, :content, :output, :ext
attr_accessor :data, :extracted_excerpt, :content, :output, :ext
attr_accessor :date, :slug, :published, :tags, :categories
attr_reader :name
# Initialize this Post instance.
# +site+ is the Site
# +base+ is the String path to the dir containing the post file
# +name+ is the String filename of the post file
# +categories+ is an Array of Strings for the categories for this post
#
# Returns <Post>
# site - The Site.
# base - The String path to the dir containing the post file.
# name - The String filename of the post file.
#
# Returns the new Post.
def initialize(site, source, dir, name)
@site = site
@base = File.join(source, dir, '_posts')
@dir = dir
@base = self.containing_dir(source, dir)
@name = name
self.categories = dir.split('/').reject { |x| x.empty? }
self.categories = dir.downcase.split('/').reject { |x| x.empty? }
self.process(name)
self.read_yaml(@base, name)
#If we've added a date and time to the yaml, use that instead of the filename date
#Means we'll sort correctly.
if self.data.has_key?('date')
# ensure Time via to_s and reparse
self.date = Time.parse(self.data["date"].to_s)
end
self.published = self.published?
self.populate_categories
self.populate_tags
end
def published?
if self.data.has_key?('published') && self.data['published'] == false
self.published = false
false
else
self.published = true
end
self.tags = self.data.pluralized_array("tag", "tags")
if self.categories.empty?
self.categories = self.data.pluralized_array('category', 'categories')
true
end
end
# Spaceship is based on Post#date, slug
def populate_categories
if self.categories.empty?
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase}
end
self.categories.flatten!
end
def populate_tags
self.tags = self.data.pluralized_array("tag", "tags").flatten
end
# Get the full path to the directory containing the post files
def containing_dir(source, dir)
return File.join(source, dir, '_posts')
end
# Read the YAML frontmatter.
#
# base - The String path to the dir containing the file.
# name - The String filename of the file.
#
# Returns nothing.
def read_yaml(base, name)
super(base, name)
self.extracted_excerpt = self.extract_excerpt
end
# The post excerpt. This is either a custom excerpt
# set in YAML front matter or the result of extract_excerpt.
#
# Returns excerpt string.
def excerpt
if self.data.has_key? 'excerpt'
self.data['excerpt']
else
self.extracted_excerpt
end
end
# Public: the Post title, from the YAML Front-Matter or from the slug
#
# Returns the post title
def title
self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' ')
end
# Public: the path to the post relative to the site source,
# from the YAML Front-Matter or from a combination of
# the directory it's in, "_posts", and the name of the
# post file
#
# Returns the path to the file relative to the site source
def path
self.data['path'] || File.join(@dir, '_posts', @name).sub(/\A\//, '')
end
# Compares Post objects. First compares the Post date. If the dates are
# equal, it compares the Post slugs.
#
# other - The other Post we are comparing to.
#
# Returns -1, 0, 1
def <=>(other)
@@ -69,10 +144,11 @@ module Jekyll
return cmp
end
# Extract information from the post filename
# +name+ is the String filename of the post file
# Extract information from the post filename.
#
# Returns nothing
# name - The String filename of the post file.
#
# Returns nothing.
def process(name)
m, cats, date, slug, ext = *name.match(MATCHER)
self.date = Time.parse(date)
@@ -82,21 +158,28 @@ module Jekyll
raise FatalException.new("Post #{name} does not have a valid date.")
end
# Transform the contents and excerpt based on the content type.
#
# Returns nothing.
def transform
super
self.extracted_excerpt = converter.convert(self.extracted_excerpt)
end
# The generated directory into which the post will be placed
# upon generation. This is derived from the permalink or, if
# permalink is absent, set to the default date
# e.g. "/2008/11/05/" if the permalink style is :date, otherwise nothing
# e.g. "/2008/11/05/" if the permalink style is :date, otherwise nothing.
#
# Returns <String>
# Returns the String directory.
def dir
File.dirname(url)
end
# The full path and filename of the post.
# Defined in the YAML of the post body
# (Optional)
# The full path and filename of the post. Defined in the YAML of the post
# body (optional).
#
# Returns <String>
# Returns the String permalink.
def permalink
self.data && self.data['permalink']
end
@@ -109,15 +192,17 @@ module Jekyll
"/:categories/:title.html"
when :date
"/:categories/:year/:month/:day/:title.html"
when :ordinal
"/:categories/:year/:y_day/:title.html"
else
self.site.permalink_style.to_s
end
end
# The generated relative url of this post
# The generated relative url of this post.
# e.g. /2008/11/05/my-awesome-post.html
#
# Returns <String>
# Returns the String URL.
def url
return @url if @url
@@ -131,7 +216,9 @@ module Jekyll
"title" => CGI.escape(slug),
"i_day" => date.strftime("%d").to_i.to_s,
"i_month" => date.strftime("%m").to_i.to_s,
"categories" => categories.join('/'),
"categories" => categories.map { |c| URI.escape(c.to_s) }.join('/'),
"short_month" => date.strftime("%b"),
"y_day" => date.strftime("%j"),
"output_ext" => self.output_ext
}.inject(template) { |result, token|
result.gsub(/:#{Regexp.escape token.first}/, token.last)
@@ -141,44 +228,31 @@ module Jekyll
# sanitize url
@url = url.split('/').reject{ |part| part =~ /^\.+$/ }.join('/')
@url += "/" if url =~ /\/$/
@url.gsub!(/\A([^\/])/, '/\1')
@url
end
# The UID for this post (useful in feeds)
# The UID for this post (useful in feeds).
# e.g. /2008/11/05/my-awesome-post
#
# Returns <String>
# Returns the String UID.
def id
File.join(self.dir, self.slug)
end
# Calculate related posts.
#
# Returns [<Post>]
# Returns an Array of related Posts.
def related_posts(posts)
return [] unless posts.size > 1
if self.site.lsi
self.class.lsi ||= begin
puts "Running the classifier... this could take a while."
lsi = Classifier::LSI.new
posts.each { |x| $stdout.print(".");$stdout.flush;lsi.add_item(x) }
puts ""
lsi
end
related = self.class.lsi.find_related(self.content, 11)
related - [self]
else
(posts - [self])[0..9]
end
Jekyll::RelatedPosts.new(self).build
end
# Add any necessary layouts to this post
# +layouts+ is a Hash of {"name" => "layout"}
# +site_payload+ is the site payload hash
# Add any necessary layouts to this post.
#
# Returns nothing
# layouts - A Hash of {"name" => "layout"}.
# site_payload - The site payload hash.
#
# Returns nothing.
def render(layouts, site_payload)
# construct payload
payload = {
@@ -188,11 +262,12 @@ module Jekyll
do_layout(payload, layouts)
end
# Obtain destination path.
# +dest+ is the String path to the destination dir
#
# Returns destination file path.
# dest - The String path to the destination dir.
#
# Returns destination file path String.
def destination(dest)
# The url needs to be unescaped in order to preserve the correct filename
path = File.join(dest, CGI.unescape(self.url))
@@ -200,34 +275,17 @@ module Jekyll
path
end
# Write the generated post file to the destination directory.
# +dest+ is the String path to the destination dir
#
# Returns nothing
def write(dest)
path = destination(dest)
FileUtils.mkdir_p(File.dirname(path))
File.open(path, 'w') do |f|
f.write(self.output)
end
end
# Convert this post into a Hash for use in Liquid templates.
#
# Returns <Hash>
# Returns the representative Hash.
def to_liquid
self.data.deep_merge({
"title" => self.data["title"] || self.slug.split('-').select {|w| w.capitalize! || w }.join(' '),
"url" => self.url,
"date" => self.date,
"id" => self.id,
"categories" => self.categories,
"next" => self.next,
"previous" => self.previous,
"tags" => self.tags,
"content" => self.content })
further_data = Hash[ATTRIBUTES_FOR_LIQUID.map { |attribute|
[attribute, send(attribute)]
}]
data.deep_merge(further_data)
end
# Returns the shorthand String identifier of this Post.
def inspect
"<Post: #{self.id}>"
end
@@ -250,6 +308,48 @@ module Jekyll
nil
end
end
end
protected
# Internal: Extract excerpt from the content
#
# By default excerpt is your first paragraph of a post: everything before
# the first two new lines:
#
# ---
# title: Example
# ---
#
# First paragraph with [link][1].
#
# Second paragraph.
#
# [1]: http://example.com/
#
# This is fairly good option for Markdown and Textile files. But might cause
# problems for HTML posts (which is quite unusual for Jekyll). If default
# excerpt delimiter is not good for you, you might want to set your own via
# configuration option `excerpt_separator`. For example, following is a good
# alternative for HTML posts:
#
# # file: _config.yml
# excerpt_separator: "<!-- more -->"
#
# Notice that all markdown-style link references will be appended to the
# excerpt. So the example post above will have this excerpt source:
#
# First paragraph with [link][1].
#
# [1]: http://example.com/
#
# Excerpts are rendered same time as content is rendered.
#
# Returns excerpt String
def extract_excerpt
separator = self.site.config['excerpt_separator']
head, _, tail = self.content.partition(separator)
"" << head << "\n\n" << tail.scan(/^\[[^\]]+\]:.+$/).join("\n")
end
end
end

View File

@@ -0,0 +1,58 @@
module Jekyll
class RelatedPosts
class << self
attr_accessor :lsi
end
attr_reader :post, :site
def initialize(post)
@post = post
@site = post.site
require 'classifier' if site.lsi
end
def build
return [] unless self.site.posts.size > 1
if self.site.lsi
build_index
lsi_related_posts
else
most_recent_posts
end
end
def build_index
self.class.lsi ||= begin
lsi = Classifier::LSI.new(:auto_rebuild => false)
display("Populating LSI...")
self.site.posts.each do |x|
lsi.add_item(x)
end
display("Rebuilding index...")
lsi.build_index
display("")
lsi
end
end
def lsi_related_posts
self.class.lsi.find_related(post.content, 11) - [self.post]
end
def most_recent_posts
(self.site.posts - [self.post])[0..9]
end
def display(output)
$stdout.print("\n")
$stdout.print(Jekyll.logger.formatted_topic(output))
$stdout.flush
end
end
end

View File

@@ -1,36 +1,54 @@
require 'set'
module Jekyll
class Site
attr_accessor :config, :layouts, :posts, :pages, :static_files,
:categories, :exclude, :source, :dest, :lsi, :pygments,
:permalink_style, :tags, :time, :future, :safe, :plugins, :limit_posts
:categories, :exclude, :include, :source, :dest, :lsi, :pygments,
:permalink_style, :tags, :time, :future, :safe, :plugins, :limit_posts,
:show_drafts, :keep_files, :baseurl
attr_accessor :converters, :generators
# Initialize the site
# +config+ is a Hash containing site configurations details
# Public: Initialize a new Site.
#
# Returns <Site>
# config - A Hash containing site configuration details.
def initialize(config)
self.config = config.clone
self.safe = config['safe']
self.source = File.expand_path(config['source'])
self.dest = File.expand_path(config['destination'])
self.plugins = File.expand_path(config['plugins'])
self.plugins = plugins_path
self.lsi = config['lsi']
self.pygments = config['pygments']
self.baseurl = config['baseurl']
self.permalink_style = config['permalink'].to_sym
self.exclude = config['exclude'] || []
self.exclude = config['exclude']
self.include = config['include']
self.future = config['future']
self.limit_posts = config['limit_posts'] || nil
self.show_drafts = config['show_drafts']
self.limit_posts = config['limit_posts']
self.keep_files = config['keep_files']
self.reset
self.setup
end
# Public: Read, process, and write this Site to output.
#
# Returns nothing.
def process
self.reset
self.read
self.generate
self.render
self.cleanup
self.write
end
# Reset Site details.
#
# Returns nothing
def reset
self.time = if self.config['time']
Time.parse(self.config['time'].to_s)
@@ -44,58 +62,60 @@ module Jekyll
self.categories = Hash.new { |hash, key| hash[key] = [] }
self.tags = Hash.new { |hash, key| hash[key] = [] }
raise ArgumentError, "Limit posts must be nil or >= 1" if !self.limit_posts.nil? && self.limit_posts < 1
if self.limit_posts < 0
raise ArgumentError, "limit_posts must be a non-negative number"
end
end
# Load necessary libraries, plugins, converters, and generators.
#
# Returns nothing.
def setup
require 'classifier' if self.lsi
# Check that the destination dir isn't the source dir or a directory
# parent to the source dir.
if self.source =~ /^#{self.dest}/
raise FatalException.new "Destination directory cannot be or contain the Source directory."
end
# If safe mode is off, load in any ruby files under the plugins
# If safe mode is off, load in any Ruby files under the plugins
# directory.
unless self.safe
Dir[File.join(self.plugins, "**/*.rb")].each do |f|
require f
self.plugins.each do |plugins|
Dir[File.join(plugins, "**/*.rb")].each do |f|
require f
end
end
end
self.converters = Jekyll::Converter.subclasses.select do |c|
!self.safe || c.safe
end.map do |c|
c.new(self.config)
end
self.generators = Jekyll::Generator.subclasses.select do |c|
!self.safe || c.safe
end.map do |c|
c.new(self.config)
end
self.converters = instantiate_subclasses(Jekyll::Converter)
self.generators = instantiate_subclasses(Jekyll::Generator)
end
# Do the actual work of processing the site and generating the
# real deal. 5 phases; reset, read, generate, render, write. This allows
# rendering to have full site payload available.
# Internal: Setup the plugin search path
#
# Returns nothing
def process
self.reset
self.read
self.generate
self.render
self.cleanup
self.write
# Returns an Array of plugin search paths
def plugins_path
if (config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
[File.join(self.source, config['plugins'])]
else
Array(config['plugins']).map { |d| File.expand_path(d) }
end
end
# Read Site data from disk and load it into internal data structures.
#
# Returns nothing.
def read
self.read_layouts # existing implementation did this at top level only so preserved that
self.read_layouts
self.read_directories
end
# Read all the files in <source>/<dir>/_layouts and create a new Layout
# object with each one.
# Read all the files in <source>/<layouts> and create a new Layout object
# with each one.
#
# Returns nothing
def read_layouts(dir = '')
base = File.join(self.source, dir, "_layouts")
# Returns nothing.
def read_layouts
base = File.join(self.source, self.config['layouts'])
return unless File.exists?(base)
entries = []
Dir.chdir(base) { entries = filter_entries(Dir['*.*']) }
@@ -106,14 +126,58 @@ module Jekyll
end
end
# Recursively traverse directories to find posts, pages and static files
# that will become part of the site according to the rules in
# filter_entries.
#
# dir - The String relative path of the directory to read. Default: ''.
#
# Returns nothing.
def read_directories(dir = '')
base = File.join(self.source, dir)
entries = Dir.chdir(base) { filter_entries(Dir.entries('.')) }
self.read_posts(dir)
if self.show_drafts
self.read_drafts(dir)
end
self.posts.sort!
# limit the posts if :limit_posts option is set
if limit_posts > 0
limit = self.posts.length < limit_posts ? self.posts.length : limit_posts
self.posts = self.posts[-limit, limit]
end
entries.each do |f|
f_abs = File.join(base, f)
f_rel = File.join(dir, f)
if File.directory?(f_abs)
next if self.dest.sub(/\/$/, '') == f_abs
read_directories(f_rel)
else
first3 = File.open(f_abs) { |fd| fd.read(3) }
if first3 == "---"
# file appears to have a YAML header so process it as a page
pages << Page.new(self, self.source, dir, f)
else
# otherwise treat it as a static file
static_files << StaticFile.new(self, self.source, dir, f)
end
end
end
end
# Read all the files in <source>/<dir>/_posts and create a new Post
# object with each one.
#
# Returns nothing
# dir - The String relative path of the directory to read.
#
# Returns nothing.
def read_posts(dir)
base = File.join(self.source, dir, '_posts')
return unless File.exists?(base)
entries = Dir.chdir(base) { filter_entries(Dir['**/*']) }
entries = get_entries(dir, '_posts')
# first pass processes, but does not yet render post content
entries.each do |f|
@@ -121,48 +185,72 @@ module Jekyll
post = Post.new(self, self.source, dir, f)
if post.published && (self.future || post.date <= self.time)
self.posts << post
post.categories.each { |c| self.categories[c] << post }
post.tags.each { |c| self.tags[c] << post }
aggregate_post_info(post)
end
end
end
self.posts.sort!
# limit the posts if :limit_posts option is set
self.posts = self.posts[-limit_posts, limit_posts] if limit_posts
end
# Read all the files in <source>/<dir>/_drafts and create a new Post
# object with each one.
#
# dir - The String relative path of the directory to read.
#
# Returns nothing.
def read_drafts(dir)
entries = get_entries(dir, '_drafts')
# first pass processes, but does not yet render draft content
entries.each do |f|
if Draft.valid?(f)
draft = Draft.new(self, self.source, dir, f)
aggregate_post_info(draft)
end
end
end
# Run each of the Generators.
#
# Returns nothing.
def generate
self.generators.each do |generator|
generator.generate(self)
end
end
# Render the site to the destination.
#
# Returns nothing.
def render
payload = site_payload
self.posts.each do |post|
post.render(self.layouts, site_payload)
post.render(self.layouts, payload)
end
self.pages.each do |page|
page.render(self.layouts, site_payload)
relative_permalinks_deprecation_method if page.uses_relative_permalinks
page.render(self.layouts, payload)
end
self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a} }
self.tags.values.map { |ps| ps.sort! { |a, b| b <=> a} }
self.categories.values.map { |ps| ps.sort! { |a, b| b <=> a } }
self.tags.values.map { |ps| ps.sort! { |a, b| b <=> a } }
rescue Errno::ENOENT => e
# ignore missing layout dir
end
# Remove orphaned files and empty directories in destination
# Remove orphaned files and empty directories in destination.
#
# Returns nothing
# Returns nothing.
def cleanup
# all files and directories in destination, including hidden ones
dest_files = Set.new
Dir.glob(File.join(self.dest, "**", "*"), File::FNM_DOTMATCH) do |file|
dest_files << file unless file =~ /\/\.{1,2}$/
if self.keep_files.length > 0
dest_files << file unless file =~ /\/\.{1,2}$/ || file =~ keep_file_regex
else
dest_files << file unless file =~ /\/\.{1,2}$/
end
end
# files to be written
@@ -176,20 +264,31 @@ module Jekyll
self.static_files.each do |sf|
files << sf.destination(self.dest)
end
# adding files' parent directories
dirs = Set.new
files.each { |file| dirs << File.dirname(file) }
files.merge(dirs)
obsolete_files = dest_files - files
FileUtils.rm_rf(obsolete_files.to_a)
end
# Write static files, pages and posts
# Private: creates a regular expression from the keep_files array
#
# Returns nothing
# Examples
# ['.git','.svn'] creates the following regex: /\/(\.git|\/.svn)/
#
# Returns the regular expression
def keep_file_regex
or_list = self.keep_files.join("|")
pattern = "\/(#{or_list.gsub(".", "\.")})"
Regexp.new pattern
end
# Write static files, pages, and posts.
#
# Returns nothing.
def write
self.posts.each do |post|
post.write(self.dest)
@@ -202,59 +301,45 @@ module Jekyll
end
end
# Reads the directories and finds posts, pages and static files that will
# become part of the valid site according to the rules in +filter_entries+.
# The +dir+ String is a relative path used to call this method
# recursively as it descends through directories
# Construct a Hash of Posts indexed by the specified Post attribute.
#
# Returns nothing
def read_directories(dir = '')
base = File.join(self.source, dir)
entries = Dir.chdir(base){ filter_entries(Dir['*']) }
self.read_posts(dir)
entries.each do |f|
f_abs = File.join(base, f)
f_rel = File.join(dir, f)
if File.directory?(f_abs)
next if self.dest.sub(/\/$/, '') == f_abs
read_directories(f_rel)
elsif !File.symlink?(f_abs)
first3 = File.open(f_abs) { |fd| fd.read(3) }
if first3 == "---"
# file appears to have a YAML header so process it as a page
pages << Page.new(self, self.source, dir, f)
else
# otherwise treat it as a static file
static_files << StaticFile.new(self, self.source, dir, f)
end
end
end
end
# Constructs a hash map of Posts indexed by the specified Post attribute
# post_attr - The String name of the Post attribute.
#
# Returns {post_attr => [<Post>]}
# Examples
#
# post_attr_hash('categories')
# # => { 'tech' => [<Post A>, <Post B>],
# # 'ruby' => [<Post B>] }
#
# Returns the Hash: { attr => posts } where
# attr - One of the values for the requested attribute.
# posts - The Array of Posts with the given attr value.
def post_attr_hash(post_attr)
# Build a hash map based on the specified post attribute ( post attr => array of posts )
# then sort each array in reverse order
hash = Hash.new { |hash, key| hash[key] = Array.new }
# Build a hash map based on the specified post attribute ( post attr =>
# array of posts ) then sort each array in reverse order.
hash = Hash.new { |hsh, key| hsh[key] = Array.new }
self.posts.each { |p| p.send(post_attr.to_sym).each { |t| hash[t] << p } }
hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a} }
return hash
hash.values.map { |sortme| sortme.sort! { |a, b| b <=> a } }
hash
end
# The Hash payload containing site-wide data
# The Hash payload containing site-wide data.
#
# Returns {"site" => {"time" => <Time>,
# "posts" => [<Post>],
# "pages" => [<Page>],
# "categories" => [<Post>]}
# Returns the Hash: { "site" => data } where data is a Hash with keys:
# "time" - The Time as specified in the configuration or the
# current time if none was specified.
# "posts" - The Array of Posts, sorted chronologically by post date
# and then title.
# "pages" - The Array of all Pages.
# "html_pages" - The Array of HTML Pages.
# "categories" - The Hash of category values and Posts.
# See Site#post_attr_hash for type info.
# "tags" - The Hash of tag values and Posts.
# See Site#post_attr_hash for type info.
def site_payload
{"site" => self.config.merge({
"time" => self.time,
"posts" => self.posts.sort { |a,b| b <=> a },
"posts" => self.posts.sort { |a, b| b <=> a },
"pages" => self.pages,
"html_pages" => self.pages.reject { |page| !page.html? },
"categories" => post_attr_hash('categories'),
@@ -264,17 +349,86 @@ module Jekyll
# Filter out any files/directories that are hidden or backup files (start
# with "." or "#" or end with "~"), or contain site content (start with "_"),
# or are excluded in the site configuration, unless they are web server
# files such as '.htaccess'
# files such as '.htaccess'.
#
# entries - The Array of String file/directory entries to filter.
#
# Returns the Array of filtered entries.
def filter_entries(entries)
entries = entries.reject do |e|
unless ['.htaccess'].include?(e)
entries.reject do |e|
unless self.include.glob_include?(e)
['.', '_', '#'].include?(e[0..0]) ||
e[-1..-1] == '~' ||
self.exclude.include?(e) ||
File.symlink?(e)
self.exclude.glob_include?(e) ||
(File.symlink?(e) && self.safe)
end
end
end
# Get the implementation class for the given Converter.
#
# klass - The Class of the Converter to fetch.
#
# Returns the Converter instance implementing the given Converter.
def getConverterImpl(klass)
matches = self.converters.select { |c| c.class == klass }
if impl = matches.first
impl
else
raise "Converter implementation not found for #{klass}"
end
end
# Create array of instances of the subclasses of the class or module
# passed in as argument.
#
# klass - class or module containing the subclasses which should be
# instantiated
#
# Returns array of instances of subclasses of parameter
def instantiate_subclasses(klass)
klass.subclasses.select do |c|
!self.safe || c.safe
end.sort.map do |c|
c.new(self.config)
end
end
# Read the entries from a particular directory for processing
#
# dir - The String relative path of the directory to read
# subfolder - The String directory to read
#
# Returns the list of entries to process
def get_entries(dir, subfolder)
base = File.join(self.source, dir, subfolder)
return [] unless File.exists?(base)
entries = Dir.chdir(base) { filter_entries(Dir['**/*']) }
entries.delete_if { |e| File.directory?(File.join(base, e)) }
end
# Aggregate post information
#
# post - The Post object to aggregate information for
#
# Returns nothing
def aggregate_post_info(post)
self.posts << post
post.categories.each { |c| self.categories[c] << post }
post.tags.each { |c| self.tags[c] << post }
end
def relative_permalinks_deprecation_method
if config['relative_permalinks'] && !@deprecated_relative_permalinks
$stderr.puts # Places newline after "Generating..."
Jekyll.logger.warn "Deprecation:", "Starting in 1.1, permalinks for pages" +
" in subfolders must be relative to the" +
" site source directory, not the parent" +
" directory. Check http://jekyllrb.com/docs/upgrading/"+
" for more info."
$stderr.print Jekyll.logger.formatted_topic("") + "..." # for "done."
@deprecated_relative_permalinks = true
end
end
end
end

View File

@@ -1,15 +1,14 @@
module Jekyll
class StaticFile
@@mtimes = Hash.new # the cache of last modification times [path] -> mtime
# The cache of last modification times [path] -> mtime.
@@mtimes = Hash.new
# Initialize a new StaticFile.
# +site+ is the Site
# +base+ is the String path to the <source>
# +dir+ is the String path between <source> and the file
# +name+ is the String filename of the file
#
# Returns <StaticFile>
# site - The Site.
# base - The String path to the <source>.
# dir - The String path between <source> and the file.
# name - The String filename of the file.
def initialize(site, base, dir, name)
@site = site
@base = base
@@ -17,24 +16,21 @@ module Jekyll
@name = name
end
# Obtains source file path.
#
# Returns source file path.
def path
File.join(@base, @dir, @name)
end
# Obtain destination path.
# +dest+ is the String path to the destination dir
#
# dest - The String path to the destination dir.
#
# Returns destination file path.
def destination(dest)
File.join(dest, @dir, @name)
end
# Obtain mtime of the source path.
#
# Returns last modifiaction time for this file.
# Returns last modification time for this file.
def mtime
File.stat(path).mtime.to_i
end
@@ -47,13 +43,14 @@ module Jekyll
end
# Write the static file to the destination directory (if modified).
# +dest+ is the String path to the destination dir
#
# dest - The String path to the destination dir.
#
# Returns false if the file was not modified since last time (no-op).
def write(dest)
dest_path = destination(dest)
return false if File.exist? dest_path and !modified?
return false if File.exist?(dest_path) and !modified?
@@mtimes[path] = mtime
FileUtils.mkdir_p(File.dirname(dest_path))
@@ -67,9 +64,7 @@ module Jekyll
# Returns nothing.
def self.reset_cache
@@mtimes = Hash.new
nil
end
end
end

68
lib/jekyll/stevenson.rb Normal file
View File

@@ -0,0 +1,68 @@
module Jekyll
class Stevenson
attr_accessor :log_level
DEBUG = 0
INFO = 1
WARN = 2
ERROR = 3
# Public: Create a new instance of Stevenson, Jekyll's logger
#
# level - (optional, integer) the log level
#
# Returns nothing
def initialize(level = INFO)
@log_level = level
end
# Public: Print a jekyll message to stdout
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def info(topic, message)
$stdout.puts(message(topic, message)) if log_level <= INFO
end
# Public: Print a jekyll message to stderr
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def warn(topic, message)
$stderr.puts(message(topic, message).yellow) if log_level <= WARN
end
# Public: Print a jekyll error message to stderr
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns nothing
def error(topic, message)
$stderr.puts(message(topic, message).red) if log_level <= ERROR
end
# Public: Build a Jekyll topic method
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
# message - the message detail
#
# Returns the formatted message
def message(topic, message)
formatted_topic(topic) + message.gsub(/\s+/, ' ')
end
# Public: Format the topic
#
# topic - the topic of the message, e.g. "Configuration file", "Deprecation", etc.
#
# Returns the formatted topic statement
def formatted_topic(topic)
"#{topic} ".rjust(20)
end
end
end

40
lib/jekyll/tags/gist.rb Normal file
View File

@@ -0,0 +1,40 @@
# Gist Liquid Tag
#
# Example:
# {% gist 1234567 %}
# {% gist 1234567 file.rb %}
module Jekyll
class GistTag < Liquid::Tag
def render(context)
if tag_contents = determine_arguments(@markup.strip)
gist_id, filename = tag_contents[0], tag_contents[1]
gist_script_tag(gist_id, filename)
else
"Error parsing gist id"
end
end
private
def determine_arguments(input)
matched = if input.include?("/")
input.match(/\A([a-zA-Z0-9\/\-_]+) ?(\S*)\Z/)
else
input.match(/\A(\d+) ?(\S*)\Z/)
end
[matched[1].strip, matched[2].strip] if matched && matched.length >= 3
end
def gist_script_tag(gist_id, filename = nil)
if filename.empty?
"<script src=\"https://gist.github.com/#{gist_id}.js\"> </script>"
else
"<script src=\"https://gist.github.com/#{gist_id}.js?file=#{filename}\"> </script>"
end
end
end
end
Liquid::Template.register_tag('gist', Jekyll::GistTag)

View File

@@ -1,73 +1,85 @@
module Jekyll
module Tags
class HighlightBlock < Liquid::Block
include Liquid::StandardFilters
class HighlightBlock < Liquid::Block
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:
#
# 1. name
# 2. name=value
SYNTAX = /^([a-zA-Z0-9.+#-]+)((\s+\w+(=\w+)?)*)$/
# we need a language, but the linenos argument is optional.
SYNTAX = /(\w+)\s?([\w\s=]+)*/
def initialize(tag_name, markup, tokens)
super
if markup =~ SYNTAX
@lang = $1
if defined? $2
tmp_options = {}
$2.split.each do |opt|
key, value = opt.split('=')
if value.nil?
if key == 'linenos'
value = 'inline'
else
value = true
end
end
tmp_options[key] = value
end
tmp_options = tmp_options.to_a.collect { |opt| opt.join('=') }
# additional options to pass to Albino.
@options = { 'O' => tmp_options.join(',') }
else
def initialize(tag_name, markup, tokens)
super
if markup.strip =~ SYNTAX
@lang = $1
@options = {}
if defined?($2) && $2 != ''
$2.split.each do |opt|
key, value = opt.split('=')
if value.nil?
if key == 'linenos'
value = 'inline'
else
value = true
end
end
@options[key] = value
end
end
else
raise SyntaxError.new <<-eos
Syntax Error in tag 'highlight' while parsing the following markup:
#{markup}
Valid syntax: highlight <lang> [linenos]
eos
end
else
raise SyntaxError.new("Syntax Error in 'highlight' - Valid syntax: highlight <lang> [linenos]")
end
end
def render(context)
if context.registers[:site].pygments
render_pygments(context, super.join)
else
render_codehighlighter(context, super.join)
def render(context)
if context.registers[:site].pygments
render_pygments(context, super)
else
render_codehighlighter(context, super)
end
end
end
def render_pygments(context, code)
output = add_code_tags(Albino.new(code, @lang).to_s(@options), @lang)
output = context["pygments_prefix"] + output if context["pygments_prefix"]
output = output + context["pygments_suffix"] if context["pygments_suffix"]
output
end
def render_pygments(context, code)
require 'pygments'
@options[:encoding] = 'utf-8'
output = add_code_tags(
Pygments.highlight(code, :lexer => @lang, :options => @options),
@lang
)
output = context["pygments_prefix"] + output if context["pygments_prefix"]
output = output + context["pygments_suffix"] if context["pygments_suffix"]
output
end
def render_codehighlighter(context, code)
#The div is required because RDiscount blows ass
<<-HTML
<div>
<pre><code class='#{@lang}'>#{h(code).strip}</code></pre>
</div>
HTML
end
def add_code_tags(code, lang)
# Add nested <code> tags to code blocks
code = code.sub(/<pre>/,'<pre><code class="' + lang + '">')
code = code.sub(/<\/pre>/,"</code></pre>")
end
def render_codehighlighter(context, code)
#The div is required because RDiscount blows ass
<<-HTML
<div>
<pre>
<code class='#{@lang}'>#{h(code).strip}</code>
</pre>
</div>
HTML
end
def add_code_tags(code, lang)
# Add nested <code> tags to code blocks
code = code.sub(/<pre>/,'<pre><code class="' + lang + '">')
code = code.sub(/<\/pre>/,"</code></pre>")
end
end
end
Liquid::Template.register_tag('highlight', Jekyll::HighlightBlock)
Liquid::Template.register_tag('highlight', Jekyll::Tags::HighlightBlock)

View File

@@ -1,37 +1,37 @@
module Jekyll
class IncludeTag < Liquid::Tag
def initialize(tag_name, file, tokens)
super
@file = file.strip
end
def render(context)
includes_dir = File.join(context.registers[:site].source, '_includes')
if File.symlink?(includes_dir)
return "Includes directory '#{includes_dir}' cannot be a symlink"
module Tags
class IncludeTag < Liquid::Tag
def initialize(tag_name, file, tokens)
super
@file = file.strip
end
if @file !~ /^[a-zA-Z0-9_\/\.-]+$/ || @file =~ /\.\// || @file =~ /\/\./
return "Include file '#{@file}' contains invalid characters or sequences"
end
def render(context)
includes_dir = File.join(context.registers[:site].source, '_includes')
Dir.chdir(includes_dir) do
choices = Dir['**/*'].reject { |x| File.symlink?(x) }
if choices.include?(@file)
source = File.read(@file)
partial = Liquid::Template.parse(source)
context.stack do
partial.render(context)
if File.symlink?(includes_dir)
return "Includes directory '#{includes_dir}' cannot be a symlink"
end
if @file !~ /^[a-zA-Z0-9_\/\.-]+$/ || @file =~ /\.\// || @file =~ /\/\./
return "Include file '#{@file}' contains invalid characters or sequences"
end
Dir.chdir(includes_dir) do
choices = Dir['**/*'].reject { |x| File.symlink?(x) }
if choices.include?(@file)
source = File.read(@file)
partial = Liquid::Template.parse(source)
context.stack do
partial.render(context)
end
else
"Included file '#{@file}' not found in _includes directory"
end
else
"Included file '#{@file}' not found in _includes directory"
end
end
end
end
end
Liquid::Template.register_tag('include', Jekyll::IncludeTag)
Liquid::Template.register_tag('include', Jekyll::Tags::IncludeTag)

View File

@@ -0,0 +1,61 @@
module Jekyll
module Tags
class PostComparer
MATCHER = /^(.+\/)*(\d+-\d+-\d+)-(.*)$/
attr_accessor :date, :slug
def initialize(name)
all, path, date, slug = *name.sub(/^\//, "").match(MATCHER)
@slug = path ? path + slug : slug
@date = Time.parse(date)
end
def ==(other)
slug == post_slug(other) &&
date.year == other.date.year &&
date.month == other.date.month &&
date.day == other.date.day
end
private
# Construct the directory-aware post slug for a Jekyll::Post
#
# other - the Jekyll::Post
#
# Returns the post slug with the subdirectory (relative to _posts)
def post_slug(other)
path = other.name.split("/")[0...-1].join("/")
if path.nil? || path == ""
other.slug
else
path + '/' + other.slug
end
end
end
class PostUrl < Liquid::Tag
def initialize(tag_name, post, tokens)
super
@orig_post = post.strip
@post = PostComparer.new(@orig_post)
end
def render(context)
site = context.registers[:site]
site.posts.each do |p|
if @post == p
return p.url
end
end
puts "ERROR: post_url: \"#{@orig_post}\" could not be found"
return "#"
end
end
end
end
Liquid::Template.register_tag('post_url', Jekyll::Tags::PostUrl)

1
lib/site_template/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_site

View File

@@ -0,0 +1,2 @@
name: Your New Jekyll Site
pygments: true

View File

@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width">
<!-- syntax highlighting CSS -->
<link rel="stylesheet" href="/css/syntax.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
<div class="container">
<div class="site">
<div class="header">
<h1 class="title"><a href="/">{{ site.name }}</a></h1>
<a class="extra" href="/">home</a>
</div>
{{ content }}
<div class="footer">
<div class="contact">
<p>
Your Name<br />
What You Are<br />
your@email.com
</p>
</div>
<div class="contact">
<p>
<a href="http://github.com/yourusername/">github.com/yourusername</a><br />
<a href="http://twitter.com/yourusername/">twitter.com/yourusername</a><br />
</p>
</div>
</div>
</div>
</div> <!-- /container -->
</body>
</html>

View File

@@ -0,0 +1,9 @@
---
layout: default
---
<h2>{{ page.title }}</h2>
<p class="meta">{{ page.date | date_to_string }}</p>
<div class="post">
{{ content }}
</div>

View File

@@ -0,0 +1,24 @@
---
layout: post
title: "Welcome to Jekyll!"
date: <%= Time.now.strftime('%Y-%m-%d %H:%M:%S') %>
categories: jekyll update
---
You'll find this post in your `_posts` directory - edit this post and re-build (or run with the `-w` switch) to see your changes!
To add new posts, simply add a file in the `_posts` directory that follows the convention: YYYY-MM-DD-name-of-post.ext.
Jekyll also offers powerful support for code snippets:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
Check out the [Jekyll docs][jekyll] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll's GitHub repo][jekyll-gh].
[jekyll-gh]: https://github.com/mojombo/jekyll
[jekyll]: http://jekyllrb.com

165
lib/site_template/css/main.css Executable file
View File

@@ -0,0 +1,165 @@
/*****************************************************************************/
/*
/* Common
/*
/*****************************************************************************/
/* Global Reset */
* {
margin: 0;
padding: 0;
}
html, body { height: 100%; }
body {
background-color: #FFF;
font: 13.34px Helvetica, Arial, sans-serif;
font-size: small;
text-align: center;
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%; }
h1 { margin-bottom: 1em; }
p { margin: 1em 0; }
a { color: #00a; }
a:hover { color: #000; }
a:visited { color: #a0a; }
table {
font-size: inherit;
font: 100%;
}
/*****************************************************************************/
/*
/* Home
/*
/*****************************************************************************/
ul.posts {
list-style-type: none;
margin-bottom: 2em;
}
ul.posts li {
line-height: 1.75em;
}
ul.posts span {
color: #aaa;
font-family: Monaco, "Courier New", monospace;
font-size: 80%;
}
/*****************************************************************************/
/*
/* Site
/*
/*****************************************************************************/
.site {
font-size: 115%;
text-align: justify;
width: 42em;
margin: 3em auto 2em;
line-height: 1.5em;
}
.site .header a {
font-weight: bold;
text-decoration: none;
}
.site .header h1.title {
display: inline-block;
margin-bottom: 2em;
}
.site .header h1.title a {
color: #a00;
}
.site .header h1.title a:hover {
color: #000;
}
.site .header a.extra {
color: #aaa;
margin-left: 1em;
}
.site .header a.extra:hover {
color: #000;
}
.site .meta {
color: #aaa;
}
.site .footer {
font-size: 80%;
color: #666;
border-top: 4px solid #eee;
margin-top: 2em;
overflow: hidden;
}
.site .footer .contact {
float: left;
margin-right: 3em;
}
.site .footer .contact a {
color: #8085C1;
}
.site .footer .rss {
margin-top: 1.1em;
margin-right: -.2em;
float: right;
}
.site .footer .rss img {
border: 0;
}
/*****************************************************************************/
/*
/* Posts
/*
/*****************************************************************************/
/* standard */
.post pre {
border: 1px solid #ddd;
background-color: #eef;
padding: 0 .4em;
}
.post ul, .post ol {
margin-left: 1.35em;
}
.post code {
border: 1px solid #ddd;
background-color: #eef;
padding: 0 .2em;
}
.post pre code {
border: none;
}
/* terminal */
.post pre.terminal {
border: 1px solid #000;
background-color: #333;
color: #FFF;
}
.post pre.terminal code {
background-color: #333;
}

View File

@@ -0,0 +1,60 @@
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

View File

@@ -0,0 +1,13 @@
---
layout: default
title: Your New Jekyll Site
---
<div id="home">
<h1>Blog Posts</h1>
<ul class="posts">
{% for post in site.posts %}
<li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>

2
script/bootstrap Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
bundle install

4
site/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
_site/
*.swp
pkg/
test/

1
site/CNAME Normal file
View File

@@ -0,0 +1 @@
jekyllrb.com

1
site/README Normal file
View File

@@ -0,0 +1 @@
Jekyll's awesome website.

3
site/_config.yml Normal file
View File

@@ -0,0 +1,3 @@
pygments: true
relative_permalinks: false
gauges_id: 503c5af6613f5d0f19000027

View File

@@ -0,0 +1,32 @@
{% if site.gauges_id %}
<!-- Gauges (http://gaug.es/) -->
<script type="text/javascript">
var _gauges = _gauges || [];
(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '{{ site.gauges_id }}');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
})();
</script>
{% endif %}
{% if site.google_analytics_id %}
<!-- Google Analytics (http://google.com/analytics) -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '{{ site.google_analytics_id }}']);
_gaq.push(['_setDomainName', '{{ site.url }}']); // Multiple sub-domains
_gaq.push(['_setAllowLinker', true]); // Multiple TLDs
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endif %}

View File

@@ -0,0 +1,88 @@
<div class="unit one-fifth hide-on-mobiles">
<aside>
<h4>Getting Started</h4>
<ul>
<li class="{% if page.title == "Welcome" %}current{% endif %}">
<a href="{{ site.url }}/docs/home">Welcome</a>
</li>
<li class="{% if page.title == "Installation" %}current{% endif %}">
<a href="{{ site.url }}/docs/installation">Installation</a>
</li>
<li class="{% if page.title == "Basic Usage" %}current{% endif %}">
<a href="{{ site.url }}/docs/usage">Basic Usage</a>
</li>
<li class="{% if page.title == "Directory structure" %}current{% endif %}">
<a href="{{ site.url }}/docs/structure">Directory structure</a>
</li>
<li class="{% if page.title == "Configuration" %}current{% endif %}">
<a href="{{ site.url }}/docs/configuration">Configuration</a>
</li>
</ul>
<h4>Your Content</h4>
<ul>
<li class="{% if page.title == "Front-matter" %}current{% endif %}">
<a href="{{ site.url }}/docs/frontmatter">Front-matter</a>
</li>
<li class="{% if page.title == "Writing posts" %}current{% endif %}">
<a href="{{ site.url }}/docs/posts">Writing posts</a>
</li>
<li class="{% if page.title == "Creating pages" %}current{% endif %}">
<a href="{{ site.url }}/docs/pages">Creating pages</a>
</li>
<li class="{% if page.title == "Variables" %}current{% endif %}">
<a href="{{ site.url }}/docs/variables">Variables</a>
</li>
<li class="{% if page.title == "Blog migrations" %}current{% endif %}">
<a href="{{ site.url }}/docs/migrations">Blog migrations</a>
</li>
</ul>
<h4>Customization</h4>
<ul>
<li class="{% if page.title == "Templates" %}current{% endif %}">
<a href="{{ site.url }}/docs/templates">Templates</a>
</li>
<li class="{% if page.title == "Permalinks" %}current{% endif %}">
<a href="{{ site.url }}/docs/permalinks">Permalinks</a>
</li>
<li class="{% if page.title == "Pagination" %}current{% endif %}">
<a href="{{ site.url }}/docs/pagination">Pagination</a>
</li>
<li class="{% if page.title == "Plugins" %}current{% endif %}">
<a href="{{ site.url }}/docs/plugins">Plugins</a>
</li>
<li class="{% if page.title == "Extras" %}current{% endif %}">
<a href="{{ site.url }}/docs/extras">Extras</a>
</li>
</ul>
<h4>Deployment</h4>
<ul>
<li class="{% if page.title == "GitHub Pages" %}current{% endif %}">
<a href="{{ site.url }}/docs/github-pages">GitHub Pages</a>
</li>
<li class="{% if page.title == "Deployment methods" %}current{% endif %}">
<a href="{{ site.url }}/docs/deployment-methods">Other methods</a>
</li>
</ul>
<h4>Miscellaneous</h4>
<ul>
<li class="{% if page.title == "Contributing" %}current{% endif %}">
<a href="{{ site.url }}/docs/contributing">Contributing</a>
</li>
<li class="{% if page.title == "Troubleshooting" %}current{% endif %}">
<a href="{{ site.url }}/docs/troubleshooting">Troubleshooting</a>
</li>
<li class="{% if page.title == "Sites using Jekyll" %}current{% endif %}">
<a href="{{ site.url }}/docs/sites">Sites using Jekyll</a>
</li>
<li class="{% if page.title == "Resources" %}current{% endif %}">
<a href="{{ site.url }}/docs/resources">Resources</a>
</li>
<li class="{% if page.title == "Upgrading" %}current{% endif %}">
<a href="{{ site.url }}/docs/upgrading">Upgrading</a>
</li>
<li class="{% if page.title == "History" %}current{% endif %}">
<a href="{{ site.url }}/docs/history">History</a>
</li>
</ul>
</aside>
</div>

View File

@@ -0,0 +1,36 @@
<div class="docs-nav-mobile unit whole show-on-mobiles">
<select onchange="if (this.value) window.location.href=this.value">
<option value="">Navigate the docs…</option>
<optgroup label="Getting started">
<option value="{{ site.url }}/docs/home">Welcome</option>
<option value="{{ site.url }}/docs/installation">Installation</option>
<option value="{{ site.url }}/docs/usage">Basic Usage</option>
<option value="{{ site.url }}/docs/structure">Directory structure</option>
<option value="{{ site.url }}/docs/configuration">Configuration</option>
</optgroup>
<optgroup label="Your Content">
<option value="{{ site.url }}/docs/frontmatter">Front-matter</option>
<option value="{{ site.url }}/docs/posts">Writing posts</option>
<option value="{{ site.url }}/docs/pages">Creating pages</option>
<option value="{{ site.url }}/docs/variables">Variables</option>
<option value="{{ site.url }}/docs/migrations">Blog migrations</option>
</optgroup>
<optgroup label="Customization">
<option value="{{ site.url }}/docs/templates">Templates</option>
<option value="{{ site.url }}/docs/permalinks">Permalinks</option>
<option value="{{ site.url }}/docs/pagination">Pagination</option>
<option value="{{ site.url }}/docs/plugins">Plugins</option>
<option value="{{ site.url }}/docs/extras">Extras</option>
</optgroup>
<optgroup label="Deployment">
<option value="{{ site.url }}/docs/github-pages">GitHub Pages</option>
<option value="{{ site.url }}/docs/deployment-methods">Other methods</option>
</optgroup>
<optgroup label="Miscellaneous">
<option value="{{ site.url }}/docs/contributing">Contributing</option>
<option value="{{ site.url }}/docs/troubleshooting">Troubleshooting</option>
<option value="{{ site.url }}/docs/sites">Sites using Jekyll</option>
<option value="{{ site.url }}/docs/resources">Resources</option>
</optgroup>
</select>
</div>

View File

@@ -0,0 +1,15 @@
<footer>
<div class="grid">
<div class="unit one-third center-on-mobiles">
<p>By <a href="http://tom.preston-werner.com">Tom Preston-Werner</a>, <a href="http://quaran.to/">Nick Quaranto</a>, and many more <a href="https://github.com/mojombo/jekyll/graphs/contributors">awesome&nbsp;contributors</a>.</p>
</div>
<div class="unit two-thirds align-right center-on-mobiles">
<p>
Proudly hosted by
<a href="https://github.com">
<img src="{{ site.url }}/img/footer-logo.png" alt="GitHub • Social coding">
</a>
</p>
</div>
</div>
</footer>

View File

@@ -0,0 +1,18 @@
<header>
<nav class="mobile-nav show-on-mobiles">
{% include primary-nav-items.html %}
</nav>
<div class="grid">
<div class="unit one-third center-on-mobiles">
<h1>
<a href="{{ site.url }}/">
<span>Jekyll</span>
<img src="{{ site.url }}/img/logo-2x.png" width="249px" height="115px" alt="">
</a>
</h1>
</div>
<nav class="main-nav unit two-thirds hide-on-mobiles">
{% include primary-nav-items.html %}
</nav>
</div>
</header>

View File

@@ -0,0 +1,11 @@
<ul>
<li class="{% if page.overview %}current{% endif %}">
<a href="{{ site.url }}/">Overview</a>
</li>
<li class="{% unless page.overview %}current{% endunless %}">
<a href="{{ site.url }}/docs/home">Doc<span class="show-on-mobiles">s</span><span class="hide-on-mobiles">umentation</span></a>
</li>
<li class="">
<a href="https://github.com/mojombo/jekyll"><span class="hide-on-mobiles">View on </span>GitHub</a>
</li>
</ul>

View File

@@ -0,0 +1,22 @@
<div class="section-nav">
<div class="left align-right">
{% if page.prev_section != null %}
<a href="{{ site.url }}/docs/{{ page.prev_section }}" class="prev">
Back
</a>
{% else %}
<span class="prev disabled">Back</span>
{% endif %}
</div>
<div class="right align-left">
{% if page.next_section != null %}
<a href="{{ site.url }}/docs/{{ page.next_section }}" class="next">
Next
</a>
{% else %}
<span class="next disabled">Next</span>
{% endif %}
</div>
<div class="clear"></div>
</div>

15
site/_includes/top.html Normal file
View File

@@ -0,0 +1,15 @@
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Arizonia' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ site.url }}/css/normalize.css" />
<link rel="stylesheet" href="{{ site.url }}/css/gridism.css" />
<link rel="stylesheet" href="{{ site.url }}/css/style.css" />
<link rel="stylesheet" href="{{ site.url }}/css/pygments.css" />
<link rel="icon" type="image/x-icon" href="{{ site.url }}/favicon.png" />
<script src="{{ site.url }}/js/modernizr-2.5.3.min.js"></script>
</head>

View File

@@ -0,0 +1,12 @@
{% include top.html %}
<body class="wrap">
{% include header.html %}
{{ content }}
{% include footer.html %}
{% include analytics.html %}
</body>
</html>

23
site/_layouts/docs.html Normal file
View File

@@ -0,0 +1,23 @@
---
layout: default
---
<section class="docs">
<div class="grid">
{% include docs_contents_mobile.html %}
<div class="unit four-fifths">
<article>
<h1>{{ page.title }}</h1>
{{ content }}
{% include section_nav.html %}
</article>
</div>
{% include docs_contents.html %}
<div class="clear"></div>
</div>
</section>

110
site/css/gridism.css Normal file
View File

@@ -0,0 +1,110 @@
/*
* Gridism
* A simple, responsive, and handy CSS grid by @cobyism
* https://github.com/cobyism/gridism
*/
/* Preserve some sanity */
.grid,
.unit {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* Set up some rules to govern the grid */
.grid {
display: block;
clear: both;
}
.grid .unit {
float: left;
width: 100%;
padding: 10px;
}
/* This ensures the outer gutters are equal to the (doubled) inner gutters. */
.grid .unit:first-child { padding-left: 20px; }
.grid .unit:last-child { padding-right: 20px; }
/* Nested grids already have padding though, so lets nuke it */
.unit .unit:first-child { padding-left: 0; }
.unit .unit:last-child { padding-right: 0; }
.unit .grid:first-child > .unit { padding-top: 0; }
.unit .grid:last-child > .unit { padding-bottom: 0; }
/* Let people nuke the gutters/padding completely in a couple of ways */
.no-gutters .unit,
.unit.no-gutters {
padding: 0 !important;
}
/* Wrapping at a maximum width is optional */
.wrap .grid,
.grid.wrap {
max-width: 978px;
margin: 0 auto;
}
/* Width classes also have shorthand versions numbered as fractions
* For example: for a grid unit 1/3 (one third) of the parent width,
* simply apply class="w-1-3" to the element. */
.grid .whole, .grid .w-1-1 { width: 100%; }
.grid .half, .grid .w-1-2 { width: 50%; }
.grid .one-third, .grid .w-1-3 { width: 33.3332%; }
.grid .two-thirds, .grid .w-2-3 { width: 66.6665%; }
.grid .one-quarter, .grid .w-1-4 { width: 25%; }
.grid .three-quarters, .grid .w-3-4 { width: 75%; }
.grid .one-fifth, .grid .w-1-5 { width: 20%; }
.grid .two-fifths, .grid .w-2-5 { width: 40%; }
.grid .three-fifths, .grid .w-3-5 { width: 60%; }
.grid .four-fifths, .grid .w-4-5 { width: 80%; }
.grid .golden-small, .grid .w-g-s { width: 38.2716%; } /* Golden section: smaller piece */
.grid .golden-large, .grid .w-g-l { width: 61.7283%; } /* Golden section: larger piece */
/* Utility classes */
.align-center { text-align: center; }
.align-left { text-align: left; }
.align-right { text-align: right; }
.pull-left { float: left; }
.pull-right { float: right; }
.show-on-mobiles {
display: none;
}
/* Responsive Stuff */
@media screen and (max-width: 568px) {
/* Stack anything that isnt full-width on smaller screens */
.grid .unit {
width: 100% !important;
padding-left: 20px;
padding-right: 20px;
}
.unit .grid .unit {
padding-left: 0px;
padding-right: 0px;
}
/* Sometimes, you just want to be different on small screens */
.center-on-mobiles {
text-align: center !important;
}
.hide-on-mobiles {
display: none !important;
}
.show-on-mobiles {
display: block !important;
}
a .show-on-mobiles {
display: inline !important;
}
}
/* Expand the wrap a bit further on larger screens */
/*@media screen and (min-width: 1180px) {
.wrap .grid {
max-width: 1180px;
margin: 0 auto;
}
}*/

504
site/css/normalize.css vendored Executable file
View File

@@ -0,0 +1,504 @@
/*! normalize.css 2012-03-11T12:53 UTC - http://github.com/necolas/normalize.css */
/* =============================================================================
HTML5 display definitions
========================================================================== */
/*
* Corrects block display not defined in IE6/7/8/9 & FF3
*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
/*
* Corrects inline-block display not defined in IE6/7/8/9 & FF3
*/
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
/*
* Prevents modern browsers from displaying 'audio' without controls
* Remove excess height in iOS5 devices
*/
audio:not([controls]) {
display: none;
height: 0;
}
/*
* Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
* Known issue: no IE6 support
*/
[hidden] {
display: none;
}
/* =============================================================================
Base
========================================================================== */
/*
* 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
* http://clagnut.com/blog/348/#c790
* 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
*/
html {
font-size: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
/*
* Addresses font-family inconsistency between 'textarea' and other form elements.
*/
html,
button,
input,
select,
textarea {
font-family: sans-serif;
}
/*
* Addresses margins handled incorrectly in IE6/7
*/
body {
margin: 0;
}
/* =============================================================================
Links
========================================================================== */
/*
* Addresses outline displayed oddly in Chrome
*/
a:focus {
outline: thin dotted;
}
/*
* Improves readability when focused and also mouse hovered in all browsers
* people.opera.com/patrickl/experiments/keyboard/test
*/
a:hover,
a:active {
outline: 0;
}
/* =============================================================================
Typography
========================================================================== */
/*
* Addresses font sizes and margins set differently in IE6/7
* Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0;
}
h4 {
font-size: 1em;
margin: 1.33em 0;
}
h5 {
font-size: 0.83em;
margin: 1.67em 0;
}
h6 {
font-size: 0.75em;
margin: 2.33em 0;
}
/*
* Addresses styling not present in IE7/8/9, S5, Chrome
*/
abbr[title] {
border-bottom: 1px dotted;
}
/*
* Addresses style set to 'bolder' in FF3+, S4/5, Chrome
*/
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
/*
* Addresses styling not present in S5, Chrome
*/
dfn {
font-style: italic;
}
/*
* Addresses styling not present in IE6/7/8/9
*/
mark {
background: #ff0;
color: #000;
}
/*
* Addresses margins set differently in IE6/7
*/
p,
pre {
margin: 1em 0;
}
/*
* Corrects font family set oddly in IE6, S4/5, Chrome
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
*/
pre,
code,
kbd,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
/*
* Improves readability of pre-formatted text in all browsers
*/
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/*
* 1. Addresses CSS quotes not supported in IE6/7
* 2. Addresses quote property not supported in S4
*/
/* 1 */
q {
quotes: none;
}
/* 2 */
q:before,
q:after {
content: '';
content: none;
}
small {
font-size: 75%;
}
/*
* Prevents sub and sup affecting line-height in all browsers
* gist.github.com/413930
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* =============================================================================
Lists
========================================================================== */
/*
* Addresses margins set differently in IE6/7
*/
dl,
menu,
ol,
ul {
margin: 1em 0;
}
dd {
margin: 0 0 0 40px;
}
/*
* Addresses paddings set differently in IE6/7
*/
menu,
ol,
ul {
padding: 0 0 0 40px;
}
/*
* Corrects list images handled incorrectly in IE7
*/
nav ul,
nav ol {
list-style: none;
list-style-image: none;
}
/* =============================================================================
Embedded content
========================================================================== */
/*
* 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
* 2. Improves image quality when scaled in IE7
* code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
*/
img {
border: 0; /* 1 */
-ms-interpolation-mode: bicubic; /* 2 */
}
/*
* Corrects overflow displayed oddly in IE9
*/
svg:not(:root) {
overflow: hidden;
}
/* =============================================================================
Figures
========================================================================== */
/*
* Addresses margin not present in IE6/7/8/9, S5, O11
*/
figure {
margin: 0;
}
/* =============================================================================
Forms
========================================================================== */
/*
* Corrects margin displayed oddly in IE6/7
*/
form {
margin: 0;
}
/*
* Define consistent border, margin, and padding
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/*
* 1. Corrects color not being inherited in IE6/7/8/9
* 2. Corrects text not wrapping in FF3
* 3. Corrects alignment displayed oddly in IE6/7
*/
legend {
border: 0; /* 1 */
padding: 0;
white-space: normal; /* 2 */
*margin-left: -7px; /* 3 */
}
/*
* 1. Corrects font size not being inherited in all browsers
* 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
* 3. Improves appearance and consistency in all browsers
*/
button,
input,
select,
textarea {
font-size: 100%; /* 1 */
margin: 0; /* 2 */
vertical-align: baseline; /* 3 */
*vertical-align: middle; /* 3 */
}
/*
* Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
*/
button,
input {
line-height: normal; /* 1 */
}
/*
* 1. Improves usability and consistency of cursor style between image-type 'input' and others
* 2. Corrects inability to style clickable 'input' types in iOS
* 3. Removes inner spacing in IE7 without affecting normal text inputs
* Known issue: inner spacing remains in IE6
*/
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
cursor: pointer; /* 1 */
-webkit-appearance: button; /* 2 */
*overflow: visible; /* 3 */
}
/*
* Re-set default cursor for disabled elements
*/
button[disabled],
input[disabled] {
cursor: default;
}
/*
* 1. Addresses box sizing set to content-box in IE8/9
* 2. Removes excess padding in IE8/9
* 3. Removes excess padding in IE7
Known issue: excess padding remains in IE6
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
*height: 13px; /* 3 */
*width: 13px; /* 3 */
}
/*
* 1. Addresses appearance set to searchfield in S5, Chrome
* 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/*
* Removes inner padding and search cancel button in S5, Chrome on OS X
*/
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
/*
* Removes inner padding and border in FF3+
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/*
* 1. Removes default vertical scrollbar in IE6/7/8/9
* 2. Improves readability and alignment in all browsers
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
/* =============================================================================
Tables
========================================================================== */
/*
* Remove most spacing between table cells
*/
table {
border-collapse: collapse;
border-spacing: 0;
}

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