0fc8264927 fix: comment scripts bypass cookie consent (#1308)
* fix: comment scripts bypass cookie consent

When GDPR cookie consent is enabled, the comments container is simply
hidden with CSS. However, this still allows all third-party script
tags within the container to be evaluated and downloaded by the
browser.

This PR uses the <template> tag which stops inner scripts from evaluating.
Once consent is granted, the template content is cloned and inserted
into the container, and the scripts are manually loaded in order.

* refactor(comments): move consent-gated loader to TS asset

* fix(comments): add integrity attribute to comments consent script

* style: align comments consent docs and naming

* refactor(comments): simplify script handling

---------

Co-authored-by: Jimmy Cai <jimmy@cai.im>
2026-04-26 18:51:22 +02:00
2026-04-26 13:40:46 +02:00
2020-09-13 12:24:07 +02:00
2020-08-22 13:20:08 +02:00
2026-02-17 19:20:09 +01:00

image

Hugo Theme Stack

logo

Card-style Hugo theme designed for bloggers.

Quickstart

Use this template: CaiJimmy/hugo-theme-stack-starter

Demo

Check demo.stack.cai.im

Documentation

Licensed under the GNU General Public License v3.0

Please do not remove the "Theme Stack designed by Jimmy" text and link.

If you want to port this theme to another blogging platform, please let me know🙏.

S
Description
No description provided
Readme GPL-3.0
1.8 MiB
Languages
HTML 39.5%
SCSS 34%
TypeScript 25.4%
Shell 1.1%