diff --git a/.eleventy.js b/.eleventy.js
index dc10593..aa2abe7 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -13,7 +13,7 @@ import toc from "markdown-it-table-of-contents"
import mark from "markdown-it-mark"
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img"
import rssPlugin from "@11ty/eleventy-plugin-rss"
-
+import link from "./src/_data/link.json" with {type: 'json'}
dotenv.config()
export default function (eleventyConfig) {
@@ -63,7 +63,9 @@ export default function (eleventyConfig) {
},
})
- eleventyConfig.addPlugin(eleventyImageTransformPlugin);
+ eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
+ outputDir: "./images"
+ });
eleventyConfig.addPassthroughCopy({
"src/assets/*.pdf": "assets",
@@ -94,6 +96,12 @@ export default function (eleventyConfig) {
return date.toISOString()
})
+ eleventyConfig.addFilter("convertToValidURL", (url) => {
+ if (url.startsWith('http')) return url
+ const validURL = new URL(url.replace("\/assets\/",""), (isDevelopment) ? "http://localhost" : link.website)
+ return validURL
+ })
+
eleventyConfig.addFilter("postYear", (dateObj) => {
return DateTime.fromJSDate(dateObj).toLocaleString({ year: "numeric" })
})
diff --git a/src/_includes/components/meta.njk b/src/_includes/components/meta.njk
index f8b0c56..151537e 100644
--- a/src/_includes/components/meta.njk
+++ b/src/_includes/components/meta.njk
@@ -5,75 +5,75 @@
{% if author %}
-
+
{% else %}
-
+
{% endif %}
{% if description %}
-
-
-
-
+
+
+
+
{% else %}
-
-
-
-
+
+
+
+
{% endif %}
{% if image %}
-
-
-
+
+
+
{% else %}
-
-
-
+
+
+
{% endif %}
{% if title %}
-
-
-
+
+
+
{% else %}
-
-
-
+
+
+
{% endif %}
+ href="/images/apple-touch-icon.png" />
+ href="/images/favicon-32x32.png" />
+ href="/images/favicon-194x194.png" />
+ href="/images/android-chrome-192x192.png" />
-
-
-
-
-
-
+ href="/images/favicon-16x16.png" />
+
+
+
+
+
+