Merge remote-tracking branch 'upstream/master' into sort-attributes

This commit is contained in:
Aidan Feldman 2013-12-22 19:31:56 -05:00
commit fa8618879d
4 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,7 @@
property's value (#1788) property's value (#1788)
* Add support for Maruku's `fenced_code_blocks` option (#1799) * Add support for Maruku's `fenced_code_blocks` option (#1799)
* Update Redcarpet dependency to ~> 3.0 (#1815) * Update Redcarpet dependency to ~> 3.0 (#1815)
* Automatically sort all pages by name (#1848)
### Bug Fixes ### Bug Fixes
* Don't allow nil entries when loading posts (#1796) * Don't allow nil entries when loading posts (#1796)
@ -33,6 +34,7 @@
* Fix issues with 1.4.1 release blog post (#1804) * Fix issues with 1.4.1 release blog post (#1804)
* Add note about deploying to OpenShift (#1812) * Add note about deploying to OpenShift (#1812)
* Collect all Windows-related docs onto one page (#1818) * Collect all Windows-related docs onto one page (#1818)
* Fixed typo in datafiles doc page (#1854)
## 1.4.2 / 2013-12-16 ## 1.4.2 / 2013-12-16

View File

@ -175,6 +175,8 @@ module Jekyll
static_files << StaticFile.new(self, self.source, dir, f) static_files << StaticFile.new(self, self.source, dir, f)
end end
end end
pages.sort_by!(&:name)
end end
# Read all the files in <source>/<dir>/_posts and create a new Post # Read all the files in <source>/<dir>/_posts and create a new Post

View File

@ -13,7 +13,7 @@ templating system](http://wiki.github.com/shopify/liquid/liquid-for-designers).
Jekyll supports loading data from [YAML](http://yaml.org/) files located in the Jekyll supports loading data from [YAML](http://yaml.org/) files located in the
`_data` directory. `_data` directory.
This powerful features allows you to avoid repetition in your templates and to This powerful feature allows you to avoid repetition in your templates and to
set site specific options without changing `_config.yml`. set site specific options without changing `_config.yml`.
Plugins/themes can also leverage Data Files to set configuration variables. Plugins/themes can also leverage Data Files to set configuration variables.

View File

@ -154,6 +154,13 @@ class TestSite < Test::Unit::TestCase
assert_equal @site.generators.sort_by(&:class).map{|g|g.class.priority}, @site.generators.map{|g|g.class.priority} assert_equal @site.generators.sort_by(&:class).map{|g|g.class.priority}, @site.generators.map{|g|g.class.priority}
end end
should "sort pages alphabetically" do
stub.proxy(Dir).entries { |entries| entries.reverse }
@site.process
sorted_pages = %w(.htaccess about.html bar.html contacts.html deal.with.dots.html foo.md index.html index.html sitemap.xml symlinked-file)
assert_equal sorted_pages, @site.pages.map(&:name)
end
should "read layouts" do should "read layouts" do
@site.read_layouts @site.read_layouts
assert_equal ["default", "simple", "post/simple"].sort, @site.layouts.keys.sort assert_equal ["default", "simple", "post/simple"].sort, @site.layouts.keys.sort