Deprecate comment embedding in favor of button
This commit is contained in:
@ -13,7 +13,7 @@ import {
|
||||
dateSuffixAdder,
|
||||
monthMap,
|
||||
timeFormatter,
|
||||
} from "./public/js/modules/mastodonDateTools.js";
|
||||
} from "./public/js/modules/dateTools.js";
|
||||
|
||||
const figoptions = {
|
||||
figcaption: true,
|
||||
@ -74,11 +74,12 @@ export default async function (eleventyConfig) {
|
||||
eleventyConfig.addPlugin(pluginBundle);
|
||||
|
||||
// Filters
|
||||
eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => {
|
||||
// Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens
|
||||
return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(
|
||||
format || "dd LLLL yyyy",
|
||||
);
|
||||
eleventyConfig.addFilter("niceDate", (date) => {
|
||||
var day = new Date(date).getUTCDate();
|
||||
var monthIndex = new Date(date).getUTCMonth();
|
||||
var year = new Date(date).getUTCFullYear();
|
||||
|
||||
return `${day}${dateSuffixAdder(day)} of ${monthMap[monthIndex]}, ${year}`;
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("htmlDateString", (dateObj) => {
|
||||
|
Reference in New Issue
Block a user