From 0797cacbe13ea64d96fd5589f4644e713c8f2c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 20 Nov 2024 14:54:25 +0100 Subject: [PATCH] fix: add_js_file takes kwargs, not dict --- util/versionselector/versionselector.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/versionselector/versionselector.py b/util/versionselector/versionselector.py index 57d669c30..b8aceaf1a 100644 --- a/util/versionselector/versionselector.py +++ b/util/versionselector/versionselector.py @@ -102,10 +102,8 @@ def config_hook(app, config): if not config.plausible_script or not config.plausible_domain: return - app.add_js_file(config.plausible_script, { - "defer": "defer", "data-domain": config.plausible_domain - }) - print("Plausible analytics script added to this build") + print(f"Adding Plausible analytics script added to this build: {config.plausible_domain}") + app.add_js_file(config.plausible_script, loading_method="defer", **{"data-domain": config.plausible_domain}) def setup(app):