Merge branch 'master' into permalink-special-characters
Conflicts: lib/jekyll/page.rb lib/jekyll/post.rb
This commit is contained in:
commit
2ac98a7358
11
.travis.yml
11
.travis.yml
|
@ -1,11 +1,20 @@
|
|||
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"
|
||||
irc:
|
||||
channels:
|
||||
- "irc.freenode.org#jekyll"
|
||||
#on_success: change
|
||||
#on_failure: change
|
||||
template:
|
||||
- "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}"
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: never
|
||||
|
|
|
@ -15,7 +15,7 @@ following in mind:
|
|||
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,
|
||||
documentation. It lives in `site/docs`. 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.
|
||||
|
@ -41,7 +41,7 @@ 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` ).
|
||||
* 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`.
|
||||
|
@ -50,6 +50,24 @@ Here's the most direct way to get your work merged into the project:
|
|||
* Create a pull request against mojombo/jekyll and describe what your change
|
||||
does and the why you think it should be merged.
|
||||
|
||||
Updating Documentation
|
||||
----------------------
|
||||
|
||||
We want the Jekyll documentation to be the best it can be. We've
|
||||
open-sourced our docs and we welcome any pull requests if you find it
|
||||
lacking.
|
||||
|
||||
You can find the documentation for jekyllrb.com in the
|
||||
[site](https://github.com/mojombo/jekyll/tree/master/site) directory of
|
||||
Jekyll's repo on GitHub.com.
|
||||
|
||||
All documentation pull requests should be directed at `master`. Pull
|
||||
requests directed at another branch will not be accepted.
|
||||
|
||||
The [Jekyll wiki](https://github.com/mojombo/jekyll/wiki) on GitHub
|
||||
can be freely updated without a pull request as all
|
||||
GitHub users have access.
|
||||
|
||||
Gotchas
|
||||
-------
|
||||
|
|
@ -0,0 +1,590 @@
|
|||
## HEAD
|
||||
|
||||
### Major Enhancements
|
||||
* Add 'docs' subcommand to read Jekyll's docs when offline. (#1046)
|
||||
* Support passing parameters to templates in 'include' tag (#1204)
|
||||
|
||||
### Minor Enhancements
|
||||
* Search the hierarchy of pagination path up to site root to determine template page for
|
||||
pagination. (#1198)
|
||||
* Add the ability to generate a new Jekyll site without a template (#1171)
|
||||
* Use redcarpet as the default markdown engine in newly generated
|
||||
sites (#1245, #1247)
|
||||
* Add `redcarpet` as a runtime dependency so `jekyll build` works out-of-the-box for new
|
||||
sites. (#1247)
|
||||
* In the generated site, remove files that will be replaced by a
|
||||
directory (#1118)
|
||||
|
||||
### Bug Fixes
|
||||
* Fix pagination in subdirectories. (#1198)
|
||||
* Fix an issue with directories and permalinks that have a plus sign
|
||||
(+) in them (#1215)
|
||||
* Provide better error reporting when generating sites (#1253)
|
||||
* Latest posts first in non-LSI `related_posts` (#1271)
|
||||
|
||||
### Development Fixes
|
||||
* Merge the theme and layout cucumber steps into one step (#1151)
|
||||
* Restrict activesupport dependency to pre-4.0.0 to maintain compatibility with `<= 1.9.2`
|
||||
* Include/exclude deprecation handling simplification (#1284)
|
||||
* Convert README to Markdown. (#1267)
|
||||
|
||||
### Site Enhancements
|
||||
* Add "News" section for release notes, along with an RSS feed (#1093, #1285, #1286)
|
||||
* Add "History" page.
|
||||
* Restructured docs sections to include "Meta" section.
|
||||
* Add message to "Templates" page that specifies that Python must be installed in order
|
||||
to use Pygments. (#1182)
|
||||
* Update link to the official Maruku repo (#1175)
|
||||
* Add documentation about `paginate_path` to "Templates" page in docs (#1129)
|
||||
* Give the quick-start guide its own page (#1191)
|
||||
* Update ProTip on Installation page in docs to point to all the info about Pygments and
|
||||
the 'highlight' tag. (#1196)
|
||||
* Run `site/img` through ImageOptim (thanks @qrush!) (#1208)
|
||||
* Added Jade Converter to `site/docs/plugins` (#1210)
|
||||
* Fix location of docs pages in Contributing pages (#1214)
|
||||
* Add ReadInXMinutes plugin to the plugin list (#1222)
|
||||
* Remove plugins from the plugin list that have equivalents in Jekyll
|
||||
proper (#1223)
|
||||
* Add jekyll-assets to the plugin list (#1225)
|
||||
* Add jekyll-pandoc-mulitple-formats to the plugin list (#1229)
|
||||
* Remove dead link to "Using Git to maintain your blog" (#1227)
|
||||
* Tidy up the third-party plugins listing (#1228)
|
||||
* Update contributor information (#1192)
|
||||
* Update URL of article about Blogger migration (#1242)
|
||||
* Specify that RedCarpet is the default for new Jekyll sites on Quickstart page (#1247)
|
||||
* Added site.pages to Variables page in docs (#1251)
|
||||
* Add Youku and Tudou Embed link on Plugins page. (#1250)
|
||||
* Add note that `gist` tag supports private gists. (#1248)
|
||||
* Add `jekyll-timeago` to list of third-party plugins. (#1260)
|
||||
* Add `jekyll-swfobject` to list of third-party plugins. (#1263)
|
||||
* Add `jekyll-picture-tag` to list of third-party plugins. (#1280)
|
||||
* Update the GitHub Pages documentation regarding relative URLs
|
||||
(#1291)
|
||||
* Update the S3 deployment documentation (#1294)
|
||||
* Add suggestion for Xcode CLT install to troubleshooting page in docs (#1296)
|
||||
* Add 'Working with drafts' page to docs (#1289)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
## 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
|
||||
(@jeffrydegrande)
|
||||
|
||||
## 0.5.2 / 2009-06-24
|
||||
* Enhancements
|
||||
* Added --paginate option to the executable along with a paginator object
|
||||
for the payload (@calavera)
|
||||
* Upgraded RedCloth to 4.2.1, which makes `<notextile>` tags work once
|
||||
again.
|
||||
* Configuration options set in config.yml are now available through the
|
||||
site payload (@vilcans)
|
||||
* Posts can now have an empty YAML front matter or none at all
|
||||
(@bahuvrihi)
|
||||
* Bug Fixes
|
||||
* Fixing Ruby 1.9 issue that requires to_s on the err object
|
||||
(@Chrononaut)
|
||||
* Fixes for pagination and ordering posts on the same day (@ujh)
|
||||
* Made pages respect permalinks style and permalinks in yml front matter
|
||||
(@eugenebolshakov)
|
||||
* Index.html file should always have index.html permalink
|
||||
(@eugenebolshakov)
|
||||
* Added trailing slash to pretty permalink style so Apache is happy
|
||||
(@eugenebolshakov)
|
||||
* Bad markdown processor in config fails sooner and with better message
|
||||
(@gcnovus)
|
||||
* Allow CRLFs in yaml frontmatter (@juretta)
|
||||
* Added Date#xmlschema for Ruby versions < 1.9
|
||||
|
||||
## 0.5.1 / 2009-05-06
|
||||
### Major Enhancements
|
||||
* Next/previous posts in site payload (@pantulis, @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 (@duritong)
|
||||
* Bug Fixes
|
||||
* Making sure config.yaml references are all gone, using only config.yml
|
||||
* Fixed syntax highlighting breaking for UTF-8 code (@henrik)
|
||||
* Worked around RDiscount bug that prevents Markdown from getting parsed
|
||||
after highlight (@henrik)
|
||||
* CGI escaped post titles (@Chrononaut)
|
||||
|
||||
## 0.5.0 / 2009-04-07
|
||||
### Minor Enhancements
|
||||
* Ability to set post categories via YAML (@qrush)
|
||||
* Ability to set prevent a post from publishing via YAML (@qrush)
|
||||
* Add textilize filter (@willcodeforfoo)
|
||||
* Add 'pretty' permalink style for wordpress-like urls (@dysinger)
|
||||
* Made it possible to enter categories from YAML as an array (@Chrononaut)
|
||||
* Ignore Emacs autosave files (@Chrononaut)
|
||||
* Bug Fixes
|
||||
* Use block syntax of popen4 to ensure that subprocesses are properly disposed (@jqr)
|
||||
* Close open4 streams to prevent zombies (@rtomayko)
|
||||
* Only query required fields from the WP Database (@ariejan)
|
||||
* Prevent `_posts` from being copied to the destination directory (@bdimcheff)
|
||||
* Refactors
|
||||
* Factored the filtering code into a method (@Chrononaut)
|
||||
* Fix tests and convert to Shoulda (@qrush, @technicalpickles)
|
||||
* Add Cucumber acceptance test suite (@qrush, @technicalpickles)
|
||||
|
||||
## 0.4.1
|
||||
### Minor Enhancements
|
||||
* Changed date format on wordpress converter (zeropadding) (@dysinger)
|
||||
* Bug Fixes
|
||||
* Add jekyll binary as executable to gemspec (@dysinger)
|
||||
|
||||
## 0.4.0 / 2009-02-03
|
||||
### Major Enhancements
|
||||
* Switch to Jeweler for packaging tasks
|
||||
|
||||
### Minor Enhancements
|
||||
* Type importer (@codeslinger)
|
||||
* site.topics accessor (@baz)
|
||||
* Add `array_to_sentence_string` filter (@mchung)
|
||||
* Add a converter for textpattern (@PerfectlyNormal)
|
||||
* Add a working Mephisto / MySQL converter (@ivey)
|
||||
* Allowing .htaccess files to be copied over into the generated site (@briandoll)
|
||||
* Add option to not put file date in permalink URL (@mreid)
|
||||
* Add line number capabilities to highlight blocks (@jcon)
|
||||
* Bug Fixes
|
||||
* Fix permalink behavior (@cavalle)
|
||||
* Fixed an issue with pygments, markdown, and newlines (@zpinter)
|
||||
* Ampersands need to be escaped (@pufuwozu, @ap)
|
||||
* Test and fix the site.categories hash (@zzot)
|
||||
* Fix site payload available to files (@matrix9180)
|
||||
|
||||
## 0.3.0 / 2008-12-24
|
||||
### Major Enhancements
|
||||
* Added --server option to start a simple WEBrick server on destination
|
||||
directory (@johnreilly and @mchung)
|
||||
|
||||
### Minor Enhancements
|
||||
* Added post categories based on directories containing `_posts` (@mreid)
|
||||
* Added post topics based on directories underneath `_posts`
|
||||
* Added new date filter that shows the full month name (@mreid)
|
||||
* Merge Post's YAML front matter into its to_liquid payload (@remi)
|
||||
* Restrict includes to regular files underneath `_includes`
|
||||
* Bug Fixes
|
||||
* Change YAML delimiter matcher so as to not chew up 2nd level markdown
|
||||
headers (@mreid)
|
||||
* Fix bug that meant page data (such as the date) was not available in
|
||||
templates (@mreid)
|
||||
* Properly reject directories in `_layouts`
|
||||
|
||||
## 0.2.1 / 2008-12-15
|
||||
* Major Changes
|
||||
* Use Maruku (pure Ruby) for Markdown by default (@mreid)
|
||||
* Allow use of RDiscount with --rdiscount flag
|
||||
|
||||
### Minor Enhancements
|
||||
* Don't load directory_watcher unless it's needed (@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 (@JackDanger)
|
||||
* Bug Fixes
|
||||
* Prevent Jekyll from picking up the output directory as a source (@JackDanger)
|
||||
* Skip `related_posts` when there is only one post (@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 (@vanpelt)
|
||||
* Mephisto and CSV converters (@vanpelt)
|
||||
* Code hilighting (@vanpelt)
|
||||
* Autobuild
|
||||
* Bug Fixes
|
||||
* Accept both \r\n and \n in YAML header (@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!
|
409
History.txt
409
History.txt
|
@ -1,409 +0,0 @@
|
|||
== HEAD
|
||||
* 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
|
||||
* 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)
|
||||
* "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
|
||||
* 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
|
||||
* 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 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!
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# Jekyll
|
||||
|
||||
[](https://travis-ci.org/mojombo/jekyll)
|
||||
[](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.
|
||||
|
||||
## Getting Started
|
||||
|
||||
* [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](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)
|
||||
|
||||
## Diving In
|
||||
|
||||
* [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
|
||||
|
||||
## Runtime Dependencies
|
||||
|
||||
* Classifier: Generating related posts (Ruby)
|
||||
* Directory Watcher: Auto-regeneration of sites (Ruby)
|
||||
* Kramdown: Markdown-superset converter (Ruby)
|
||||
* Liquid: Templating system (Ruby)
|
||||
* Maruku: Default markdown engine (Ruby)
|
||||
|
||||
## Developer Dependencies
|
||||
|
||||
* RDiscount: Discount Markdown Processor (Ruby)
|
||||
* RedCloth: Textile support (Ruby)
|
||||
* RedGreen: Nicer test output (Ruby)
|
||||
* RR: Mocking (Ruby)
|
||||
* Shoulda: Test framework (Ruby)
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](https://github.com/mojombo/jekyll/blob/master/LICENSE).
|
|
@ -1,45 +0,0 @@
|
|||
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
|
||||
* 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
|
||||
* 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
|
||||
* Use custom "Plugins":http://wiki.github.com/mojombo/jekyll/Plugins to generate content specific to your site
|
||||
|
||||
h2. Runtime Dependencies
|
||||
|
||||
* Classifier: Generating related posts (Ruby)
|
||||
* Directory Watcher: Auto-regeneration of sites (Ruby)
|
||||
* Kramdown: Markdown-superset converter (Ruby)
|
||||
* Liquid: Templating system (Ruby)
|
||||
* Maruku: Default markdown engine (Ruby)
|
||||
|
||||
h2. Developer Dependencies
|
||||
|
||||
* 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":https://github.com/mojombo/jekyll/blob/master/LICENSE.
|
65
Rakefile
65
Rakefile
|
@ -2,6 +2,7 @@ require 'rubygems'
|
|||
require 'rake'
|
||||
require 'rdoc'
|
||||
require 'date'
|
||||
require 'yaml'
|
||||
|
||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w[lib]))
|
||||
|
||||
|
@ -24,6 +25,10 @@ def date
|
|||
Date.today.to_s
|
||||
end
|
||||
|
||||
def file_date
|
||||
Date.today.strftime("%F")
|
||||
end
|
||||
|
||||
def rubyforge_project
|
||||
name
|
||||
end
|
||||
|
@ -40,6 +45,39 @@ def replace_header(head, header_name)
|
|||
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
|
||||
end
|
||||
|
||||
def normalize_bullets(markdown)
|
||||
markdown.gsub(/\s{2}\*{1}/, "-")
|
||||
end
|
||||
|
||||
def linkify_prs(markdown)
|
||||
markdown.gsub(/#(\d+)/) do |word|
|
||||
"[#{word}](https://github.com/mojombo/jekyll/issues/#{word.delete("#")})"
|
||||
end
|
||||
end
|
||||
|
||||
def linkify_users(markdown)
|
||||
markdown.gsub(/(@\w+)/) do |username|
|
||||
"[#{username}](https://github.com/#{username.delete("@")})"
|
||||
end
|
||||
end
|
||||
|
||||
def linkify(markdown)
|
||||
linkify_users(linkify_prs(markdown))
|
||||
end
|
||||
|
||||
def liquid_escape(markdown)
|
||||
markdown.gsub(/(`{[{%].+[}%]}`)/, "{% raw %}\\1{% endraw %}")
|
||||
end
|
||||
|
||||
def remove_head_from_history(markdown)
|
||||
index = markdown =~ /^##\s+\d+\.\d+\.\d+/
|
||||
markdown[index..-1]
|
||||
end
|
||||
|
||||
def converted_history(markdown)
|
||||
remove_head_from_history(liquid_escape(linkify(normalize_bullets(markdown))))
|
||||
end
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Standard tasks
|
||||
|
@ -110,11 +148,7 @@ namespace :site do
|
|||
end
|
||||
|
||||
desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
|
||||
task :publish do
|
||||
# Failsafe. Remove this once it has been done.
|
||||
puts "Make sure to merge #583 into gh-pages before deploying."
|
||||
exit(1)
|
||||
|
||||
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")
|
||||
|
@ -147,6 +181,27 @@ namespace :site do
|
|||
end
|
||||
puts 'Done.'
|
||||
end
|
||||
|
||||
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
|
||||
task :history do
|
||||
if File.exist?("History.markdown")
|
||||
history_file = File.read("History.markdown")
|
||||
front_matter = {
|
||||
"layout" => "docs",
|
||||
"title" => "History",
|
||||
"permalink" => "/docs/history/",
|
||||
"prev_section" => "contributing"
|
||||
}
|
||||
Dir.chdir('site/docs/') do
|
||||
File.open("history.md", "w") do |file|
|
||||
file.write("#{front_matter.to_yaml}---\n\n")
|
||||
file.write(converted_history(history_file))
|
||||
end
|
||||
end
|
||||
else
|
||||
abort "You seem to have misplaced your History.markdown file. I can haz?"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#############################################################################
|
||||
|
|
55
bin/jekyll
55
bin/jekyll
|
@ -6,6 +6,8 @@ $:.unshift File.join(File.dirname(__FILE__), *%w{ .. lib })
|
|||
require 'commander/import'
|
||||
require 'jekyll'
|
||||
|
||||
Jekyll::Deprecator.process(ARGV)
|
||||
|
||||
program :name, 'jekyll'
|
||||
program :version, Jekyll::VERSION
|
||||
program :description, 'Jekyll is a blog-aware, static site generator in Ruby'
|
||||
|
@ -15,7 +17,7 @@ default_command :help
|
|||
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 '--plugins', 'Plugins directory (defaults to ./_plugins)'
|
||||
global_option '-p', '--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]', Array, 'Plugins directory (defaults to ./_plugins)'
|
||||
global_option '--layouts', 'Layouts directory (defaults to ./_layouts)'
|
||||
|
||||
# Option names don't always directly match the configuration value we'd like.
|
||||
|
@ -35,8 +37,11 @@ command :new do |c|
|
|||
c.syntax = 'jekyll new PATH'
|
||||
c.description = 'Creates a new Jekyll site scaffold in PATH'
|
||||
|
||||
c.option '--force', 'Force creation even if PATH already exists'
|
||||
c.option '--blank', 'Creates scaffolding but with empty files'
|
||||
|
||||
c.action do |args, options|
|
||||
Jekyll::Commands::New.process(args)
|
||||
Jekyll::Commands::New.process(args, options.__hash__)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -44,15 +49,14 @@ command :build do |c|
|
|||
c.syntax = 'jekyll build [options]'
|
||||
c.description = 'Build your site'
|
||||
|
||||
c.option '--config [CONFIG_FILE]', 'Custom configuration file'
|
||||
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', 'Limits the number of posts to parse and publish'
|
||||
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'
|
||||
|
||||
c.action do |args, options|
|
||||
options.defaults :serving => false
|
||||
options = normalize_options(options.__hash__)
|
||||
options = Jekyll.configuration(options)
|
||||
Jekyll::Commands::Build.process(options)
|
||||
|
@ -63,15 +67,15 @@ command :serve do |c|
|
|||
c.syntax = 'jekyll serve [options]'
|
||||
c.description = 'Serve your site locally'
|
||||
|
||||
c.option '--config [CONFIG_FILE]', 'Custom configuration file'
|
||||
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', 'Limits the number of posts to parse and publish'
|
||||
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'
|
||||
|
||||
c.option '-p', '--port [PORT]', 'Port to listen on'
|
||||
c.option '-h', '--host [HOST]', 'Host to bind to'
|
||||
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'
|
||||
|
||||
c.action do |args, options|
|
||||
|
@ -85,6 +89,39 @@ command :serve do |c|
|
|||
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 :docs do |c|
|
||||
c.syntax = 'jekyll docs'
|
||||
c.description = "Launch local server with docs for Jekyll v#{Jekyll::VERSION}"
|
||||
|
||||
c.option '-p', '--port [PORT]', 'Port to listen on'
|
||||
c.option '-u', '--host [HOST]', 'Host to bind to'
|
||||
|
||||
c.action do |args, options|
|
||||
options = normalize_options(options.__hash__)
|
||||
options = Jekyll.configuration(options).merge({
|
||||
'source' => File.expand_path("../site", File.dirname(__FILE__)),
|
||||
'destination' => File.expand_path("../site/_site", File.dirname(__FILE__))
|
||||
})
|
||||
puts options
|
||||
Jekyll::Commands::Build.process(options)
|
||||
Jekyll::Commands::Serve.process(options)
|
||||
end
|
||||
end
|
||||
|
||||
command :import do |c|
|
||||
c.syntax = 'jekyll import <platform> [options]'
|
||||
c.description = 'Import your old blog to Jekyll'
|
||||
|
|
|
@ -3,6 +3,13 @@ Feature: Create sites
|
|||
I want to be able to make a static site
|
||||
In order to share my awesome ideas with the interwebs
|
||||
|
||||
Scenario: Blank site
|
||||
Given I do not have a "test_blank" directory
|
||||
When I call jekyll new with test_blank --blank
|
||||
Then the test_blank/_layouts directory should exist
|
||||
And the test_blank/_posts directory should exist
|
||||
And the "test_blank/index.html" file should exist
|
||||
|
||||
Scenario: Basic site
|
||||
Given I have an "index.html" file that contains "Basic Site"
|
||||
When I run jekyll
|
||||
|
@ -13,7 +20,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 +38,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 +56,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"
|
||||
|
@ -99,8 +106,8 @@ Feature: Create sites
|
|||
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 "URL: /2020/01/31/entry2/" in "_site/index.html"
|
||||
|
@ -110,3 +117,14 @@ Feature: Create sites
|
|||
When I run jekyll
|
||||
Then the _site directory should exist
|
||||
And I should see "SomeDirective" in "_site/.htaccess"
|
||||
|
||||
Scenario: File was replaced by a directory
|
||||
Given I have a "test" file that contains "some stuff"
|
||||
When I run jekyll
|
||||
Then the _site directory should exist
|
||||
When I delete the file "test"
|
||||
Given I have a test directory
|
||||
And I have a "test/index.html" file that contains "some other stuff"
|
||||
When I run jekyll
|
||||
Then the _site/test directory should exist
|
||||
And I should see "some other stuff" in "_site/test/index.html"
|
||||
|
|
|
@ -2,13 +2,13 @@ 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 | 3/27/2009 | default | Not baked yet. |
|
||||
| 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"
|
||||
|
@ -19,7 +19,7 @@ Feature: Draft Posts
|
|||
And I have a _drafts directory
|
||||
And I have the following draft:
|
||||
| title | date | layout | content |
|
||||
| Recipe | 3/27/2009 | default | Not baked yet. |
|
||||
| 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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
Feature: Include tags
|
||||
In order to share their content across several pages
|
||||
As a hacker who likes to blog
|
||||
I want to be able to include files in my blog posts
|
||||
|
||||
Scenario: Include a file with parameters
|
||||
Given I have an _includes directory
|
||||
And I have an "_includes/header.html" file that contains "<header>My awesome blog header: {{include.param}}</header>"
|
||||
And I have an "_includes/params.html" file that contains "Parameters:<ul>{% for param in include %}<li>{{param[0]}} = {{param[1]}}</li>{% endfor %}</ul>"
|
||||
And I have an "_includes/ignore.html" file that contains "<footer>My blog footer</footer>"
|
||||
And I have a _posts directory
|
||||
And I have the following post:
|
||||
| title | date | layout | content |
|
||||
| Include Files | 2013-03-21 | default | {% include header.html param="myparam" %} |
|
||||
| Ignore params if unused | 2013-03-21 | default | {% include ignore.html date="today" %} |
|
||||
| List multiple parameters | 2013-03-21 | default | {% include params.html date="today" start="tomorrow" %} |
|
||||
| Dont keep parameters | 2013-03-21 | default | {% include ignore.html param="test" %}\n{% include header.html %} |
|
||||
| Allow params with spaces and quotes | 2013-04-07 | default | {% include params.html cool="param with spaces" super="\"quoted\"" single='has "quotes"' escaped='\'single\' quotes' %} |
|
||||
| Parameter syntax | 2013-04-12 | default | {% include params.html param1_or_2="value" %} |
|
||||
| Pass a variable | 2013-06-22 | default | {% assign var = 'some text' %}{% include params.html local=var layout=page.layout %} |
|
||||
When I run jekyll
|
||||
Then the _site directory should exist
|
||||
And I should see "<header>My awesome blog header: myparam</header>" in "_site/2013/03/21/include-files.html"
|
||||
And I should not see "myparam" in "_site/2013/03/21/ignore-params-if-unused.html"
|
||||
And I should see "<li>date = today</li>" in "_site/2013/03/21/list-multiple-parameters.html"
|
||||
And I should see "<li>start = tomorrow</li>" in "_site/2013/03/21/list-multiple-parameters.html"
|
||||
And I should not see "<header>My awesome blog header: myparam</header>" in "_site/2013/03/21/dont-keep-parameters.html"
|
||||
But I should see "<header>My awesome blog header: </header>" in "_site/2013/03/21/dont-keep-parameters.html"
|
||||
And I should see "<li>cool = param with spaces</li>" in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html"
|
||||
And I should see "<li>super = “quoted”</li>" in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html"
|
||||
And I should see "<li>single = has “quotes”</li>" in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html"
|
||||
And I should see "<li>escaped = ‘single’ quotes</li>" in "_site/2013/04/07/allow-params-with-spaces-and-quotes.html"
|
||||
And I should see "<li>param1_or_2 = value</li>" in "_site/2013/04/12/parameter-syntax.html"
|
||||
And I should see "<li>local = some text</li>" in "_site/2013/06/22/pass-a-variable.html"
|
||||
And I should see "<li>layout = default</li>" in "_site/2013/06/22/pass-a-variable.html"
|
|
@ -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"
|
||||
|
|
|
@ -2,18 +2,18 @@ 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
|
||||
|
@ -32,15 +32,15 @@ Feature: Site pagination
|
|||
| paginate | 1 |
|
||||
| paginate_path | /blog/page-:num |
|
||||
| permalink | /blog/:year/:month/:day/:title |
|
||||
And I have a _layouts directory
|
||||
And I have an "index.html" page that contains "{{ paginator.posts.size }}"
|
||||
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 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/blog/page-<exist> directory should exist
|
||||
And the "_site/blog/page-<exist>/index.html" file should exist
|
||||
|
@ -52,3 +52,31 @@ Feature: Site pagination
|
|||
| 2 | 1 | 5 |
|
||||
| 3 | 1 | 6 |
|
||||
| 4 | 1 | 7 |
|
||||
|
||||
Scenario Outline: Setting a custom pagination path without an index.html in it
|
||||
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 an "index.html" page that contains "Don't pick me!"
|
||||
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 |
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,7 +30,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 date: {{ page.date | date_to_string }}"
|
||||
When I run jekyll
|
||||
Then the _site directory should exist
|
||||
|
@ -41,7 +41,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 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,7 @@ 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
|
||||
|
@ -101,7 +101,7 @@ 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
|
||||
|
@ -112,29 +112,29 @@ 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 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 | 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 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 | 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
|
||||
|
@ -145,20 +145,44 @@ Feature: Post data
|
|||
And I have a _layouts directory
|
||||
And I have the following posts:
|
||||
| title | date | layout | categories | content |
|
||||
| Star Wars | 3/27/2009 | simple | ['scifi', 'Movies'] | Luke, I am your father. |
|
||||
| Star Trek | 3/17/2013 | simple | ['SciFi', 'movies'] | Jean Luc, I am your father. |
|
||||
| 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
|
||||
|
@ -169,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
|
||||
|
@ -180,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
|
||||
|
|
|
@ -88,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"
|
||||
|
@ -108,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:
|
||||
|
@ -123,9 +163,9 @@ 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
|
||||
|
@ -157,8 +197,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: 2 on 2010-01-01" in "_site/index.html"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
Before do
|
||||
FileUtils.rm_rf(TEST_DIR)
|
||||
FileUtils.mkdir(TEST_DIR)
|
||||
Dir.chdir(TEST_DIR)
|
||||
end
|
||||
|
||||
After do
|
||||
Dir.chdir(TEST_DIR)
|
||||
FileUtils.rm_rf(TEST_DIR)
|
||||
end
|
||||
|
||||
Given /^I have a blank site in "(.*)"$/ do |path|
|
||||
FileUtils.mkdir(path)
|
||||
end
|
||||
|
||||
Given /^I do not have a "(.*)" directory$/ do |path|
|
||||
File.directory?("#{TEST_DIR}/#{path}")
|
||||
end
|
||||
|
||||
# Like "I have a foo file" but gives a yaml front matter so jekyll actually processes it
|
||||
Given /^I have an? "(.*)" page(?: with (.*) "(.*)")? that contains "(.*)"$/ do |file, key, value, text|
|
||||
File.open(file, 'w') do |f|
|
||||
|
@ -30,14 +30,13 @@ Given /^I have an? "(.*)" file that contains "(.*)"$/ do |file, text|
|
|||
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)
|
||||
Given /^I have an? (.*) (layout|theme) that contains "(.*)"$/ do |name, type, text|
|
||||
folder = if type == 'layout'
|
||||
'_layouts'
|
||||
else
|
||||
'_theme'
|
||||
end
|
||||
end
|
||||
|
||||
Given /^I have a (.*) theme that contains "(.*)"$/ do |layout, text|
|
||||
File.open(File.join('_theme', layout + '.html'), 'w') do |f|
|
||||
File.open(File.join(folder, name + '.html'), 'w') do |f|
|
||||
f.write(text)
|
||||
end
|
||||
end
|
||||
|
@ -46,34 +45,33 @@ Given /^I have an? (.*) directory$/ do |dir|
|
|||
FileUtils.mkdir_p(dir)
|
||||
end
|
||||
|
||||
Given /^I have the following (draft|post)s?(?: (.*) "(.*)")?:$/ do |status, direction, folder, table|
|
||||
Given /^I have the following (draft|post)s?(?: (in|under) "([^"]+)")?:$/ do |status, direction, folder, table|
|
||||
table.hashes.each do |post|
|
||||
title = post['title'].downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
|
||||
|
||||
if direction && direction == "in"
|
||||
before = folder || '.'
|
||||
elsif direction && direction == "under"
|
||||
after = folder || '.'
|
||||
end
|
||||
|
||||
title = slug(post['title'])
|
||||
ext = post['type'] || 'textile'
|
||||
before, after = location(folder, direction)
|
||||
|
||||
if "draft" == status
|
||||
path = File.join(before || '.', '_drafts', after || '.', "#{title}.#{ext}")
|
||||
else
|
||||
date = Date.strptime(post['date'], '%m/%d/%Y').strftime('%Y-%m-%d')
|
||||
path = File.join(before || '.', '_posts', after || '.', "#{date}-#{title}.#{ext}")
|
||||
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, 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|
|
||||
|
@ -119,6 +117,10 @@ When /^I run jekyll with drafts$/ do
|
|||
run_jekyll(:drafts => true)
|
||||
end
|
||||
|
||||
When /^I call jekyll new with test_blank --blank$/ do
|
||||
call_jekyll_new(:path => "test_blank", :blank => true)
|
||||
end
|
||||
|
||||
When /^I debug jekyll$/ do
|
||||
run_jekyll(:debug => true)
|
||||
end
|
||||
|
@ -129,12 +131,24 @@ When /^I change "(.*)" to contain "(.*)"$/ do |file, text|
|
|||
end
|
||||
end
|
||||
|
||||
When /^I delete the file "(.*)"$/ do |file|
|
||||
File.delete(file)
|
||||
end
|
||||
|
||||
Then /^the (.*) directory should exist$/ do |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 not see "(.*)" in "(.*)"$/ do |text, file|
|
||||
assert_no_match Regexp.new(text), File.read(file)
|
||||
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|
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
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.clone
|
||||
|
@ -17,5 +14,26 @@ def run_jekyll(opts = {})
|
|||
system command
|
||||
end
|
||||
|
||||
def call_jekyll_new(opts = {})
|
||||
command = JEKYLL_PATH.clone
|
||||
command << " new"
|
||||
command << " #{opts[:path]}" if opts[:path]
|
||||
command << " --blank" if opts[:blank]
|
||||
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 if RUBY_VERSION < '1.9'
|
||||
|
|
|
@ -4,9 +4,9 @@ Gem::Specification.new do |s|
|
|||
s.rubygems_version = '1.3.5'
|
||||
|
||||
s.name = 'jekyll'
|
||||
s.version = '1.0.0.beta4'
|
||||
s.version = '1.0.3'
|
||||
s.license = 'MIT'
|
||||
s.date = '2013-04-09'
|
||||
s.date = '2013-06-07'
|
||||
s.rubyforge_project = 'jekyll'
|
||||
|
||||
s.summary = "A simple, blog aware, static site generator."
|
||||
|
@ -21,37 +21,39 @@ Gem::Specification.new do |s|
|
|||
s.executables = ["jekyll"]
|
||||
|
||||
s.rdoc_options = ["--charset=UTF-8"]
|
||||
s.extra_rdoc_files = %w[README.textile LICENSE]
|
||||
s.extra_rdoc_files = %w[README.markdown LICENSE]
|
||||
|
||||
s.add_runtime_dependency('liquid', "~> 2.3")
|
||||
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', "~> 0.14")
|
||||
s.add_runtime_dependency('pygments.rb', "~> 0.4.2")
|
||||
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_runtime_dependency('redcarpet', "~> 2.2.2")
|
||||
|
||||
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")
|
||||
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")
|
||||
s.add_development_dependency('activesupport', '~> 3.2.13')
|
||||
|
||||
# = MANIFEST =
|
||||
s.files = %w[
|
||||
CONTRIBUTING.md
|
||||
CONTRIBUTING.markdown
|
||||
Gemfile
|
||||
History.txt
|
||||
History.markdown
|
||||
LICENSE
|
||||
README.textile
|
||||
README.markdown
|
||||
Rakefile
|
||||
bin/jekyll
|
||||
cucumber.yml
|
||||
|
@ -70,14 +72,21 @@ Gem::Specification.new do |s|
|
|||
lib/jekyll.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
|
||||
|
@ -88,20 +97,21 @@ Gem::Specification.new do |s|
|
|||
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/screen.css
|
||||
lib/site_template/css/main.css
|
||||
lib/site_template/css/syntax.css
|
||||
lib/site_template/images/.gitkeep
|
||||
lib/site_template/images/rss.png
|
||||
lib/site_template/index.html
|
||||
script/bootstrap
|
||||
site/.gitignore
|
||||
|
@ -110,39 +120,42 @@ Gem::Specification.new do |s|
|
|||
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/_posts/2012-07-01-configuration.md
|
||||
site/_posts/2012-07-01-contributing.md
|
||||
site/_posts/2012-07-01-deployment-methods.md
|
||||
site/_posts/2012-07-01-extras.md
|
||||
site/_posts/2012-07-01-frontmatter.md
|
||||
site/_posts/2012-07-01-github-pages.md
|
||||
site/_posts/2012-07-01-heroku.md
|
||||
site/_posts/2012-07-01-home.md
|
||||
site/_posts/2012-07-01-installation.md
|
||||
site/_posts/2012-07-01-migrations.md
|
||||
site/_posts/2012-07-01-pages.md
|
||||
site/_posts/2012-07-01-pagination.md
|
||||
site/_posts/2012-07-01-permalinks.md
|
||||
site/_posts/2012-07-01-plugins.md
|
||||
site/_posts/2012-07-01-posts.md
|
||||
site/_posts/2012-07-01-resources.md
|
||||
site/_posts/2012-07-01-sites.md
|
||||
site/_posts/2012-07-01-structure.md
|
||||
site/_posts/2012-07-01-templates.md
|
||||
site/_posts/2012-07-01-troubleshooting.md
|
||||
site/_posts/2012-07-01-usage.md
|
||||
site/_posts/2012-07-01-variables.md
|
||||
site/css/grid.css
|
||||
site/css/gridism.css
|
||||
site/css/normalize.css
|
||||
site/css/pygments.css
|
||||
site/css/style.css
|
||||
site/docs/index.html
|
||||
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
|
||||
|
@ -193,6 +206,9 @@ Gem::Specification.new do |s|
|
|||
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
|
||||
|
@ -222,6 +238,7 @@ Gem::Specification.new do |s|
|
|||
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
|
||||
]
|
||||
|
|
130
lib/jekyll.rb
130
lib/jekyll.rb
|
@ -24,10 +24,13 @@ require 'English'
|
|||
# 3rd party
|
||||
require 'liquid'
|
||||
require 'maruku'
|
||||
require 'pygments'
|
||||
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/url'
|
||||
|
@ -38,6 +41,7 @@ require 'jekyll/draft'
|
|||
require 'jekyll/filters'
|
||||
require 'jekyll/static_file'
|
||||
require 'jekyll/errors'
|
||||
require 'jekyll/related_posts'
|
||||
|
||||
# extensions
|
||||
require 'jekyll/plugin'
|
||||
|
@ -47,123 +51,45 @@ 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 = '1.0.0.beta4'
|
||||
|
||||
# Default options. Overriden by values in _config.yml.
|
||||
# Strings rather than symbols are used for compatability with YAML.
|
||||
DEFAULTS = {
|
||||
'source' => Dir.pwd,
|
||||
'destination' => File.join(Dir.pwd, '_site'),
|
||||
'plugins' => '_plugins',
|
||||
'layouts' => '_layouts',
|
||||
'keep_files' => ['.git','.svn'],
|
||||
|
||||
'future' => true, # remove and make true just default
|
||||
'pygments' => true, # remove and make true just default
|
||||
|
||||
'markdown' => 'maruku',
|
||||
'permalink' => 'date',
|
||||
'baseurl' => '/',
|
||||
'include' => ['.htaccess'],
|
||||
'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
|
||||
}
|
||||
}
|
||||
VERSION = '1.0.3'
|
||||
|
||||
# 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)
|
||||
# Convert any symbol keys to strings and remove the old key/values
|
||||
override = override.reduce({}) { |hsh,(k,v)| hsh.merge(k.to_s => v) }
|
||||
|
||||
# _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 or <source>/<config_file>
|
||||
config_file = override.delete('config')
|
||||
config_file = File.join(source, "_config.yml") if config_file.to_s.empty?
|
||||
|
||||
begin
|
||||
config = YAML.safe_load_file(config_file)
|
||||
raise "Configuration file: (INVALID) #{config_file}" if !config.is_a?(Hash)
|
||||
$stdout.puts "Configuration file: #{config_file}"
|
||||
rescue SystemCallError
|
||||
# Errno:ENOENT = file not found
|
||||
$stderr.puts "Configuration file: none"
|
||||
config = {}
|
||||
rescue => err
|
||||
$stderr.puts " " +
|
||||
"WARNING: Error reading configuration. " +
|
||||
"Using defaults (and options)."
|
||||
$stderr.puts "#{err}"
|
||||
config = {}
|
||||
end
|
||||
|
||||
# Provide backwards-compatibility
|
||||
if config['auto']
|
||||
$stderr.puts "Deprecation: ".rjust(20) + "'auto' has been changed to " +
|
||||
"'watch'. Please update your configuration to use 'watch'."
|
||||
config['watch'] = config['auto']
|
||||
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
|
||||
|
|
|
@ -8,5 +8,20 @@ module Jekyll
|
|||
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
|
||||
|
|
|
@ -17,18 +17,10 @@ module Jekyll
|
|||
def self.build(site, options)
|
||||
source = options['source']
|
||||
destination = options['destination']
|
||||
puts " Source: #{source}"
|
||||
puts " Destination: #{destination}"
|
||||
print " Generating... "
|
||||
begin
|
||||
site.process
|
||||
rescue Jekyll::FatalException => e
|
||||
puts
|
||||
puts "ERROR: YOUR SITE COULD NOT BE BUILT:"
|
||||
puts "------------------------------------"
|
||||
puts e.message
|
||||
exit(1)
|
||||
end
|
||||
Jekyll.logger.info "Source:", source
|
||||
Jekyll.logger.info "Destination:", destination
|
||||
print Jekyll.logger.formatted_topic "Generating..."
|
||||
self.process_site(site)
|
||||
puts "done."
|
||||
end
|
||||
|
||||
|
@ -44,23 +36,15 @@ module Jekyll
|
|||
source = options['source']
|
||||
destination = options['destination']
|
||||
|
||||
puts " Auto-regeneration: enabled"
|
||||
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 " Regenerating: #{args.size} files at #{t} "
|
||||
begin
|
||||
site.process
|
||||
rescue Jekyll::FatalException => e
|
||||
puts
|
||||
puts "ERROR: YOUR SITE COULD NOT BE BUILT:"
|
||||
puts "------------------------------------"
|
||||
puts e.message
|
||||
exit(1)
|
||||
end
|
||||
print Jekyll.logger.formatted_topic("Regenerating:") + "#{args.size} files at #{t} "
|
||||
self.process_site(site)
|
||||
puts "...done."
|
||||
end
|
||||
|
||||
|
|
|
@ -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
|
|
@ -3,20 +3,36 @@ require 'erb'
|
|||
module Jekyll
|
||||
module Commands
|
||||
class New < Command
|
||||
def self.process(args)
|
||||
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
|
||||
|
||||
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))
|
||||
if preserve_source_location?(new_blog_path, options)
|
||||
Jekyll.logger.error "Conflict:", "#{new_blog_path} exists and is not empty."
|
||||
exit(1)
|
||||
end
|
||||
|
||||
if options[:blank]
|
||||
create_blank_site new_blog_path
|
||||
else
|
||||
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
|
||||
end
|
||||
|
||||
puts "New jekyll site installed in #{new_blog_path}."
|
||||
end
|
||||
|
||||
def self.create_blank_site(path)
|
||||
Dir.chdir(path) do
|
||||
FileUtils.mkdir(%w(_layouts _posts _drafts))
|
||||
FileUtils.touch("index.html")
|
||||
end
|
||||
end
|
||||
|
||||
def self.scaffold_post_content(template_site)
|
||||
ERB.new(File.read(File.expand_path(scaffold_path, site_template))).result
|
||||
end
|
||||
|
@ -29,6 +45,11 @@ module Jekyll
|
|||
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)
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
# 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
|
||||
|
||||
%w[include exclude].each do |option|
|
||||
if config.fetch(option, []).is_a?(String)
|
||||
Jekyll.logger.warn "Deprecation:", "The '#{option}' 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[option] = csv_to_array(config[option])
|
||||
end
|
||||
end
|
||||
config
|
||||
end
|
||||
|
||||
end
|
||||
end
|
|
@ -8,87 +8,23 @@ module Jekyll
|
|||
|
||||
def setup
|
||||
return if @setup
|
||||
case @config['markdown']
|
||||
@parser = case @config['markdown']
|
||||
when 'redcarpet'
|
||||
begin
|
||||
require 'redcarpet'
|
||||
|
||||
@renderer ||= Class.new(Redcarpet::Render::HTML) do
|
||||
def block_code(code, lang)
|
||||
lang = lang && lang.split.first || "text"
|
||||
output = add_code_tags(
|
||||
Pygments.highlight(code, :lexer => lang, :options => { :encoding => 'utf-8' }),
|
||||
lang
|
||||
)
|
||||
end
|
||||
|
||||
def add_code_tags(code, lang)
|
||||
code = code.sub(/<pre>/,'<pre><code class="' + lang + '">')
|
||||
code = code.sub(/<\/pre>/,"</code></pre>")
|
||||
end
|
||||
end
|
||||
|
||||
@redcarpet_extensions = {}
|
||||
@config['redcarpet']['extensions'].each { |e| @redcarpet_extensions[e.to_sym] = true }
|
||||
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
|
||||
RedcarpetParser.new @config
|
||||
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
|
||||
KramdownParser.new @config
|
||||
when 'rdiscount'
|
||||
begin
|
||||
require 'rdiscount'
|
||||
@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
|
||||
RDiscountParser.new @config
|
||||
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
|
||||
MarukuParser.new @config
|
||||
else
|
||||
STDERR.puts "Invalid Markdown processor: #{@config['markdown']}"
|
||||
STDERR.puts " Valid options are [ maruku | rdiscount | kramdown ]"
|
||||
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)
|
||||
|
@ -100,49 +36,7 @@ module Jekyll
|
|||
|
||||
def convert(content)
|
||||
setup
|
||||
case @config['markdown']
|
||||
when 'redcarpet'
|
||||
@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)
|
||||
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'],
|
||||
:smart_quotes => @config['kramdown']['smart_quotes'],
|
||||
|
||||
: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
|
||||
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'],
|
||||
:smart_quotes => @config['kramdown']['smart_quotes']
|
||||
}).to_html
|
||||
end
|
||||
when 'rdiscount'
|
||||
rd = RDiscount.new(content, *@rdiscount_extensions)
|
||||
html = rd.to_html
|
||||
if rd.generate_toc and html.include?(@config['rdiscount']['toc_token'])
|
||||
html.gsub!(@config['rdiscount']['toc_token'], rd.toc_content.force_encoding('utf-8'))
|
||||
end
|
||||
html
|
||||
when 'maruku'
|
||||
Maruku.new(content).to_html
|
||||
end
|
||||
@parser.convert(content)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -1,3 +1,5 @@
|
|||
# encoding: UTF-8
|
||||
|
||||
require 'set'
|
||||
|
||||
# Convertible provides methods for converting a pagelike item
|
||||
|
@ -32,10 +34,10 @@ module Jekyll
|
|||
self.content = $POSTMATCH
|
||||
self.data = YAML.safe_load($1)
|
||||
end
|
||||
rescue => e
|
||||
puts "Error reading file #{File.join(base, name)}: #{e.message}"
|
||||
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 ||= {}
|
||||
|
@ -46,6 +48,10 @@ module Jekyll
|
|||
# Returns nothing.
|
||||
def transform
|
||||
self.content = converter.convert(self.content)
|
||||
rescue => e
|
||||
Jekyll.logger.error "Conversion error:", "There was an error converting" +
|
||||
" '#{self.path}'."
|
||||
raise e
|
||||
end
|
||||
|
||||
# Determine the extension depending on content_type.
|
||||
|
@ -64,34 +70,28 @@ module Jekyll
|
|||
@converter ||= self.site.converters.find { |c| c.matches(self.ext) }
|
||||
end
|
||||
|
||||
# Add any necessary layouts to this convertible document.
|
||||
# Render Liquid in the content
|
||||
#
|
||||
# payload - The site payload Hash.
|
||||
# layouts - A Hash of {"name" => "layout"}.
|
||||
# content - the raw Liquid content to render
|
||||
# payload - the payload for Liquid
|
||||
# info - the info for Liquid
|
||||
#
|
||||
# Returns nothing.
|
||||
def do_layout(payload, layouts)
|
||||
info = { :filters => [Jekyll::Filters], :registers => { :site => self.site } }
|
||||
|
||||
# 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.name}"
|
||||
e.backtrace.each do |backtrace|
|
||||
puts backtrace
|
||||
end
|
||||
abort("Build Failed")
|
||||
end
|
||||
|
||||
self.transform
|
||||
|
||||
# output keeps track of what will finally be written
|
||||
self.output = self.content
|
||||
# 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])
|
||||
|
@ -99,15 +99,9 @@ module Jekyll
|
|||
while layout
|
||||
payload = payload.deep_merge({"content" => self.output, "page" => layout.data})
|
||||
|
||||
begin
|
||||
self.output = Liquid::Template.parse(layout.content).render!(payload, info)
|
||||
rescue => e
|
||||
puts "Liquid Exception: #{e.message} in #{self.data["layout"]}"
|
||||
e.backtrace.each do |backtrace|
|
||||
puts backtrace
|
||||
end
|
||||
abort("Build Failed")
|
||||
end
|
||||
self.output = self.render_liquid(layout.content,
|
||||
payload.merge({:file => layout.name}),
|
||||
info)
|
||||
|
||||
if layout = layouts[layout.data["layout"]]
|
||||
if used.include?(layout)
|
||||
|
@ -118,5 +112,42 @@ module Jekyll
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Add any necessary layouts to this convertible document.
|
||||
#
|
||||
# payload - The site payload Hash.
|
||||
# layouts - A Hash of {"name" => "layout"}.
|
||||
#
|
||||
# Returns nothing.
|
||||
def do_layout(payload, layouts)
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
self.render_all_layouts(layouts, payload, info)
|
||||
end
|
||||
|
||||
# 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
|
||||
end
|
||||
|
|
|
@ -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
|
|
@ -30,7 +30,7 @@ module Jekyll
|
|||
#
|
||||
# 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".
|
||||
|
@ -39,7 +39,7 @@ module Jekyll
|
|||
#
|
||||
# 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.
|
||||
|
@ -53,7 +53,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the formatted String.
|
||||
def date_to_xmlschema(date)
|
||||
date.xmlschema
|
||||
time(date).xmlschema
|
||||
end
|
||||
|
||||
# Format a date according to RFC-822
|
||||
|
@ -67,7 +67,7 @@ module Jekyll
|
|||
#
|
||||
# Returns the formatted String.
|
||||
def date_to_rfc822(date)
|
||||
date.rfc822
|
||||
time(date).rfc822
|
||||
end
|
||||
|
||||
# XML escape a string for use. Replaces any special characters with
|
||||
|
@ -99,7 +99,17 @@ module Jekyll
|
|||
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
|
||||
|
@ -137,5 +147,18 @@ module Jekyll
|
|||
"#{array[0...-1].join(', ')}, #{connector} #{array[-1]}"
|
||||
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
|
||||
|
|
|
@ -10,8 +10,13 @@ module Jekyll
|
|||
#
|
||||
# Returns nothing.
|
||||
def generate(site)
|
||||
site.pages.dup.each do |page|
|
||||
paginate(site, page) if Pager.pagination_enabled?(site.config, page.name)
|
||||
if Pager.pagination_enabled?(site)
|
||||
if template = template_page(site)
|
||||
paginate(site, template)
|
||||
else
|
||||
Jekyll.logger.warn "Pagination:", "Pagination is enabled, but I couldn't find" +
|
||||
"an index.html page to use as the pagination template. Skipping pagination."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -33,11 +38,11 @@ module Jekyll
|
|||
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)
|
||||
pager = Pager.new(site, num_page, all_posts, pages)
|
||||
if num_page > 1
|
||||
newpage = Page.new(site, site.source, page.dir, page.name)
|
||||
newpage.pager = pager
|
||||
newpage.dir = File.join(page.dir, Pager.paginate_path(site.config, num_page))
|
||||
newpage.dir = Pager.paginate_path(site, num_page)
|
||||
site.pages << newpage
|
||||
else
|
||||
page.pager = pager
|
||||
|
@ -45,6 +50,32 @@ module Jekyll
|
|||
end
|
||||
end
|
||||
|
||||
# Static: Fetch the URL of the template page. Used to determine the
|
||||
# path to the first pager in the series.
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns the url of the template page
|
||||
def self.first_page_url(site)
|
||||
if page = Pagination.new.template_page(site)
|
||||
page.url
|
||||
else
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
# Public: Find the Jekyll::Page which will act as the pager template
|
||||
#
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns the Jekyll::Page which will act as the pager template
|
||||
def template_page(site)
|
||||
site.pages.dup.select do |page|
|
||||
Pager.pagination_candidate?(site.config, page)
|
||||
end.sort do |one, two|
|
||||
two.path.size <=> one.path.size
|
||||
end.first
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -62,26 +93,78 @@ module Jekyll
|
|||
(all_posts.size.to_f / per_page.to_i).ceil
|
||||
end
|
||||
|
||||
# Determine if pagination is enabled for a given file.
|
||||
# Determine if pagination is enabled the site.
|
||||
#
|
||||
# config - The configuration Hash.
|
||||
# file - The String filename of the file.
|
||||
# site - the Jekyll::Site object
|
||||
#
|
||||
# Returns true if pagination is enabled, false otherwise.
|
||||
def self.pagination_enabled?(config, file)
|
||||
file == 'index.html' && !config['paginate'].nil?
|
||||
def self.pagination_enabled?(site)
|
||||
!site.config['paginate'].nil? &&
|
||||
site.pages.size > 0
|
||||
end
|
||||
|
||||
# Static: Determine if a page is a possible candidate to be a template page.
|
||||
# Page's name must be `index.html` and exist in any of the directories
|
||||
# between the site source and `paginate_path`.
|
||||
#
|
||||
# config - the site configuration hash
|
||||
# page - the Jekyll::Page about which we're inquiring
|
||||
#
|
||||
# Returns true if the
|
||||
def self.pagination_candidate?(config, page)
|
||||
page_dir = File.dirname(File.expand_path(remove_leading_slash(page.path), config['source']))
|
||||
paginate_path = remove_leading_slash(config['paginate_path'])
|
||||
paginate_path = File.expand_path(paginate_path, config['source'])
|
||||
page.name == 'index.html' &&
|
||||
in_hierarchy(config['source'], page_dir, File.dirname(paginate_path))
|
||||
end
|
||||
|
||||
# Determine if the subdirectories of the two paths are the same relative to source
|
||||
#
|
||||
# source - the site source
|
||||
# page_dir - the directory of the Jekyll::Page
|
||||
# paginate_path - the absolute paginate path (from root of FS)
|
||||
#
|
||||
# Returns whether the subdirectories are the same relative to source
|
||||
def self.in_hierarchy(source, page_dir, paginate_path)
|
||||
return false if paginate_path == File.dirname(paginate_path)
|
||||
return false if paginate_path == Pathname.new(source).parent
|
||||
page_dir == paginate_path ||
|
||||
in_hierarchy(source, page_dir, File.dirname(paginate_path))
|
||||
end
|
||||
|
||||
# Static: Return the pagination path of the page
|
||||
#
|
||||
# site_config - the site config
|
||||
# site - the Jekyll::Site object
|
||||
# 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.sub(':num', num_page.to_s)
|
||||
def self.paginate_path(site, num_page)
|
||||
return nil if num_page.nil?
|
||||
return Generators::Pagination.first_page_url(site) if num_page <= 1
|
||||
format = site.config['paginate_path']
|
||||
format = format.sub(':num', num_page.to_s)
|
||||
ensure_leading_slash(format)
|
||||
end
|
||||
|
||||
# Static: Return a String version of the input which has a leading slash.
|
||||
# If the input already has a forward slash in position zero, it will be
|
||||
# returned unchanged.
|
||||
#
|
||||
# path - a String path
|
||||
#
|
||||
# Returns the path with a leading slash
|
||||
def self.ensure_leading_slash(path)
|
||||
path[0..0] == "/" ? path : "/#{path}"
|
||||
end
|
||||
|
||||
# Static: Return a String version of the input without a leading slash.
|
||||
#
|
||||
# path - a String path
|
||||
#
|
||||
# Returns the input without the leading slash
|
||||
def self.remove_leading_slash(path)
|
||||
ensure_leading_slash(path)[1..-1]
|
||||
end
|
||||
|
||||
# Initialize a new Pager.
|
||||
|
@ -91,9 +174,9 @@ module Jekyll
|
|||
# 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)
|
||||
def initialize(site, page, all_posts, num_pages = nil)
|
||||
@page = page
|
||||
@per_page = config['paginate'].to_i
|
||||
@per_page = site.config['paginate'].to_i
|
||||
@total_pages = num_pages || Pager.calculate_pages(all_posts, @per_page)
|
||||
|
||||
if @page > @total_pages
|
||||
|
@ -106,9 +189,9 @@ 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)
|
||||
@previous_page_path = Pager.paginate_path(site, @previous_page)
|
||||
@next_page = @page != @total_pages ? @page + 1 : nil
|
||||
@next_page_path = Pager.paginate_path(config, @next_page)
|
||||
@next_page_path = Pager.paginate_path(site, @next_page)
|
||||
end
|
||||
|
||||
# Convert this Pager's data to a Hash suitable for use by Liquid.
|
||||
|
|
|
@ -5,6 +5,9 @@ module Jekyll
|
|||
# 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
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ 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
|
||||
|
|
|
@ -24,18 +24,6 @@ module Jekyll
|
|||
self.read_yaml(File.join(base, dir), name)
|
||||
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.data['layout'] = 'page' unless self.data.has_key?('layout')
|
||||
self.data
|
||||
end
|
||||
|
||||
# The generated directory into which the page will be placed
|
||||
# upon generation. This is derived from the permalink or, if
|
||||
# permalink is absent, we be '/'
|
||||
|
@ -50,7 +38,12 @@ module Jekyll
|
|||
#
|
||||
# Returns the String permalink or nil if none has been set.
|
||||
def permalink
|
||||
self.data && self.data['permalink']
|
||||
return nil if self.data.nil? || self.data['permalink'].nil?
|
||||
if site.config['relative_permalinks']
|
||||
File.join(@dir, self.data['permalink'])
|
||||
else
|
||||
self.data['permalink']
|
||||
end
|
||||
end
|
||||
|
||||
# The template of the permalink.
|
||||
|
@ -110,7 +103,15 @@ module Jekyll
|
|||
def to_liquid
|
||||
self.data.deep_merge({
|
||||
"url" => self.url,
|
||||
"content" => self.content })
|
||||
"content" => self.content,
|
||||
"path" => self.data['path'] || path })
|
||||
end
|
||||
|
||||
# The path to the source file
|
||||
#
|
||||
# Returns the path to the source file
|
||||
def path
|
||||
File.join(@dir, @name).sub(/\A\//, '')
|
||||
end
|
||||
|
||||
# Obtain destination path.
|
||||
|
@ -119,26 +120,11 @@ module Jekyll
|
|||
#
|
||||
# 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, CGI.unescape(self.url))
|
||||
path = File.join(dest, self.url)
|
||||
path = File.join(path, "index.html") if self.url =~ /\/$/
|
||||
path
|
||||
end
|
||||
|
||||
# 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
|
||||
|
||||
# Returns the object as a debug String.
|
||||
def inspect
|
||||
"#<Jekyll:Page @name=#{self.name.inspect}>"
|
||||
|
@ -153,5 +139,9 @@ module Jekyll
|
|||
def index?
|
||||
basename == 'index'
|
||||
end
|
||||
|
||||
def uses_relative_permalinks
|
||||
permalink && @dir != "" && site.config['relative_permalinks']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,6 +11,21 @@ module Jekyll
|
|||
# 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
|
||||
#
|
||||
|
@ -20,7 +35,7 @@ module Jekyll
|
|||
end
|
||||
|
||||
attr_accessor :site
|
||||
attr_accessor :data, :excerpt, :content, :output, :ext
|
||||
attr_accessor :data, :extracted_excerpt, :content, :output, :ext
|
||||
attr_accessor :date, :slug, :published, :tags, :categories
|
||||
|
||||
attr_reader :name
|
||||
|
@ -34,40 +49,43 @@ module Jekyll
|
|||
# Returns the new Post.
|
||||
def initialize(site, source, dir, name)
|
||||
@site = site
|
||||
@dir = dir
|
||||
@base = self.containing_dir(source, dir)
|
||||
@name = name
|
||||
|
||||
self.categories = dir.downcase.split('/').reject { |x| x.empty? }
|
||||
self.process(name)
|
||||
begin
|
||||
self.read_yaml(@base, name)
|
||||
rescue Exception => msg
|
||||
raise FatalException.new("#{msg} in #{@base}/#{name}")
|
||||
end
|
||||
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
|
||||
true
|
||||
end
|
||||
end
|
||||
|
||||
self.tags = self.data.pluralized_array("tag", "tags")
|
||||
|
||||
def populate_categories
|
||||
if self.categories.empty?
|
||||
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.downcase}
|
||||
self.categories = self.data.pluralized_array('category', 'categories').map {|c| c.to_s.downcase}
|
||||
end
|
||||
|
||||
self.tags.flatten!
|
||||
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')
|
||||
|
@ -81,8 +99,36 @@ module Jekyll
|
|||
# Returns nothing.
|
||||
def read_yaml(base, name)
|
||||
super(base, name)
|
||||
self.excerpt = self.extract_excerpt
|
||||
self.data['layout'] = 'post' unless self.data.has_key?('layout')
|
||||
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
|
||||
|
@ -118,7 +164,7 @@ module Jekyll
|
|||
# Returns nothing.
|
||||
def transform
|
||||
super
|
||||
self.excerpt = converter.convert(self.excerpt)
|
||||
self.extracted_excerpt = converter.convert(self.extracted_excerpt)
|
||||
end
|
||||
|
||||
# The generated directory into which the post will be placed
|
||||
|
@ -182,25 +228,7 @@ module Jekyll
|
|||
#
|
||||
# Returns an Array of related Posts.
|
||||
def related_posts(posts)
|
||||
return [] unless posts.size > 1
|
||||
|
||||
if self.site.lsi
|
||||
self.class.lsi ||= begin
|
||||
puts "Starting the classifier..."
|
||||
lsi = Classifier::LSI.new(:auto_rebuild => false)
|
||||
$stdout.print(" Populating LSI... ");$stdout.flush
|
||||
posts.each { |x| $stdout.print(".");$stdout.flush;lsi.add_item(x) }
|
||||
$stdout.print("\n Rebuilding LSI index... ")
|
||||
lsi.build_index
|
||||
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.
|
||||
|
@ -218,7 +246,7 @@ module Jekyll
|
|||
|
||||
do_layout(payload, layouts)
|
||||
end
|
||||
|
||||
|
||||
# Obtain destination path.
|
||||
#
|
||||
# dest - The String path to the destination dir.
|
||||
|
@ -231,34 +259,14 @@ module Jekyll
|
|||
path
|
||||
end
|
||||
|
||||
# Write the generated post 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
|
||||
|
||||
# Convert this post into a Hash for use in Liquid templates.
|
||||
#
|
||||
# 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,
|
||||
"excerpt" => self.excerpt })
|
||||
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.
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
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
|
||||
recent_posts = self.site.posts.reverse - [self.post]
|
||||
recent_posts.first(10)
|
||||
end
|
||||
|
||||
def display(output)
|
||||
$stdout.print("\n")
|
||||
$stdout.print(Jekyll.logger.formatted_topic(output))
|
||||
$stdout.flush
|
||||
end
|
||||
end
|
||||
end
|
|
@ -23,12 +23,12 @@ module Jekyll
|
|||
self.pygments = config['pygments']
|
||||
self.baseurl = config['baseurl']
|
||||
self.permalink_style = config['permalink'].to_sym
|
||||
self.exclude = config['exclude'] || []
|
||||
self.include = config['include'] || []
|
||||
self.exclude = config['exclude']
|
||||
self.include = config['include']
|
||||
self.future = config['future']
|
||||
self.show_drafts = config['show_drafts'] || nil
|
||||
self.limit_posts = config['limit_posts'] || nil
|
||||
self.keep_files = config['keep_files'] || []
|
||||
self.show_drafts = config['show_drafts']
|
||||
self.limit_posts = config['limit_posts']
|
||||
self.keep_files = config['keep_files']
|
||||
|
||||
self.reset
|
||||
self.setup
|
||||
|
@ -62,8 +62,8 @@ module Jekyll
|
|||
self.categories = Hash.new { |hash, key| hash[key] = [] }
|
||||
self.tags = Hash.new { |hash, key| hash[key] = [] }
|
||||
|
||||
if !self.limit_posts.nil? && self.limit_posts < 1
|
||||
raise ArgumentError, "Limit posts must be nil or >= 1"
|
||||
if self.limit_posts < 0
|
||||
raise ArgumentError, "limit_posts must be a non-negative number"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -71,8 +71,6 @@ module Jekyll
|
|||
#
|
||||
# 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}/
|
||||
|
@ -97,7 +95,7 @@ module Jekyll
|
|||
#
|
||||
# Returns an Array of plugin search paths
|
||||
def plugins_path
|
||||
if (config['plugins'] == Jekyll::DEFAULTS['plugins'])
|
||||
if (config['plugins'] == Jekyll::Configuration::DEFAULTS['plugins'])
|
||||
[File.join(self.source, config['plugins'])]
|
||||
else
|
||||
Array(config['plugins']).map { |d| File.expand_path(d) }
|
||||
|
@ -148,7 +146,7 @@ module Jekyll
|
|||
self.posts.sort!
|
||||
|
||||
# limit the posts if :limit_posts option is set
|
||||
if limit_posts
|
||||
if limit_posts > 0
|
||||
limit = self.posts.length < limit_posts ? self.posts.length : limit_posts
|
||||
self.posts = self.posts[-limit, limit]
|
||||
end
|
||||
|
@ -231,6 +229,7 @@ module Jekyll
|
|||
end
|
||||
|
||||
self.pages.each do |page|
|
||||
relative_permalinks_deprecation_method if page.uses_relative_permalinks
|
||||
page.render(self.layouts, payload)
|
||||
end
|
||||
|
||||
|
@ -271,7 +270,11 @@ module Jekyll
|
|||
files.each { |file| dirs << File.dirname(file) }
|
||||
files.merge(dirs)
|
||||
|
||||
obsolete_files = dest_files - files
|
||||
# files that are replaced by dirs should be deleted
|
||||
files_to_delete = Set.new
|
||||
dirs.each { |dir| files_to_delete << dir if File.file?(dir) }
|
||||
|
||||
obsolete_files = dest_files - files + files_to_delete
|
||||
FileUtils.rm_rf(obsolete_files.to_a)
|
||||
end
|
||||
|
||||
|
@ -418,5 +421,18 @@ module Jekyll
|
|||
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
|
||||
|
|
|
@ -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
|
|
@ -6,9 +6,10 @@
|
|||
|
||||
module Jekyll
|
||||
class GistTag < Liquid::Tag
|
||||
|
||||
def render(context)
|
||||
if tag_contents = @markup.strip.match(/\A(\d+) ?(\S*)\Z/)
|
||||
gist_id, filename = tag_contents[1].strip, tag_contents[2].strip
|
||||
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"
|
||||
|
@ -17,7 +18,16 @@ module Jekyll
|
|||
|
||||
private
|
||||
|
||||
def gist_script_tag(gist_id, filename=nil)
|
||||
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
|
||||
|
|
|
@ -49,6 +49,8 @@ eos
|
|||
end
|
||||
|
||||
def render_pygments(context, code)
|
||||
require 'pygments'
|
||||
|
||||
@options[:encoding] = 'utf-8'
|
||||
|
||||
output = add_code_tags(
|
||||
|
|
|
@ -1,9 +1,51 @@
|
|||
module Jekyll
|
||||
module Tags
|
||||
class IncludeTag < Liquid::Tag
|
||||
def initialize(tag_name, file, tokens)
|
||||
|
||||
MATCHER = /([\w-]+)\s*=\s*(?:"([^"\\]*(?:\\.[^"\\]*)*)"|'([^'\\]*(?:\\.[^'\\]*)*)'|([\w\.-]+))/
|
||||
|
||||
def initialize(tag_name, markup, tokens)
|
||||
super
|
||||
@file = file.strip
|
||||
@file, @params = markup.strip.split(' ', 2);
|
||||
end
|
||||
|
||||
def parse_params(context)
|
||||
validate_syntax
|
||||
|
||||
params = {}
|
||||
markup = @params
|
||||
|
||||
while match = MATCHER.match(markup) do
|
||||
markup = markup[match.end(0)..-1]
|
||||
|
||||
value = if match[2]
|
||||
match[2].gsub(/\\"/, '"')
|
||||
elsif match[3]
|
||||
match[3].gsub(/\\'/, "'")
|
||||
elsif match[4]
|
||||
context[match[4]]
|
||||
end
|
||||
|
||||
params[match[1]] = value
|
||||
end
|
||||
params
|
||||
end
|
||||
|
||||
# ensure the entire markup string from start to end is valid syntax, and params are separated by spaces
|
||||
def validate_syntax
|
||||
full_matcher = Regexp.compile('\A\s*(?:' + MATCHER.to_s + '(?=\s|\z)\s*)*\z')
|
||||
unless @params =~ full_matcher
|
||||
raise SyntaxError.new <<-eos
|
||||
Invalid syntax for include tag:
|
||||
|
||||
#{@params}
|
||||
|
||||
Valid syntax:
|
||||
|
||||
{% include file.ext param='value' param2="value" %}
|
||||
|
||||
eos
|
||||
end
|
||||
end
|
||||
|
||||
def render(context)
|
||||
|
@ -22,7 +64,9 @@ module Jekyll
|
|||
if choices.include?(@file)
|
||||
source = File.read(@file)
|
||||
partial = Liquid::Template.parse(source)
|
||||
|
||||
context.stack do
|
||||
context['include'] = parse_params(context) if @params
|
||||
partial.render(context)
|
||||
end
|
||||
else
|
||||
|
|
|
@ -6,10 +6,32 @@ module Jekyll
|
|||
attr_accessor :date, :slug
|
||||
|
||||
def initialize(name)
|
||||
who, cares, date, slug = *name.match(MATCHER)
|
||||
@slug = slug
|
||||
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
|
||||
|
@ -23,11 +45,7 @@ module Jekyll
|
|||
site = context.registers[:site]
|
||||
|
||||
site.posts.each do |p|
|
||||
if p.slug == @post.slug \
|
||||
and p.date.year == @post.date.year \
|
||||
and p.date.month == @post.date.month \
|
||||
and p.date.day == @post.date.day
|
||||
|
||||
if @post == p
|
||||
return p.url
|
||||
end
|
||||
end
|
||||
|
|
|
@ -47,6 +47,9 @@ module Jekyll
|
|||
|
||||
# Append a trailing slash to the URL if the unsanitized URL had one
|
||||
url += "/" if in_url =~ /\/$/
|
||||
|
||||
# Always add a leading slash
|
||||
url.gsub!(/\A([^\/])/, '/\1')
|
||||
url
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
_site
|
|
@ -1,2 +1,3 @@
|
|||
markdown: rdiscount
|
||||
name: Your New Jekyll Site
|
||||
markdown: redcarpet
|
||||
pygments: true
|
||||
|
|
|
@ -1,38 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>{{ page.title }}</title>
|
||||
<!-- syntax highlighting CSS -->
|
||||
<link rel="stylesheet" href="/css/syntax.css" type="text/css" />
|
||||
<!-- Homepage CSS -->
|
||||
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen, projection" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="site">
|
||||
<div class="title">
|
||||
<a href="/">Your Name</a>
|
||||
<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>
|
||||
<a href="http://github.com/yourusername"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
|
||||
</body>
|
||||
<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>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
<div id="post">
|
||||
<h2>{{ page.title }}</h2>
|
||||
<p class="meta">{{ page.date | date_to_string }}</p>
|
||||
|
||||
<div class="post">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -1,189 +0,0 @@
|
|||
/*****************************************************************************/
|
||||
/*
|
||||
/* Common
|
||||
/*
|
||||
/*****************************************************************************/
|
||||
|
||||
/* Global Reset */
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
font: 13.34px helvetica, arial, clean, 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: black;
|
||||
}
|
||||
|
||||
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: 110%;
|
||||
text-align: justify;
|
||||
width: 42em;
|
||||
margin: 3em auto 2em auto;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #a00;
|
||||
font-weight: bold;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.site .title a {
|
||||
color: #a00;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site .title a:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.site .title a.extra {
|
||||
color: #aaa;
|
||||
text-decoration: none;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.site .title a.extra:hover {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.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
|
||||
/*
|
||||
/*****************************************************************************/
|
||||
|
||||
#post {
|
||||
|
||||
}
|
||||
|
||||
/* 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;
|
||||
font-size: 85%;
|
||||
padding: 0 .2em;
|
||||
}
|
||||
|
||||
#post pre code {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* terminal */
|
||||
|
||||
#post pre.terminal {
|
||||
border: 1px solid black;
|
||||
background-color: #333;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#post pre.terminal code {
|
||||
background-color: #333;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 5.0 KiB |
|
@ -1,5 +1,4 @@
|
|||
auto: false
|
||||
server: true
|
||||
permalink: /docs/:categories/:title
|
||||
pygments: true
|
||||
relative_permalinks: false
|
||||
gauges_id: 503c5af6613f5d0f19000027
|
||||
permalink: /news/:year/:month/:day/:title
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
<div class="grid2">
|
||||
<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 == "Quick-start guide" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/quickstart">Quick-start guide</a>
|
||||
</li>
|
||||
<li class="{% if page.title == "Installation" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/installation">Installation</a>
|
||||
</li>
|
||||
|
@ -26,6 +29,9 @@
|
|||
<li class="{% if page.title == "Writing posts" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/posts">Writing posts</a>
|
||||
</li>
|
||||
<li class="{% if page.title == "Working with drafts" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/drafts">Working with drafts</a>
|
||||
</li>
|
||||
<li class="{% if page.title == "Creating pages" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/pages">Creating pages</a>
|
||||
</li>
|
||||
|
@ -65,9 +71,6 @@
|
|||
</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>
|
||||
|
@ -77,6 +80,18 @@
|
|||
<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>
|
||||
</ul>
|
||||
<h4>Meta</h4>
|
||||
<ul>
|
||||
<li class="{% if page.title == "Contributing" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/contributing">Contributing</a>
|
||||
</li>
|
||||
<li class="{% if page.title == "History" %}current{% endif %}">
|
||||
<a href="{{ site.url }}/docs/history">History</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
<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/quickstart">Quick-start guide</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/drafts">Working with drafts</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/troubleshooting">Troubleshooting</option>
|
||||
<option value="{{ site.url }}/docs/sites">Sites using Jekyll</option>
|
||||
<option value="{{ site.url }}/docs/resources">Resources</option>
|
||||
<option value="{{ site.url }}/docs/upgrading">Upgrading</option>
|
||||
</optgroup>
|
||||
<optgroup label="Meta">
|
||||
<option value="{{ site.url }}/docs/contributing">Contributing</option>
|
||||
<option value="{{ site.url }}/docs/history">History</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
|
@ -1,15 +1,15 @@
|
|||
<footer>
|
||||
<div class="content">
|
||||
<div class="grid4 first">
|
||||
<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 contributors</a>.</p>
|
||||
<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 contributors</a>.</p>
|
||||
</div>
|
||||
<div class="grid8 align-right">
|
||||
<p>Proudly hosted by</p>
|
||||
<a href="https://github.com">
|
||||
<img src="{{ site.url }}/img/footer-logo.png" alt="GitHub • Social coding">
|
||||
</a>
|
||||
<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 class="clear"></div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<header>
|
||||
<div class="content">
|
||||
<div class="grid3 first">
|
||||
<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>
|
||||
|
@ -8,19 +11,8 @@
|
|||
</a>
|
||||
</h1>
|
||||
</div>
|
||||
<nav class="grid6">
|
||||
<ul>
|
||||
<li {% if page.overview %}class="current"{% endif %}>
|
||||
<a href="{{ site.url }}/">Overview</a>
|
||||
</li>
|
||||
<li {% unless page.overview %}class="current"{% endunless %}>
|
||||
<a href="{{ site.url }}/docs">Documentation</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="https://github.com/mojombo/jekyll">View on GitHub</a>
|
||||
</li>
|
||||
</ul>
|
||||
<nav class="main-nav unit two-thirds hide-on-mobiles">
|
||||
{% include primary-nav-items.html %}
|
||||
</nav>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<div class="unit one-fifth hide-on-mobiles">
|
||||
<aside>
|
||||
<ul>
|
||||
<li class="{% if page.title == 'News' %}current{% endif %}">
|
||||
<a href="/news/">All News</a>
|
||||
</li>
|
||||
<li class="{% if page.title == 'Releases' %}current{% endif %}">
|
||||
<a href="/news/releases/">Jekyll Releases</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h4>Recent Releases</h4>
|
||||
<ul>
|
||||
{% for post in site.posts limit:5 %}
|
||||
<li class="{% if page.title == post.title %}current{% endif %}">
|
||||
<a href="{{ post.url }}">Version {{ post.version }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li>
|
||||
<a href="/docs/history/">History »</a>
|
||||
</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</div>
|
|
@ -0,0 +1,11 @@
|
|||
<div class="docs-nav-mobile unit whole show-on-mobiles">
|
||||
<select onchange="if (this.value) window.location.href=this.value">
|
||||
<option value="">Navigate the blog…</option>
|
||||
<option value="/news/">Home</option>
|
||||
<optgroup label="v1.x">
|
||||
{% for post in site.posts %}
|
||||
<option value="{{ post.url }}">{{ post.title }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
|
@ -0,0 +1,24 @@
|
|||
<article>
|
||||
<h2>
|
||||
<a href="{{ post.url }}">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h2>
|
||||
<span class="post-category">
|
||||
{% for category in post.categories %}
|
||||
<span class="label">{{ category }}</span>
|
||||
{% endfor %}
|
||||
</span>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ post.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ post.author }}" class="post-author">
|
||||
<img src="https://github.com/{{ post.author }}.png" class="avatar" />
|
||||
{{ post.author }}
|
||||
</a>
|
||||
</div>
|
||||
<p class="post-content">
|
||||
{{ post.content }}
|
||||
</p>
|
||||
</article>
|
|
@ -0,0 +1,14 @@
|
|||
<ul>
|
||||
<li class="{% if page.overview %}current{% endif %}">
|
||||
<a href="{{ site.url }}/">Overview</a>
|
||||
</li>
|
||||
<li class="{% if page.url contains '/docs/' %}current{% endif %}">
|
||||
<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="{% if page.author %}current{% endif %}">
|
||||
<a href="{{ site.url }}/news">News</a>
|
||||
</li>
|
||||
<li class="">
|
||||
<a href="https://github.com/mojombo/jekyll"><span class="hide-on-mobiles">View on </span>GitHub</a>
|
||||
</li>
|
||||
</ul>
|
|
@ -3,10 +3,12 @@
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{ page.title }}</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="alternate" type="application/rss+xml" title="Jekyll • Simple, blog-aware, static sites - Feed" href="/feed.xml" />
|
||||
<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/grid.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" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% include top.html %}
|
||||
|
||||
<body>
|
||||
<body class="wrap">
|
||||
{% include header.html %}
|
||||
|
||||
{{ content }}
|
||||
|
|
|
@ -3,9 +3,11 @@ layout: default
|
|||
---
|
||||
|
||||
<section class="docs">
|
||||
<div class="content">
|
||||
<div class="grid">
|
||||
|
||||
<div class="grid10 first">
|
||||
{% include docs_contents_mobile.html %}
|
||||
|
||||
<div class="unit four-fifths">
|
||||
<article>
|
||||
<h1>{{ page.title }}</h1>
|
||||
{{ content }}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
<section class="news">
|
||||
<div class="grid">
|
||||
|
||||
{% include news_contents_mobile.html %}
|
||||
|
||||
<div class="unit four-fifths">
|
||||
{{ content }}
|
||||
</div>
|
||||
|
||||
{% include news_contents.html %}
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
||||
</section>
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
layout: news
|
||||
---
|
||||
|
||||
<article>
|
||||
<h2>
|
||||
{{ page.title }}
|
||||
<a href="{{ page.url }}" class="permalink" title="Permalink">∞</a>
|
||||
</h2>
|
||||
<span class="post-category">
|
||||
{% for category in page.categories %}
|
||||
<span class="label">{{ category }}</span>
|
||||
{% endfor %}
|
||||
</span>
|
||||
<div class="post-meta">
|
||||
<span class="post-date">
|
||||
{{ page.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ page.author }}" class="post-author">
|
||||
<img src="https://github.com/{{ page.author }}.png" class="avatar" />
|
||||
{{ page.author }}
|
||||
</a>
|
||||
</div>
|
||||
<p class="post-content">
|
||||
{{ content }}
|
||||
</p>
|
||||
</article>
|
|
@ -1,115 +0,0 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Extras
|
||||
prev_section: plugins
|
||||
next_section: github-pages
|
||||
---
|
||||
|
||||
There are a number of (optional) extra features that Jekyll supports that you
|
||||
may want to install, depending on how you plan to use Jekyll.
|
||||
|
||||
## Pygments
|
||||
|
||||
If you want syntax highlighting via the `{% raw %}{% highlight %}{% endraw %}`
|
||||
tag in your posts, you’ll need to install [Pygments](http://pygments.org/).
|
||||
|
||||
### Installing Pygments on OSX
|
||||
|
||||
Mac OS X (Leopard onwards) comes preinstalled with Python, so on just about any
|
||||
OS X machine you can install Pygments simply by running:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo easy_install Pygments
|
||||
{% endhighlight %}
|
||||
|
||||
#### Installing Pygments using Homebrew
|
||||
|
||||
Alternatively, you can install Pygments with
|
||||
[Homebrew](http://mxcl.github.com/homebrew/), an excellent package manager for
|
||||
OS X:
|
||||
|
||||
{% highlight bash %}
|
||||
$ brew install python
|
||||
# export PATH="/usr/local/share/python:${PATH}"
|
||||
$ easy_install pip
|
||||
$ pip install --upgrade distribute
|
||||
$ pip install pygments
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="note">
|
||||
<h5>Homebrew's executable paths</h5>
|
||||
<p>
|
||||
Homebrew doesn’t symlink the executables for you. For the Homebrew default
|
||||
Cellar location and Python 2.7, be sure to add `/usr/local/share/python` to
|
||||
your `PATH`. For more information, check out [the Homebrew
|
||||
wiki](https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python).
|
||||
</p>
|
||||
</div>
|
||||
|
||||
#### Installing Pygments using MacPorts
|
||||
|
||||
If you use MacPorts, you can install Pygments by running:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo port install python25 py25-pygments
|
||||
{% endhighlight %}
|
||||
|
||||
Seriously though, you should check out
|
||||
[Homebrew](http://mxcl.github.com/homebrew/)—it’s awesome.
|
||||
|
||||
### Installing Pygments on Arch Linux
|
||||
|
||||
You can install Pygments using the pacman package manager as follows:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo pacman -S python-pygments
|
||||
{% endhighlight %}
|
||||
|
||||
Or to use python2 for Pygments:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo pacman -S python2-pygments
|
||||
{% endhighlight %}
|
||||
|
||||
### Installing Pygments on Ubuntu and Debian
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo apt-get install python-pygments
|
||||
{% endhighlight %}
|
||||
|
||||
### Installing Pygments on RedHat, Fedora, and CentOS
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo yum install python-pygments
|
||||
{% endhighlight %}
|
||||
|
||||
### Installing Pygments on Gentoo
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo emerge -av dev-python/pygments
|
||||
{% endhighlight %}
|
||||
|
||||
## LaTeX Support
|
||||
|
||||
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
|
||||
(Version 0.6) which must be in your `$PATH` along with `dvips`. If you need
|
||||
Maruku to not assume a fixed location for `dvips`, check out [Remi’s Maruku
|
||||
fork](http://github.com/remi/maruku).
|
||||
|
||||
## RDiscount
|
||||
|
||||
If you prefer to use [RDiscount](http://github.com/rtomayko/rdiscount) instead
|
||||
of [Maruku](http://maruku.rubyforge.org/) for markdown, just make sure you have
|
||||
it installed:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo gem install rdiscount
|
||||
{% endhighlight %}
|
||||
|
||||
And then specify RDiscount as the Markdown engine in your `_config.yml` file to
|
||||
have Jekyll run with that option.
|
||||
|
||||
{% highlight bash %}
|
||||
# In _config.yml
|
||||
markdown: rdiscount
|
||||
{% endhighlight %}
|
|
@ -1,204 +0,0 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Blog migrations
|
||||
prev_section: variables
|
||||
next_section: templates
|
||||
---
|
||||
|
||||
If you’re switching to Jekyll from another blogging system, Jekyll’s importers
|
||||
can help you with the move. Most methods listed on this page require read access
|
||||
to the database to generate posts from your old system. Each method generates
|
||||
`.markdown` posts in the `_posts` directory based on the entries in the foreign
|
||||
system.
|
||||
|
||||
## Preparing for migrations
|
||||
|
||||
Because the importers have many of their own dependencies, they are made
|
||||
available via a separate gem called `jekyll-import`. To use them, all you need
|
||||
to do is install the gem, and they will become available as part of Jekyll's
|
||||
standard command line interface.
|
||||
|
||||
{% highlight bash %}
|
||||
$ gem install jekyll-import
|
||||
{% endhighlight %}
|
||||
|
||||
You should now be all set to run the importers below. If you ever get stuck, you
|
||||
can see help for each importer:
|
||||
|
||||
{% highlight bash %}
|
||||
$ jekyll help import # => See list of importers
|
||||
$ jekyll help import IMPORTER # => See importer specific help
|
||||
{% endhighlight %}
|
||||
|
||||
Where IMPORTER is the name of the specific importer.
|
||||
|
||||
<div class="note info">
|
||||
<h5>Note: Always double-check migrated content</h5>
|
||||
<p>
|
||||
|
||||
Importers may not distinguish between published or private posts, so
|
||||
you should always check that the content Jekyll generates for you appears as
|
||||
you intended.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- TODO all these need to be fixed -->
|
||||
|
||||
## WordPress
|
||||
|
||||
### Wordpress export files
|
||||
|
||||
If hpricot is not already installed, you will need to run `gem install hpricot`.
|
||||
Next, export your blog using the Wordpress export utility. Assuming that the
|
||||
exported file is saved as `wordpress.xml`, here is the command you need to run:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/wordpressdotcom";
|
||||
Jekyll::WordpressDotCom.process("wordpress.xml")'
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTip™: Wordpress.com Export Tool</h5>
|
||||
<p>If you are migrating from a Wordpress.com account, you can access the export tool at the following URL: `https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php`.</p>
|
||||
</div>
|
||||
|
||||
### Using Wordpress MySQL server connection
|
||||
|
||||
If you want to import using a direct connection to the Wordpress MySQL server, here's how:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/wordpress";
|
||||
Jekyll::WordPress.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
If you are using Webfaction and have to set up an [SSH tunnel](http://docs.webfaction.com/user-guide/databases.html?highlight=mysql#starting-an-ssh-tunnel-with-ssh), be sure to make the hostname (`127.0.0.1`) explicit, otherwise MySQL may block your access based on `localhost` and `127.0.0.1` not being equivalent in its authentication system:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/wordpress";
|
||||
Jekyll::WordPress.process("database", "user", "pass", "127.0.0.1")'
|
||||
{% endhighlight %}
|
||||
|
||||
### Further Wordpress migration alternatives
|
||||
|
||||
While the above methods work, they do not import much of the metadata that is usually stored in Wordpress posts and pages. If you need to export things like pages, tags, custom fields, image attachments and so on, the following resources might be useful to you:
|
||||
|
||||
- [Exitwp](https://github.com/thomasf/exitwp) is a configurable tool written in Python for migrating one or more Wordpress blogs into Jekyll (Markdown) format while keeping as much metadata as possible. Exitwp also downloads attachments and pages.
|
||||
- [A great article](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/) with a step-by-step guide for migrating a Wordpress blog to Jekyll while keeping most of the structure and metadata.
|
||||
- [wpXml2Jekyll](https://github.com/theaob/wpXml2Jekyll) is an executable windows application for creating Markdown posts from your Wordpress XML file.
|
||||
|
||||
## Drupal
|
||||
|
||||
If you’re migrating from [Drupal](http://drupal.org), there is [a migrator](https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/drupal.rb) for you too:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/drupal";
|
||||
Jekyll::Drupal.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="note warning">
|
||||
<h5>Warning: Drupal Version Compatibility</h5>
|
||||
<p>This migrator was written for Drupal 6.1 and may not work as expected on future versions of Drupal. Please update it and send us a pull request if necessary.</p>
|
||||
</div>
|
||||
|
||||
## Movable Type
|
||||
|
||||
To import posts from Movable Type:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/mt";
|
||||
Jekyll::MT.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
## Typo
|
||||
|
||||
To import posts from Typo:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/typo";
|
||||
Jekyll::Typo.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
This code also has only been tested with Typo version 4+.
|
||||
|
||||
## TextPattern
|
||||
|
||||
To import posts from TextPattern:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/textpattern";
|
||||
Jekyll::TextPattern.process("database_name", "username", "password", "hostname")'
|
||||
{% endhighlight %}
|
||||
|
||||
You will need to run the above from the parent directory of your `_import` folder. For example, if `_import` is located in `/path/source/_import`, you will need to run this code from `/path/source`. The hostname defaults to `localhost`, all other variables are required. You may need to adjust the code used to filter entries. Left alone, it will attempt to pull all entries that are live or sticky.
|
||||
|
||||
## Mephisto
|
||||
|
||||
To import posts from Mephisto:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/mephisto";
|
||||
Jekyll::Mephisto.process("database", "user", "password")'
|
||||
{% endhighlight %}
|
||||
|
||||
If your data is in Postgres, you should do this instead:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/mephisto";
|
||||
Jekyll::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
||||
{% endhighlight %}
|
||||
|
||||
## Blogger (Blogspot)
|
||||
|
||||
To import posts from Blogger, see [this post about migrating from Blogger to Jekyll](http://coolaj86.info/articles/migrate-from-blogger-to-jekyll.html). If that doesn’t work for you, you might want to try some of the following alternatives:
|
||||
|
||||
- [@kennym](https://github.com/kennym) created a [little migration script](https://gist.github.com/1115810), because the solutions in the previous article didn't work out for him.
|
||||
- [@ngauthier](https://github.com/ngauthier) created [another importer](https://gist.github.com/1506614) that imports comments, and does so via blogger’s archive instead of the RSS feed.
|
||||
- [@juniorz](https://github.com/juniorz) created [yet another importer](https://gist.github.com/1564581) that works for [Octopress](http://octopress.org). It is like [@ngauthier’s version](https://gist.github.com/1506614) but separates drafts from posts, as well as importing tags and permalinks.
|
||||
|
||||
## Posterous
|
||||
|
||||
To import posts from your primary Posterous blog:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/posterous";
|
||||
Jekyll::Posterous.process("my_email", "my_pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
For any other Posterous blog on your account, you will need to specify the `blog_id` for the blog:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/posterous";
|
||||
Jekyll::Posterous.process("my_email", "my_pass", "blog_id")'
|
||||
{% endhighlight %}
|
||||
|
||||
There is also an [alternative Posterous migrator](https://github.com/pepijndevos/jekyll/blob/patch-1/lib/jekyll/migrators/posterous.rb) that maintains permalinks and attempts to import images too.
|
||||
|
||||
## Tumblr
|
||||
|
||||
To import posts from Tumblr:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/tumblr";
|
||||
Jekyll::Tumblr.process("http://www.your_blog_url.com", true)'
|
||||
{% endhighlight %}
|
||||
|
||||
There is also [a modified Tumblr migrator](https://github.com/stephenmcd/jekyll/blob/master/lib/jekyll/migrators/tumblr.rb) that exports posts as Markdown and preserves post tags.
|
||||
|
||||
The migrator above requires the `json` gem and Python's `html2text` to be installed as follows:
|
||||
|
||||
{% highlight bash %}
|
||||
$ gem install json
|
||||
$ pip install html2text
|
||||
{% endhighlight %}
|
||||
|
||||
Once installed, simply use the format argument:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/migrators/tumblr";
|
||||
Jekyll::Tumblr.process("http://www.your_blog_url.com", format="md")'
|
||||
{% endhighlight %}
|
||||
|
||||
## Other Systems
|
||||
|
||||
If you have a system that there isn’t currently a migrator for, you should consider writing one and sending us a pull request.
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.0 Released"
|
||||
date: "2013-05-06 02:12:52 +0200"
|
||||
author: parkr
|
||||
version: 1.0.0
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Hey! After many months of hard work by Jekyll's contributors, we're excited
|
||||
to announce the first major release of the project in a long while. v1.0.0 is
|
||||
finally here! While the list of improvements and bug fixes is [quite lengthy][history],
|
||||
here are the highlights (thanks to [@benbalter](http://twitter.com/BenBalter) for the
|
||||
examples and for compiling this list):
|
||||
|
||||
- Support for the Gist tag for easily embedding Gists ([example](https://gist.github.com/benbalter/5555251))
|
||||
- Automatically generated post excerpts ([example](https://gist.github.com/benbalter/5555369))
|
||||
- Save and preview drafts before publishing ([example](https://gist.github.com/benbalter/5555992))
|
||||
|
||||
Take a look at the [Upgrading][] page in the docs for more detailed information.
|
||||
|
||||
[history]: /docs/history/#100__20130506
|
||||
[Upgrading]: /docs/upgrading/
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.1 Released"
|
||||
date: "2013-05-08 23:46:11 +0200"
|
||||
author: parkr
|
||||
version: 1.0.1
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Hot on the trails of v1.0, v1.0.1 is out! Here are the highlights:
|
||||
|
||||
* Add newer `language-` class name prefix to code blocks ([#1037][])
|
||||
* Commander error message now preferred over process abort with incorrect args ([#1040][])
|
||||
* Do not force use of toc_token when using generate_toc in RDiscount ([#1048][])
|
||||
* 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][])
|
||||
|
||||
See the [History][] page for more information on this release.
|
||||
|
||||
{% assign issue_numbers = "1037|1040|1048|1053|1045|1041|1032" | split: "|" %}
|
||||
{% for issue in issue_numbers %}
|
||||
[#{{ issue }}]: https://github.com/mojombo/jekyll/issues/{{ issue }}
|
||||
{% endfor %}
|
||||
|
||||
[History]: /docs/history/#101__20130508
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.2 Released"
|
||||
date: "2013-05-12 14:45:00 +0200"
|
||||
author: parkr
|
||||
version: 1.0.2
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
v1.0.2 has some key bugfixes that optionally restore some behaviour from pre-1.0
|
||||
releases, and fix some other annoying bugs:
|
||||
|
||||
* Backwards-compatibilize relative permalinks ([#1081][])
|
||||
* Add `jekyll doctor` command to check site for any known compatibility problems ([#1081][])
|
||||
* Deprecate old config `server_port`, match to `port` if `port` isn't set ([#1084][])
|
||||
* Update pygments.rb and kramdon versions to 0.5.0 and 1.0.2, respectively ([#1061][], [#1067][])
|
||||
* Fix issue when post categories are numbers ([#1078][])
|
||||
* Add a `data-lang="<lang>"` attribute to Redcarpet code blocks ([#1066][])
|
||||
* Catching that Redcarpet gem isn't installed ([#1059][])
|
||||
|
||||
See the [History][] page for more information on this release.
|
||||
|
||||
{% assign issue_numbers = "1059|1061|1066|1067|1078|1081|1084" | split: "|" %}
|
||||
{% for issue in issue_numbers %}
|
||||
[#{{ issue }}]: https://github.com/mojombo/jekyll/issues/{{ issue }}
|
||||
{% endfor %}
|
||||
|
||||
[History]: /docs/history/#102__20130512
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: news_item
|
||||
title: "Jekyll 1.0.3 Released"
|
||||
date: "2013-06-07 21:02:13 +0200"
|
||||
author: parkr
|
||||
version: 1.0.3
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
v1.0.3 contains some key enhancements and bug fixes:
|
||||
|
||||
- Fail with non-zero exit code when MaRuKu errors ([#1190][]) or Liquid errors ([#1121][])
|
||||
- Add support for private gists to `gist` tag ([#1189][])
|
||||
- Add `--force` option to `jekyll new` ([#1115][])
|
||||
- Fix compatibility with `exclude` and `include` with pre-1.0 Jekyll ([#1114][])
|
||||
- Fix pagination issue regarding `File.basename` and `page:num` ([#1063][])
|
||||
|
||||
See the [History][] page for more information on this release.
|
||||
|
||||
{% assign issue_numbers = "1190|1121|1189|1115|1114|1063" | split: "|" %}
|
||||
{% for issue in issue_numbers %}
|
||||
[#{{ issue }}]: https://github.com/mojombo/jekyll/issues/{{ issue }}
|
||||
{% endfor %}
|
||||
|
||||
[History]: /docs/history/#103__20130607
|
|
@ -1,62 +0,0 @@
|
|||
.content {
|
||||
width: 978px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.grid1, .grid2, .grid3, .grid4, .grid5, .grid6, .grid7, .grid8, .grid9, .grid10, .grid11 {
|
||||
float: left;
|
||||
display: inline;
|
||||
margin-left: 30px;
|
||||
}
|
||||
.grid1 {
|
||||
width: 54px;
|
||||
}
|
||||
.grid2 {
|
||||
width: 138px;
|
||||
}
|
||||
.grid3 {
|
||||
width: 222px;
|
||||
}
|
||||
.grid4 {
|
||||
width: 306px;
|
||||
}
|
||||
.grid5 {
|
||||
width: 390px;
|
||||
}
|
||||
.grid6 {
|
||||
width: 474px;
|
||||
}
|
||||
.grid7 {
|
||||
width: 558px;
|
||||
}
|
||||
.grid8 {
|
||||
width: 642px;
|
||||
}
|
||||
.grid9 {
|
||||
width: 726px;
|
||||
}
|
||||
.grid10 {
|
||||
width: 810px;
|
||||
}
|
||||
.grid11 {
|
||||
width: 894px;
|
||||
}
|
||||
.first {
|
||||
margin-left: 0;
|
||||
clear: left;
|
||||
}
|
||||
|
||||
/* clearfix */
|
||||
.clear:after {
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0;
|
||||
content: " ";
|
||||
clear: both;
|
||||
height: 0;
|
||||
}
|
||||
* html .clear {
|
||||
zoom: 1;
|
||||
} /* IE6 */
|
||||
*:first-child+html .clear {
|
||||
zoom: 1;
|
||||
} /* IE7 */
|
|
@ -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 let’s 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 isn’t 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;
|
||||
}
|
||||
}*/
|
|
@ -18,7 +18,7 @@
|
|||
.highlight .gr { color: #c0c0c0; font-weight: bold; background-color: #c00000 } /* Generic.Error */
|
||||
.highlight .gh { color: #cd5c5c} /* Generic.Heading */
|
||||
.highlight .gi { color: #ffffff; background-color: #0000c0 } /* Generic.Inserted */
|
||||
.highlight .go { color: #add8e6; font-weight: bold; background-color: #4d4d4d } /* Generic.Output */
|
||||
.highlight span.go { color: #add8e6; font-weight: bold; background-color: #4d4d4d } /* Generic.Output, qualified with span to prevent applying this style to the Go language, see #1153. */
|
||||
.highlight .gp { color: #ffffff} /* Generic.Prompt */
|
||||
.highlight .gs { color: #ffffff} /* Generic.Strong */
|
||||
.highlight .gu { color: #cd5c5c} /* Generic.Subheading */
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
/* Base */
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 21px;
|
||||
|
@ -11,6 +17,18 @@ body {
|
|||
text-shadow: 0 1px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.clear {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.clear:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
height: 0;
|
||||
clear: both;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Sections */
|
||||
|
||||
body > header, body > section, body > footer {
|
||||
|
@ -19,34 +37,16 @@ body > header, body > section, body > footer {
|
|||
clear: both;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
body > header {
|
||||
padding: 40px 0 10px;
|
||||
}
|
||||
|
||||
body > header .content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body > header h1 img {
|
||||
margin-left: -30px;
|
||||
body > header h1, body > header nav {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
body > header h1 span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
|
||||
nav {
|
||||
margin-top: 52px;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
@ -54,10 +54,17 @@ nav ul {
|
|||
|
||||
nav li {
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
nav li a {
|
||||
.main-nav {
|
||||
margin-top: 52px;
|
||||
}
|
||||
|
||||
.main-nav li {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.main-nav li a {
|
||||
border-radius: 5px;
|
||||
font-weight: 800;
|
||||
font-size: 14px;
|
||||
|
@ -69,19 +76,65 @@ nav li a {
|
|||
-webkit-transition: all .25s;
|
||||
}
|
||||
|
||||
nav li a:hover {
|
||||
.main-nav li a:hover {
|
||||
background: #252525;
|
||||
box-shadow: inset 0 1px 3px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.1);
|
||||
text-shadow: 0 1px 3px rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
nav li.current a {
|
||||
.main-nav li.current a {
|
||||
background: #fc0;
|
||||
color: #222;
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 5px rgba(0,0,0,.5);
|
||||
text-shadow: 0 1px 0 rgba(255,255,255,.3);
|
||||
}
|
||||
|
||||
.mobile-nav ul {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
display: table;
|
||||
}
|
||||
|
||||
.mobile-nav a {
|
||||
float: left;
|
||||
width: 100%;
|
||||
background: #333;
|
||||
color: #fc0;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.mobile-nav .current a {
|
||||
background: #fc0;
|
||||
color: #222;
|
||||
box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 5px rgba(0,0,0,.5);
|
||||
text-shadow: 0 1px 0 rgba(255,255,255,.3);
|
||||
}
|
||||
|
||||
.mobile-nav li {
|
||||
display: table-cell;
|
||||
width: 25%;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px){
|
||||
.main-nav ul {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
@media (max-width: 830px){
|
||||
.main-nav .show-on-mobiles {
|
||||
display: inline;
|
||||
}
|
||||
.main-nav .hide-on-mobiles {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
|
||||
body > footer {
|
||||
|
@ -96,50 +149,60 @@ body > footer a {
|
|||
color: #fff;
|
||||
}
|
||||
|
||||
body > footer .align-right p, body > footer .align-right img {
|
||||
body > footer .align-right p, body > footer img {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
body > footer .align-right img {
|
||||
body > footer img {
|
||||
position: relative;
|
||||
top: 14px;
|
||||
top: 8px;
|
||||
margin-left: 5px;
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
opacity: .8;
|
||||
padding: 1px;
|
||||
-webkit-transition: opacity .2s;
|
||||
-moz-transition: opacity .2s;
|
||||
transition: opacity .2s;
|
||||
}
|
||||
|
||||
/* Utilities */
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
body > footer a:hover img {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
@media (max-width: 568px){
|
||||
footer .one-third p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
footer .two-thirds p {
|
||||
margin-top: -20px;
|
||||
}
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
/* Intro */
|
||||
|
||||
/* Sections */
|
||||
|
||||
.intro .content {
|
||||
.intro .unit {
|
||||
padding: 10px 0 40px;
|
||||
}
|
||||
|
||||
.intro p {
|
||||
font-size: 3.2em;
|
||||
font-size: 1.75em;
|
||||
line-height: 1em;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.features .content {
|
||||
padding: 20px 0 40px;
|
||||
@media (min-width: 569px){
|
||||
.intro p {
|
||||
font-size: 3.2em;
|
||||
}
|
||||
}
|
||||
|
||||
/* Quickstart */
|
||||
|
||||
.quickstart {
|
||||
background: #3F1F1F;
|
||||
color: #fff;
|
||||
margin: 60px 0 80px;
|
||||
margin: 60px 0;
|
||||
box-shadow: inset 0 3px 10px rgba(0,0,0,.4);
|
||||
}
|
||||
|
||||
|
@ -147,81 +210,47 @@ body > footer .align-right img {
|
|||
padding: 0px 0;
|
||||
}
|
||||
|
||||
.quickstart .code {
|
||||
margin: -30px 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.quickstart h4 {
|
||||
margin: 48px 0 0;
|
||||
font-size: 28px;
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
margin-top: 20px;
|
||||
text-shadow: 0 1px 3px rgba(0,0,0,.8);
|
||||
}
|
||||
|
||||
.free-hosting .content {
|
||||
/*margin-bottom: 40px;*/
|
||||
position: relative;
|
||||
.quickstart .code {
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin: 0 0 -30px;
|
||||
}
|
||||
|
||||
.free-hosting .pane {
|
||||
background: #444;
|
||||
border-radius: 10px;
|
||||
padding: 40px 70px 30px;
|
||||
/*color: #222;*/
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.free-hosting img {
|
||||
float: left;
|
||||
margin: -20px 40px -40px -20px;
|
||||
}
|
||||
|
||||
.free-hosting h2 {
|
||||
/*font-weight: 800;*/
|
||||
}
|
||||
.free-hosting p,
|
||||
.free-hosting a {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.free-hosting p {
|
||||
margin: 0.75em;
|
||||
}
|
||||
|
||||
.free-hosting a {
|
||||
/*color: #c00;*/
|
||||
}
|
||||
|
||||
.free-hosting .content:after {
|
||||
content: " ";
|
||||
float: right;
|
||||
background: url(../img/footer-arrow.png) top left no-repeat;
|
||||
width: 73px;
|
||||
height: 186px;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
bottom: -60px;
|
||||
@media (min-width: 768px){
|
||||
.quickstart .code {
|
||||
font-size: 18px;
|
||||
margin: -30px 0;
|
||||
float: right;
|
||||
}
|
||||
.quickstart h4 {
|
||||
margin: 50px 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code */
|
||||
|
||||
.quickstart .code {
|
||||
display: block;
|
||||
background: #3d3d3d;
|
||||
border-radius: 5px;
|
||||
padding: 0;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, "Liberation Mono", monospace;
|
||||
line-height: 1.3em;
|
||||
box-shadow: 0 5px 30px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.quickstart .code .title {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
margin: 0 20px;
|
||||
padding: 5px 0;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
box-shadow: box-shadow: 0 3px 10px rgba(0,0,0,.5);
|
||||
border-radius: 5px 5px 0 0;
|
||||
box-shadow: 0 3px 10px rgba(0,0,0,.5);
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: normal;
|
||||
|
@ -242,6 +271,10 @@ body > footer .align-right img {
|
|||
.quickstart .code .shell {
|
||||
padding: 20px;
|
||||
text-shadow: none;
|
||||
margin: 0 20px;
|
||||
background: #3d3d3d;
|
||||
border-radius: 0 0 5px 5px;
|
||||
box-shadow: 0 5px 30px rgba(0,0,0,.3);
|
||||
}
|
||||
|
||||
.quickstart .code .line {
|
||||
|
@ -270,25 +303,100 @@ body > footer .align-right img {
|
|||
color: #888;
|
||||
}
|
||||
|
||||
/* Documentation */
|
||||
/* Free Hosting */
|
||||
|
||||
.docs .content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.docs article {
|
||||
.free-hosting .pane {
|
||||
background: #444;
|
||||
border-radius: 10px;
|
||||
padding: 40px 40px 30px;
|
||||
box-shadow: 0 3px 10px rgba(0,0,0,.1);
|
||||
min-height: 800px;
|
||||
text-shadow: none;
|
||||
position: relative;
|
||||
padding: 0 20px 30px;
|
||||
}
|
||||
|
||||
.docs aside {
|
||||
.free-hosting img {
|
||||
margin: -30px 0 0;
|
||||
width: 180px;
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.free-hosting h2 {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.free-hosting p,
|
||||
.free-hosting a {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.free-hosting p {
|
||||
margin: .75em 0;
|
||||
}
|
||||
|
||||
@media (min-width: 768px){
|
||||
.free-hosting img {
|
||||
float: left;
|
||||
margin: -20px -30px -30px -50px;
|
||||
width: 300px;
|
||||
height: 251px;
|
||||
}
|
||||
.free-hosting .pane-content {
|
||||
margin-top: 35px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
.free-hosting p,
|
||||
.free-hosting a {
|
||||
font-size: 18px;
|
||||
}
|
||||
.free-hosting .pane:after {
|
||||
content: " ";
|
||||
float: right;
|
||||
background: url(../img/footer-arrow.png) top left no-repeat;
|
||||
width: 73px;
|
||||
height: 186px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -30px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Article - Used for both docs and news */
|
||||
|
||||
|
||||
article {
|
||||
background: #444;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin: 0 10px;
|
||||
box-shadow: 0 3px 10px rgba(0,0,0,.1);
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 480px){
|
||||
article ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 568px){
|
||||
article {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px){
|
||||
article {
|
||||
padding: 40px 40px 30px;
|
||||
font-size: 21px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Right-side nav - used by both docs and news */
|
||||
|
||||
aside {
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.docs aside h4 {
|
||||
aside h4 {
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
|
@ -298,20 +406,24 @@ body > footer .align-right img {
|
|||
border-bottom: 1px solid #c00;
|
||||
}
|
||||
|
||||
.docs aside ul {
|
||||
aside ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.docs aside li {
|
||||
aside ul:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
aside li {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.docs aside li a {
|
||||
aside li a {
|
||||
font-size: 16px;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.docs aside li.current a:before {
|
||||
aside li.current a:before {
|
||||
content: "";
|
||||
border-color: transparent transparent transparent #444;
|
||||
border-style: solid;
|
||||
|
@ -323,11 +435,22 @@ body > footer .align-right img {
|
|||
left: -30px;
|
||||
}
|
||||
|
||||
/* Documentation */
|
||||
|
||||
.docs article {
|
||||
min-height: 800px;
|
||||
}
|
||||
|
||||
.docs .content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.section-nav {
|
||||
text-align: center;
|
||||
padding-top: 40px;
|
||||
position: relative;
|
||||
background: url(../img/article-footer.png) top center no-repeat;
|
||||
margin: 40px -20px 10px;
|
||||
}
|
||||
|
||||
.section-nav > div {
|
||||
|
@ -342,7 +465,6 @@ body > footer .align-right img {
|
|||
padding: 8px 12px 10px;
|
||||
border-radius: 5px;
|
||||
/*border: 1px solid #333;*/
|
||||
background: #999;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5);
|
||||
background: #777;
|
||||
}
|
||||
|
@ -391,6 +513,99 @@ body > footer .align-right img {
|
|||
cursor: default;
|
||||
}
|
||||
|
||||
.docs-nav-mobile select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* News */
|
||||
|
||||
article h2:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.post-category,
|
||||
.post-meta {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.post-category {
|
||||
display: inline-block;
|
||||
margin-left: -30px;
|
||||
padding: 6px 10px 8px;
|
||||
padding-left: 50px;
|
||||
border-radius: 0 5px 5px 0;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(0,0,0,.3);
|
||||
background: #9e2812;
|
||||
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllMjgxMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM2ZjBkMGQiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
||||
background: -moz-linear-gradient(top, #9e2812 0%, #6f0d0d 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#9e2812), color-stop(100%,#6f0d0d));
|
||||
background: -webkit-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
|
||||
background: -o-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
|
||||
background: -ms-linear-gradient(top, #9e2812 0%,#6f0d0d 100%);
|
||||
background: linear-gradient(to bottom, #9e2812 0%,#6f0d0d 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9e2812', endColorstr='#6f0d0d',GradientType=0 );
|
||||
}
|
||||
|
||||
.label {
|
||||
float: left;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
@media (max-width: 568px){
|
||||
.post-category {
|
||||
padding-left: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px){
|
||||
.post-category {
|
||||
margin-left: -50px;
|
||||
}
|
||||
}
|
||||
|
||||
.post-category:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 0px;
|
||||
border-color: transparent #6f0d0d #6f0d0d transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
padding: 5px 0;
|
||||
color: #aaa;
|
||||
font-weight: 600;
|
||||
text-shadow: 0 -1px 0 #000;
|
||||
}
|
||||
|
||||
.post-date,
|
||||
.post-author {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.news article + article {
|
||||
margin-top: -10px;
|
||||
border-radius: 0 0 10px 10px;
|
||||
border-top: 1px solid #555;
|
||||
box-shadow: 0 -1px 0 #2f2f2f;
|
||||
}
|
||||
|
||||
/* Code Highlighting */
|
||||
|
||||
|
@ -401,12 +616,18 @@ pre, code {
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, "Liberation Mono", monospace;
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
padding: 0 .5em;
|
||||
line-height: 1.8em;
|
||||
}
|
||||
|
||||
.highlight, p > pre, p > code, p > nobr > code, li > code {
|
||||
@media (min-width: 768px){
|
||||
pre, code {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.highlight, p > pre, p > code, p > nobr > code, li > code, h5 > code, .note > code {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
|
@ -415,13 +636,19 @@ pre, code {
|
|||
0 -1px 0 rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
.note code {
|
||||
background-color: rgba(0,0,0,0.2);
|
||||
margin-left: 2.5px;
|
||||
margin-right: 2.5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
padding: 10px 0;
|
||||
width: 100%;
|
||||
overflow: scroll;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
|
||||
/* HTML Elements */
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
|
@ -586,10 +813,10 @@ code.option, code.flag, code.filter, code.output {
|
|||
|
||||
.note {
|
||||
margin: 30px 0;
|
||||
margin-left: -50px;
|
||||
margin-left: -30px;
|
||||
padding: 20px 20px 24px;
|
||||
padding-left: 50px;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
border-radius: 0 5px 5px 0;
|
||||
position: relative;
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255,255,255,.2), inset 0 -1px 0 rgba(0,0,0,.3);
|
||||
background: #7e6d42;
|
||||
|
@ -603,6 +830,18 @@ code.option, code.flag, code.filter, code.output {
|
|||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7e6d42', endColorstr='#5c4e35',GradientType=0 );
|
||||
}
|
||||
|
||||
@media (max-width: 568px){
|
||||
.note {
|
||||
margin-right: -30px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px){
|
||||
.note {
|
||||
margin-left: -50px;
|
||||
}
|
||||
}
|
||||
|
||||
.note:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
|
@ -695,3 +934,13 @@ code.option, code.flag, code.filter, code.output {
|
|||
font-weight: bold;
|
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.5);
|
||||
}
|
||||
|
||||
/* Responsive tables */
|
||||
|
||||
@media (max-width: 768px){
|
||||
.mobile-side-scroller {
|
||||
overflow-x: scroll;
|
||||
margin: 0 -40px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Configuration
|
||||
prev_section: structure
|
||||
next_section: frontmatter
|
||||
permalink: /docs/configuration/
|
||||
---
|
||||
|
||||
Jekyll allows you to concoct your sites in any way you can dream up, and it’s
|
||||
|
@ -16,9 +17,10 @@ in the terminal.
|
|||
### Global Configuration
|
||||
|
||||
The table below lists the available settings for Jekyll, and the various <code
|
||||
class="option">options</code> (specifed in the configuration file) and <code
|
||||
class="option">options</code> (specified in the configuration file) and <code
|
||||
class="flag">flags</code> (specified on the command-line) that control them.
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -81,11 +83,29 @@ class="flag">flags</code> (specified on the command-line) that control them.
|
|||
<p><code class="option">include: [DIR, FILE, ...]</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='setting'>
|
||||
<td>
|
||||
<p class='name'><strong>Time Zone</strong></p>
|
||||
<p class="description">
|
||||
Set the time zone for site generation. This sets the <code>TZ</code>
|
||||
environment variable, which Ruby uses to handle time and date
|
||||
creation and manipulation. Any entry from the
|
||||
<a href="http://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
|
||||
Database</a> is valid, e.g. <code>America/New_York</code>. The default
|
||||
is the local time zone, as set by your operating system.
|
||||
</p>
|
||||
</td>
|
||||
<td class='align-center'>
|
||||
<p><code class="option">timezone: TIMEZONE</code></p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
### Build Command Options
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -153,6 +173,7 @@ class="flag">flags</code> (specified on the command-line) that control them.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
### Serve Command Options
|
||||
|
||||
|
@ -160,6 +181,7 @@ In addition to the options below, the `serve` sub-command can accept any of the
|
|||
for the `build` sub-command, which are then applied to the site build which occurs right
|
||||
before your site is served.
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -191,7 +213,7 @@ before your site is served.
|
|||
<tr class='setting'>
|
||||
<td>
|
||||
<p class='name'><strong>Base URL</strong></p>
|
||||
<p class='description'>Serve website with the given base URL</p>
|
||||
<p class='description'>Serve the website from the given base URL</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p><code class="option">baseurl: URL</code></p>
|
||||
|
@ -200,6 +222,7 @@ before your site is served.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="note warning">
|
||||
<h5>Do not use tabs in configuration files</h5>
|
||||
|
@ -220,24 +243,30 @@ source: .
|
|||
destination: ./_site
|
||||
plugins: ./_plugins
|
||||
layouts: ./_layouts
|
||||
include: ['.htaccess']
|
||||
exclude: []
|
||||
keep_files: ['.git','.svn']
|
||||
timezone: nil
|
||||
|
||||
future: true
|
||||
pygments: false
|
||||
show_drafts: nil
|
||||
limit_posts: 0
|
||||
pygments: true
|
||||
|
||||
relative_permalinks: true
|
||||
|
||||
markdown: maruku
|
||||
permalink: date
|
||||
include: ['.htaccess']
|
||||
paginate_path: 'page:num'
|
||||
|
||||
markdown_ext: markdown,mkd,mkdn,md
|
||||
textile_ext: textile
|
||||
markdown: maruku
|
||||
markdown_ext: markdown,mkd,mkdn,md
|
||||
textile_ext: textile
|
||||
|
||||
excerpt_separator: "\n\n"
|
||||
|
||||
safe: false
|
||||
watch: false
|
||||
server: false
|
||||
watch: false # deprecated
|
||||
server: false # deprecated
|
||||
host: 0.0.0.0
|
||||
port: 4000
|
||||
baseurl: /
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Contributing
|
||||
prev_section: deployment-methods
|
||||
next_section: troubleshooting
|
||||
prev_section: upgrading
|
||||
next_section: history
|
||||
permalink: /docs/contributing/
|
||||
---
|
||||
|
||||
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
|
||||
|
@ -14,11 +15,11 @@ following in mind:
|
|||
[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.
|
||||
where appropriate. Also, whipping up some documentation in your fork's `site`
|
||||
directory would be appreciated, and once merged it will also appear in
|
||||
the next update of the main site.
|
||||
* If your contribution adds or changes any Jekyll behavior, make sure to update
|
||||
the documentation. It lives in `site/_posts`. If the docs are missing
|
||||
the documentation. It lives in `site/docs`. 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.
|
||||
|
@ -56,15 +57,49 @@ 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`
|
||||
* Clone down your fork:
|
||||
|
||||
{% highlight bash %}
|
||||
git clone git://github.com/<username>/jekyll.git
|
||||
{% endhighlight %}
|
||||
|
||||
* Create a topic branch to contain your change:
|
||||
|
||||
{% highlight bash %}
|
||||
git checkout -b my_awesome_feature
|
||||
{% endhighlight %}
|
||||
|
||||
|
||||
* 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`
|
||||
* Push the branch up:
|
||||
|
||||
{% highlight bash %}
|
||||
git push origin my_awesome_feature
|
||||
{% endhighlight %}
|
||||
|
||||
* Create a pull request against mojombo/jekyll and describe what your change
|
||||
does and the why you think it should be merged.
|
||||
|
||||
Updating Documentation
|
||||
----------------------
|
||||
|
||||
We want the Jekyll documentation to be the best it can be. We've
|
||||
open-sourced our docs and we welcome any pull requests if you find it
|
||||
lacking.
|
||||
|
||||
You can find the documentation for jekyllrb.com in the
|
||||
[site](https://github.com/mojombo/jekyll/tree/master/site) directory of
|
||||
Jekyll's repo on GitHub.com.
|
||||
|
||||
All documentation pull requests should be directed at `master`. Pull
|
||||
requests directed at another branch will not be accepted.
|
||||
|
||||
The [Jekyll wiki](https://github.com/mojombo/jekyll/wiki) on GitHub
|
||||
can be freely updated without a pull request as all
|
||||
GitHub users have access.
|
||||
|
||||
Gotchas
|
||||
-------
|
||||
|
|
@ -2,7 +2,8 @@
|
|||
layout: docs
|
||||
title: Deployment methods
|
||||
prev_section: github-pages
|
||||
next_section: contributing
|
||||
next_section: troubleshooting
|
||||
permalink: /docs/deployment-methods/
|
||||
---
|
||||
|
||||
Sites built using Jekyll can be deployed in a large number of ways due to the static nature of the generated output. A few of the most common deployment techniques are described below.
|
||||
|
@ -53,7 +54,7 @@ TMP_GIT_CLONE=$HOME/tmp/myrepo
|
|||
PUBLIC_WWW=/var/www/myrepo
|
||||
|
||||
git clone $GIT_REPO $TMP_GIT_CLONE
|
||||
jekyll build $TMP_GIT_CLONE $PUBLIC_WWW
|
||||
jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
|
||||
rm -Rf $TMP_GIT_CLONE
|
||||
exit
|
||||
{% endhighlight %}
|
||||
|
@ -96,7 +97,7 @@ If you want to maintain Jekyll inside your existing Rails app, [Jekyll-Admin](ht
|
|||
## Amazon S3
|
||||
|
||||
If you want to host your site in Amazon S3, you can do so with
|
||||
[jekyll-s3](https://github.com/laurilehmijoki/jekyll-s3) application. It will
|
||||
[s3_website](https://github.com/laurilehmijoki/s3_website) application. It will
|
||||
push your site to Amazon S3 where it can be served like any web server,
|
||||
dynamically scaling to almost unlimited traffic. This approach has the
|
||||
benefit of being about the cheapest hosting option available for
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Working with drafts
|
||||
permalink: /docs/drafts/
|
||||
---
|
||||
|
||||
Drafts are posts without a date. They're posts you're still working on and don't want to
|
||||
publish yet. To get up and running with drafts, create a `_drafts` folder in your site's
|
||||
root (as described in the [site structure](/docs/structure/) section) and create your
|
||||
first draft:
|
||||
|
||||
{% highlight text %}
|
||||
|-- _drafts/
|
||||
| |-- a-draft-post.md
|
||||
{% endhighlight %}
|
||||
|
||||
To preview your site with drafts, simply run `jekyll serve` or `jekyll build` with
|
||||
the `--drafts` switch. Each will be assigned the value of `Time.now`
|
||||
for its date, and thus you will see them generated as the latest posts.
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Extras
|
||||
prev_section: plugins
|
||||
next_section: github-pages
|
||||
permalink: /docs/extras/
|
||||
---
|
||||
|
||||
There are a number of (optional) extra features that Jekyll supports that you
|
||||
may want to install, depending on how you plan to use Jekyll.
|
||||
|
||||
## LaTeX Support
|
||||
|
||||
Maruku comes with optional support for LaTeX to PNG rendering via blahtex
|
||||
(Version 0.6) which must be in your `$PATH` along with `dvips`. If you need
|
||||
Maruku to not assume a fixed location for `dvips`, check out [Remi’s Maruku
|
||||
fork](http://github.com/remi/maruku).
|
||||
|
||||
## RDiscount
|
||||
|
||||
If you prefer to use [RDiscount](http://github.com/rtomayko/rdiscount) instead
|
||||
of [Maruku](http://github.com/bhollis/maruku) for markdown, just make sure you have
|
||||
it installed:
|
||||
|
||||
{% highlight bash %}
|
||||
$ sudo gem install rdiscount
|
||||
{% endhighlight %}
|
||||
|
||||
And then specify RDiscount as the Markdown engine in your `_config.yml` file to
|
||||
have Jekyll run with that option.
|
||||
|
||||
{% highlight bash %}
|
||||
# In _config.yml
|
||||
markdown: rdiscount
|
||||
{% endhighlight %}
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Front-matter
|
||||
prev_section: configuration
|
||||
next_section: posts
|
||||
permalink: /docs/frontmatter/
|
||||
---
|
||||
|
||||
The front-matter is where Jekyll starts to get really cool. Any file that
|
||||
|
@ -33,10 +34,22 @@ relies on.
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTip™: Front Matter Variables Are Optional</h5>
|
||||
<p>
|
||||
If you want to use <a href="../variables">Liquid tags and variables</a> but
|
||||
don't need anything in your front-matter, just leave it empty! The set of
|
||||
triple-dashed lines with nothing in between will still get Jekyll to process
|
||||
your file. (This is useful for things like CSS and RSS feeds!)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## Predefined Global Variables
|
||||
|
||||
There are a number of predefined global variables that you can set in the front-matter of a page or post.
|
||||
There are a number of predefined global variables that you can set in the
|
||||
front-matter of a page or post.
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -53,7 +66,7 @@ There are a number of predefined global variables that you can set in the front-
|
|||
<p>
|
||||
|
||||
If set, this specifies the layout file to use. Use the layout file
|
||||
name without file extension. Layout files must be placed in the
|
||||
name without the file extension. Layout files must be placed in the
|
||||
<code>_layouts</code> directory.
|
||||
|
||||
</p>
|
||||
|
@ -118,6 +131,7 @@ There are a number of predefined global variables that you can set in the front-
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
## Custom Variables
|
||||
|
@ -141,6 +155,7 @@ title:
|
|||
|
||||
These are available out-of-the-box to be used in the front-matter for a post.
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -162,3 +177,4 @@ These are available out-of-the-box to be used in the front-matter for a post.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -3,9 +3,10 @@ layout: docs
|
|||
title: GitHub Pages
|
||||
prev_section: extras
|
||||
next_section: deployment-methods
|
||||
permalink: /docs/github-pages/
|
||||
---
|
||||
|
||||
[GitHub Pages](https://pages.github.com) are public web pages for users,
|
||||
[GitHub Pages](http://pages.github.com) are public web pages for users,
|
||||
organizations, and repositories, that are freely hosted on GitHub's
|
||||
[github.io]() domain or on a custom domain name of your choice. GitHub Pages are
|
||||
powered by Jekyll behind the scenes, so in addition to supporting regular HTML
|
||||
|
@ -53,6 +54,31 @@ actual software project for Jekyll, however the Jekyll website (that you’re
|
|||
looking at right now) is contained in the [gh-pages
|
||||
branch](https://github.com/mojombo/jekyll/tree/gh-pages) of the same repository.
|
||||
|
||||
### Project Page URL Structure
|
||||
|
||||
Sometimes it's nice to preview your Jekyll site before you push your `gh-pages`
|
||||
branch to GitHub. However, the subdirectory-like URL structure GitHub uses for
|
||||
Project Pages complicates the proper resolution of URLs. Here is an approach to
|
||||
utilizing the GitHub Project Page URL structure (`username.github.io/project-name/`)
|
||||
whilst maintaining the ability to preview your Jekyll site locally.
|
||||
|
||||
1. In `_config.yml`, set the `baseurl` option to `/project-name` -- note the
|
||||
leading slash and the **absence** of a trailing slash.
|
||||
2. When referencing JS or CSS files, do it like this:
|
||||
`{% raw %}{{ site.baseurl}}/path/to/css.css{% endraw %}` -- note the slash
|
||||
immediately following the variable (just before "path").
|
||||
3. When doing permalinks or internal links, do it like this:
|
||||
`{% raw %}{{ site.baseurl }}{{ post.url }}{% endraw %}` -- note that there
|
||||
is **no** slash between the two variables.
|
||||
4. Finally, if you'd like to preview your site before committing/deploying using
|
||||
`jekyll serve`, be sure to pass an **empty string** to the `--baseurl` option,
|
||||
so that you can view everything at `localhost:4000` normally (without
|
||||
`/project-name` at the beginning): `jekyll serve --baseurl ''`
|
||||
|
||||
This way you can preview your site locally from the site root on localhost,
|
||||
but when GitHub generates your pages from the gh-pages branch all the URLs
|
||||
will start with `/project-name` and resolve properly.
|
||||
|
||||
<div class="note">
|
||||
<h5>GitHub Pages Documentation, Help, and Support</h5>
|
||||
<p>
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Heroku
|
||||
prev_section: github-pages
|
||||
next_section: manual-deployment
|
||||
permalink: /docs/heroku/
|
||||
---
|
||||
|
||||
Move along, people. Nothing to see here.
|
|
@ -0,0 +1,529 @@
|
|||
---
|
||||
layout: docs
|
||||
title: History
|
||||
permalink: /docs/history/
|
||||
prev_section: contributing
|
||||
---
|
||||
|
||||
## 1.0.3 / 2013-06-07
|
||||
|
||||
### Minor Enhancements
|
||||
- Add support to gist tag for private gists. ([#1189](https://github.com/mojombo/jekyll/issues/1189))
|
||||
- Fail loudly when MaRuKu errors out ([#1190](https://github.com/mojombo/jekyll/issues/1190))
|
||||
- Move the building of related posts into their own class ([#1057](https://github.com/mojombo/jekyll/issues/1057))
|
||||
- Removed trailing spaces in several places throughout the code ([#1116](https://github.com/mojombo/jekyll/issues/1116))
|
||||
- Add a `--force` option to `jekyll new` ([#1115](https://github.com/mojombo/jekyll/issues/1115))
|
||||
- Convert IDs in the site template to classes ([#1170](https://github.com/mojombo/jekyll/issues/1170))
|
||||
|
||||
### Bug Fixes
|
||||
- Fix typo in Stevenson constant "ERROR". ([#1166](https://github.com/mojombo/jekyll/issues/1166))
|
||||
- Rename Jekyll::Logger to Jekyll::Stevenson to fix inheritance issue ([#1106](https://github.com/mojombo/jekyll/issues/1106))
|
||||
- Exit with a non-zero exit code when dealing with a Liquid error ([#1121](https://github.com/mojombo/jekyll/issues/1121))
|
||||
- Make the `exclude` and `include` options backwards compatible with
|
||||
versions of Jekyll prior to 1.0 ([#1114](https://github.com/mojombo/jekyll/issues/1114))
|
||||
- Fix pagination on Windows ([#1063](https://github.com/mojombo/jekyll/issues/1063))
|
||||
- Fix the application of Pygments' Generic Output style to Go code
|
||||
([#1156](https://github.com/mojombo/jekyll/issues/1156))
|
||||
|
||||
### Site Enhancements
|
||||
- Add a Pro Tip to docs about front matter variables being optional ([#1147](https://github.com/mojombo/jekyll/issues/1147))
|
||||
- Add changelog to site as History page in /docs/ ([#1065](https://github.com/mojombo/jekyll/issues/1065))
|
||||
- Add note to Upgrading page about new config options in 1.0.x ([#1146](https://github.com/mojombo/jekyll/issues/1146))
|
||||
- Documentation for `date_to_rfc822` and `uri_escape` ([#1142](https://github.com/mojombo/jekyll/issues/1142))
|
||||
- Documentation highlight boxes shouldn't show scrollbars if not necessary ([#1123](https://github.com/mojombo/jekyll/issues/1123))
|
||||
- Add link to jekyll-minibundle in the doc's plugins list ([#1035](https://github.com/mojombo/jekyll/issues/1035))
|
||||
- Quick patch for importers documentation
|
||||
- Fix prefix for WordpressDotCom importer in docs ([#1107](https://github.com/mojombo/jekyll/issues/1107))
|
||||
- Add jekyll-contentblocks plugin to docs ([#1068](https://github.com/mojombo/jekyll/issues/1068))
|
||||
- Make code bits in notes look more natural, more readable ([#1089](https://github.com/mojombo/jekyll/issues/1089))
|
||||
- Fix logic for `relative_permalinks` instructions on Upgrading page ([#1101](https://github.com/mojombo/jekyll/issues/1101))
|
||||
- Add docs for post excerpt ([#1072](https://github.com/mojombo/jekyll/issues/1072))
|
||||
- Add docs for gist tag ([#1072](https://github.com/mojombo/jekyll/issues/1072))
|
||||
- Add docs indicating that Pygments does not need to be installed
|
||||
separately ([#1099](https://github.com/mojombo/jekyll/issues/1099), [#1119](https://github.com/mojombo/jekyll/issues/1119))
|
||||
- Update the migrator docs to be current ([#1136](https://github.com/mojombo/jekyll/issues/1136))
|
||||
- Add the Jekyll Gallery Plugin to the plugin list ([#1143](https://github.com/mojombo/jekyll/issues/1143))
|
||||
|
||||
### Development Fixes
|
||||
- Use Jekyll.logger instead of Jekyll::Stevenson to log things ([#1149](https://github.com/mojombo/jekyll/issues/1149))
|
||||
- Fix pesky Cucumber infinite loop ([#1139](https://github.com/mojombo/jekyll/issues/1139))
|
||||
- Do not write posts with timezones in Cucumber tests ([#1124](https://github.com/mojombo/jekyll/issues/1124))
|
||||
- Use ISO formatted dates in Cucumber features ([#1150](https://github.com/mojombo/jekyll/issues/1150))
|
||||
|
||||
## 1.0.2 / 2013-05-12
|
||||
|
||||
### Major Enhancements
|
||||
- Add `jekyll doctor` command to check site for any known compatibility problems ([#1081](https://github.com/mojombo/jekyll/issues/1081))
|
||||
- Backwards-compatibilize relative permalinks ([#1081](https://github.com/mojombo/jekyll/issues/1081))
|
||||
|
||||
### Minor Enhancements
|
||||
- Add a `data-lang="<lang>"` attribute to Redcarpet code blocks ([#1066](https://github.com/mojombo/jekyll/issues/1066))
|
||||
- Deprecate old config `server_port`, match to `port` if `port` isn't set ([#1084](https://github.com/mojombo/jekyll/issues/1084))
|
||||
- Update pygments.rb version to 0.5.0 ([#1061](https://github.com/mojombo/jekyll/issues/1061))
|
||||
- Update Kramdown version to 1.0.2 ([#1067](https://github.com/mojombo/jekyll/issues/1067))
|
||||
|
||||
### Bug Fixes
|
||||
- Fix issue when categories are numbers ([#1078](https://github.com/mojombo/jekyll/issues/1078))
|
||||
- Catching that Redcarpet gem isn't installed ([#1059](https://github.com/mojombo/jekyll/issues/1059))
|
||||
|
||||
### Site Enhancements
|
||||
- Add documentation about `relative_permalinks` ([#1081](https://github.com/mojombo/jekyll/issues/1081))
|
||||
- Remove pygments-installation instructions, as pygments.rb is bundled with it ([#1079](https://github.com/mojombo/jekyll/issues/1079))
|
||||
- Move pages to be Pages for realz ([#985](https://github.com/mojombo/jekyll/issues/985))
|
||||
- Updated links to Liquid documentation ([#1073](https://github.com/mojombo/jekyll/issues/1073))
|
||||
|
||||
## 1.0.1 / 2013-05-08
|
||||
|
||||
### Minor Enhancements
|
||||
- Do not force use of toc_token when using generate_tok in RDiscount ([#1048](https://github.com/mojombo/jekyll/issues/1048))
|
||||
- Add newer `language-` class name prefix to code blocks ([#1037](https://github.com/mojombo/jekyll/issues/1037))
|
||||
- Commander error message now preferred over process abort with incorrect args ([#1040](https://github.com/mojombo/jekyll/issues/1040))
|
||||
|
||||
### Bug Fixes
|
||||
- Make Redcarpet respect the pygments configuration option ([#1053](https://github.com/mojombo/jekyll/issues/1053))
|
||||
- Fix the index build with LSI ([#1045](https://github.com/mojombo/jekyll/issues/1045))
|
||||
- Don't print deprecation warning when no arguments are specified. ([#1041](https://github.com/mojombo/jekyll/issues/1041))
|
||||
- Add missing `</div>` to site template used by `new` subcommand, fixed typos in code ([#1032](https://github.com/mojombo/jekyll/issues/1032))
|
||||
|
||||
### Site Enhancements
|
||||
- Changed https to http in the GitHub Pages link ([#1051](https://github.com/mojombo/jekyll/issues/1051))
|
||||
- Remove CSS cruft, fix typos, fix HTML errors ([#1028](https://github.com/mojombo/jekyll/issues/1028))
|
||||
- Removing manual install of Pip and Distribute ([#1025](https://github.com/mojombo/jekyll/issues/1025))
|
||||
- Updated URL for Markdown references plugin ([#1022](https://github.com/mojombo/jekyll/issues/1022))
|
||||
|
||||
### Development Fixes
|
||||
- Markdownify history file ([#1027](https://github.com/mojombo/jekyll/issues/1027))
|
||||
- Update links on README to point to new jekyllrb.com ([#1018](https://github.com/mojombo/jekyll/issues/1018))
|
||||
|
||||
## 1.0.0 / 2013-05-06
|
||||
|
||||
### Major Enhancements
|
||||
- Add `jekyll new` subcommand: generate a jekyll scaffold ([#764](https://github.com/mojombo/jekyll/issues/764))
|
||||
- Refactored jekyll commands into subcommands: build, serve, and migrate. ([#690](https://github.com/mojombo/jekyll/issues/690))
|
||||
- Removed importers/migrators from main project, migrated to jekyll-import sub-gem ([#793](https://github.com/mojombo/jekyll/issues/793))
|
||||
- Added ability to render drafts in `_drafts` folder via command line ([#833](https://github.com/mojombo/jekyll/issues/833))
|
||||
- Add ordinal date permalink style (/:categories/:year/:y_day/:title.html) ([#928](https://github.com/mojombo/jekyll/issues/928))
|
||||
|
||||
### Minor Enhancements
|
||||
- Site template HTML5-ified ([#964](https://github.com/mojombo/jekyll/issues/964))
|
||||
- Use post's directory path when matching for the post_url tag ([#998](https://github.com/mojombo/jekyll/issues/998))
|
||||
- Loosen dependency on Pygments so it's only required when it's needed ([#1015](https://github.com/mojombo/jekyll/issues/1015))
|
||||
- Parse strings into Time objects for date-related Liquid filters ([#1014](https://github.com/mojombo/jekyll/issues/1014))
|
||||
- Tell the user if there is no subcommand specified ([#1008](https://github.com/mojombo/jekyll/issues/1008))
|
||||
- Freak out if the destination of `jekyll new` exists and is non-empty ([#981](https://github.com/mojombo/jekyll/issues/981))
|
||||
- Add `timezone` configuration option for compilation ([#957](https://github.com/mojombo/jekyll/issues/957))
|
||||
- Add deprecation messages for pre-1.0 CLI options ([#959](https://github.com/mojombo/jekyll/issues/959))
|
||||
- Refactor and colorize logging ([#959](https://github.com/mojombo/jekyll/issues/959))
|
||||
- Refactor Markdown parsing ([#955](https://github.com/mojombo/jekyll/issues/955))
|
||||
- Added application/vnd.apple.pkpass to mime.types served by WEBrick ([#907](https://github.com/mojombo/jekyll/issues/907))
|
||||
- Move template site to default markdown renderer ([#961](https://github.com/mojombo/jekyll/issues/961))
|
||||
- Expose new attribute to Liquid via `page`: `page.path` ([#951](https://github.com/mojombo/jekyll/issues/951))
|
||||
- Accept multiple config files from command line ([#945](https://github.com/mojombo/jekyll/issues/945))
|
||||
- Add page variable to liquid custom tags and blocks ([#413](https://github.com/mojombo/jekyll/issues/413))
|
||||
- Add paginator.previous_page_path and paginator.next_page_path ([#942](https://github.com/mojombo/jekyll/issues/942))
|
||||
- Backwards compatibility for 'auto' ([#821](https://github.com/mojombo/jekyll/issues/821), [#934](https://github.com/mojombo/jekyll/issues/934))
|
||||
- Added date_to_rfc822 used on RSS feeds ([#892](https://github.com/mojombo/jekyll/issues/892))
|
||||
- Upgrade version of pygments.rb to 0.4.2 ([#927](https://github.com/mojombo/jekyll/issues/927))
|
||||
- Added short month (e.g. "Sep") to permalink style options for posts ([#890](https://github.com/mojombo/jekyll/issues/890))
|
||||
- Expose site.baseurl to Liquid templates ([#869](https://github.com/mojombo/jekyll/issues/869))
|
||||
- Adds excerpt attribute to posts which contains first paragraph of content ([#837](https://github.com/mojombo/jekyll/issues/837))
|
||||
- Accept custom configuration file via CLI ([#863](https://github.com/mojombo/jekyll/issues/863))
|
||||
- Load in GitHub Pages MIME Types on `jekyll serve` ([#847](https://github.com/mojombo/jekyll/issues/847), [#871](https://github.com/mojombo/jekyll/issues/871))
|
||||
- Improve debugability of error message for a malformed highlight tag ([#785](https://github.com/mojombo/jekyll/issues/785))
|
||||
- Allow symlinked files in unsafe mode ([#824](https://github.com/mojombo/jekyll/issues/824))
|
||||
- Add 'gist' Liquid tag to core ([#822](https://github.com/mojombo/jekyll/issues/822), [#861](https://github.com/mojombo/jekyll/issues/861))
|
||||
- New format of Jekyll output ([#795](https://github.com/mojombo/jekyll/issues/795))
|
||||
- Reinstate --limit_posts and --future switches ([#788](https://github.com/mojombo/jekyll/issues/788))
|
||||
- Remove ambiguity from command descriptions ([#815](https://github.com/mojombo/jekyll/issues/815))
|
||||
- Fix SafeYAML Warnings ([#807](https://github.com/mojombo/jekyll/issues/807))
|
||||
- Relaxed Kramdown version to 0.14 ([#808](https://github.com/mojombo/jekyll/issues/808))
|
||||
- Aliased `jekyll server` to `jekyll serve`. ([#792](https://github.com/mojombo/jekyll/issues/792))
|
||||
- Updated gem versions for Kramdown, Rake, Shoulda, Cucumber, and RedCarpet. ([#744](https://github.com/mojombo/jekyll/issues/744))
|
||||
- Refactored jekyll subcommands into Jekyll::Commands submodule, which now contains them ([#768](https://github.com/mojombo/jekyll/issues/768))
|
||||
- Rescue from import errors in Wordpress.com migrator ([#671](https://github.com/mojombo/jekyll/issues/671))
|
||||
- Massively accelerate LSI performance ([#664](https://github.com/mojombo/jekyll/issues/664))
|
||||
- Truncate post slugs when importing from Tumblr ([#496](https://github.com/mojombo/jekyll/issues/496))
|
||||
- Add glob support to include, exclude option ([#743](https://github.com/mojombo/jekyll/issues/743))
|
||||
- Layout of Page or Post defaults to 'page' or 'post', respectively ([#580](https://github.com/mojombo/jekyll/issues/580))
|
||||
REPEALED by ([#977](https://github.com/mojombo/jekyll/issues/977))
|
||||
- "Keep files" feature ([#685](https://github.com/mojombo/jekyll/issues/685))
|
||||
- Output full path & name for files that don't parse ([#745](https://github.com/mojombo/jekyll/issues/745))
|
||||
- Add source and destination directory protection ([#535](https://github.com/mojombo/jekyll/issues/535))
|
||||
- Better YAML error message ([#718](https://github.com/mojombo/jekyll/issues/718))
|
||||
- Bug Fixes
|
||||
- Paginate in subdirectories properly ([#1016](https://github.com/mojombo/jekyll/issues/1016))
|
||||
- Ensure post and page URLs have a leading slash ([#992](https://github.com/mojombo/jekyll/issues/992))
|
||||
- Catch all exceptions, not just StandardError descendents ([#1007](https://github.com/mojombo/jekyll/issues/1007))
|
||||
- Bullet-proof limit_posts option ([#1004](https://github.com/mojombo/jekyll/issues/1004))
|
||||
- Read in YAML as UTF-8 to accept non-ASCII chars ([#836](https://github.com/mojombo/jekyll/issues/836))
|
||||
- Fix the CLI option --plugins to actually accept dirs and files ([#993](https://github.com/mojombo/jekyll/issues/993))
|
||||
- Allow 'excerpt' in YAML Front-Matter to override the extracted excerpt ([#946](https://github.com/mojombo/jekyll/issues/946))
|
||||
- Fix cascade problem with site.baseurl, site.port and site.host. ([#935](https://github.com/mojombo/jekyll/issues/935))
|
||||
- Filter out directories with valid post names ([#875](https://github.com/mojombo/jekyll/issues/875))
|
||||
- Fix symlinked static files not being correctly built in unsafe mode ([#909](https://github.com/mojombo/jekyll/issues/909))
|
||||
- Fix integration with directory_watcher 1.4.x ([#916](https://github.com/mojombo/jekyll/issues/916))
|
||||
- Accepting strings as arguments to jekyll-import command ([#910](https://github.com/mojombo/jekyll/issues/910))
|
||||
- Force usage of older directory_watcher gem as 1.5 is broken ([#883](https://github.com/mojombo/jekyll/issues/883))
|
||||
- Ensure all Post categories are downcase ([#842](https://github.com/mojombo/jekyll/issues/842), [#872](https://github.com/mojombo/jekyll/issues/872))
|
||||
- Force encoding of the rdiscount TOC to UTF8 to avoid conversion errors ([#555](https://github.com/mojombo/jekyll/issues/555))
|
||||
- Patch for multibyte URI problem with jekyll serve ([#723](https://github.com/mojombo/jekyll/issues/723))
|
||||
- Order plugin execution by priority ([#864](https://github.com/mojombo/jekyll/issues/864))
|
||||
- Fixed Page#dir and Page#url for edge cases ([#536](https://github.com/mojombo/jekyll/issues/536))
|
||||
- Fix broken post_url with posts with a time in their YAML Front-Matter ([#831](https://github.com/mojombo/jekyll/issues/831))
|
||||
- Look for plugins under the source directory ([#654](https://github.com/mojombo/jekyll/issues/654))
|
||||
- Tumblr Migrator: finds `_posts` dir correctly, fixes truncation of long
|
||||
post names ([#775](https://github.com/mojombo/jekyll/issues/775))
|
||||
- Force Categories to be Strings ([#767](https://github.com/mojombo/jekyll/issues/767))
|
||||
- Safe YAML plugin to prevent vulnerability ([#777](https://github.com/mojombo/jekyll/issues/777))
|
||||
- Add SVG support to Jekyll/WEBrick. ([#407](https://github.com/mojombo/jekyll/issues/407), [#406](https://github.com/mojombo/jekyll/issues/406))
|
||||
- Prevent custom destination from causing continuous regen on watch ([#528](https://github.com/mojombo/jekyll/issues/528), [#820](https://github.com/mojombo/jekyll/issues/820), [#862](https://github.com/mojombo/jekyll/issues/862))
|
||||
|
||||
### Site Enhancements
|
||||
- Responsify ([#860](https://github.com/mojombo/jekyll/issues/860))
|
||||
- Fix spelling, punctuation and phrasal errors ([#989](https://github.com/mojombo/jekyll/issues/989))
|
||||
- Update quickstart instructions with `new` command ([#966](https://github.com/mojombo/jekyll/issues/966))
|
||||
- Add docs for page.excerpt ([#956](https://github.com/mojombo/jekyll/issues/956))
|
||||
- Add docs for page.path ([#951](https://github.com/mojombo/jekyll/issues/951))
|
||||
- Clean up site docs to prepare for 1.0 release ([#918](https://github.com/mojombo/jekyll/issues/918))
|
||||
- Bring site into master branch with better preview/deploy ([#709](https://github.com/mojombo/jekyll/issues/709))
|
||||
- Redesigned site ([#583](https://github.com/mojombo/jekyll/issues/583))
|
||||
|
||||
### Development Fixes
|
||||
- Exclude Cucumber 1.2.4, which causes tests to fail in 1.9.2 ([#938](https://github.com/mojombo/jekyll/issues/938))
|
||||
- Added "features:html" rake task for debugging purposes, cleaned up
|
||||
cucumber profiles ([#832](https://github.com/mojombo/jekyll/issues/832))
|
||||
- Explicitly require HTTPS rubygems source in Gemfile ([#826](https://github.com/mojombo/jekyll/issues/826))
|
||||
- Changed Ruby version for development to 1.9.3-p374 from p362 ([#801](https://github.com/mojombo/jekyll/issues/801))
|
||||
- Including a link to the GitHub Ruby style guide in CONTRIBUTING.md ([#806](https://github.com/mojombo/jekyll/issues/806))
|
||||
- Added script/bootstrap ([#776](https://github.com/mojombo/jekyll/issues/776))
|
||||
- Running Simplecov under 2 conditions: ENV(COVERAGE)=true and with Ruby version
|
||||
of greater than 1.9 ([#771](https://github.com/mojombo/jekyll/issues/771))
|
||||
- Switch to Simplecov for coverage report ([#765](https://github.com/mojombo/jekyll/issues/765))
|
||||
|
||||
## 0.12.1 / 2013-02-19
|
||||
### Minor Enhancements
|
||||
- Update Kramdown version to 0.14.1 ([#744](https://github.com/mojombo/jekyll/issues/744))
|
||||
- Test Enhancements
|
||||
- Update Rake version to 10.0.3 ([#744](https://github.com/mojombo/jekyll/issues/744))
|
||||
- Update Shoulda version to 3.3.2 ([#744](https://github.com/mojombo/jekyll/issues/744))
|
||||
- Update Redcarpet version to 2.2.2 ([#744](https://github.com/mojombo/jekyll/issues/744))
|
||||
|
||||
## 0.12.0 / 2012-12-22
|
||||
### Minor Enhancements
|
||||
- Add ability to explicitly specify included files ([#261](https://github.com/mojombo/jekyll/issues/261))
|
||||
- Add --default-mimetype option ([#279](https://github.com/mojombo/jekyll/issues/279))
|
||||
- Allow setting of RedCloth options ([#284](https://github.com/mojombo/jekyll/issues/284))
|
||||
- Add post_url Liquid tag for internal post linking ([#369](https://github.com/mojombo/jekyll/issues/369))
|
||||
- Allow multiple plugin dirs to be specified ([#438](https://github.com/mojombo/jekyll/issues/438))
|
||||
- Inline TOC token support for RDiscount ([#333](https://github.com/mojombo/jekyll/issues/333))
|
||||
- Add the option to specify the paginated url format ([#342](https://github.com/mojombo/jekyll/issues/342))
|
||||
- Swap out albino for pygments.rb ([#569](https://github.com/mojombo/jekyll/issues/569))
|
||||
- Support Redcarpet 2 and fenced code blocks ([#619](https://github.com/mojombo/jekyll/issues/619))
|
||||
- Better reporting of Liquid errors ([#624](https://github.com/mojombo/jekyll/issues/624))
|
||||
- Bug Fixes
|
||||
- Allow some special characters in highlight names
|
||||
- URL escape category names in URL generation ([#360](https://github.com/mojombo/jekyll/issues/360))
|
||||
- Fix error with limit_posts ([#442](https://github.com/mojombo/jekyll/issues/442))
|
||||
- Properly select dotfile during directory scan ([#363](https://github.com/mojombo/jekyll/issues/363), [#431](https://github.com/mojombo/jekyll/issues/431), [#377](https://github.com/mojombo/jekyll/issues/377))
|
||||
- Allow setting of Kramdown smart_quotes ([#482](https://github.com/mojombo/jekyll/issues/482))
|
||||
- Ensure front-matter is at start of file ([#562](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/409))
|
||||
- Update dependencies
|
||||
|
||||
## 0.11.0 / 2011-07-10
|
||||
### Major Enhancements
|
||||
- Add command line importer functionality ([#253](https://github.com/mojombo/jekyll/issues/253))
|
||||
- Add Redcarpet Markdown support ([#318](https://github.com/mojombo/jekyll/issues/318))
|
||||
- Make markdown/textile extensions configurable ([#312](https://github.com/mojombo/jekyll/issues/312))
|
||||
- Add `markdownify` filter
|
||||
|
||||
### Minor Enhancements
|
||||
- Switch to Albino gem
|
||||
- Bundler support
|
||||
- Use English library to avoid hoops ([#292](https://github.com/mojombo/jekyll/issues/292))
|
||||
- Add Posterous importer ([#254](https://github.com/mojombo/jekyll/issues/254))
|
||||
- Fixes for Wordpress importer ([#274](https://github.com/mojombo/jekyll/issues/274), [#252](https://github.com/mojombo/jekyll/issues/252), [#271](https://github.com/mojombo/jekyll/issues/271))
|
||||
- Better error message for invalid post date ([#291](https://github.com/mojombo/jekyll/issues/291))
|
||||
- Print formatted fatal exceptions to stdout on build failure
|
||||
- Add Tumblr importer ([#323](https://github.com/mojombo/jekyll/issues/323))
|
||||
- Add Enki importer ([#320](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/245))
|
||||
- Complain about YAML and Liquid errors ([#249](https://github.com/mojombo/jekyll/issues/249))
|
||||
- Remove orphaned files during regeneration ([#247](https://github.com/mojombo/jekyll/issues/247))
|
||||
- Add Marley migrator ([#28](https://github.com/mojombo/jekyll/issues/28))
|
||||
|
||||
## 0.8.0 / 2010-11-22
|
||||
### Minor Enhancements
|
||||
- Add wordpress.com importer ([#207](https://github.com/mojombo/jekyll/issues/207))
|
||||
- Add --limit-posts cli option ([#212](https://github.com/mojombo/jekyll/issues/212))
|
||||
- Add uri_escape filter ([#234](https://github.com/mojombo/jekyll/issues/234))
|
||||
- Add --base-url cli option ([#235](https://github.com/mojombo/jekyll/issues/235))
|
||||
- Improve MT migrator ([#238](https://github.com/mojombo/jekyll/issues/238))
|
||||
- Add kramdown support ([#239](https://github.com/mojombo/jekyll/issues/239))
|
||||
- Bug Fixes
|
||||
- Fixed filename basename generation ([#208](https://github.com/mojombo/jekyll/issues/208))
|
||||
- Set mode to UTF8 on Sequel connections ([#237](https://github.com/mojombo/jekyll/issues/237))
|
||||
- Prevent `_includes` dir from being a symlink
|
||||
|
||||
## 0.7.0 / 2010-08-24
|
||||
### Minor Enhancements
|
||||
- Add support for rdiscount extensions ([#173](https://github.com/mojombo/jekyll/issues/173))
|
||||
- Bug Fixes
|
||||
- Highlight should not be able to render local files
|
||||
- The site configuration may not always provide a 'time' setting ([#184](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/183))
|
||||
- Expand source, destination, and plugin paths ([#180](https://github.com/mojombo/jekyll/issues/180))
|
||||
- Fix page.url to include full relative path ([#181](https://github.com/mojombo/jekyll/issues/181))
|
||||
|
||||
## 0.6.1 / 2010-06-24
|
||||
- Bug Fixes
|
||||
- Fix Markdown Pygments prefix and suffix ([#178](https://github.com/mojombo/jekyll/issues/178))
|
||||
|
||||
## 0.6.0 / 2010-06-23
|
||||
### Major Enhancements
|
||||
- Proper plugin system ([#19](https://github.com/mojombo/jekyll/issues/19), [#100](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/57))
|
||||
|
||||
### Minor Enhancements
|
||||
- Inclusion/exclusion of future dated posts ([#59](https://github.com/mojombo/jekyll/issues/59))
|
||||
- Generation for a specific time ([#59](https://github.com/mojombo/jekyll/issues/59))
|
||||
- Allocate site.time on render not per site_payload invocation ([#59](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/142))
|
||||
- Allow arbitrary options to Pygments ([#31](https://github.com/mojombo/jekyll/issues/31))
|
||||
- Allow URL to be set via command line option ([#147](https://github.com/mojombo/jekyll/issues/147))
|
||||
- Bug Fixes
|
||||
- Render highlighted code for non markdown/textile pages ([#116](https://github.com/mojombo/jekyll/issues/116))
|
||||
- Fix highlighting on Ruby 1.9 ([#65](https://github.com/mojombo/jekyll/issues/65))
|
||||
- Fix extension munging when pretty permalinks are enabled ([#64](https://github.com/mojombo/jekyll/issues/64))
|
||||
- Stop sorting categories ([#33](https://github.com/mojombo/jekyll/issues/33))
|
||||
- Preserve generated attributes over front matter ([#119](https://github.com/mojombo/jekyll/issues/119))
|
||||
- Fix source directory binding using Dir.pwd ([#75](https://github.com/mojombo/jekyll/issues/75))
|
||||
|
||||
## 0.5.7 / 2010-01-12
|
||||
### Minor Enhancements
|
||||
- Allow overriding of post date in the front matter ([#62](https://github.com/mojombo/jekyll/issues/62), [#38](https://github.com/mojombo/jekyll/issues/38))
|
||||
- Bug Fixes
|
||||
- Categories isn't always an array ([#73](https://github.com/mojombo/jekyll/issues/73))
|
||||
- Empty tags causes error in read_posts ([#84](https://github.com/mojombo/jekyll/issues/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](https://github.com/mojombo/jekyll/issues/92))
|
||||
- Don't break on triple dashes in yaml frontmatter ([#93](https://github.com/mojombo/jekyll/issues/93))
|
||||
|
||||
### Minor Enhancements
|
||||
- Allow .mkd as markdown extension
|
||||
- Use $stdout/err instead of constants ([#99](https://github.com/mojombo/jekyll/issues/99))
|
||||
- Properly wrap code blocks ([#91](https://github.com/mojombo/jekyll/issues/91))
|
||||
- Add javascript mime type for webrick ([#98](https://github.com/mojombo/jekyll/issues/98))
|
||||
|
||||
## 0.5.5 / 2010-01-08
|
||||
- Bug Fixes
|
||||
- Fix pagination % 0 bug ([#78](https://github.com/mojombo/jekyll/issues/78))
|
||||
- Ensure all posts are processed first ([#71](https://github.com/mojombo/jekyll/issues/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
|
||||
([@jeffrydegrande](https://github.com/jeffrydegrande))
|
||||
|
||||
## 0.5.2 / 2009-06-24
|
||||
- Enhancements
|
||||
- Added --paginate option to the executable along with a paginator object
|
||||
for the payload ([@calavera](https://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 ([@vilcans](https://github.com/vilcans))
|
||||
- Posts can now have an empty YAML front matter or none at all
|
||||
([@bahuvrihi](https://github.com/bahuvrihi))
|
||||
- Bug Fixes
|
||||
- Fixing Ruby 1.9 issue that requires to_s on the err object
|
||||
([@Chrononaut](https://github.com/Chrononaut))
|
||||
- Fixes for pagination and ordering posts on the same day ([@ujh](https://github.com/ujh))
|
||||
- Made pages respect permalinks style and permalinks in yml front matter
|
||||
([@eugenebolshakov](https://github.com/eugenebolshakov))
|
||||
- Index.html file should always have index.html permalink
|
||||
([@eugenebolshakov](https://github.com/eugenebolshakov))
|
||||
- Added trailing slash to pretty permalink style so Apache is happy
|
||||
([@eugenebolshakov](https://github.com/eugenebolshakov))
|
||||
- Bad markdown processor in config fails sooner and with better message
|
||||
([@gcnovus](https://github.com/gcnovus))
|
||||
- Allow CRLFs in yaml frontmatter ([@juretta](https://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 ([@pantulis](https://github.com/pantulis), [@tomo](https://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 ([@duritong](https://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 ([@henrik](https://github.com/henrik))
|
||||
- Worked around RDiscount bug that prevents Markdown from getting parsed
|
||||
after highlight ([@henrik](https://github.com/henrik))
|
||||
- CGI escaped post titles ([@Chrononaut](https://github.com/Chrononaut))
|
||||
|
||||
## 0.5.0 / 2009-04-07
|
||||
### Minor Enhancements
|
||||
- Ability to set post categories via YAML ([@qrush](https://github.com/qrush))
|
||||
- Ability to set prevent a post from publishing via YAML ([@qrush](https://github.com/qrush))
|
||||
- Add textilize filter ([@willcodeforfoo](https://github.com/willcodeforfoo))
|
||||
- Add 'pretty' permalink style for wordpress-like urls ([@dysinger](https://github.com/dysinger))
|
||||
- Made it possible to enter categories from YAML as an array ([@Chrononaut](https://github.com/Chrononaut))
|
||||
- Ignore Emacs autosave files ([@Chrononaut](https://github.com/Chrononaut))
|
||||
- Bug Fixes
|
||||
- Use block syntax of popen4 to ensure that subprocesses are properly disposed ([@jqr](https://github.com/jqr))
|
||||
- Close open4 streams to prevent zombies ([@rtomayko](https://github.com/rtomayko))
|
||||
- Only query required fields from the WP Database ([@ariejan](https://github.com/ariejan))
|
||||
- Prevent `_posts` from being copied to the destination directory ([@bdimcheff](https://github.com/bdimcheff))
|
||||
- Refactors
|
||||
- Factored the filtering code into a method ([@Chrononaut](https://github.com/Chrononaut))
|
||||
- Fix tests and convert to Shoulda ([@qrush](https://github.com/qrush), [@technicalpickles](https://github.com/technicalpickles))
|
||||
- Add Cucumber acceptance test suite ([@qrush](https://github.com/qrush), [@technicalpickles](https://github.com/technicalpickles))
|
||||
|
||||
## 0.4.1
|
||||
### Minor Enhancements
|
||||
- Changed date format on wordpress converter (zeropadding) ([@dysinger](https://github.com/dysinger))
|
||||
- Bug Fixes
|
||||
- Add jekyll binary as executable to gemspec ([@dysinger](https://github.com/dysinger))
|
||||
|
||||
## 0.4.0 / 2009-02-03
|
||||
### Major Enhancements
|
||||
- Switch to Jeweler for packaging tasks
|
||||
|
||||
### Minor Enhancements
|
||||
- Type importer ([@codeslinger](https://github.com/codeslinger))
|
||||
- site.topics accessor ([@baz](https://github.com/baz))
|
||||
- Add `array_to_sentence_string` filter ([@mchung](https://github.com/mchung))
|
||||
- Add a converter for textpattern ([@PerfectlyNormal](https://github.com/PerfectlyNormal))
|
||||
- Add a working Mephisto / MySQL converter ([@ivey](https://github.com/ivey))
|
||||
- Allowing .htaccess files to be copied over into the generated site ([@briandoll](https://github.com/briandoll))
|
||||
- Add option to not put file date in permalink URL ([@mreid](https://github.com/mreid))
|
||||
- Add line number capabilities to highlight blocks ([@jcon](https://github.com/jcon))
|
||||
- Bug Fixes
|
||||
- Fix permalink behavior ([@cavalle](https://github.com/cavalle))
|
||||
- Fixed an issue with pygments, markdown, and newlines ([@zpinter](https://github.com/zpinter))
|
||||
- Ampersands need to be escaped ([@pufuwozu](https://github.com/pufuwozu), [@ap](https://github.com/ap))
|
||||
- Test and fix the site.categories hash ([@zzot](https://github.com/zzot))
|
||||
- Fix site payload available to files ([@matrix9180](https://github.com/matrix9180))
|
||||
|
||||
## 0.3.0 / 2008-12-24
|
||||
### Major Enhancements
|
||||
- Added --server option to start a simple WEBrick server on destination
|
||||
directory ([@johnreilly](https://github.com/johnreilly) and [@mchung](https://github.com/mchung))
|
||||
|
||||
### Minor Enhancements
|
||||
- Added post categories based on directories containing `_posts` ([@mreid](https://github.com/mreid))
|
||||
- Added post topics based on directories underneath `_posts`
|
||||
- Added new date filter that shows the full month name ([@mreid](https://github.com/mreid))
|
||||
- Merge Post's YAML front matter into its to_liquid payload ([@remi](https://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 ([@mreid](https://github.com/mreid))
|
||||
- Fix bug that meant page data (such as the date) was not available in
|
||||
templates ([@mreid](https://github.com/mreid))
|
||||
- Properly reject directories in `_layouts`
|
||||
|
||||
## 0.2.1 / 2008-12-15
|
||||
- Major Changes
|
||||
- Use Maruku (pure Ruby) for Markdown by default ([@mreid](https://github.com/mreid))
|
||||
- Allow use of RDiscount with --rdiscount flag
|
||||
|
||||
### Minor Enhancements
|
||||
- Don't load directory_watcher unless it's needed ([@pjhyett](https://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 {% raw %}`{% include x.textile %}`{% endraw %}
|
||||
|
||||
## 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 ([@JackDanger](https://github.com/JackDanger))
|
||||
- Bug Fixes
|
||||
- Prevent Jekyll from picking up the output directory as a source ([@JackDanger](https://github.com/JackDanger))
|
||||
- Skip `related_posts` when there is only one post ([@JackDanger](https://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 ([@vanpelt](https://github.com/vanpelt))
|
||||
- Mephisto and CSV converters ([@vanpelt](https://github.com/vanpelt))
|
||||
- Code hilighting ([@vanpelt](https://github.com/vanpelt))
|
||||
- Autobuild
|
||||
- Bug Fixes
|
||||
- Accept both \r\n and \n in YAML header ([@vanpelt](https://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. {% raw %}`{{ page.url }}`{% endraw %}
|
||||
|
||||
## 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!
|
|
@ -1,11 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="refresh" content="0;url=home">
|
||||
<title>Jekyll</title>
|
||||
</head>
|
||||
<body style="background: #333;">
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,43 +1,29 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Welcome
|
||||
next_section: installation
|
||||
next_section: quickstart
|
||||
permalink: /docs/home/
|
||||
---
|
||||
|
||||
This site aims to be a comprehensive guide to Jekyll. We’ll cover everything
|
||||
from getting your site up and running, creating and managing your content,
|
||||
This site aims to be a comprehensive guide to Jekyll. We’ll cover topics such
|
||||
as getting your site up and running, creating and managing your content,
|
||||
customizing the way your site works and looks, deploying to various
|
||||
environments, as well as some advice on participating in the future development
|
||||
of Jekyll itself.
|
||||
environments, and give you some advice on participating in the future
|
||||
development of Jekyll itself.
|
||||
|
||||
## So what is Jekyll, exactly?
|
||||
|
||||
Jekyll is a simple, blog-aware, static site generator. It takes a template
|
||||
directory containing raw text files in various formats, runs it through
|
||||
[Markdown](http://daringfireball.net/projects/markdown/) (or
|
||||
[Textile](http://textile.sitemonks.com/)) and [Liquid](http://liquidmarkup.org/)
|
||||
[Textile](http://textile.sitemonks.com/)) and
|
||||
[Liquid](http://wiki.shopify.com/Liquid)
|
||||
converters, and spits out a complete, ready-to-publish static website suitable
|
||||
for serving with your favorite web server. Jekyll also happens to be the engine
|
||||
behind [GitHub Pages](http://pages.github.com), which means you can use Jekyll
|
||||
to host your project’s page, blog, or website from GitHub’s servers **for
|
||||
free**.
|
||||
|
||||
## Quick-start guide
|
||||
|
||||
For the impatient, here's how to get a boilerplate Jekyll site up and running.
|
||||
|
||||
{% highlight bash %}
|
||||
~ $ gem install jekyll
|
||||
~ $ jekyll new myblog
|
||||
~ $ cd myblog
|
||||
~/myblog $ jekyll serve
|
||||
# => Now browse to http://localhost:4000
|
||||
{% endhighlight %}
|
||||
|
||||
That's nothing, though. The real magic happens when you start creating blog
|
||||
posts, using the front-matter to control templates and layouts, and taking
|
||||
advantage of all the awesome configuration options Jekyll makes available.
|
||||
|
||||
## ProTips™, Notes, and Warnings
|
||||
|
||||
Throughout this guide there are a number of small-but-handy pieces of
|
|
@ -1,14 +1,15 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Installation
|
||||
prev_section: home
|
||||
prev_section: quickstart
|
||||
next_section: usage
|
||||
permalink: /docs/installation/
|
||||
---
|
||||
|
||||
Getting Jekyll installed and ready-to-go should only take a few minutes. If it
|
||||
ever becomes a pain in the ass, please [file an
|
||||
issue](https://github.com/mojombo/jekyll/issues/new) (or submit a pull request)
|
||||
describing the issue you encountered, and how we might make the process easier.
|
||||
describing the issue you encountered and how we might make the process easier.
|
||||
|
||||
### Requirements
|
||||
|
||||
|
@ -39,27 +40,26 @@ simply run the following command to install Jekyll:
|
|||
$ gem install jekyll
|
||||
{% endhighlight %}
|
||||
|
||||
All Jekyll’s gem dependencies are automatically installed by the above command,
|
||||
so you won’t have to worry about them at all. If you have problems installing
|
||||
Jekyll, check out the [troubleshooting](../troubleshooting) page or [report an
|
||||
issue](https://github.com/mojombo/jekyll/issues/new) so the Jekyll community can
|
||||
improve the experience for everyone.
|
||||
All of Jekyll’s gem dependencies are automatically installed by the above
|
||||
command, so you won’t have to worry about them at all. If you have problems
|
||||
installing Jekyll, check out the [troubleshooting](../troubleshooting) page or
|
||||
[report an issue](https://github.com/mojombo/jekyll/issues/new) so the Jekyll
|
||||
community can improve the experience for everyone.
|
||||
|
||||
## Optional Extras
|
||||
|
||||
There are a number of (optional) extra features that Jekyll supports that you
|
||||
may want to install, depending on how you plan to use Jekyll. These extras
|
||||
include syntax highlighting of code snippets using
|
||||
[Pygments](http://pygments.org/), LaTeX support, and the use of alternative
|
||||
content rendering engines. Check out [the extras page](../extras) for more
|
||||
information.
|
||||
include LaTeX support, and the use of alternative content rendering engines.
|
||||
Check out [the extras page](../extras) for more information.
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTip™: Enable Syntax Highlighting</h5>
|
||||
<p>
|
||||
If you’re the kind of person who is using Jekyll, then chances are you’ll
|
||||
want to enable syntax highlighting using Pygments. You should really
|
||||
<a href="../extras">check out how to do that</a> before you go any further.
|
||||
<a href="../templates/#code_snippet_highlighting">check out how to do
|
||||
that</a> before you go any further.
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,245 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Blog migrations
|
||||
prev_section: variables
|
||||
next_section: templates
|
||||
permalink: /docs/migrations/
|
||||
---
|
||||
|
||||
If you’re switching to Jekyll from another blogging system, Jekyll’s importers
|
||||
can help you with the move. Most methods listed on this page require read access
|
||||
to the database from your old system to generate posts for Jekyll. Each method
|
||||
generates `.markdown` posts in the `_posts` directory based on the entries in
|
||||
the foreign system.
|
||||
|
||||
## Preparing for migrations
|
||||
|
||||
Because the importers have many of their own dependencies, they are made
|
||||
available via a separate gem called
|
||||
[`jekyll-import`](https://github.com/jekyll/jekyll-import). To use them, all
|
||||
you need to do is install the gem, and they will become available as part of
|
||||
Jekyll's standard command line interface.
|
||||
|
||||
{% highlight bash %}
|
||||
$ gem install jekyll-import --pre
|
||||
{% endhighlight %}
|
||||
|
||||
You should now be all set to run the importers below. If you ever get stuck, you
|
||||
can see help for each importer:
|
||||
|
||||
{% highlight bash %}
|
||||
$ jekyll help import # => See list of importers
|
||||
$ jekyll help import IMPORTER # => See importer specific help
|
||||
{% endhighlight %}
|
||||
|
||||
Where IMPORTER is the name of the specific importer.
|
||||
|
||||
<div class="note info">
|
||||
<h5>Note: Always double-check migrated content</h5>
|
||||
<p>
|
||||
|
||||
Importers may not distinguish between published or private posts, so
|
||||
you should always check that the content Jekyll generates for you appears as
|
||||
you intended.
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- TODO all these need to be fixed -->
|
||||
|
||||
## WordPress
|
||||
|
||||
### Wordpress export files
|
||||
|
||||
If hpricot is not already installed, you will need to run `gem install hpricot`.
|
||||
Next, export your blog using the Wordpress export utility. Assuming that the
|
||||
exported file is saved as `wordpress.xml`, here is the command you need to run:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpressdotcom";
|
||||
JekyllImport::WordpressDotCom.process({ :source => "wordpress.xml" })'
|
||||
{% endhighlight %}
|
||||
|
||||
<div class="note">
|
||||
<h5>ProTip™: Wordpress.com Export Tool</h5>
|
||||
<p markdown="1">If you are migrating from a Wordpress.com account, you can access the export tool at the following URL: `https://YOUR-USER-NAME.wordpress.com/wp-admin/export.php`.</p>
|
||||
</div>
|
||||
|
||||
### Using Wordpress MySQL server connection
|
||||
|
||||
If you want to import using a direct connection to the Wordpress MySQL server, here's how:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
||||
JekyllImport::WordPress.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
If you are using Webfaction and have to set up an [SSH
|
||||
tunnel](http://docs.webfaction.com/user-guide/databases.html?highlight=mysql#starting-an-ssh-tunnel-with-ssh),
|
||||
be sure to make the hostname (`127.0.0.1`) explicit, otherwise MySQL may block
|
||||
your access based on `localhost` and `127.0.0.1` not being equivalent in its
|
||||
authentication system:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/wordpress";
|
||||
JekyllImport::WordPress.process("database", "user", "pass", "127.0.0.1")'
|
||||
{% endhighlight %}
|
||||
|
||||
### Further Wordpress migration alternatives
|
||||
|
||||
While the above methods work, they do not import much of the metadata that is
|
||||
usually stored in Wordpress posts and pages. If you need to export things like
|
||||
pages, tags, custom fields, image attachments and so on, the following resources
|
||||
might be useful to you:
|
||||
|
||||
- [Exitwp](https://github.com/thomasf/exitwp) is a configurable tool written in
|
||||
Python for migrating one or more Wordpress blogs into Jekyll (Markdown) format
|
||||
while keeping as much metadata as possible. Exitwp also downloads attachments
|
||||
and pages.
|
||||
- [A great
|
||||
article](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/) with a
|
||||
step-by-step guide for migrating a Wordpress blog to Jekyll while keeping most
|
||||
of the structure and metadata.
|
||||
- [wpXml2Jekyll](https://github.com/theaob/wpXml2Jekyll) is an executable
|
||||
windows application for creating Markdown posts from your Wordpress XML file.
|
||||
|
||||
## Drupal
|
||||
|
||||
If you’re migrating from [Drupal](http://drupal.org), there are two migrators
|
||||
for you, depending upon your Drupal version:
|
||||
- [Drupal 6](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal6.rb)
|
||||
- [Drupal 7](https://github.com/jekyll/jekyll-import/blob/v0.1.0.beta1/lib/jekyll/jekyll-import/drupal7.rb)
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
||||
JekyllImport::Drupal6.process("dbname", "user", "pass")'
|
||||
# ... or ...
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
||||
JekyllImport::Drupal7.process("dbname", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
If you are connecting to a different host or need to specify a table prefix for
|
||||
your database, you may optionally add those two parameters to the end of either
|
||||
Drupal migrator execution:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal6";
|
||||
JekyllImport::Drupal6.process("dbname", "user", "pass", "host", "table_prefix")'
|
||||
# ... or ...
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/drupal7";
|
||||
JekyllImport::Drupal7.process("dbname", "user", "pass", "host", "table_prefix")'
|
||||
{% endhighlight %}
|
||||
|
||||
## Movable Type
|
||||
|
||||
To import posts from Movable Type:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mt";
|
||||
JekyllImport::MT.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
## Typo
|
||||
|
||||
To import posts from Typo:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/typo";
|
||||
JekyllImport::Typo.process("database", "user", "pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
This code has only been tested with Typo version 4+.
|
||||
|
||||
## TextPattern
|
||||
|
||||
To import posts from TextPattern:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/textpattern";
|
||||
JekyllImport::TextPattern.process("database_name", "username", "password", "hostname")'
|
||||
{% endhighlight %}
|
||||
|
||||
You will need to run the above from the parent directory of your `_import`
|
||||
folder. For example, if `_import` is located in `/path/source/_import`, you will
|
||||
need to run this code from `/path/source`. The hostname defaults to `localhost`,
|
||||
all other variables are required. You may need to adjust the code used to filter
|
||||
entries. Left alone, it will attempt to pull all entries that are live or
|
||||
sticky.
|
||||
|
||||
## Mephisto
|
||||
|
||||
To import posts from Mephisto:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
||||
JekyllImport::Mephisto.process("database", "user", "password")'
|
||||
{% endhighlight %}
|
||||
|
||||
If your data is in Postgres, you should do this instead:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/mephisto";
|
||||
JekyllImport::Mephisto.postgres({:database => "database", :username=>"username", :password =>"password"})'
|
||||
{% endhighlight %}
|
||||
|
||||
## Blogger (Blogspot)
|
||||
|
||||
To import posts from Blogger, see [this post about migrating from Blogger to
|
||||
Jekyll](http://blog.coolaj86.com/articles/migrate-from-blogger-to-jekyll.html). If
|
||||
that doesn’t work for you, you might want to try some of the following
|
||||
alternatives:
|
||||
|
||||
- [@kennym](https://github.com/kennym) created a [little migration
|
||||
script](https://gist.github.com/1115810), because the solutions in the
|
||||
previous article didn't work out for him.
|
||||
- [@ngauthier](https://github.com/ngauthier) created [another
|
||||
importer](https://gist.github.com/1506614) that imports comments, and does so
|
||||
via blogger’s archive instead of the RSS feed.
|
||||
- [@juniorz](https://github.com/juniorz) created [yet another
|
||||
importer](https://gist.github.com/1564581) that works for
|
||||
[Octopress](http://octopress.org). It is like [@ngauthier’s
|
||||
version](https://gist.github.com/1506614) but separates drafts from posts, as
|
||||
well as importing tags and permalinks.
|
||||
|
||||
## Posterous
|
||||
|
||||
To import posts from your primary Posterous blog:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
||||
JekyllImport::Posterous.process("my_email", "my_pass")'
|
||||
{% endhighlight %}
|
||||
|
||||
For any other Posterous blog on your account, you will need to specify the
|
||||
`blog_id` for the blog:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/posterous";
|
||||
JekyllImport::Posterous.process("my_email", "my_pass", "blog_id")'
|
||||
{% endhighlight %}
|
||||
|
||||
There is also an [alternative Posterous
|
||||
migrator](https://github.com/pepijndevos/jekyll/blob/patch-1/lib/jekyll/migrators/posterous.rb)
|
||||
that maintains permalinks and attempts to import images too.
|
||||
|
||||
## Tumblr
|
||||
|
||||
To import posts from Tumblr:
|
||||
|
||||
{% highlight bash %}
|
||||
$ ruby -rubygems -e 'require "jekyll/jekyll-import/tumblr";
|
||||
JekyllImport::Tumblr.process(url, format, grab_images, add_highlights, rewrite_urls)'
|
||||
# url - String: your blog's URL
|
||||
# format - String: the output file extension. Use "md" to have your content
|
||||
# converted from HTML to Markdown. Defaults to "html".
|
||||
# grab_images - Boolean: whether to download images as well. Defaults to false.
|
||||
# add_highlights - Boolean: whether to wrap code blocks (indented 4 spaces) in a Liquid
|
||||
"highlight" tag. Defaults to false.
|
||||
# rewrite_urls - Boolean: whether to write pages that redirect from the old Tumblr paths
|
||||
to the new Jekyll paths. Defaults to false.
|
||||
{% endhighlight %}
|
||||
|
||||
## Other Systems
|
||||
|
||||
If you have a system for which there is currently no migrator, consider writing
|
||||
one and sending us [a pull request](https://github.com/jekyll/jekyll-import).
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Creating pages
|
||||
prev_section: posts
|
||||
next_section: variables
|
||||
permalink: /docs/pages/
|
||||
---
|
||||
|
||||
In addition to [writing posts](../posts), another thing you may want to do with
|
||||
|
@ -35,8 +36,8 @@ There are two main ways of creating pages:
|
|||
- Create a folder in the site's root for each page, and place an index.html file
|
||||
in each page folder.
|
||||
|
||||
Both methods work fine (and can be used in conjunction with each other), with the
|
||||
only real difference being the resulting URLs.
|
||||
Both methods work fine (and can be used in conjunction with each other),
|
||||
with the only real difference being the resulting URLs.
|
||||
|
||||
### Named HTML files
|
||||
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Pagination
|
||||
prev_section: permalinks
|
||||
next_section: plugins
|
||||
permalink: /docs/pagination/
|
||||
---
|
||||
|
||||
With many websites—especially blogs—it’s very common to break the main listing
|
||||
|
@ -31,11 +32,24 @@ paginate: 5
|
|||
The number should be the maximum number of Posts you’d like to be displayed per-
|
||||
page in the generated site.
|
||||
|
||||
You may also specify where the destination of the pagination pages:
|
||||
|
||||
{% highlight yaml %}
|
||||
paginate_path: "blog/page:num"
|
||||
{% endhighlight %}
|
||||
|
||||
This will read in `blog/index.html`, send it each pagination page in Liquid as `paginator`
|
||||
and write the output to `blog/page:num`, where `:num` is the pagination page number,
|
||||
starting with `2`. If a site has 12 posts and specifies `paginate: 5`, Jekyll will write
|
||||
`blog/index.html` with the first 5 posts, `blog/page2/index.html` with the next 5 posts
|
||||
and `blog/page3/index.html` with the last 2 posts into the destination directory.
|
||||
|
||||
## Liquid Attributes Available
|
||||
|
||||
The pagination plugin exposes the `paginator` liquid object with the following
|
||||
attributes:
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -102,10 +116,14 @@ attributes:
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="note info">
|
||||
<h5>Pagination does not support tags or categories</h5>
|
||||
<p>Pagination pages through every post in the <code>posts</code> variable regardless of variables defined in the YAML Front Matter of each. It does not currently allow paging over groups of posts linked by a common tag or category.</p>
|
||||
<p>Pagination pages through every post in the <code>posts</code>
|
||||
variable regardless of variables defined in the YAML Front Matter of
|
||||
each. It does not currently allow paging over groups of posts linked
|
||||
by a common tag or category.</p>
|
||||
</div>
|
||||
|
||||
## Render the paginated Posts
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Permalinks
|
||||
prev_section: templates
|
||||
next_section: pagination
|
||||
permalink: /docs/permalinks/
|
||||
---
|
||||
|
||||
Jekyll supports a flexible way to build your site’s URLs. You can specify the
|
||||
|
@ -17,6 +18,7 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
|
|||
|
||||
## Template variables
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -87,9 +89,11 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
## Built-in permalink styles
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -124,11 +128,13 @@ permalink is defined as `/:categories/:year/:month/:day/:title.html`.
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
## Permalink style examples
|
||||
|
||||
Given a post named: `/2009-04-29-slap-chop.textile`
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -171,3 +177,4 @@ Given a post named: `/2009-04-29-slap-chop.textile`
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Plugins
|
||||
prev_section: assets
|
||||
next_section: extras
|
||||
permalink: /docs/plugins/
|
||||
---
|
||||
|
||||
Jekyll has a plugin system with hooks that allow you to create custom generated
|
||||
|
@ -80,6 +81,7 @@ using the `category_index.html` layout.
|
|||
|
||||
Generators are only required to implement one method:
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -98,6 +100,7 @@ Generators are only required to implement one method:
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
## Converters
|
||||
|
||||
|
@ -139,6 +142,7 @@ end
|
|||
|
||||
Converters should implement at a minimum 3 methods:
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -178,6 +182,7 @@ Converters should implement at a minimum 3 methods:
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
In our example, `UpcaseConverter#matches` checks if our filename extension is
|
||||
`.upcase`, and will render using the converter if it is. It will call
|
||||
|
@ -212,6 +217,7 @@ Liquid::Template.register_tag('render_time', Jekyll::RenderTimeTag)
|
|||
|
||||
At a minimum, liquid tags must implement:
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -230,6 +236,7 @@ At a minimum, liquid tags must implement:
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
You must also register the custom tag with the Liquid template engine as
|
||||
follows:
|
||||
|
@ -286,6 +293,7 @@ Liquid::Template.register_filter(Jekyll::AssetFilter)
|
|||
|
||||
There are two flags to be aware of when writing a plugin:
|
||||
|
||||
<div class="mobile-side-scroller">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -325,6 +333,7 @@ There are two flags to be aware of when writing a plugin:
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
To use one of the example plugins above as an illustration, here is how you’d
|
||||
specify these two flags:
|
||||
|
@ -344,13 +353,12 @@ end
|
|||
There are a few useful, prebuilt plugins at the following locations:
|
||||
|
||||
- [Truncate HTML while preserving markup structure](https://github.com/MattHall/truncatehtml) by [Matt Hall](http://codebeef.com)
|
||||
- [Generic Blog Plugins by Jose Diaz-Gonzalez](https://github.com/josegonzalez/josediazgonzalez.com/tree/master/_plugins): Contains plugins for tags, categories, archives, as well as a few Liquid extensions
|
||||
- [Domain Name Filter by Lawrence Woodman](https://github.com/LawrenceWoodman/domain_name-liquid_filter): Filters the input text so that just the domain name is left
|
||||
- [Jekyll Plugins by Recursive Design](http://recursive-design.com/projects/jekyll-plugins/): Plugin to generate Project pages from GitHub readmes, a Category page plugin, and a Sitemap generator
|
||||
- [Tag Cloud Plugin from a Jekyll walk-through](http://vitobotta.com/how-to-migrate-from-wordpress-to-jekyll/): Plugin to generate a tag cloud
|
||||
- [Pygments Cache Path by Raimonds Simanovskis](https://github.com/rsim/blog.rayapps.com/blob/master/_plugins/pygments_cache_patch.rb): Plugin to cache syntax-highlighted code from Pygments
|
||||
- [Delicious Plugin by Christian Hellsten](https://github.com/christianhellsten/jekyll-plugins): Fetches and renders bookmarks from delicious.com.
|
||||
- [Ultraviolet plugin by Steve Alex](https://gist.github.com/480380): Jekyll Plugin for Ultraviolet
|
||||
- [Jade plugin by John Papandriopoulos](https://github.com/snappylabs/jade-jekyll-plugin): Jade Converter plugin for Jekyll
|
||||
- [HAML plugin by Sam Z](https://gist.github.com/517556): HAML plugin for jekyll
|
||||
- [ArchiveGenerator by Ilkka Laukkanen](https://gist.github.com/707909): Uses [this archive page](https://gist.github.com/707020) to generate archives
|
||||
- [Tag Cloud Plugin by Ilkka Laukkanen](https://gist.github.com/710577): Jekyll tag cloud / tag pages plugin
|
||||
|
@ -374,18 +382,18 @@ There are a few useful, prebuilt plugins at the following locations:
|
|||
- [CoffeeScript converter by phaer](https://gist.github.com/959938): Put this file in `plugins` and write a YAML header to your .coffee files. See [http://coffeescript.org](http://coffeescript.org) for more info
|
||||
- [Raw Tag by phaer.](https://gist.github.com/1020852): Keeps liquid from parsing text betweeen `{{ "{% raw " }}%}` and `{{ "{% endraw " }}%}`
|
||||
- [URL encoding by James An](https://gist.github.com/919275)
|
||||
- [Sitemap.xml Generator by Michael Levin](http://www.kinnetica.com/projects/jekyll-sitemap-generator/)
|
||||
- [Markdown references by Olov Lassus](https://gist.github.com/961336): Keep all your markdown reference-style link definitions in one file (_references.md)
|
||||
- [Sitemap.xml Generator by Michael
|
||||
Levin](https://github.com/kinnetica/jekyll-plugins)
|
||||
- [Markdown references by Olov Lassus](https://github.com/olov/jekyll-references): Keep all your markdown reference-style link definitions in one file (_references.md)
|
||||
- [Full-text search by Pascal Widdershoven](https://github.com/PascalW/jekyll_indextank): Add full-text search to your Jekyll site with this plugin and a bit of JavaScript.
|
||||
- [Stylus Converter](https://gist.github.com/988201) Convert .styl to .css.
|
||||
- [Embed.ly client by Robert Böhnke](https://github.com/robb/jekyll-embedly-client) Autogenerate embeds from URLs using oEmbed.
|
||||
- [Logarithmic Tag Cloud](https://gist.github.com/2290195): Flexible. Logarithmic distribution. Usage eg: `{{ "{% tag_cloud font-size: 50 - 150%, threshold: 2 " }}%}`. Documentation inline.
|
||||
- [Logarithmic Tag Cloud](https://gist.github.com/2290195): Flexible. Logarithmic distribution. Documentation inline.
|
||||
- [Related Posts by Lawrence Woodman](https://github.com/LawrenceWoodman/related_posts-jekyll_plugin): Overrides `site.related_posts` to use categories to assess relationship
|
||||
- [AliasGenerator by Thomas Mango](https://github.com/tsmango/jekyll_alias_generator): Generates redirect pages for posts when an alias configuration is specified in the YAML Front Matter.
|
||||
- [FlickrSetTag by Thomas Mango](https://github.com/tsmango/jekyll_flickr_set_tag): Generates image galleries from Flickr sets.
|
||||
- [Projectlist by Frederic Hemberger](https://github.com/fhemberger/jekyll-projectlist): Loads all files from a directory and renders the entries into a single page, instead of creating separate posts.
|
||||
- [Tiered Archives by Eli Naeher](https://gist.github.com/88cda643aa7e3b0ca1e5): creates a tiered template variable that allows you to create archives grouped by year and month.
|
||||
- [Jammit generator by Vladimir Andrijevik](https://gist.github.com/1224971): enables use of [Jammit](http://documentcloud.github.com/jammit/) for JavaScript and CSS packaging.
|
||||
- [oEmbed Tag by Tammo van Lessen](https://gist.github.com/1455726): enables easy content embedding (e.g. from YouTube, Flickr, Slideshare) via oEmbed.
|
||||
- [Company website and blog plugins](https://github.com/flatterline/jekyll-plugins) by Flatterline, a [Ruby on Rails development company](http://flatterline.com/): portfolio/project page generator, team/individual page generator, author bio liquid template tag for use on posts and a few other smaller plugins.
|
||||
- [Transform Layouts](https://gist.github.com/1472645) Monkey patching allowing HAML layouts (you need a HAML Converter plugin for this to work)
|
||||
|
@ -395,11 +403,11 @@ There are a few useful, prebuilt plugins at the following locations:
|
|||
- [jekyll-rendering](https://github.com/blackwinter/jekyll-rendering): Jekyll plugin to provide alternative rendering engines.
|
||||
- [jekyll-pagination](https://github.com/blackwinter/jekyll-pagination): Jekyll plugin to extend the pagination generator.
|
||||
- [jekyll-tagging](https://github.com/pattex/jekyll-tagging): Jekyll plugin to automatically generate a tag cloud and tag pages.
|
||||
- [jekyll-contentblocks](https://github.com/rustygeldmacher/jekyll-contentblocks): Lets you use Rails-like content_for tags in your templates, for passing content from your posts up to your layouts.
|
||||
- [Generate YouTube Embed (tag)](https://gist.github.com/1805814) by [joelverhagen](https://github.com/joelverhagen): Jekyll plugin which allows you to embed a YouTube video in your page with the YouTube ID. Optionally specify width and height dimensions. Like “oEmbed Tag” but just for YouTube.
|
||||
- [JSON Filter](https://gist.github.com/1850654) by [joelverhagen](https://github.com/joelverhagen): filter that takes input text and outputs it as JSON. Great for rendering JavaScript.
|
||||
- [jekyll-beastiepress](https://github.com/okeeblow/jekyll-beastiepress): FreeBSD utility tags for Jekyll sites.
|
||||
- [jsonball](https://gist.github.com/1895282): reads json files and produces maps for use in jekylled files
|
||||
- [redcarpet2](https://github.com/nono/Jekyll-plugins): use Redcarpet2 for rendering markdown
|
||||
- [bibjekyll](https://github.com/pablooliveira/bibjekyll): render BibTeX-formatted bibliographies/citations included in posts/pages using bibtex2html
|
||||
- [jekyll-citation](https://github.com/archome/jekyll-citation): render BibTeX-formatted bibliographies/citations included in posts/pages (pure Ruby)
|
||||
- [jekyll-scholar](https://github.com/inukshuk/jekyll-scholar): Jekyll extensions for the blogging scholar
|
||||
|
@ -409,14 +417,24 @@ There are a few useful, prebuilt plugins at the following locations:
|
|||
- [refheap_tag](https://github.com/aburdette/refheap_tag): Liquid tag that allows embedding pastes from [refheap](https://refheap.com)
|
||||
- [i18n_filter](https://github.com/gacha/gacha.id.lv/blob/master/_plugins/i18n_filter.rb): Liquid filter to use I18n localization.
|
||||
- [singlepage-jekyll](https://github.com/JCB-K/singlepage-jekyll) by [JCB-K](https://github.com/JCB-K): turns Jekyll into a dynamic one-page website.
|
||||
- [flickr](http://jonasforsberg.se/2012/04/15/flickr-plugin-for-jekyll/): Embed photos from flickr right into your posts.
|
||||
- [flickr](https://github.com/reagent/fleakr): Embed photos from flickr right into your posts.
|
||||
- [jekyll-devonly_tag](https://gist.github.com/2403522): A block tag for including markup only during development.
|
||||
- [Jekyll plugins by Aucor](https://github.com/aucor/jekyll-plugins): Plugins for eg. trimming unwanted newlines/whitespace and sorting pages by weight attribute.
|
||||
- [Only first paragraph](https://github.com/sebcioz/jekyll-only_first_p): Show only first paragrpaph of page/post.
|
||||
- [jekyll-pandoc-plugin](https://github.com/dsanson/jekyll-pandoc-plugin): use pandoc for rendering markdown.
|
||||
- [File compressor](https://gist.github.com/2758691) by [mytharcher](https://github.com/mytharcher): Compress HTML (\*.html) and JavaScript(\*.js) files when output.
|
||||
- [smilify](https://github.com/SaswatPadhi/jekyll_smilify) by [SaswatPadhi](https://github.com/SaswatPadhi): Convert text emoticons in your content to themeable smiley pics. [Demo](http://saswatpadhi.github.com/)
|
||||
- [excerpts](http://blog.darkrefraction.com/2012/jekyll-excerpt-plugin.html) by [drawoc](https://github.com/drawoc): provides a nice way to implement page excerpts.
|
||||
- [jekyll-minibundle](https://github.com/tkareine/jekyll-minibundle): Asset bundling and cache busting using external minification tool of your choice, no gem dependencies.
|
||||
- [JekyllGalleryTag](https://github.com/redwallhp/JekyllGalleryTag) by [redwallhp](https://github.com/redwallhp): Generates thumbnails from a directory of images and displays them in a grid with a Liquid tag.
|
||||
- [Read in X Minutes](https://gist.github.com/zachleat/5792681) by [zachleat](https://github.com/zachleat): Estimates the reading time of a string (use for blog post content).
|
||||
- [jekyll-assets](http://ixti.net/jekyll-assets/) by [ixti](https://github.com/ixti): Rails-alike assets pipeline (write assets in CoffeeScript, SASS, LESS etc; specify dependencies for automatic bundling using simple declarative comments in assets; minify and compress; use JST templates; cache bust; and many-many more).
|
||||
- [jekyll-pandoc-multiple-formats](https://github.com/fauno/jekyll-pandoc-multiple-formats)
|
||||
by [edsl](https://github.com/edsl): Use pandoc to generate your site in
|
||||
multiple formats plus support for pandoc's markdown extensions.
|
||||
- [Youku and Tudou Embed](https://gist.github.com/Yexiaoxing/5891929): Liquid plugin for
|
||||
embedding Youku and Tudou videos
|
||||
- [jekyll-timeago](https://github.com/markets/jekyll-timeago): Time-ago Liquid filter
|
||||
- [jekyll-swfobject](https://github.com/sectore/jekyll-swfobject): Liquid plugin for embedding Adobe Flash files (`*.swf`) using [SWFObject](http://code.google.com/p/swfobject/)
|
||||
- [Jekyll Picture Tag](https://github.com/robwierzbowski/jekyll-picture-tag): Easy responsive images for Jekyll. Based on the proposed [`<picture>`](http://picture.responsiveimages.org/) element, polyfilled with Scott Jelh's [Picturefill](https://github.com/scottjehl/picturefill).
|
||||
|
||||
<div class="note info">
|
||||
<h5>Jekyll Plugins Wanted</h5>
|
|
@ -3,6 +3,7 @@ layout: docs
|
|||
title: Writing posts
|
||||
prev_section: frontmatter
|
||||
next_section: pages
|
||||
permalink: /docs/posts/
|
||||
---
|
||||
|
||||
One of Jekyll’s best aspects is that it is “blog aware”. What does this mean,
|
||||
|
@ -95,7 +96,7 @@ Linking to a PDF for readers to download:
|
|||
It’s all well and good to have posts in a folder, but a blog is no use unless
|
||||
you have a list of posts somewhere. Creating an index of posts on another page
|
||||
(or in a [template](../templates)) is easy, thanks to the [Liquid template
|
||||
language](http://liquidmarkup.org/) and its tags. Here’s a basic example of how
|
||||
language](http://wiki.shopify.com/Liquid) and its tags. Here’s a basic example of how
|
||||
to create a list of links to your blog posts:
|
||||
|
||||
{% highlight html %}
|
||||
|
@ -112,11 +113,33 @@ Of course, you have full control over how (and where) you display your posts,
|
|||
and how you structure your site. You should read more about [how templates
|
||||
work](../templates) with Jekyll if you want to know more.
|
||||
|
||||
## Post excerpts
|
||||
|
||||
Each post automatically takes the first block of text, from the beginning of the content
|
||||
to the first occurrence of `excerpt_separator`, and sets it as the `post.excerpt`.
|
||||
Take the above example of an index of posts. Perhaps you want to include
|
||||
a little hint about the post's content by adding the first paragraph of each of your
|
||||
posts:
|
||||
|
||||
{% highlight html %}
|
||||
<ul>
|
||||
{% raw %}{% for post in site.posts %}{% endraw %}
|
||||
<li>
|
||||
<a href="{% raw %}{{ post.url }}{% endraw %}">{% raw %}{{ post.title }}{% endraw %}</a>
|
||||
<p>{% raw %}{{ post.excerpt }}{% endraw %}</p>
|
||||
</li>
|
||||
{% raw %}{% endfor %}{% endraw %}
|
||||
</ul>
|
||||
{% endhighlight %}
|
||||
|
||||
If you don't like the automatically-generated post excerpt, it can be overridden by adding
|
||||
`excerpt` to your post's YAML front-matter.
|
||||
|
||||
## Highlighting code snippets
|
||||
|
||||
Jekyll also has built-in support for syntax highlighting of code snippets using
|
||||
[Pygments](../extras), and including a code snippet in any post is easy. Just
|
||||
use the dedicated Liquid tag as follows:
|
||||
Pygments, and including a code snippet in any post is easy. Just use the
|
||||
dedicated Liquid tag as follows:
|
||||
|
||||
{% highlight text %}
|
||||
{% raw %}{% highlight ruby %}{% endraw %}
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
layout: docs
|
||||
title: Quick-start guide
|
||||
prev_section: home
|
||||
next_section: installation
|
||||
permalink: /docs/quickstart/
|
||||
---
|
||||
|
||||
For the impatient, here's how to get a boilerplate Jekyll site up and running.
|
||||
|
||||
{% highlight bash %}
|
||||
~ $ gem install jekyll
|
||||
~ $ jekyll new myblog
|
||||
~ $ cd myblog
|
||||
~/myblog $ jekyll serve
|
||||
# => Now browse to http://localhost:4000
|
||||
{% endhighlight %}
|
||||
|
||||
That's nothing, though. The real magic happens when you start creating blog
|
||||
posts, using the front-matter to control templates and layouts, and taking
|
||||
advantage of all the awesome configuration options Jekyll makes available.
|
||||
|
||||
<div class="note info">
|
||||
<h5>Redcarpet is the default Markdown engine for new sites</h5>
|
||||
<p>In Jekyll 1.1, we switched the default markdown engine for sites
|
||||
generated with <code>jekyll new</code> to Redcarpet</p>
|
||||
</div>
|
|
@ -2,16 +2,14 @@
|
|||
layout: docs
|
||||
title: Resources
|
||||
prev_section: sites
|
||||
next_section: upgrading
|
||||
permalink: /docs/resources/
|
||||
---
|
||||
|
||||
Jekyll’s growing use is producing a wide variety of tutorials, frameworks, extensions, examples, and other resources that can be very helpful. Below is a collection of links to some of the most popular Jekyll resources.
|
||||
|
||||
### Jekyll tips & tricks, and examples
|
||||
|
||||
- [A simple way to add draft posts](https://gist.github.com/2870636)
|
||||
|
||||
No plugins required.
|
||||
|
||||
- [Tips for working with GitHub Pages Integration](https://gist.github.com/2890453)
|
||||
|
||||
Code example reuse, and keeping documentation up to date.
|
||||
|
@ -28,7 +26,6 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext
|
|||
#### Integrating Jekyll with Git
|
||||
|
||||
- [Blogging with Git, Emacs and Jekyll](http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/)
|
||||
- [Using Git to maintain your blog](http://matedriven.com.ar/2009/04/28/using-git-to-maintain-your-blog.html) (step by step guide)
|
||||
|
||||
#### Other hacks
|
||||
|
||||
|
@ -44,6 +41,6 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext
|
|||
|
||||
- [Jekyll Extensions -= Pain](http://rfelix.com/2010/01/19/jekyll-extensions-minus-equal-pain/)
|
||||
|
||||
A way to [extend Jekyll](http://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](http://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reutilized and shared.
|
||||
A way to [extend Jekyll](http://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](http://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
|
||||
|
||||
- [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue