diff --git a/eleventy.config.js b/eleventy.config.js index 0308d5f..5d771fd 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -16,6 +16,12 @@ export default async function (eleventyConfig) { process.env.DEBUG && console.log(inspect(sections)); return sections; }); + eleventyConfig.addCollection("pdfSections", (collectionApi) => { + const sections = collectionApi.getFilteredByGlob("./src/pages/sections/**") + .sort((a, b) => (a.data?.pdf?.order ?? a.data.order) - (b.data?.pdf?.order ?? b.data.order)); + process.env.DEBUG && console.log(inspect(sections)); + return sections; + }); eleventyConfig.addCollection("projects", (collectionApi) => { const projects = collectionApi.getFilteredByGlob("./src/projects/**") .sort((a, b) => a.data.order - b.data.order); diff --git a/src/pdf.liquid b/src/pdf.liquid index c6a3e29..32afc4c 100644 --- a/src/pdf.liquid +++ b/src/pdf.liquid @@ -25,13 +25,10 @@ links: -
-The time is {{ "now" | date: "%Y-%m-%d %H:%M" }} +
{{ author.about }}
- - -{% for section in collections.sections %} - {% if section.data.excludeFromPdf != true %} +{% for section in collections.pdfSections %} + {% if section.data.pdf.exclude != true %} {% assign items = collections[section.data.collection] %} {% include 'partials/components/pdf/section' %} {% endif %}