From 763d5040aaa416fc9235df36bf9a9e9bb0752000 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:47:11 +0300 Subject: [PATCH 1/7] Docs: Inlined a link in the README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 16be253..c1188ee 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ https://mermaid.live. ### Favicon -- Check if RealFaviconGenerator got updated - (https://realfavicongenerator.net/change_log) by running +- Check if RealFaviconGenerator + [got updated](https://realfavicongenerator.net/change_log) by running ```sh npm run check-favicon-update ``` From 026d64f33961fbadeea56002ebf2685777101ddb Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:47:17 +0300 Subject: [PATCH 2/7] Updated the location of the favicon assets --- _config.yml | 2 +- _includes/custom-head.html | 14 +++++++------- .../favicon/android-chrome-192x192.png | Bin .../favicon/android-chrome-512x512.png | Bin assets/{ => images}/favicon/apple-touch-icon.png | Bin assets/{ => images}/favicon/browserconfig.xml | 2 +- assets/{ => images}/favicon/favicon-16x16.png | Bin assets/{ => images}/favicon/favicon-32x32.png | Bin assets/{ => images}/favicon/favicon.ico | Bin assets/{ => images}/favicon/mstile-144x144.png | Bin assets/{ => images}/favicon/mstile-150x150.png | Bin assets/{ => images}/favicon/mstile-310x150.png | Bin assets/{ => images}/favicon/mstile-310x310.png | Bin assets/{ => images}/favicon/mstile-70x70.png | Bin assets/{ => images}/favicon/safari-pinned-tab.svg | 0 assets/{ => images}/favicon/site.webmanifest | 4 ++-- package.json | 6 +++--- sources/favicon/faviconData.json | 2 +- sources/favicon/faviconDescription.json | 2 +- 19 files changed, 16 insertions(+), 16 deletions(-) rename assets/{ => images}/favicon/android-chrome-192x192.png (100%) rename assets/{ => images}/favicon/android-chrome-512x512.png (100%) rename assets/{ => images}/favicon/apple-touch-icon.png (100%) rename assets/{ => images}/favicon/browserconfig.xml (67%) rename assets/{ => images}/favicon/favicon-16x16.png (100%) rename assets/{ => images}/favicon/favicon-32x32.png (100%) rename assets/{ => images}/favicon/favicon.ico (100%) rename assets/{ => images}/favicon/mstile-144x144.png (100%) rename assets/{ => images}/favicon/mstile-150x150.png (100%) rename assets/{ => images}/favicon/mstile-310x150.png (100%) rename assets/{ => images}/favicon/mstile-310x310.png (100%) rename assets/{ => images}/favicon/mstile-70x70.png (100%) rename assets/{ => images}/favicon/safari-pinned-tab.svg (100%) rename assets/{ => images}/favicon/site.webmanifest (67%) diff --git a/_config.yml b/_config.yml index 578fac3..f28c337 100644 --- a/_config.yml +++ b/_config.yml @@ -20,7 +20,7 @@ defaults: - scope: path: "" values: - image: /assets/favicon/android-chrome-512x512.png + image: /assets/images/favicon/android-chrome-512x512.png minima: skin: auto diff --git a/_includes/custom-head.html b/_includes/custom-head.html index 794ac30..f07d072 100644 --- a/_includes/custom-head.html +++ b/_includes/custom-head.html @@ -1,10 +1,10 @@ {% assign favicon_version = 1 %} - - - - - - + + + + + + - + diff --git a/assets/favicon/android-chrome-192x192.png b/assets/images/favicon/android-chrome-192x192.png similarity index 100% rename from assets/favicon/android-chrome-192x192.png rename to assets/images/favicon/android-chrome-192x192.png diff --git a/assets/favicon/android-chrome-512x512.png b/assets/images/favicon/android-chrome-512x512.png similarity index 100% rename from assets/favicon/android-chrome-512x512.png rename to assets/images/favicon/android-chrome-512x512.png diff --git a/assets/favicon/apple-touch-icon.png b/assets/images/favicon/apple-touch-icon.png similarity index 100% rename from assets/favicon/apple-touch-icon.png rename to assets/images/favicon/apple-touch-icon.png diff --git a/assets/favicon/browserconfig.xml b/assets/images/favicon/browserconfig.xml similarity index 67% rename from assets/favicon/browserconfig.xml rename to assets/images/favicon/browserconfig.xml index 2e9b193..4e94946 100644 --- a/assets/favicon/browserconfig.xml +++ b/assets/images/favicon/browserconfig.xml @@ -5,7 +5,7 @@ - + #da532c diff --git a/assets/favicon/favicon-16x16.png b/assets/images/favicon/favicon-16x16.png similarity index 100% rename from assets/favicon/favicon-16x16.png rename to assets/images/favicon/favicon-16x16.png diff --git a/assets/favicon/favicon-32x32.png b/assets/images/favicon/favicon-32x32.png similarity index 100% rename from assets/favicon/favicon-32x32.png rename to assets/images/favicon/favicon-32x32.png diff --git a/assets/favicon/favicon.ico b/assets/images/favicon/favicon.ico similarity index 100% rename from assets/favicon/favicon.ico rename to assets/images/favicon/favicon.ico diff --git a/assets/favicon/mstile-144x144.png b/assets/images/favicon/mstile-144x144.png similarity index 100% rename from assets/favicon/mstile-144x144.png rename to assets/images/favicon/mstile-144x144.png diff --git a/assets/favicon/mstile-150x150.png b/assets/images/favicon/mstile-150x150.png similarity index 100% rename from assets/favicon/mstile-150x150.png rename to assets/images/favicon/mstile-150x150.png diff --git a/assets/favicon/mstile-310x150.png b/assets/images/favicon/mstile-310x150.png similarity index 100% rename from assets/favicon/mstile-310x150.png rename to assets/images/favicon/mstile-310x150.png diff --git a/assets/favicon/mstile-310x310.png b/assets/images/favicon/mstile-310x310.png similarity index 100% rename from assets/favicon/mstile-310x310.png rename to assets/images/favicon/mstile-310x310.png diff --git a/assets/favicon/mstile-70x70.png b/assets/images/favicon/mstile-70x70.png similarity index 100% rename from assets/favicon/mstile-70x70.png rename to assets/images/favicon/mstile-70x70.png diff --git a/assets/favicon/safari-pinned-tab.svg b/assets/images/favicon/safari-pinned-tab.svg similarity index 100% rename from assets/favicon/safari-pinned-tab.svg rename to assets/images/favicon/safari-pinned-tab.svg diff --git a/assets/favicon/site.webmanifest b/assets/images/favicon/site.webmanifest similarity index 67% rename from assets/favicon/site.webmanifest rename to assets/images/favicon/site.webmanifest index 3165d86..09ee307 100644 --- a/assets/favicon/site.webmanifest +++ b/assets/images/favicon/site.webmanifest @@ -6,12 +6,12 @@ "short_name": "Notepad Tab", "icons": [ { - "src": "{% link /assets/favicon/android-chrome-192x192.png %}?v=2", + "src": "{% link /assets/images/favicon/android-chrome-192x192.png %}?v=2", "sizes": "192x192", "type": "image/png" }, { - "src": "{% link /assets/favicon/android-chrome-512x512.png %}?v=2", + "src": "{% link /assets/images/favicon/android-chrome-512x512.png %}?v=2", "sizes": "512x512", "type": "image/png" } diff --git a/package.json b/package.json index 5f37e24..b9434c4 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "scripts": { "serve": "watchy --watch '_config.yml' --watch '_plugins/*.rb' -- bundle exec jekyll serve --host '0.0.0.0' --trace --baseurl '/notepadtab.com'", - "pregenerate-favicon": "mkdir -p assets/favicon", - "generate-favicon": "mkdir -p assets/favicon && real-favicon generate sources/favicon/faviconDescription.json sources/favicon/faviconData.json assets/favicon", - "postgenerate-favicon": "for file in assets/favicon/browserconfig.xml assets/favicon/site.webmanifest; do perl -pi -e 'print \"---\\n---\\n\\n\" if $. == 1' \"$file\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", + "pregenerate-favicon": "mkdir -p assets/images/favicon", + "generate-favicon": "mkdir -p assets/images/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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", "check-favicon-update": "real-favicon check-for-update --fail-on-update sources/favicon/faviconData.json" }, "dependencies": { diff --git a/sources/favicon/faviconData.json b/sources/favicon/faviconData.json index 52a2808..98cd79b 100644 --- a/sources/favicon/faviconData.json +++ b/sources/favicon/faviconData.json @@ -1 +1 @@ -{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/browserconfig.xml","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon.ico","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/site.webmanifest"],"html_code":"\n\n\n\n\n\n\n\n","compression":"true","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-config\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/assets/favicon"},"preview_picture_url":"https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/favicon_preview.png","version":"0.16"} \ No newline at end of file +{"result":{"status":"success"},"favicon":{"package_url":"https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/favicon_package_v0.16.zip","files_urls":["https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/android-chrome-192x192.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/android-chrome-512x512.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/apple-touch-icon.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/browserconfig.xml","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon-16x16.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon-32x32.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/favicon.ico","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-144x144.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-150x150.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-310x150.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-310x310.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/mstile-70x70.png","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/safari-pinned-tab.svg","https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/package_files/site.webmanifest"],"html_code":"\n\n\n\n\n\n\n\n","compression":"true","overlapping_markups":["link[rel=\"apple-touch-icon\"]","link[rel=\"shortcut\"]","link[rel=\"shortcut icon\"]","link[rel=\"icon\",sizes=\"16x16\"]","link[rel=\"icon\",sizes=\"32x32\"]","meta[name=\"msapplication-TileColor\"]","meta[name=\"msapplication-config\"]","link[rel=\"manifest\"]","meta[name=\"theme-color\"]","link[rel=\"mask-icon\"]"]},"files_location":{"type":"path","path":"/assets/images/favicon"},"preview_picture_url":"https://realfavicongenerator.net/files/94a44176afe7cfd3faaadb44f5d5a14d67417754/favicon_preview.png","version":"0.16"} \ No newline at end of file diff --git a/sources/favicon/faviconDescription.json b/sources/favicon/faviconDescription.json index a93277f..8635983 100644 --- a/sources/favicon/faviconDescription.json +++ b/sources/favicon/faviconDescription.json @@ -1,6 +1,6 @@ { "masterPicture": "sources/favicon/favicon.svg", - "iconsPath": "/assets/favicon", + "iconsPath": "/assets/images/favicon", "design": { "ios": { "pictureAspect": "noChange", From 4fd5f44db2cd2ac349e4e9b89d284d996b51cdd7 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:49:43 +0300 Subject: [PATCH 3/7] Docs: Added favicon checker link in the README --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c1188ee..12660e1 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ https://mermaid.live. ```sh npm run generate-favicon ``` +- Check the generated (and deployed) favicon assets by going to + https://realfavicongenerator.net/favicon_checker?protocol=https&site=notepadtab.com ## Usage From 6982cd7ae28503b069a3fee7e28dd9dcab6cec02 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:54:24 +0300 Subject: [PATCH 4/7] Refactor: Fixed inconsistent favicon paths --- _includes/custom-head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/custom-head.html b/_includes/custom-head.html index f07d072..c5f51d5 100644 --- a/_includes/custom-head.html +++ b/_includes/custom-head.html @@ -2,9 +2,9 @@ - + - + From afb71e69b1753050a9c6b864fc3920a830220848 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:00:55 +0300 Subject: [PATCH 5/7] Project: Fixed duplicated command being used when generating the favicon --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b9434c4..3ff5939 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "serve": "watchy --watch '_config.yml' --watch '_plugins/*.rb' -- bundle exec jekyll serve --host '0.0.0.0' --trace --baseurl '/notepadtab.com'", "pregenerate-favicon": "mkdir -p assets/images/favicon", - "generate-favicon": "mkdir -p assets/images/favicon && real-favicon generate sources/favicon/faviconDescription.json sources/favicon/faviconData.json 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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", "check-favicon-update": "real-favicon check-for-update --fail-on-update sources/favicon/faviconData.json" }, From c524004468c4268e861cd9192818fea2627e8f03 Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:11:49 +0300 Subject: [PATCH 6/7] Fixed out of sync favicon HTML --- README.md | 4 ++-- _includes/custom-head.html | 17 ++++++++--------- package.json | 5 +++++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 12660e1..f974083 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ https://mermaid.live. npm run check-favicon-update ``` - If you update [the source SVG](sources/favicon/favicon.svg), or if - RealFaviconGenerator gets updated, generate the favicon assets by running + RealFaviconGenerator gets updated, update the favicon assets by running ```sh - npm run generate-favicon + npm run update-favicon ``` - Check the generated (and deployed) favicon assets by going to https://realfavicongenerator.net/favicon_checker?protocol=https&site=notepadtab.com diff --git a/_includes/custom-head.html b/_includes/custom-head.html index c5f51d5..99dfddf 100644 --- a/_includes/custom-head.html +++ b/_includes/custom-head.html @@ -1,10 +1,9 @@ -{% assign favicon_version = 1 %} - - - - - - + + + + + + - - + + \ No newline at end of file diff --git a/package.json b/package.json index 3ff5939..505e6ea 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,11 @@ "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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", + "update-favicon": "npm run generate-favicon && npm run inject-favicon", + "check-favicon-update": "real-favicon check-for-update --fail-on-update sources/favicon/faviconData.json" }, "dependencies": { From 4922cd2ea74db7177ffff3b4b4797b11ab6615da Mon Sep 17 00:00:00 2001 From: Iulian Onofrei <5748627+revolter@users.noreply.github.com> Date: Wed, 10 Jul 2024 00:15:15 +0300 Subject: [PATCH 7/7] Project: Extracted duplicated shell script into a separate NPM script --- package.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 505e6ea..34fbad9 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,12 @@ "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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", + "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\"; perl -pi -e 's/\\/assets\\/.+(?=\\?v=\\d+)/{% link $& %}/g' \"$file\"; done", - "update-favicon": "npm run generate-favicon && npm run inject-favicon", + "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", + "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" },