Skip to content

Commit

Permalink
feat: switch to @11ty/eleventy-plugin-rss, bump `eleventy-plugin-ve…
Browse files Browse the repository at this point in the history
…nto` and `@11ty/eleventy`
  • Loading branch information
uncenter committed Jan 28, 2025
1 parent 9a48b38 commit 6e59de5
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 181 deletions.
4 changes: 2 additions & 2 deletions config/11ty/filters.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DateTime } from 'luxon';
import stringify from '../json-pretty-stringify.js';
import urlize from '../urlize.js';
import { toAbsoluteUrl } from '../url.js';

const toShortDate = (dateObject) => {
// 10/14/1983
Expand Down Expand Up @@ -53,5 +53,5 @@ export const filters = (eleventyConfig) => {
eleventyConfig.addFilter('stringify', (value) => {
return stringify(value, '\t');
});
eleventyConfig.addFilter('url', urlize);
eleventyConfig.addFilter('toAbsoluteUrl', toAbsoluteUrl);
};
4 changes: 2 additions & 2 deletions config/urlize.js → config/url.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import site from '../site.config.js';

export default (path, base) => {
export function toAbsoluteUrl(path, base) {
if (!base) base = new URL(site.url);
return new URL(path, base).href;
};
}
2 changes: 1 addition & 1 deletion eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { collections, filters, shortcodes } from './config/11ty/index.js';

Check failure on line 1 in eleventy.config.js

View workflow job for this annotation

GitHub Actions / lint

organizeImports

Import statements differs from the output

import pluginExternalLinks from '@aloskutov/eleventy-plugin-external-links';
import pluginRSS from '@ryanccn/eleventy-plugin-rss';
import pluginRSS from '@11ty/eleventy-plugin-rss';
import pluginTOC from '@uncenter/eleventy-plugin-toc';
import pluginAutoCacheBuster from 'eleventy-auto-cache-buster';
import pluginIcons from 'eleventy-plugin-icons';
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
},
"dependencies": {
"11ty.ts": "^0.0.5",
"@11ty/eleventy": "3.0.0",
"@11ty/eleventy": "3.0.1-alpha.3",
"@11ty/eleventy-fetch": "^5.0.2",
"@11ty/eleventy-img": "^6.0.1",
"@11ty/eleventy-plugin-rss": "^2.0.3",
"@aloskutov/eleventy-plugin-external-links": "^2.1.1",
"@catppuccin/palette": "^1.7.1",
"@ryanccn/eleventy-plugin-rss": "github:uncenter/ryanccn-eleventy-plugin-rss",
"@shikijs/markdown-it": "1.29.1",
"@shikijs/transformers": "1.29.1",
"@uncenter/eleventy-plugin-toc": "^1.0.3",
Expand All @@ -27,7 +27,7 @@
"eleventy-auto-cache-buster": "^0.7.0",
"eleventy-plugin-icons": "^4.5.1",
"eleventy-plugin-validate": "^0.1.3",
"eleventy-plugin-vento": "^4.0.1",
"eleventy-plugin-vento": "^4.1.1",
"html-minifier": "^4.0.0",
"lightningcss": "^1.29.1",
"linkedom": "^0.18.7",
Expand Down
Loading

0 comments on commit 6e59de5

Please sign in to comment.