feat(11ty): rename definitions collection to tableOfContent

This commit is contained in:
Oscar 2019-11-17 19:47:06 +01:00
parent 90666572b9
commit 6e087a9abe
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ module.exports = function (config) {
// NOTE (ovlb): this will not be remembered as the best code ive written. if anyone seeing this has a better solution then the following to achieve sub groups of the definitions: i am happy to get rid of it // NOTE (ovlb): this will not be remembered as the best code ive written. if anyone seeing this has a better solution then the following to achieve sub groups of the definitions: i am happy to get rid of it
config.addCollection('definitions', collection => { config.addCollection('tableOfContent', collection => {
const allItems = collection const allItems = collection
.getFilteredByGlob('./11ty/definitions/*.md') .getFilteredByGlob('./11ty/definitions/*.md')
.sort((a, b) => { .sort((a, b) => {

View File

@ -1,7 +1,7 @@
<section> <section>
<nav class="" aria-label="Definitions"> <nav class="" aria-label="Definitions">
<ol class="auto-grid list"> <ol class="auto-grid list">
{% for section in collections.definitions %} {% for section in collections.tableOfContent %}
<li> <li>
<span class="sub-headline">{{ section.title }}</span> <span class="sub-headline">{{ section.title }}</span>
<ol> <ol>