Commit Graph

1335 Commits

Author SHA1 Message Date
John Piasetzki
d6bd735aff Refactor highlighting
Extract some of the common logic from the renderers.
2014-04-27 23:20:00 -04:00
Parker Moore
513e77635b Refactor 'jekyll serve' command. 2014-04-27 19:02:33 -04:00
Robin Dupret
3a610882f6 Avoid duplicated output using highlight tags
While using Rouge and an `highlight` tag, the output was duplicated
since the `output` variable in the Liquid tag definition was equal to
the highlighter's prefix value and the `<<` method changes its receiver.

Therefore, we should simply define an empty string and append the prefix
if it is present.
2014-04-27 12:22:40 +02:00
Parker Moore
4e6d268ef3 Bump 💎 version. 2014-04-25 23:16:00 -04:00
Parker Moore
068d921ef6 Fix up docs for collections.
#2238.
2014-04-25 23:15:18 -04:00
Parker Moore
6225073095 Use the 'output' key instead of 'write' for writing out collections' document files. 2014-04-25 19:47:35 -04:00
Parker Moore
c906dfdf71 TEST THE COLLECTIONS 2014-04-24 14:01:23 -04:00
Parker Moore
dd4fe87f69 Use Hash.new instead of hash literal 2014-04-24 13:59:25 -04:00
Parker Moore
fb39b41ffb NO MORE DATA COLLECTION I CAN'T HANDLE IT 2014-04-24 13:59:25 -04:00
Parker Moore
b74c90dc20 Extract Collections metadata from site config 2014-04-24 13:59:24 -04:00
Parker Moore
0dc680df0b Always render collections, just don't always write them 2014-04-24 13:59:24 -04:00
Parker Moore
7be78de93a Don't read the collection if it's the data collection 2014-04-24 13:59:24 -04:00
Parker Moore
f1a422dfff Don't pretend there is a collections setter 2014-04-24 13:59:24 -04:00
Parker Moore
a27e5825b9 Nil-out @collections so #collections will re-compile 2014-04-24 13:59:24 -04:00
Parker Moore
fd98d5b1e6 Fetch collection names agnostically regarding the data structure of config['collections'] 2014-04-24 13:59:24 -04:00
Parker Moore
330005d932 Reset the collections hash on #reset.
Fixes #2234.
2014-04-24 13:59:24 -04:00
Parker Moore
4de2be8c5f Add Jekyll::LiquidExtensions.lookup_variable
To use, just include `Jekyll::LiquidExtensions` as you please:

```ruby
class SayHi < Liquid::Tag
  include Jekyll::LiquidExtensions

  def initialize(tag_name, markup, tokens)
    @markup = markup.strip
  end

  def render(context)
    "hi #{lookup_variable(context, @markup)}"
  end
end
```

Fixes #2071.
2014-04-22 14:27:47 -04:00
Parker Moore
9db5a1a6ce Merge pull request #2205 from jekyll/maul-esel-frontmatter-defaults 2014-04-21 23:01:05 -04:00
Ben Balter
6f0bebdfda convert input to string before xml escaping 2014-04-18 16:54:48 -04:00
Parker Moore
571fb95cc1 Only read in 5 bytes when checking for YAML header.
#2211 #2210
2014-04-15 09:48:44 -04:00
Parker Moore
29fdc0946a Use +rb switches when reading in file for checking existence of YAML header.
Fixes #2228.
2014-04-15 09:46:53 -04:00
Parker Moore
b0cf022983 Release 2.0.0.alpha.3 2014-04-14 23:17:32 -04:00
Parker Moore
5a6f1d42a9 Fix #filtered_entries so it returns a new Array if the directory doesn't exist 2014-04-14 23:03:19 -04:00
Parker Moore
696aea211a Don't gather any entries if the collection directory doesn't exist 2014-04-14 22:56:23 -04:00
Parker Moore
a1af95c34e Clean up some code per @baweaver's suggestions. 2014-04-14 22:46:22 -04:00
Parker Moore
ad7efb23e6 Code/docs cleanup, props @baweaver 2014-04-14 22:46:22 -04:00
Parker Moore
af61451f87 Use #error instead of #warn when telling the user not to use a custom data source 2014-04-14 22:46:22 -04:00
Parker Moore
62551b5ff9 Include data in the array of collections 2014-04-14 22:46:22 -04:00
Parker Moore
aa502348e5 Filter entries in the collection per EntryFilter#filter 2014-04-14 22:46:21 -04:00
Parker Moore
323ea0ef73 EntryFilter#special? should also check the base name of the entry 2014-04-14 22:46:21 -04:00
Parker Moore
f0e68d7d86 Expose collections as site.<collection_name> in Liquid as array of docs. 2014-04-14 22:46:21 -04:00
Parker Moore
00ca09a2ea Add comments for Document 2014-04-14 22:46:21 -04:00
Parker Moore
a307aff858 Do not render any asset files with Liquid. 2014-04-14 22:46:21 -04:00
Parker Moore
5ae1c34857 Add comments for Collection 2014-04-14 22:46:21 -04:00
Parker Moore
be769dcf00 SANITIZE THE collection name plz. 2014-04-14 22:46:21 -04:00
Parker Moore
37a7236e20 Homagah it all renders I think. 2014-04-14 22:46:21 -04:00
Parker Moore
a15a584136 Don't let that render get you down. 2014-04-14 22:46:21 -04:00
Parker Moore
75f49a751e OMG COLLECTIONS ARE RENDERING CALL THE POLICE 2014-04-14 22:46:21 -04:00
Parker Moore
f082eca791 GUYS failing test for rendering 2014-04-14 22:45:20 -04:00
Parker Moore
cefe99bed2 Sort the docs based on path 2014-04-14 22:44:29 -04:00
Parker Moore
90807ac6e7 DEM TESTS 2014-04-14 22:44:29 -04:00
Parker Moore
08162dbb50 Hey girl, i heard you like YAML. 2014-04-14 22:44:29 -04:00
Parker Moore
50b46d7bee OMG it's happening ~*Collections*~ 2014-04-14 22:44:29 -04:00
Parker Moore
a77c92aebe Replace load-in of YAML data with Jekyll::Document logic.
COLLECTIONS IS COMING
2014-04-14 22:43:09 -04:00
Matt Rogers
6be33cf6ef Merge pull request #1492 from maul-esel/publishing 2014-04-14 20:17:01 -05:00
Parker Moore
4f66db6c38 Merge pull request #2211 from jekyll/pgp-key-header-frontmatter 2014-04-14 12:59:59 -04:00
Ben Balter
b666ac787b Stricter start of line check via \A 2014-04-11 15:15:37 -04:00
Ben Balter
387cf2181a use regex to verify yaml existence 2014-04-11 08:00:40 -04:00
maul.esel
46a5ab99f9 Support "published: false" for pages
Fixes 1034.
2014-04-07 16:22:04 +02:00
maul.esel
3a330dc7fc Use Publisher instead of Post#published? 2014-04-07 16:20:13 +02:00