Commit Graph

133 Commits

Author SHA1 Message Date
Colin Dean 88686e759e Add `path` to required methods
The error messages in this module call `#path`, but the module does not require the `path` method to be implemented. This change documents that classes which include `Convertible` must define `path`.

See #1846 for discussion.
2013-12-23 12:56:02 -05:00
Robin Dupret 92064134d6 Rename the pygments option to highlighter
Rename the pygments configuration option to highlighter to allow
different highlighters in the future. For now, the allowed values are
`pygments` and `null`.

It's now more straightforward to plug another syntax highlighter.
2013-12-22 12:45:15 +01:00
Aidan Feldman 2bfafb3b33 make non-data properties/methods accessible to Liquid
per https://github.com/jekyll/jekyll/pull/1849/files#r8490593
2013-12-22 03:38:32 -05:00
Aidan Feldman c2b750448e allow data attribute access by Liquid on Convertible items 2013-12-19 17:14:51 -05:00
Parker Moore 601f89d4d1 Remove File.read_with_options patch to allow 1.9 and 1.8 to behave the same 2013-12-08 00:50:12 -05:00
maul.esel f1869cda98 Merge branch 'master' into frontmatter-defaults 2013-12-05 19:29:57 +01:00
maul.esel 960e01cba8 move self.type to convertible 2013-12-05 09:14:31 +01:00
maul.esel 3888a24068 output including file for include tag error 2013-11-21 22:03:39 +01:00
maul.esel 20ea0c8d56 Merge branch 'master' into frontmatter-defaults 2013-10-14 19:44:06 +02:00
maul.esel 699eeba9f0 fix frontmatter defaults for custom paths
The Page#path or Post#path can be overriden by by a frontmatter
setting. This causes path-based frontmatter default detection to
fail. Add test to demonstrate this and fix it.
2013-10-14 19:16:53 +02:00
maul.esel 76ada8c672 output correct path in case of liquid error in layout
As with includes, an error in a layout was reported on the
page that used the layout. Fix this by passing on the path
of the layout that is rendered.
2013-10-04 00:07:50 +02:00
maul.esel 7a4ea086a1 Output path in case of render error in included file
Fixes #1591.
2013-10-01 23:02:50 +02:00
Shigeya Suzuki c625ddf6cd Invoke File.read with or without options depends on Ruby version
- Extract option fetch method as a separate method
- Added File.read_with_options method to use
- With performance fix
2013-09-19 12:22:50 +09:00
Shigeya Suzuki 8b892ed735 read_yaml to accept optional parameter to override defaults 2013-09-19 12:21:25 +09:00
MURAOKA Taro 4cb24f4b87 consider a case of "site" is unavailable in Convertible 2013-09-19 12:21:25 +09:00
MURAOKA Taro 8a28d80690 add encoding for configuration 2013-09-19 12:21:25 +09:00
maul.esel 9d44d3290b make frontmatter defaults available to liquid 2013-09-11 00:55:57 +02:00
Matt Rogers a9e2a74ea6 Merge pull request #1341 from maul-esel/minor-refactors
Minor refactors
2013-08-29 20:21:08 -07:00
Parker Moore 5f4efd34bd When a Liquid Exception is caught, show the full path (rel to site source) 2013-08-12 21:19:54 +02:00
MURAOKA Taro 8a155e0a50 use binary mode when writing file. 2013-07-30 21:35:02 +09:00
maul.esel 01922a10ac Convertible#to_liquid: allow an alternate attribute set to be passed 2013-07-28 21:18:54 +02:00
maul.esel 75d6587d27 Move #to_liquid to Convertible 2013-07-22 16:34:01 +02:00
Parker Moore cb1a2d1818 Catch conversion errors. Constituent of #1105. 2013-06-30 16:38:35 +02:00
Parker Moore 1f59e9c757 Use Jekyll.logger instead of Jekyll::Stevenson to log things. 2013-05-29 11:58:35 +02:00
Parker Moore ff8cf7c868 provide access to the layout name so when shit goes down we get the name of the layout which couldn't be processed 2013-05-17 22:45:39 +02:00
Parker Moore a95fa70d72 raise things when there's a yaml exception (non-zero exit code 2013-05-17 22:44:46 +02:00
Parker Moore 35f4f09c3e Rename Jekyll::Logger ~> Jekyll::Stevenson to fix inheritance problem
Problem described here: ca888cad76
2013-05-14 21:07:23 +02:00
Michael Klishin 82ec02905e Catch all exceptions, not just StandardError descendents
We've hit a few edge cases in Liquid/Markdown rendering
with http://clojurewerkz.org documentation sites.
They resulted in exceptions Jekyll silently swallowed because
they were not StandardException subclasses.
2013-04-30 23:33:08 +04:00
Parker Moore 5f13e00791 Comments for Convertible.render_all_layouts and Convertible.render_liquid 2013-04-26 21:09:02 +02:00
Parker Moore 29a1c18300 Refactoring Jekyll::Convertible 2013-04-26 19:36:52 +02:00
Parker Moore 61c24c601a Add UTF-8 encoding where we read in YAML so it reads in UTF-8 characters properly. Fixes #836. 2013-04-25 02:15:25 +02:00
Parker Moore 6ed41e373c Remove code duplication: #write in Page and Post is the same. 2013-04-16 02:55:31 +02:00
Parker Moore abb8e5039e Merge pull request #413 from sethladd/master
add page variable to liquid custom tags and blocks
2013-04-09 16:54:20 -07:00
Parker Moore 11eb1ecae1 Safe loading of files and YAML. 2013-02-10 19:07:38 +01:00
Parker Moore 6253f79de2 Added space between arguments in Convertible errors 2013-01-10 22:11:13 -08:00
Eric Theise ba48870ead outputting full path when file does not parse 2013-01-10 12:29:04 -08:00
stereobooster a5a6900948 fix error for case with broken encoding 2012-12-30 00:07:21 +02:00
stereobooster 2dbce8ca9f fix error for case with wrong encoding or error in YAML 2012-12-29 23:32:34 +02:00
Tom Preston-Werner 3a8ebb4b71 Merge branch 'fix/front-matter-regexp' of https://github.com/zimbatm/jekyll into zimbatm-fix/front-matter-regexp 2012-12-15 22:09:41 -08:00
Will Brady 336ea66983 Better error reporting on Liquid exceptions 2012-08-14 17:35:41 -04:00
Jonas Pfenniger da4e8f2ee1 Front-matter should be at start of file
It's the theme of the moment ; regexp checking.

Just in case we have two line start with --- in the file, we want to
make sure it's not interpreted as a front-matter.
2012-05-25 18:59:26 +01:00
Tom Preston-Werner c04a9549ea Make note of self.name requirement for Convertible. 2012-01-22 15:02:41 -08:00
jpravetz 9a3429dc74 Update lib/jekyll/convertible.rb 2011-12-04 08:37:42 -08:00
Seth Ladd e09f058a06 add page variable to liquid custom tags and blocks. thx to mike west for the patch 2011-09-20 13:03:31 -07:00
Tom Preston-Werner 3241d882b5 Merge remote-tracking branch 'kou/fix-error-message' 2011-07-05 22:31:25 -07:00
Matt Palmer eebeaf5dfb Give name of file that generated YAML exception message
It's not much good saying "hey, there was a problem" if you don't know where
the problem *is*.  Hunting through several hundred YAML files is no fun.
2011-07-02 10:35:41 +10:00
Kouhei Sutou 70aaded1e9 fix path name in syntax error message. 2011-06-20 22:46:38 +09:00
Aman Gupta 22585d4b7f avoid infinite recursion while rendering layouts 2011-05-23 17:23:21 -04:00
Tom Preston-Werner 6c94db1486 TomDoc convertible.rb. 2011-03-11 16:00:32 -08:00
Tom Preston-Werner a31780a1ec Move require to jekyll.rb and update history. 2011-03-10 21:15:29 -08:00
Ryan Davis bd01e647a7 Cleaned up unnecessary string munging 2011-03-02 00:24:17 -08:00
MattHall 226c7cc121 Rescue exception when parsing invalid yaml. Prevents silent fail in auto and server mode 2010-12-11 14:30:44 +00:00
MattHall 0a58d78338 Catch Liquid template exceptions, and write out their details. Prevents silent fail of template parsing 2010-12-11 14:23:12 +00:00
Kris Brown 84b26a31da removed use of content_type strings in the highlighting tag 2010-02-28 00:11:43 +00:00
Kris Brown cedda3afa3 move converters to classes 2010-02-27 22:14:27 +00:00
Kris Brown f73dac1582 fixes problem in issue 64 fix where pages like about.md would be output as about.md/index.html. provides the output extension as a method rather than replacing the ext attribute as part of transform 2010-02-27 09:27:36 +00:00
Kris Brown ce228ac1c4 removed accessor method and fixed tests 2010-01-10 16:24:56 +00:00
Kris Brown 6b74454a07 resetting to upstream 2010-01-10 10:11:44 +00:00
Kris Brown 2a7b1cbd98 merged 'mojombo/master' at 'v0.5.6' 2010-01-09 09:03:59 +00:00
Tom Preston-Werner 4c1021d597 don't prematurely terminate front matter on mid-line triple dashes. fixes #93 2010-01-08 18:04:36 -08:00
Tom Preston-Werner c89d8dd0f3 allow .mkd as a markdown extension 2010-01-08 17:26:48 -08:00
Kris Brown 7806a0d6bb separated up the attrs required by convertible and made tags and categories always non-nil as empty front matter entries could cause them to be nil 2010-01-06 15:19:39 +00:00
Simon Chiang ca98cd0152 updated convertible to allow for posts with no, or empty YAML 2009-06-23 20:55:13 -06:00
Simon Chiang b616a4ceca fixed test for CRLF (extra newline was being picked up) 2009-06-23 20:54:26 -06:00
Stefan Saasen e39810c984 Fix exception that causes jekyll to fail when using CRLF (0d0a) linebreaks in YAML front matter.
Signed-off-by: Nick Quaranto <nick@quaran.to>
2009-06-23 08:10:38 -04:00
Nick Quaranto 99098dd8c7 Removing the extremely brittle generated_site test and moving the tags check into post.rb so pages don't break 2009-05-18 18:28:56 -04:00
Nick Quaranto 102f6be6a2 Added tags to posts. Based off Henrik's implementation in 072d9e7. 2009-05-18 18:28:56 -04:00
Tom Preston-Werner 73d42b24ad Huge refactor to move all config into Jekyll::Site
This commit makes Jekyll threadsafe (or at least makes it possible to be so).
It also makes it a ton easier to use Jekyll as a library for scripted site
transformation. I did, however, break all the tests. =(
2009-03-12 19:05:43 -07:00
mreid cb13ea3000 Rebased with mojombo. All tests pass. Some conflicts with Liquid and Maruku 2009-03-12 21:25:34 +11:00
Mark 6edfae8c26 Refactored configuration and command-line option code 2009-03-12 20:51:11 +11:00
Zachary Pinter 5cfa956448 Fixed an issue with pygments, markdown, and newlines. 2009-01-11 12:03:46 -07:00
Tom Preston-Werner 94c06d0100 more flexible textile and markdown extension matching 2009-01-02 13:07:48 -08:00
Tom Preston-Werner dd8054411c deep merge hashes so as to not lose data 2008-12-24 22:06:42 -08:00
Tom Preston-Werner c46ea4096d simplify and correct rendering pipeline 2008-12-24 13:17:28 -08:00
Tom Preston-Werner 10bc499ce2 Merge commit '8d08a2' 2008-12-21 17:48:41 -08:00
Mark Reid 46d8fa0d56 Fixed bug that meant page data (such as the date) was not available in templates 2008-12-19 13:03:53 +11:00
Mark Reid b18ad30880 Changed YAML delimiter matcher so as to not chew up 2nd level markdown headers 2008-12-18 23:11:34 +11:00
Tom Preston-Werner 59080271ed allow use of rdiscount if --rdiscount is set and gem is installed 2008-12-15 12:27:57 -08:00
Mark Reid b094b93301 Replaced rdiscount with Maruku for Markdown with equation support 2008-12-15 16:17:45 +11:00
Jack Danger Canty 96bf21dce7 Updating documentation for Convertible#do_layout
Making it clear that this method doesn't just work on posts
2008-12-10 13:53:32 -08:00
Chris Van Pelt b9cdfc8824 Modified the yaml regex to accept both \r\n and \n 2008-11-23 14:53:45 -08:00
Tom Preston-Werner c742fb7701 implement a real related posts feature. up to 0.1.2 2008-11-22 12:36:32 -08:00
Tom Preston-Werner bffdeee637 rename to Jekyll 2008-11-17 11:07:54 -08:00