diff --git a/README.md b/README.md index 16be253..f974083 100644 --- a/README.md +++ b/README.md @@ -24,16 +24,18 @@ 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 ``` - 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 ## Usage 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..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/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..34fbad9 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,15 @@ "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": "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", + "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" }, "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",