From 43d76d6698ad8186ce8ec1d1327d1d3446f56b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Brechbu=CC=88hl?= Date: Tue, 2 Apr 2024 21:50:08 +0200 Subject: [PATCH 01/16] sortByOrder --- eleventy.config.filters.js | 11 +++++--- .../img/{mtt-article.png => mtt_article.png} | Bin src/assets/layouts/partials/header.njk | 24 ++++++++++-------- .../layouts/partials/sidebar_basics.njk | 8 +++--- .../acrobat/add-an-alt-text-in-acrobat.md | 1 + ...adjust-logical-reading-order-in-acrobat.md | 1 + .../create-and-check-artifacts-in-acrobat.md | 1 + .../create-and-modify-pdf-tags-in-acrobat.md | 1 + ...eneral-working-with-pdf-tags-in-acrobat.md | 1 + ...eck-semantics-and-logical-reading-order.md | 1 + .../general/overview-of-the-pdf-tags.md | 1 + ...e-with-the-help-of-multi-level-headings.md | 1 + .../indesign/add-an-alt-text-in-indesign.md | 1 + .../defining-artifacts-in-indesign.md | 1 + ...ining-logical-reading-order-in-indesign.md | 1 + .../indesign/defining-pdf-tags-in-indesign.md | 1 + .../de/basics/word/add-an-alt-text-in-word.md | 1 + .../basics/word/defining-artifacts-in-word.md | 3 ++- .../basics/word/defining-pdf-tags-in-word.md | 1 + src/content/de/tutorials/tutorials.md | 8 +++--- .../acrobat/add-an-alt-text-in-acrobat.md | 1 + ...adjust-logical-reading-order-in-acrobat.md | 1 + .../create-and-check-artifacts-in-acrobat.md | 1 + .../create-and-modify-pdf-tags-in-acrobat.md | 1 + ...eneral-working-with-pdf-tags-in-acrobat.md | 1 + ...eck-semantics-and-logical-reading-order.md | 1 + .../general/overview-of-the-pdf-tags.md | 1 + ...e-with-the-help-of-multi-level-headings.md | 1 + .../indesign/add-an-alt-text-in-indesign.md | 1 + .../defining-artifacts-in-indesign.md | 1 + ...ining-logical-reading-order-in-indesign.md | 3 ++- .../indesign/defining-pdf-tags-in-indesign.md | 1 + .../en/basics/word/add-an-alt-text-in-word.md | 1 + .../basics/word/defining-artifacts-in-word.md | 1 + .../basics/word/defining-pdf-tags-in-word.md | 1 + 35 files changed, 61 insertions(+), 24 deletions(-) rename src/assets/img/{mtt-article.png => mtt_article.png} (100%) diff --git a/eleventy.config.filters.js b/eleventy.config.filters.js index 70a8a64c9..1816e5fae 100644 --- a/eleventy.config.filters.js +++ b/eleventy.config.filters.js @@ -4,7 +4,7 @@ module.exports = (eleventyConfig) => { eleventyConfig.addFilter("localizedDate", (dateObj, lang, format) => { // Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens return DateTime.fromJSDate(dateObj, { locale: lang || "en" }).toFormat( - format || "LLLL dd yyyy" + format || "LLLL dd yyyy", ); }); @@ -17,7 +17,12 @@ module.exports = (eleventyConfig) => { return values.slice().sort((a, b) => a.data.title.localeCompare(b.data.title)); }); - eleventyConfig.addFilter("sortByMenuOrder", (values) => { - return values.slice().sort((a, b) => a.data.order - b.data.order); + eleventyConfig.addFilter("sortByOrder", (values) => { + return values.slice().sort((a, b) => { + if (a.data.order && b.data.order) { + return a.data.order - b.data.order; + } + return 0; + }); }); }; diff --git a/src/assets/img/mtt-article.png b/src/assets/img/mtt_article.png similarity index 100% rename from src/assets/img/mtt-article.png rename to src/assets/img/mtt_article.png diff --git a/src/assets/layouts/partials/header.njk b/src/assets/layouts/partials/header.njk index 7f2371a74..082551786 100644 --- a/src/assets/layouts/partials/header.njk +++ b/src/assets/layouts/partials/header.njk @@ -16,11 +16,13 @@ - + \ No newline at end of file diff --git a/src/assets/layouts/partials/sidebar_basics.njk b/src/assets/layouts/partials/sidebar_basics.njk index 04043aa15..3a2bea445 100644 --- a/src/assets/layouts/partials/sidebar_basics.njk +++ b/src/assets/layouts/partials/sidebar_basics.njk @@ -3,7 +3,7 @@