diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-10-22 13:57:09 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-11-02 22:25:48 -0300 |
commit | c24956785120cf0a3fd8897f10924d01d5c38ed9 (patch) | |
tree | e723b9f3faf9a58cb9aaf86cc000ba6cda16e407 /src/content | |
parent | 6de2f25e926d385c6ec69e4518b56844db8a08c6 (diff) |
content, test: remove generatePreviousNextLinks
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/dependencies/generatePreviousNextLinks.js | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/content/dependencies/generatePreviousNextLinks.js b/src/content/dependencies/generatePreviousNextLinks.js deleted file mode 100644 index d9f80849..00000000 --- a/src/content/dependencies/generatePreviousNextLinks.js +++ /dev/null @@ -1,57 +0,0 @@ -export default { - // Returns an array with the slotted previous and next links, prepared - // for inclusion in a page's navigation bar. Include with other links - // in the nav bar and then join them all as a unit list, for example. - - contentDependencies: ['generateNextLink', 'generatePreviousLink'], - extraDependencies: ['html', 'language'], - - relations: (relation) => ({ - previousLink: - relation('generatePreviousLink'), - - nextLink: - relation('generateNextLink'), - }), - - slots: { - previousLink: { - type: 'html', - mutable: true, - }, - - nextLink: { - type: 'html', - mutable: true, - }, - - id: { - type: 'boolean', - default: true, - }, - }, - - generate(relations, slots, {html, language}) { - const previousNext = []; - - relations.previousLink.setSlots({ - link: slots.previousLink, - id: slots.id, - }); - - relations.nextLink.setSlots({ - link: slots.nextLink, - id: slots.id, - }); - - if (!html.isBlank(slots.previousLink)) { - previousNext.push(relations.previousLink); - } - - if (!html.isBlank(slots.nextLink)) { - previousNext.push(relations.nextLink); - } - - return previousNext; - }, -}; |