It's been a while, but we have a bunch of changes, and the start of some new documentation.
Some deprecations this time, in the continuing run-up to v1.0:
- Document data attributes now must be hashes. This makes all the data attributes (document, page, site, application) consistent and easier to manage.
- The default layout is now
site/layout.html.ep. Now that layouts are bundling multiple themes, having a specific directory is better.
The new features include:
- Content sections. Templates and documents can now define content that can be used later in the layout. This allows applications with tags or feeds, for example, to add content to the layout header, sidebar, or footer.
bundle themecommand now allows you to specify which files you want to bundle. This makes it easy to copy only certain things from the default theme. This is helpful for the templates that don't change much, like the feed templates, robots.txt, and sitemap.xml templates.
- The site object now has a
templatesattribute which allows you to override the site's default layout,
- The document page
sectionsmethod now allows for indexes as arguments. This makes it easier to use document sections in template.
And some bugfixes:
- The LinkCheck plugin now correctly
handles relative links to parent directories (
- The LinkCheck plugin now warns about links with empty
hrefattributes. This is technically legal, but is more likely a problem of not filling in the URL.
- The index page now properly handles relative links. Previously,
relative links on an index page would be broken when the index gets
Full changelog below.
- allow indexes to the sections method (#490)
- move date parsing into document class (#392)
- fix relative links on index page getting broken (#345)
- add tests for relative links on index page (#345)
- move default layout to layout directory (#486)
- allow overriding the layout for the entire site (#312)
- allow template overrides in the site object (#312)
- ignore hidden files in theme test
- show the page list when count is wrong in tests
- warn about links with empty href destination (#492)
- fix linkcheck plugin marking all ".." as broken (#488)
- pass-through the document data attr to the page
- bundle theme to site theme directory only
- allow bundling of specific files from a theme
- deprecate document data attrs that are not hashes (#417)
- move content sections to page object
- add full-width layout template to remove sidebar
- move sidebar to layout
- add content sections to template helper (#416)