Skip to content

Commit 6c9c95e

Browse files
authored
feat: switch to @11ty/eleventy-plugin-rss, bump eleventy-plugin-vento and @11ty/eleventy (#260)
1 parent 9a48b38 commit 6c9c95e

12 files changed

Lines changed: 157 additions & 183 deletions

File tree

config/11ty/filters.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DateTime } from 'luxon';
22
import stringify from '../json-pretty-stringify.js';
3-
import urlize from '../urlize.js';
3+
import { toAbsoluteUrl } from '../url.js';
44

55
const toShortDate = (dateObject) => {
66
// 10/14/1983
@@ -53,5 +53,5 @@ export const filters = (eleventyConfig) => {
5353
eleventyConfig.addFilter('stringify', (value) => {
5454
return stringify(value, '\t');
5555
});
56-
eleventyConfig.addFilter('url', urlize);
56+
eleventyConfig.addFilter('toAbsoluteUrl', toAbsoluteUrl);
5757
};
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import site from '../site.config.js';
22

3-
export default (path, base) => {
3+
export function toAbsoluteUrl(path, base) {
44
if (!base) base = new URL(site.url);
55
return new URL(path, base).href;
6-
};
6+
}

eleventy.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { collections, filters, shortcodes } from './config/11ty/index.js';
22

3+
import pluginRSS from '@11ty/eleventy-plugin-rss';
34
import pluginExternalLinks from '@aloskutov/eleventy-plugin-external-links';
4-
import pluginRSS from '@ryanccn/eleventy-plugin-rss';
55
import pluginTOC from '@uncenter/eleventy-plugin-toc';
66
import pluginAutoCacheBuster from 'eleventy-auto-cache-buster';
77
import pluginIcons from 'eleventy-plugin-icons';

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
},
1414
"dependencies": {
1515
"11ty.ts": "^0.0.5",
16-
"@11ty/eleventy": "3.0.0",
16+
"@11ty/eleventy": "3.0.1-alpha.3",
1717
"@11ty/eleventy-fetch": "^5.0.2",
1818
"@11ty/eleventy-img": "^6.0.1",
19+
"@11ty/eleventy-plugin-rss": "^2.0.3",
1920
"@aloskutov/eleventy-plugin-external-links": "^2.1.1",
2021
"@catppuccin/palette": "^1.7.1",
21-
"@ryanccn/eleventy-plugin-rss": "github:uncenter/ryanccn-eleventy-plugin-rss",
2222
"@shikijs/markdown-it": "1.29.1",
2323
"@shikijs/transformers": "1.29.1",
2424
"@uncenter/eleventy-plugin-toc": "^1.0.3",
@@ -27,7 +27,7 @@
2727
"eleventy-auto-cache-buster": "^0.7.0",
2828
"eleventy-plugin-icons": "^4.5.1",
2929
"eleventy-plugin-validate": "^0.1.3",
30-
"eleventy-plugin-vento": "^4.0.1",
30+
"eleventy-plugin-vento": "^4.1.1",
3131
"html-minifier": "^4.0.0",
3232
"lightningcss": "^1.29.1",
3333
"linkedom": "^0.18.7",
@@ -51,6 +51,11 @@
5151
"terser": "^5.37.0",
5252
"zod": "^3.24.1"
5353
},
54+
"pnpm": {
55+
"patchedDependencies": {
56+
"ventojs": "patches/ventojs.patch"
57+
}
58+
},
5459
"devDependencies": {
5560
"@biomejs/biome": "1.9.4"
5661
},

patches/ventojs.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/esm/src/errors.js b/esm/src/errors.js
2+
index 15ebe973ec2f98600798968cb4f782fa9d7aae02..34610c230a9011c5217b067e1c499f1eec1574a8 100644
3+
--- a/esm/src/errors.js
4+
+++ b/esm/src/errors.js
5+
@@ -11,6 +11,9 @@ export class TemplateError extends VentoBaseError {
6+
this.path = path;
7+
this.source = source;
8+
this.position = position;
9+
+ if (cause) {
10+
+ this.message += `(via ${cause.name})\n`;
11+
+ }
12+
}
13+
}
14+
export class TransformError extends VentoBaseError {

0 commit comments

Comments
 (0)