From b10dfae5dd5fd39ea79b34432fa829a3cb8e1c86 Mon Sep 17 00:00:00 2001 From: Lewis Dale Date: Sat, 30 Dec 2023 15:38:09 +0000 Subject: [PATCH] Add atom/rss/json feeds --- config/collections/index.js | 6 +- config/collections/posts.js | 0 config/collections/tags.js | 10 + config/filters/dates.js | 2 +- config/filters/filterBy.js | 7 + config/filters/index.js | 3 +- package-lock.json | 377 +++++++++++++++++++++++------------- package.json | 6 +- src/_data/metadata.json | 1 + src/_includes/post.njk | 8 +- src/blog/index.html | 2 +- src/blog/tag.html | 19 +- src/feeds/atom.njk | 29 +++ src/feeds/json.njk | 31 +++ src/feeds/rss.njk | 26 +++ src/feeds/tags/atom.njk | 31 +++ src/feeds/tags/json.njk | 33 ++++ src/feeds/tags/rss.njk | 30 +++ src/sitemap.njk | 26 +-- 19 files changed, 466 insertions(+), 181 deletions(-) delete mode 100644 config/collections/posts.js create mode 100644 config/collections/tags.js create mode 100644 config/filters/filterBy.js create mode 100644 src/feeds/atom.njk create mode 100644 src/feeds/json.njk create mode 100644 src/feeds/rss.njk create mode 100644 src/feeds/tags/atom.njk create mode 100644 src/feeds/tags/json.njk create mode 100644 src/feeds/tags/rss.njk diff --git a/config/collections/index.js b/config/collections/index.js index a485537..aa327c9 100644 --- a/config/collections/index.js +++ b/config/collections/index.js @@ -1 +1,5 @@ -module.exports = function() {} \ No newline at end of file +const tags = require('./tags'); + +module.exports = function(eleventyConfig) { + eleventyConfig.addPlugin(tags); +} \ No newline at end of file diff --git a/config/collections/posts.js b/config/collections/posts.js deleted file mode 100644 index e69de29..0000000 diff --git a/config/collections/tags.js b/config/collections/tags.js new file mode 100644 index 0000000..42ee86a --- /dev/null +++ b/config/collections/tags.js @@ -0,0 +1,10 @@ +module.exports = (eleventyConfig) => { + eleventyConfig.addCollection('tags', (collectionApi) => { + const tags = new Set(); + collectionApi.getAll().forEach((item) => { + if (!item.data.tags) return; + item.data.tags.forEach((tag) => tags.add(tag)); + }); + return [...tags]; + }); +} \ No newline at end of file diff --git a/config/filters/dates.js b/config/filters/dates.js index 4d3acfe..eaf105a 100644 --- a/config/filters/dates.js +++ b/config/filters/dates.js @@ -16,5 +16,5 @@ module.exports = function(eleventyConfig) { 'hour12': true })); - eleventyConfig.addFilter('rfc3339', date => new Date(date).toISOString()); + // eleventyConfig.addFilter('rfc3339', date => new Date(date).toISOString()); } diff --git a/config/filters/filterBy.js b/config/filters/filterBy.js new file mode 100644 index 0000000..348f9ae --- /dev/null +++ b/config/filters/filterBy.js @@ -0,0 +1,7 @@ +module.exports = (eleventyConfig) => { + eleventyConfig.addFilter('filterBy', (collection, value) => { + return collection.filter((item) => { + return item.data.tags.includes(value); + }) + }); +} \ No newline at end of file diff --git a/config/filters/index.js b/config/filters/index.js index 11e8006..5bb50ca 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -1,11 +1,12 @@ const dateFilters = require('./dates'); const arrayFilters = require('./arrays'); const excerptFilter = require('./excerpt'); - +const filterBy = require('./filterBy') module.exports = function(eleventyConfig) { eleventyConfig.addPlugin(dateFilters); eleventyConfig.addPlugin(arrayFilters); eleventyConfig.addPlugin(excerptFilter); + eleventyConfig.addPlugin(filterBy); eleventyConfig.addFilter('keys', obj => Object.keys(obj)) eleventyConfig.addFilter('json', obj => JSON.stringify(obj, null, 2)); diff --git a/package-lock.json b/package-lock.json index c3241ae..a038f70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@11ty/eleventy": "^2.0.0", "@11ty/eleventy-fetch": "^3.0.0", "@11ty/eleventy-img": "^3.0.0", - "@11ty/eleventy-plugin-rss": "^1.2.0", "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", "@toycode/markdown-it-class": "^1.2.4", "autoprefixer": "^10.4.13", @@ -21,7 +20,7 @@ "lodash": "^4.17.21", "markdown-it-abbr": "^1.0.4", "markdown-it-anchor": "^8.6.6", - "markdown-it-eleventy-img": "^0.9.0", + "markdown-it-eleventy-img": "^0.10.1", "markdown-it-emoji": "^2.0.2", "markdown-it-footnote": "^3.0.3", "markdown-it-link-attributes": "^4.0.1", @@ -35,6 +34,9 @@ "postcss-nested": "^6.0.0", "prettier": "^2.8.3", "tailwindcss": "^3.2.4" + }, + "devDependencies": { + "@11ty/eleventy-plugin-rss": "^1.2.0" } }, "node_modules/@11ty/dependency-tree": { @@ -146,16 +148,17 @@ } }, "node_modules/@11ty/eleventy-img": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-3.0.0.tgz", - "integrity": "sha512-qMotOn0ywxwuRd2zF2gNfJSwVQNbSBdzVQ2N1UPQeiXNZrxPGIitfraSf/OfWJbgGI9Cje12AtXdzr3Qc6wctw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-3.1.8.tgz", + "integrity": "sha512-9xVqbykggQAHTSiZEo6nUayS8l8nkM7RU8dCjGzikCc8FXSW/E17ytq7SaDngo24D3LZdD+3Gheh4zSeidrImA==", "dependencies": { - "@11ty/eleventy-fetch": "^3.0.0", + "@11ty/eleventy-fetch": "^4.0.0", + "brotli-size": "^4.0.0", "debug": "^4.3.4", - "entities": "^4.4.0", + "entities": "^4.5.0", "image-size": "^1.0.2", "p-queue": "^6.6.2", - "sharp": "^0.31.3" + "sharp": "^0.32.6" }, "engines": { "node": ">=14.15.0" @@ -165,10 +168,28 @@ "url": "https://opencollective.com/11ty" } }, + "node_modules/@11ty/eleventy-img/node_modules/@11ty/eleventy-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-fetch/-/eleventy-fetch-4.0.0.tgz", + "integrity": "sha512-wGAd0r+8DUWr22fK5r07dOKuNY6ltA7hX+sJzngGZL1yJmuUVdM/xPQZ+iq0BFgf/ZeRdpVEzf2D0cpVZUuiTg==", + "dependencies": { + "debug": "^4.3.4", + "flat-cache": "^3.0.4", + "node-fetch": "^2.6.7", + "p-queue": "^6.6.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, "node_modules/@11ty/eleventy-img/node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "engines": { "node": ">=0.12" }, @@ -180,6 +201,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-1.2.0.tgz", "integrity": "sha512-YzFnSH/5pObcFnqZ2sAQ782WmpOZHj1+xB9ydY/0j7BZ2jUNahn53VmwCB/sBRwXA/Fbwwj90q1MLo01Ru0UaQ==", + "dev": true, "dependencies": { "debug": "^4.3.4", "posthtml": "^0.16.6", @@ -647,6 +669,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "node_modules/babel-walk": { "version": "3.0.0-canary-5", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", @@ -761,6 +788,17 @@ "node": ">=8" } }, + "node_modules/brotli-size": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-4.0.0.tgz", + "integrity": "sha512-uA9fOtlTRC0iqKfzff1W34DXUA3GyVqbUaeo3Rw3d4gd1eavKVCETXrn3NzO74W+UVkG3UHu8WxUi+XvKI/huA==", + "dependencies": { + "duplexer": "0.1.1" + }, + "engines": { + "node": ">= 10.16.0" + } + }, "node_modules/browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -1289,9 +1327,9 @@ } }, "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "engines": { "node": ">=8" } @@ -1408,6 +1446,11 @@ "url": "https://github.com/fb55/domutils?sponsor=1" } }, + "node_modules/duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha512-sxNZ+ljy+RA1maXoUReeqBBpBC6RLKmg5ewzV+x+mSETmWNoKdZN6vcQjpFROemza23hGFskJtFNoUWUaQ+R4Q==" + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -1628,6 +1671,11 @@ "node": ">=0.10.0" } }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -2872,57 +2920,19 @@ } }, "node_modules/markdown-it-eleventy-img": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/markdown-it-eleventy-img/-/markdown-it-eleventy-img-0.9.0.tgz", - "integrity": "sha512-C2d7D5MRipB1XlFjiWYUsqtKiy0I+QVcZjk1ZRdKZn44U/wvtO6apyMU24ssgr3qxczUGCbh+vpX4ESQN8CM3Q==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/markdown-it-eleventy-img/-/markdown-it-eleventy-img-0.10.1.tgz", + "integrity": "sha512-MaPM7M1qFzbMj1kUeOiC4ZKICO+543bCDyCd7X3PvUdKwIX1dLFv00jO4D6rJPhiJTW7iFdHkRATuvgUdYCE2w==", "dependencies": { - "@11ty/eleventy-img": "^2.0.1" + "@11ty/eleventy-img": "^3.1.0" }, "engines": { - "node": ">=12" + "node": ">=14.15" }, "peerDependencies": { "markdown-it": ">= 9.0.0" } }, - "node_modules/markdown-it-eleventy-img/node_modules/@11ty/eleventy-img": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-2.0.1.tgz", - "integrity": "sha512-l30E+TszoovF/NK0WRc1oQoI42VxmYyM3O9cPiS20alSBHucX92RFdwl9HMDyRoh1g+App3+PomFIa5FKkb1Dw==", - "dependencies": { - "@11ty/eleventy-fetch": "^3.0.0", - "debug": "^4.3.3", - "image-size": "^1.0.1", - "p-queue": "^6.6.2", - "sharp": "^0.30.3" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/11ty" - } - }, - "node_modules/markdown-it-eleventy-img/node_modules/sharp": { - "version": "0.30.7", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.30.7.tgz", - "integrity": "sha512-G+MY2YW33jgflKPTXXptVO28HvNOo9G3j0MybYAHeEmby+QuD2U98dT6ueht9cv/XDqZspSpIhoSW+BAKJ7Hig==", - "hasInstallScript": true, - "dependencies": { - "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", - "prebuild-install": "^7.1.1", - "semver": "^7.3.7", - "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", - "tunnel-agent": "^0.6.0" - }, - "engines": { - "node": ">=12.13.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" - } - }, "node_modules/markdown-it-emoji": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/markdown-it-emoji/-/markdown-it-emoji-2.0.2.tgz", @@ -3148,9 +3158,15 @@ } }, "node_modules/nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3184,11 +3200,6 @@ "node": ">=10" } }, - "node_modules/node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" - }, "node_modules/node-fetch": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", @@ -3660,9 +3671,9 @@ } }, "node_modules/postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "funding": [ { "type": "opencollective", @@ -3671,10 +3682,14 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "dependencies": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, @@ -4523,6 +4538,11 @@ } ] }, + "node_modules/queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "node_modules/quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -4812,18 +4832,18 @@ } }, "node_modules/sharp": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", - "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "hasInstallScript": true, "dependencies": { "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.3.8", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" }, "engines": { @@ -4833,6 +4853,31 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/sharp/node_modules/node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, + "node_modules/sharp/node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/sharp/node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -5022,6 +5067,15 @@ "node": ">= 0.8" } }, + "node_modules/streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "dependencies": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "node_modules/string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", @@ -5769,22 +5823,34 @@ } }, "@11ty/eleventy-img": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-3.0.0.tgz", - "integrity": "sha512-qMotOn0ywxwuRd2zF2gNfJSwVQNbSBdzVQ2N1UPQeiXNZrxPGIitfraSf/OfWJbgGI9Cje12AtXdzr3Qc6wctw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-3.1.8.tgz", + "integrity": "sha512-9xVqbykggQAHTSiZEo6nUayS8l8nkM7RU8dCjGzikCc8FXSW/E17ytq7SaDngo24D3LZdD+3Gheh4zSeidrImA==", "requires": { - "@11ty/eleventy-fetch": "^3.0.0", + "@11ty/eleventy-fetch": "^4.0.0", + "brotli-size": "^4.0.0", "debug": "^4.3.4", - "entities": "^4.4.0", + "entities": "^4.5.0", "image-size": "^1.0.2", "p-queue": "^6.6.2", - "sharp": "^0.31.3" + "sharp": "^0.32.6" }, "dependencies": { + "@11ty/eleventy-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-fetch/-/eleventy-fetch-4.0.0.tgz", + "integrity": "sha512-wGAd0r+8DUWr22fK5r07dOKuNY6ltA7hX+sJzngGZL1yJmuUVdM/xPQZ+iq0BFgf/ZeRdpVEzf2D0cpVZUuiTg==", + "requires": { + "debug": "^4.3.4", + "flat-cache": "^3.0.4", + "node-fetch": "^2.6.7", + "p-queue": "^6.6.2" + } + }, "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==" + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==" } } }, @@ -5792,6 +5858,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-rss/-/eleventy-plugin-rss-1.2.0.tgz", "integrity": "sha512-YzFnSH/5pObcFnqZ2sAQ782WmpOZHj1+xB9ydY/0j7BZ2jUNahn53VmwCB/sBRwXA/Fbwwj90q1MLo01Ru0UaQ==", + "dev": true, "requires": { "debug": "^4.3.4", "posthtml": "^0.16.6", @@ -6112,6 +6179,11 @@ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" }, + "b4a": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", + "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==" + }, "babel-walk": { "version": "3.0.0-canary-5", "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz", @@ -6191,6 +6263,14 @@ "fill-range": "^7.0.1" } }, + "brotli-size": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-4.0.0.tgz", + "integrity": "sha512-uA9fOtlTRC0iqKfzff1W34DXUA3GyVqbUaeo3Rw3d4gd1eavKVCETXrn3NzO74W+UVkG3UHu8WxUi+XvKI/huA==", + "requires": { + "duplexer": "0.1.1" + } + }, "browserslist": { "version": "4.21.5", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", @@ -6546,9 +6626,9 @@ "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==" }, "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==" }, "detective": { "version": "5.2.1", @@ -6628,6 +6708,11 @@ "domhandler": "^4.2.0" } }, + "duplexer": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "integrity": "sha512-sxNZ+ljy+RA1maXoUReeqBBpBC6RLKmg5ewzV+x+mSETmWNoKdZN6vcQjpFROemza23hGFskJtFNoUWUaQ+R4Q==" + }, "eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -6795,6 +6880,11 @@ "is-extendable": "^0.1.0" } }, + "fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, "fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", @@ -7682,40 +7772,11 @@ "requires": {} }, "markdown-it-eleventy-img": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/markdown-it-eleventy-img/-/markdown-it-eleventy-img-0.9.0.tgz", - "integrity": "sha512-C2d7D5MRipB1XlFjiWYUsqtKiy0I+QVcZjk1ZRdKZn44U/wvtO6apyMU24ssgr3qxczUGCbh+vpX4ESQN8CM3Q==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/markdown-it-eleventy-img/-/markdown-it-eleventy-img-0.10.1.tgz", + "integrity": "sha512-MaPM7M1qFzbMj1kUeOiC4ZKICO+543bCDyCd7X3PvUdKwIX1dLFv00jO4D6rJPhiJTW7iFdHkRATuvgUdYCE2w==", "requires": { - "@11ty/eleventy-img": "^2.0.1" - }, - "dependencies": { - "@11ty/eleventy-img": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@11ty/eleventy-img/-/eleventy-img-2.0.1.tgz", - "integrity": "sha512-l30E+TszoovF/NK0WRc1oQoI42VxmYyM3O9cPiS20alSBHucX92RFdwl9HMDyRoh1g+App3+PomFIa5FKkb1Dw==", - "requires": { - "@11ty/eleventy-fetch": "^3.0.0", - "debug": "^4.3.3", - "image-size": "^1.0.1", - "p-queue": "^6.6.2", - "sharp": "^0.30.3" - } - }, - "sharp": { - "version": "0.30.7", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.30.7.tgz", - "integrity": "sha512-G+MY2YW33jgflKPTXXptVO28HvNOo9G3j0MybYAHeEmby+QuD2U98dT6ueht9cv/XDqZspSpIhoSW+BAKJ7Hig==", - "requires": { - "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", - "prebuild-install": "^7.1.1", - "semver": "^7.3.7", - "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", - "tunnel-agent": "^0.6.0" - } - } + "@11ty/eleventy-img": "^3.1.0" } }, "markdown-it-emoji": { @@ -7883,9 +7944,9 @@ "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==" }, "nanoid": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", - "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==" }, "napi-build-utils": { "version": "1.0.2", @@ -7910,11 +7971,6 @@ "semver": "^7.3.5" } }, - "node-addon-api": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", - "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" - }, "node-fetch": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", @@ -8242,11 +8298,11 @@ } }, "postcss": { - "version": "8.4.21", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", - "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", + "version": "8.4.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", + "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", "requires": { - "nanoid": "^3.3.4", + "nanoid": "^3.3.7", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" } @@ -8812,6 +8868,11 @@ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, + "queue-tick": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", + "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==" + }, "quick-lru": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", @@ -9011,18 +9072,45 @@ "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" }, "sharp": { - "version": "0.31.3", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz", - "integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==", + "version": "0.32.6", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.32.6.tgz", + "integrity": "sha512-KyLTWwgcR9Oe4d9HwCwNM2l7+J0dUQwn/yf7S0EnTtb0eVS4RxO0eUSvxPtzT4F3SY+C4K6fqdv/DO27sJ/v/w==", "requires": { "color": "^4.2.3", - "detect-libc": "^2.0.1", - "node-addon-api": "^5.0.0", + "detect-libc": "^2.0.2", + "node-addon-api": "^6.1.0", "prebuild-install": "^7.1.1", - "semver": "^7.3.8", + "semver": "^7.5.4", "simple-get": "^4.0.1", - "tar-fs": "^2.1.1", + "tar-fs": "^3.0.4", "tunnel-agent": "^0.6.0" + }, + "dependencies": { + "node-addon-api": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", + "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" + }, + "tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "requires": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "requires": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + } } }, "shebang-command": { @@ -9147,6 +9235,15 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==" }, + "streamx": { + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "requires": { + "fast-fifo": "^1.1.0", + "queue-tick": "^1.0.1" + } + }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", diff --git a/package.json b/package.json index 7b0530b..8cec187 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@11ty/eleventy": "^2.0.0", "@11ty/eleventy-fetch": "^3.0.0", "@11ty/eleventy-img": "^3.0.0", - "@11ty/eleventy-plugin-rss": "^1.2.0", "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", "@toycode/markdown-it-class": "^1.2.4", "autoprefixer": "^10.4.13", @@ -29,7 +28,7 @@ "lodash": "^4.17.21", "markdown-it-abbr": "^1.0.4", "markdown-it-anchor": "^8.6.6", - "markdown-it-eleventy-img": "^0.9.0", + "markdown-it-eleventy-img": "^0.10.1", "markdown-it-emoji": "^2.0.2", "markdown-it-footnote": "^3.0.3", "markdown-it-link-attributes": "^4.0.1", @@ -43,5 +42,8 @@ "postcss-nested": "^6.0.0", "prettier": "^2.8.3", "tailwindcss": "^3.2.4" + }, + "devDependencies": { + "@11ty/eleventy-plugin-rss": "^1.2.0" } } diff --git a/src/_data/metadata.json b/src/_data/metadata.json index 81331d4..888880d 100644 --- a/src/_data/metadata.json +++ b/src/_data/metadata.json @@ -6,6 +6,7 @@ "site": { "name": "LewisDale.dev", "domain": "lewisdale.dev", + "url": "https://lewisdale.dev", "description": "", "language": "en" } diff --git a/src/_includes/post.njk b/src/_includes/post.njk index 6d5722f..2268e83 100644 --- a/src/_includes/post.njk +++ b/src/_includes/post.njk @@ -5,16 +5,16 @@ includePrism: true

{{ title | safe }}

-

Published:

+

Published:

{{ content | safe }}
- {% if post.tags | length %} + {% if tags | length %}

Tags:

diff --git a/src/blog/index.html b/src/blog/index.html index 368199e..3f77452 100644 --- a/src/blog/index.html +++ b/src/blog/index.html @@ -13,7 +13,7 @@ pagination: {% for item in pagination.items %}
  • {{ item.data.title | safe }}

    - +
    {{ item.content | excerpt }}
    Read more
  • diff --git a/src/blog/tag.html b/src/blog/tag.html index 3c92ab4..f777339 100644 --- a/src/blog/tag.html +++ b/src/blog/tag.html @@ -2,24 +2,25 @@ title: Blog layout: base.njk pagination: - data: tags + data: collections.tags size: 1 alias: tag eleventyComputed: - permalink: "/post/tag/{{ tag.slug }}/" - feed: "/post/tag/{{ tag.slug }}/feed/" + permalink: "/post/tag/{{ tag }}/" + feed: "/post/tag/{{ tag }}/feed/" ---
    -

    Posts tagged “{{ tag.name }}”

    +

    Posts tagged “{{ tag }}”

      - {% for item in tag.posts %} + {% set posts = collections.posts | filterBy(tag) %} + {% for item in posts %}
    1. -

      {{ item.title.rendered | safe }}

      - - {{ item.excerpt.rendered | safe }} - Read more +

      {{ item.data.title | safe }}

      + +
      {{ item.content | excerpt }}
      + Read more
    2. {% endfor %}
    diff --git a/src/feeds/atom.njk b/src/feeds/atom.njk new file mode 100644 index 0000000..c4d9764 --- /dev/null +++ b/src/feeds/atom.njk @@ -0,0 +1,29 @@ +---json +{ + "permalink": "atom.xml", + "eleventyExcludeFromCollections": true +} +--- + + + {{ metadata.site.name }} + {{ metadata.site.description }} + + + {{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }} + {{ metadata.site.url }} + + {{ metadata.author.name }} + {{ metadata.site.url }} + + {%- for post in collections.posts | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + + {{ post.data.title }} + + {{ post.date | dateToRfc3339 }} + {{ absolutePostUrl }} + {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} + + {%- endfor %} + \ No newline at end of file diff --git a/src/feeds/json.njk b/src/feeds/json.njk new file mode 100644 index 0000000..548cd8e --- /dev/null +++ b/src/feeds/json.njk @@ -0,0 +1,31 @@ +---json +{ + "permalink": "feed.json", + "eleventyExcludeFromCollections": true +} +--- +{ + "version": "https://jsonfeed.org/version/1.1", + "title": "{{ metadata.site.name }}", + "language": "{{ metadata.site.language }}", + "home_page_url": "{{ metadata.site.url }}", + "feed_url": "{{ permalink | absoluteUrl(metadata.site.url) }}", + "description": "{{ metadata.site.description }}", + "author": { + "name": "{{ metadata.author.name }}", + "url": "{{ metadata.site.url }}" + }, + "items": [ + {%- for post in collections.posts | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + { + "id": "{{ absolutePostUrl }}", + "url": "{{ absolutePostUrl }}", + "title": "{{ post.data.title }}", + "content_html": {% if post.templateContent %}{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}{% else %}""{% endif %}, + "date_published": "{{ post.date | dateToRfc3339 }}" + } + {% if not loop.last %},{% endif %} + {%- endfor %} + ] +} \ No newline at end of file diff --git a/src/feeds/rss.njk b/src/feeds/rss.njk new file mode 100644 index 0000000..3cb6aa3 --- /dev/null +++ b/src/feeds/rss.njk @@ -0,0 +1,26 @@ +--- +permalink: /rss.xml +eleventyExcludeFromCollections: true +--- + + + + {{ metadata.site.name }} + {{ metadata.site.url }} + + {{ metadata.site.description }} + {{ metadata.site.language }} + {%- for post in collections.posts | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + + {{ post.data.title }} + {{ absolutePostUrl }} + {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} + {{ post.date | dateToRfc822 }} + {{ metadata.author.name }} + {{ absolutePostUrl }} + + {%- endfor %} + + + diff --git a/src/feeds/tags/atom.njk b/src/feeds/tags/atom.njk new file mode 100644 index 0000000..ee37ad5 --- /dev/null +++ b/src/feeds/tags/atom.njk @@ -0,0 +1,31 @@ +--- +pagination: + data: collections.tags + size: 1 + alias: tag +eleventyComputed: + permalink: "/post/tag/{{ tag }}/atom.xml" +--- + + + {{ metadata.site.name }} + Posts tagged #{{ tag }} + + + {{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }} + {{ metadata.site.url }} + + {{ metadata.author.name }} + {{ metadata.site.url }} + + {%- for post in collections.posts | filterBy(tag) | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + + {{ post.data.title }} + + {{ post.date | dateToRfc3339 }} + {{ absolutePostUrl }} + {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} + + {%- endfor %} + \ No newline at end of file diff --git a/src/feeds/tags/json.njk b/src/feeds/tags/json.njk new file mode 100644 index 0000000..aba5158 --- /dev/null +++ b/src/feeds/tags/json.njk @@ -0,0 +1,33 @@ +--- +pagination: + data: collections.tags + size: 1 + alias: tag +eleventyComputed: + permalink: "/post/tag/{{ tag }}/feed.json" +--- +{ + "version": "https://jsonfeed.org/version/1.1", + "title": "{{ metadata.site.name }}", + "language": "{{ metadata.site.language }}", + "home_page_url": "{{ metadata.site.url }}", + "feed_url": "{{ permalink | absoluteUrl(metadata.site.url) }}", + "description": "Posts tagged #{{ tag }}", + "author": { + "name": "{{ metadata.author.name }}", + "url": "{{ metadata.site.url }}" + }, + "items": [ + {%- for post in collections.posts | filterBy(tag) | reverse %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + { + "id": "{{ absolutePostUrl }}", + "url": "{{ absolutePostUrl }}", + "title": "{{ post.data.title }}", + "content_html": {% if post.templateContent %}{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) | dump | safe }}{% else %}""{% endif %}, + "date_published": "{{ post.date | dateToRfc3339 }}" + } + {% if not loop.last %},{% endif %} + {%- endfor %} + ] +} \ No newline at end of file diff --git a/src/feeds/tags/rss.njk b/src/feeds/tags/rss.njk new file mode 100644 index 0000000..c46444d --- /dev/null +++ b/src/feeds/tags/rss.njk @@ -0,0 +1,30 @@ +--- +pagination: + data: collections.tags + size: 1 + alias: tag +eleventyComputed: + permalink: "/post/tag/{{ tag }}/rss.xml" +--- + + + + {{ metadata.site.name }} + {{ metadata.site.url }} + + Posts tagged #{{ tag }} + {{ metadata.site.language }} + {% set posts = collections.posts | filterBy(tag) | reverse %} + {%- for post in posts %} + {%- set absolutePostUrl = post.url | absoluteUrl(metadata.site.url) %} + + {{ post.data.title }} + {{ absolutePostUrl }} + {{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }} + {{ post.date | dateToRfc822 }} + {{ metadata.author.name }} + {{ absolutePostUrl }} + + {%- endfor %} + + \ No newline at end of file diff --git a/src/sitemap.njk b/src/sitemap.njk index 08dd9f8..dbd5fe4 100644 --- a/src/sitemap.njk +++ b/src/sitemap.njk @@ -4,31 +4,13 @@ permalink: /sitemap.xml - https://{{ metadata.site.domain }}/ + {{ metadata.site.url }}/ 1.0 - - https://{{ metadata.site.domain }}/now/ - + {% for page in collections.all %} - https://{{ metadata.site.domain }}/blog/ - 0.8 - - - https://{{ metadata.site.domain }}/links/ - - - https://{{ metadata.site.domain }}/user-manual.html - - {% for tag in tags %} - - https://{{ metadata.site.domain }}/post/tag/{{ tag.slug }}/ - - {% endfor %} - {% for post in posts %} - - https://{{ metadata.site.domain }}/post/{{ post.slug }}/ - {{ post.date | rfc3339 }} + {{ page.url | absoluteUrl(metadata.site.url) }} + {{ page.date | dateToRfc3339 }} {% endfor %}