Pagelist
The ::pagelist element allows you to create a dynamic page directory that displays a list of pages on a website. Various options can be used to filter the displayed pages, choose the format of the list, and determine the order.
::pagelist{format="<Format>" source="<Source>" orderBy="<Sortierkriterium>"}
Parameter
- format
- ol: Creates an ordered list
- ul: Creates an unordered list
- glossary: Creates a grouped list
- #
: Uses the snippet to generate the list. The snippet receives pages, which contains all pages, and can then process them.
- source
- href: The page link
- name: The page name
- keyword: The page keywords
- orderBy
- name: Sorts by the page name
- index: Sorts by the page index
- href: Sorts by the URL
- asc: Ascending
- desc: Descending
Examples
Glossary
::pagelist{format="glossary" source="href(/glossary/.*)"}
A Glossary of all Elements
::pagelist{format="glossary" source="href(/elements/.*)"}
D
Q
V
Y
Unordered List by href
::pagelist{format="ul" source="href(/elements/.*)" orderBy="name:desc"}
Ordered List with IDE in the namen and additionally with SQL in the URL
::pagelist{format="ol" source="name(.*IDE.*)"}
::pagelist{format="ol" source="href(.*SQL.*) AND name(.*IDE.*)"}
Custom snippet
The snippet is located in the snippets
folger with the name list.md.hbs
{{#each pages}}
- {{{ name }}}: [{{ href }}]({{ href }})
{{/each}}
::pagelist{format="#list" source="name(^V.*)"}
- Vercel: /hosting/vercel
- Video: /elements/video