From ecb33848cb1d23656ec3defe4da37a53606b0a92 Mon Sep 17 00:00:00 2001 From: madrilene Date: Wed, 31 Jan 2024 10:21:40 +0100 Subject: [PATCH] pagination rdundant, adding optin for view repo --- src/_data/meta.js | 8 +++++--- src/_includes/components/edit-on.njk | 12 ++++++++++++ src/_layouts/post.njk | 1 + 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/_includes/components/edit-on.njk diff --git a/src/_data/meta.js b/src/_data/meta.js index 8724d31..4355b44 100644 --- a/src/_data/meta.js +++ b/src/_data/meta.js @@ -36,9 +36,6 @@ module.exports = { paginationPrevious: 'Previous', paginationNext: 'Next' }, - pagination: { - itemsPerPage: 20 - }, navigation: { ariaTop: 'Main', ariaBottom: 'Complementary', @@ -64,5 +61,10 @@ module.exports = { url: '' } }, + viewRepo: { + // this is for the view/edit on github link. The value in the package.json will be pulled in. + allow: true, + infoText: 'View this page on GitHub' + }, easteregg: true }; diff --git a/src/_includes/components/edit-on.njk b/src/_includes/components/edit-on.njk new file mode 100644 index 0000000..1c24a72 --- /dev/null +++ b/src/_includes/components/edit-on.njk @@ -0,0 +1,12 @@ +{% if meta.viewRepo.allow %} +
+

+ {{ meta[page.lang].blog.githubEdit }} + {{ meta.viewRepo.infoText }}. +

+{% endif %} diff --git a/src/_layouts/post.njk b/src/_layouts/post.njk index 78d5597..5c106e6 100644 --- a/src/_layouts/post.njk +++ b/src/_layouts/post.njk @@ -29,6 +29,7 @@ schema: blog

{{ content | safe }} + {% include 'components/edit-on.njk' %}