Open jneug opened 5 months ago
This is a great feature. For the handlebars templates, I would use a more "native" solution. Maybe something like this.
{{#each (pagelist title="Schuljahr 23/34: %" order-by="title") }}
- [{{{ name }}}]({{ path.href }})
{{/each}}
:::
And I think pagelist should return VFile-objects
Another possibility would be the use of snippets to get reusable formats.
In a page
:pagelist{... snippet="my-list-snippet"}
And in snippets/my-list-snippet.md.hbs
:
{{#each pages}}
- {{{ title }}}
{{/each}}
Thats the way the MediaWiki extension does it.
For MediaWiki there exists an extension called DynamicPageList that can create lists of pages based on certain criteria and display them in different formats.
This could be used to add tables of content to pages or outlines of a subset of pages related to the current. Depending on the implemented feature set, it could create dynamic portal pages or category pages that group certain pages.
Proposed features
The most basic version could simply list all pages in a subdirectory of
book
:gives something like
This would be of limited use, though. The more filter criteria for page selection are available, the more powerful this gets:
The output format could be controlled by a parameter with predefined options:
Possible options:
ul
for an unordered list (default,ol
ordered list,table
as a tableplain
for unformatted output.This feature would be even more powerful when combined handlebars templates: