Skip to content

Commit

Permalink
Add the links collection
Browse files Browse the repository at this point in the history
I don't understand why the collection doesn't exist without it, the "links" tag is in the "link" layout YFM.
  • Loading branch information
nhoizey committed Nov 13, 2019
1 parent f28311a commit 8621a13
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .eleventy.js
Expand Up @@ -43,6 +43,14 @@ module.exports = function (eleventyConfig) {
const { parse, stringify } = require("flatted/cjs");
eleventyConfig.addFilter("safeDump", stringify);

// ------------------------------------------------------------------------
// Collections
// ------------------------------------------------------------------------

eleventyConfig.addCollection("links", function (collection) {
return collection.getFilteredByGlob("src/links/**/*.md");
});

// ------------------------------------------------------------------------
// Shortcodes
// ------------------------------------------------------------------------
Expand Down

0 comments on commit 8621a13

Please sign in to comment.