Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini simplifications #65

Open
juchom opened this issue Oct 25, 2024 · 1 comment
Open

Mini simplifications #65

juchom opened this issue Oct 25, 2024 · 1 comment

Comments

@juchom
Copy link

juchom commented Oct 25, 2024

Hello Lene,

If I'm correct (I'm not a web person), 11ty is shipping this filters :

htmlBaseUrl which can replace this custom filter toAbsoluteUrl in main/src/_config/filters/to-absolute-url.js.

dateToRfc3339 (shipped with @11ty/eleventy-plugin-rss) which can replace this custom filter toISOString in src/_config/filters/dates.js

I'm not sure yet how to do it but formatDate in src/_config/filters/dates.js could probably use Intl.DateTimeFormat api and avoid an extra dependency on dayjs

Again thanks for this excellent repo !

EDIT : if toAbsoluteUrl is not needed anymore you could also remove src/_config/utils/throw-if-not-type.js as it is the only place where it is used.

@madrilene
Copy link
Owner

I'll check that again!
I guess I prefer some filters to be stable, in case I remove the RSS plugin for a specific project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants