From f6dba35c739820c9c930756a5784194df8d578e6 Mon Sep 17 00:00:00 2001
From: EmptyWork <22065214+EmptyWork@users.noreply.github.com>
Date: Fri, 4 Jul 2025 15:35:33 +0900
Subject: [PATCH 1/4] =?UTF-8?q?update:=20`.eleventy.js`=20=E2=80=94=20opti?=
=?UTF-8?q?mized=20image=20out=20to=20`/images`?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.eleventy.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.eleventy.js b/.eleventy.js
index dc10593..00e86e0 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -63,7 +63,9 @@ export default function (eleventyConfig) {
},
})
- eleventyConfig.addPlugin(eleventyImageTransformPlugin);
+ eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
+ outputDir: "./images"
+ });
eleventyConfig.addPassthroughCopy({
"src/assets/*.pdf": "assets",
From 949e4c577cbbd122bb6c63dc03d377bc4ae9cbe1 Mon Sep 17 00:00:00 2001
From: EmptyWork <22065214+EmptyWork@users.noreply.github.com>
Date: Fri, 4 Jul 2025 15:36:13 +0900
Subject: [PATCH 2/4] =?UTF-8?q?update:=20`meta.njk`=20=E2=80=94=20reformat?=
=?UTF-8?q?=20and=20refactor?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/_includes/components/meta.njk | 80 +++++++++++++++----------------
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/src/_includes/components/meta.njk b/src/_includes/components/meta.njk
index f8b0c56..298bdda 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" />
+
+
+
+
+
+
From 26c8f549643ece219eb9ee780666dd411fc9d1e4 Mon Sep 17 00:00:00 2001
From: EmptyWork <22065214+EmptyWork@users.noreply.github.com>
Date: Fri, 4 Jul 2025 16:02:53 +0900
Subject: [PATCH 3/4] =?UTF-8?q?update:=20`.eleventy.js`=20=E2=80=94=20make?=
=?UTF-8?q?=20url=20valid=20for=20meta:image?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.eleventy.js | 8 +++++++-
src/_includes/components/meta.njk | 12 ++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/.eleventy.js b/.eleventy.js
index 00e86e0..25d442b 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) {
@@ -96,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, (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 298bdda..151537e 100644
--- a/src/_includes/components/meta.njk
+++ b/src/_includes/components/meta.njk
@@ -31,16 +31,16 @@
{% if image %}
-
-
-
+
+
+
{% else %}
+ content="{{ link.website | development }}/images/emptywork.my.id-secondary-banner.png" />
+ content="{{ link.website | development }}/images/emptywork.my.id-secondary-banner.png" />
+ content="{{ link.website | development }}/images/emptywork.my.id-secondary-banner.png" />
{% endif %}
{% if title %}
From 36b42c0f5dd0ef7fd4fba3bdb03d2c5474f76ae1 Mon Sep 17 00:00:00 2001
From: EmptyWork <22065214+EmptyWork@users.noreply.github.com>
Date: Fri, 4 Jul 2025 16:09:41 +0900
Subject: [PATCH 4/4] =?UTF-8?q?update:=20`.eleventy.js`=20=E2=80=94=20repl?=
=?UTF-8?q?ace=20extra=20path=20from=20link?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.eleventy.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.eleventy.js b/.eleventy.js
index 25d442b..aa2abe7 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -98,7 +98,7 @@ export default function (eleventyConfig) {
eleventyConfig.addFilter("convertToValidURL", (url) => {
if (url.startsWith('http')) return url
- const validURL = new URL(url, (isDevelopment) ? "http://localhost" : link.website)
+ const validURL = new URL(url.replace("\/assets\/",""), (isDevelopment) ? "http://localhost" : link.website)
return validURL
})