diff options
| author | Kevin J Hoerr <kjhoerr@protonmail.com> | 2023-12-24 08:13:33 +0000 |
|---|---|---|
| committer | Kevin J Hoerr <kjhoerr@protonmail.com> | 2023-12-24 08:13:33 +0000 |
| commit | 1c4c99f0c19f19424e3aee04e868c38333164dd9 (patch) | |
| tree | 783970ddbd3d1f696493a8b66d9cff6aed533b68 /src/config.ts | |
| parent | 3bc3700152504ac0ff4f9a42a45ab59cde2e189d (diff) | |
| download | submelon.dev-1c4c99f0c19f19424e3aee04e868c38333164dd9.tar.gz submelon.dev-1c4c99f0c19f19424e3aee04e868c38333164dd9.tar.bz2 submelon.dev-1c4c99f0c19f19424e3aee04e868c38333164dd9.zip | |
Generate sitemap.xml, robots.txt
Diffstat (limited to 'src/config.ts')
| -rw-r--r-- | src/config.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config.ts b/src/config.ts index 75ba2dd..c9f5ba0 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -import { getTimestamp } from "./util/timestamp"; +import { formatDate, getTimestamp } from "./util/timestamp"; import BuildInfo from "../config.json"; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -9,10 +9,14 @@ export default function (eleventyConfig: any) { }); // hook in configured build time for GH action to update + eleventyConfig.addGlobalData("site", () => BuildInfo); eleventyConfig.addGlobalData("buildTimeEncoded", () => { return getTimestamp(Number(BuildInfo.version)); }); + // add `date` filter + eleventyConfig.addFilter("formatDate", formatDate); + // ensure eleventy marks this config as watched, since it's typescript eleventyConfig.addWatchTarget("./src/config.ts"); |
