Allow configuring other data keys to be parsed as dates/content dates #4020
Replies: 3 comments
-
|
I think a lot of this could be achieved with computed data in the data cascade and luxon or https://github.com/11ty/parse-date-strings or whatever date library you want, no? |
Beta Was this translation helpful? Give feedback.
-
|
Maybe a documentation tip would suffice? Seems to be a common enough issue it might warrant a configuration option but you're right it would be as simple as importing the |
Beta Was this translation helpful? Give feedback.
-
In #3926 @slightlyoff added that special values for dates such as "Last Modified" and "Created" are notable and tied to Eleventy internals, though yes for simpler cases using those aforementioned date parsing libraries could work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I come across the issue of and have dealt with personally wanting to use other keys besides
datefor content dates, but not having them work the same way asdatedoes since it is treated specially. For example, having apublishedandeditedfields instead ofdatefor more granular metadata.Describe the solution you'd like
Some kind of configuration API to control it. In #3652, I was thinking something like:
But I'm not sure how best to keep it simple if it is still a core feature.
Describe alternatives you've considered
No response
Additional context
I hope this hasn't already been discussed. I searched among issues for a bit and didn't see anything and being involved in the community I haven't seen much linked around to on this matter.
Beta Was this translation helpful? Give feedback.
All reactions