mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-07-13 16:16:44 +02:00
Add Markdown-based news content model
This commit is contained in:
@@ -28,6 +28,14 @@ function rewriteManualLinks(content, lang) {
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
|
||||
eleventyConfig.addFilter("readableDate", function (dateObj) {
|
||||
return new Intl.DateTimeFormat("en", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric"
|
||||
}).format(dateObj);
|
||||
});
|
||||
|
||||
eleventyConfig.addCollection("sortedFeatures", function (collectionApi) {
|
||||
return collectionApi.getFilteredByTag("features").sort((a, b) => {
|
||||
return (a.data.order || 999) - (b.data.order || 999);
|
||||
|
||||
Reference in New Issue
Block a user