From 855ef8417833714e84bf31d8cd91bc7f3a844c53 Mon Sep 17 00:00:00 2001
From: Iulian Onofrei <5748627+revolter@users.noreply.github.com>
Date: Wed, 10 Jul 2024 01:02:48 +0300
Subject: [PATCH 1/2] Refactor: Extracted the favicon HTML into a separate file
---
_includes/custom-head.html | 11 ++---------
_includes/favicon.html | 9 +++++++++
package.json | 8 ++++----
3 files changed, 15 insertions(+), 13 deletions(-)
create mode 100644 _includes/favicon.html
diff --git a/_includes/custom-head.html b/_includes/custom-head.html
index 99dfddf..db6496e 100644
--- a/_includes/custom-head.html
+++ b/_includes/custom-head.html
@@ -1,9 +1,2 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+{% include favicon.html -%}
diff --git a/_includes/favicon.html b/_includes/favicon.html
new file mode 100644
index 0000000..99dfddf
--- /dev/null
+++ b/_includes/favicon.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index be6b032..62c73f3 100644
--- a/package.json
+++ b/package.json
@@ -5,10 +5,10 @@
"pregenerate-favicon": "mkdir -p assets/images/favicon",
"generate-favicon": "real-favicon generate sources/favicon/faviconDescription.json sources/favicon/faviconData.json assets/images/favicon",
"postgenerate-favicon": "for file in assets/images/favicon/browserconfig.xml assets/images/favicon/site.webmanifest; do perl -pi -e 'print \"---\\n---\\n\\n\" if $. == 1' \"$file\"; done",
- "preinject-favicon": "mkdir -p _includes && touch _includes/custom-head.html",
- "inject-favicon": "real-favicon inject sources/favicon/faviconData.json _includes _includes/custom-head.html",
- "postinject-favicon": "for file in _includes/custom-head.html; do perl -pi -e 's/<\\/?(html|head|body)>\\n?//g' \"$file\"; done",
- "linkify-favicon": "for file in assets/images/favicon/browserconfig.xml assets/images/favicon/site.webmanifest _includes/custom-head.html; do perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done",
+ "preinject-favicon": "mkdir -p _includes && touch _includes/favicon.html",
+ "inject-favicon": "real-favicon inject sources/favicon/faviconData.json _includes _includes/favicon.html",
+ "postinject-favicon": "for file in _includes/favicon.html; do perl -pi -e 's/<\\/?(html|head|body)>\\n?//g' \"$file\"; done",
+ "linkify-favicon": "for file in assets/images/favicon/browserconfig.xml assets/images/favicon/site.webmanifest _includes/favicon.html; do perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done",
"update-favicon": "npm run generate-favicon && npm run inject-favicon && npm run linkify-favicon",
"check-favicon-update": "real-favicon check-for-update --fail-on-update sources/favicon/faviconData.json"
From 81d318ed484fb53ef0de5c9872bf557efe131fa9 Mon Sep 17 00:00:00 2001
From: Iulian Onofrei <5748627+revolter@users.noreply.github.com>
Date: Wed, 10 Jul 2024 01:04:16 +0300
Subject: [PATCH 2/2] Project: Fixed failing build
---
_includes/custom-head.html | 2 +-
_includes/favicon.html | 4 ++--
package.json | 1 +
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/_includes/custom-head.html b/_includes/custom-head.html
index db6496e..fd57bd0 100644
--- a/_includes/custom-head.html
+++ b/_includes/custom-head.html
@@ -1,2 +1,2 @@
-{% include favicon.html -%}
+{% include favicon.html %}
diff --git a/_includes/favicon.html b/_includes/favicon.html
index 99dfddf..febb1ce 100644
--- a/_includes/favicon.html
+++ b/_includes/favicon.html
@@ -1,9 +1,9 @@
-
+
-
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 62c73f3..4d94f19 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
"inject-favicon": "real-favicon inject sources/favicon/faviconData.json _includes _includes/favicon.html",
"postinject-favicon": "for file in _includes/favicon.html; do perl -pi -e 's/<\\/?(html|head|body)>\\n?//g' \"$file\"; done",
"linkify-favicon": "for file in assets/images/favicon/browserconfig.xml assets/images/favicon/site.webmanifest _includes/favicon.html; do perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done",
+ "postlinkify-favicon": "for file in _includes/favicon.html; do perl -pi -e 's/\\/(?=assets\\/.+(site\\.webmanifest|browserconfig\\.xml))//g' \"$file\"; done",
"update-favicon": "npm run generate-favicon && npm run inject-favicon && npm run linkify-favicon",
"check-favicon-update": "real-favicon check-for-update --fail-on-update sources/favicon/faviconData.json"