Skip to content

v0.3

Compare
Choose a tag to compare
@nliautaud nliautaud released this 24 Oct 12:59
· 27 commits to master since this release
3aa9d89

Switch to array filtering and rendering with twig filters, on pages or nested_pages (#5).

  • Adds twig global {{ nested_pages }} in addition to {{ pages }}
  • Render flat or nested HTML navigation tree with navigation twig filter
  • Filter pages and nested pages by paths with exclude() and only() twig filters

Examples :

    {{ pages | navigation }} // output a flat pages list
    {{ nested_pages | navigation }} // output a nested pages list
    {{ nested_pages | exclude('sub/page') | navigation }} // filtered nested pages list
    {% assign filtered = pages | only('sub/path/') %} // get filtered flat pages array