The properties of Liquid::Drops are only evaluated when they're asked for
and therefore save computation time. This prevents a lot of GC time cleaning
up objects that are not needed, because they're not created unless requested.
Additionally, this saves time for actual computation of those values because
they can be computed only if needed.
It's funny how much it helps when you only do what is needed. Far less overhead.
- Replaced occurrences of #array += with concat
operations.(performance)
- Corrected alignment.
- Removed rebase artifact.
Signed-off-by: Martin Rogalla <martin@martinrogalla.com>
Organized the draft, post and layout reader into the *readers* classes.
Fixed all references and ran tests.
Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
Extracted `in_source_dir` from site.rb into reader.rb.
Updated all the references and tests.
Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
* Stevenson now inherits from Logger and extends some methods to use $stderr
for log messages greater than info level.
* LogWriter provides an interface between Jekyll and Logger to maintain API.
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.
* 'frontmatter-defaults' of git://github.com/maul-esel/jekyll:
move self.type to convertible
oops, fix minor indentation quirk
document frontmatter defaults precedence
adjust frontmatter defaults precedence handling
change cucumber feature to test for precedence too
fix frontmatter defaults for custom paths
more robust cucumber features
fix slash handling for paths
move cucumber features to own file
fix minor docs quirk
improve path checking, now using Pathname instead of regex
Add site documentation for the new feature
add inline code docs
improve validation code
fix for Ruby 1.8
Add basic cucumber features for frontmatter defaults
Retrieve frontmatter defaults when retrieved internally
make frontmatter defaults available to liquid
add a class `FrontmatterDefaults` for handling of frontmatter defaults
Add a method to retrieve type to post, page and draft
Conflicts:
lib/jekyll.rb
lib/jekyll/convertible.rb
lib/jekyll/core_ext.rb
lib/jekyll/page.rb
lib/jekyll/post.rb