Commit Graph

56 Commits

Author SHA1 Message Date
ZhenShuo Leo a070040538 fix(a11y): zen mode not working when showZenMode is false
load zen-mode.js in head.html for clarity
2025-08-05 18:36:24 +08:00
Nuno C. 417f6ef42c Merge pull request #2395 from Weaxs/main
Support google adsense
2025-08-03 01:47:37 +01:00
Weaxs 848ac6b17b ADD adsbygoogle.js IN head.html 2025-08-02 20:31:42 +08:00
ZhenShuo Leo 26637ee585 refactor: decoupling a11y and blur 2025-07-22 00:43:14 +08:00
ZhenShuo Leo 9e5a7f9d29 Revert "♻️ Refactor: Move inline styles containing background-image: out of line"
This reverts commit 1736cafcf4.
2025-07-11 09:09:43 +08:00
ZhenShuo Leo 8d05df18dc Revert "🐛 Fix: Typos and images not in css if optimized"
This reverts commit f82776c86b.
2025-07-11 09:09:43 +08:00
ZhenShuo Leo 95b62176cf Revert "🐛 Fix: Reassignment of variable names"
This reverts commit 80486364cd.
2025-07-11 09:09:43 +08:00
Nuno C. 3253e366b3 Merge pull request #2260 from servedsmart/use-pure-version-medium-zoom
🔒 Use pure version of medium-zoom to avoid inline style and simplify CSP usage
2025-07-10 11:40:05 +01:00
Served Smart 65a50ff643 Only generate css classes for used repo colors
This in most cases will reduce the size of main.bundle.css dramatically. Before I had around ~+32kB, now it is ~+228B
2025-07-09 19:19:10 +02:00
Served Smart cc2e90233a ♻️ Refactor: Use universal json and move styles out of line 2025-07-09 19:18:54 +02:00
Served Smart 48a2d64023 🔒 Use pure version of medium-zoom to avoid inline style
This avoids an extra sha sum for a hashed CSP because it merges the CSS into main.bundle.css and avoids any inline styles being applied by medium-zoom.

This addresses concerns mentioned in the closed PR https://github.com/nunocoracao/blowfish/pull/2196, now the same changes are integrated into package.json.

This fixes https://github.com/nunocoracao/blowfish/issues/2195.
2025-07-09 18:52:38 +02:00
Nuno C. b83889b72f Merge pull request #2268 from servedsmart/move-inline-style-background-image-out-of-line
♻️ Refactor: Move inline styles containing background-image: out of line
2025-07-09 15:43:04 +01:00
Nuno C. 0f83712a3d Merge pull request #2253 from servedsmart/move-some-inline-event-handlers-out-of-line
♻️ Refactor: Move 2 inline event handlers out of line
2025-07-09 15:42:33 +01:00
Served Smart a34947a630 ♻️ Refactor: Move 2 inline event handlers out of line
If MDN explicitly warns user not to use them, we probably shouldn't.

MDN also states: "Note that inline event handlers are blocked as well[...]You should replace them with addEventListener calls[...]" regarding CSP.
2025-06-27 19:23:55 +02:00
Served Smart 80486364cd 🐛 Fix: Reassignment of variable names
I'm not sure why this is such a big problem, but hugo doesn't seem to like this. It is also better to just use the intended way to reassign vars always.

Before, *feature* images if using background.html would always get overwritten, now that is fixed.
2025-06-27 19:21:59 +02:00
Served Smart f82776c86b 🐛 Fix: Typos and images not in css if optimized 2025-06-27 19:21:58 +02:00
Served Smart 1736cafcf4 ♻️ Refactor: Move inline styles containing background-image: out of line
This greatly reduces the number of inline styles in the project and enhances maintainability by avoiding a lot of duplicate code.

This also reduces the number of hashes required for a CSP since all previous background-image inline styles are now in main.css.
2025-06-27 19:21:58 +02:00
ZhenShuo Leo 62e5fc2564 style: format head.html 2025-06-19 19:42:57 +08:00
ZhenShuo Leo fda569cb8b fix: make head.html formattable 2025-06-19 19:42:57 +08:00
ZhenShuo Leo e9edfa8f1c feat: support all types of sources for defaultSocialImage 2025-06-19 19:42:56 +08:00
Nuno Coração 03f9c7d732 Merge pull request #2224 from Weaxs/support-adsense
 support advertisement
2025-06-17 23:06:45 +01:00
Weaxs 52b47665c8 support advertisement 2025-06-16 16:18:51 +08:00
Served Smart dc36597427 🔒 Add config parameter fingerprintAlgorithm
This parameter allows users to choose their algorithm for html integrity checks. This mainly affects Hugo's fingerprint
2025-06-03 11:53:03 +02:00
Nuno Coração 5fc28a1ffd Merge pull request #2116 from ZhenShuo2021/feat/extend-head
 Feat: support extend-head access .Page (#1781)
2025-05-27 00:24:57 +01:00
ZhenShuo Leo 73cbdae595 Feat: support extend-head access .Page (#1781)
Use extend-head-uncached.html for downward compatibility
2025-05-06 23:55:47 +08:00
ZhenShuo Leo 3afe8b5e00 chore: correct typo (#1491) (#2100) 2025-05-03 03:14:29 +08:00
ZhenShuo Leo e4b76d6fce feat: add defaultSocialImage (#1491) (#2100)
Add `defaultSocialImage` as the default image for social media sharing. This feature would be useful for users who don’t want to specify an image for every article. This PR also resolves the issue where the homepage missing an image when shared.
2025-05-03 03:07:00 +08:00
ZhenShuo Leo faa22c47d8 🐛 fix: i18n items of code don't work (#1965) 2025-05-02 18:20:41 +08:00
Karun Sandhu 9b3f313d00 don't add mailto: links to <head> 2025-04-17 12:04:31 +02:00
May Meow eedb814199 Add fediverse attribution 2024-10-09 00:26:42 +02:00
Nuno Coração de1fa4a58d fix https://github.com/nunocoracao/blowfish/issues/1695 2024-09-03 23:40:54 +01:00
unacro d6873cf1b1 chore: Move .Site.Author to .Site.Params.Author 2024-08-11 20:45:05 +08:00
W.T. Chang df0a232bfc add hash to zoom.min.js 2024-07-24 23:27:00 +08:00
Ruby a31607509e Only request zoom library if it is not disabled.
There is already a if condition in `footer.html` that only runs the JS
from the zoom library if it is enabled per-site.
This commit takes the same if condition and applies it in `head.html` as
well to save a unnecessary web request to `zoom.min.js` if that is the case.
2023-11-28 06:25:25 +01:00
Gottfried Mayer cfbfc2fbc1 always generate appearance.js in js folder
depending on the basePath, the "appearance.js" was generated in an additional subfolder (i.E. /js/docs/appearance... instead of /js/appearance... ).
2023-07-17 10:36:07 +02:00
Nuno Coração c49443d765 fixed analytics 2023-06-06 21:42:12 +01:00
Nuno Coração 2b3b34fab9 fixe issue with analytics and new hugo update 2023-05-24 22:43:31 +01:00
Nuno Coração 50e4c2b9aa Merge pull request #683 from DanWiseProgramming/feature/add_logo_dark_light_mode_switching
[#676] Add logo dark/light mode switching mechanism
2023-05-12 14:13:14 +01:00
Nuno Coração 7c2ca7969e frontmatter uses both summary and description for site's meta description 2023-05-12 14:10:41 +01:00
Daniel Odrinski cd946b93e5 Merge branch 'dev' into feature/add_logo_dark_light_mode_switching 2023-05-09 14:12:59 +01:00
MaikelChan 0427f9f5af Fixed zoom library not being found if site is in a subfolder. 2023-05-07 06:49:40 +02:00
Daniel Odrinski e3869849bd [#676] Add accidentally un-committed files 2023-05-02 03:17:31 +01:00
madoke bbacdd1dbd Use tags ahead of site default keywords 2023-03-12 18:53:13 +00:00
madoke 81e825ca9a Use article/page configured summary ahead of default 2023-03-12 12:53:14 +00:00
Nuno Coração 3c5be0854d add support for meta theme-color with bg color 2023-02-25 19:14:28 +00:00
Nuno Coração a194975889 Page indicator in navigation bar 2023-01-14 23:50:34 +00:00
Nuno Coração d8e641dc8d final version for testing 2023-01-14 02:09:45 +00:00
Nuno Coração f970b2b6d9 ♻️ initial cleanup 2023-01-08 22:15:54 +00:00
madoke dfb18c126c add nested menus capability 2023-01-06 16:57:51 +00:00
Chris Banes a5242ce7a6 Remove Inter font CSS
This doesn't look like it is used?
2022-10-15 20:31:36 +01:00