madrilene / eleventy-excellent

Eleventy starter based on the workflow suggested by Andy Bell's buildexcellentwebsit.es.
https://eleventy-excellent.netlify.app/
Other
404 stars 73 forks source link

Mini simplifications #65

Open juchom opened 1 month ago

juchom commented 1 month ago

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 commented 3 days ago

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.