Skip to content

Commit 0797cac

Browse files
committed
fix: add_js_file takes kwargs, not dict
1 parent 38b8d0e commit 0797cac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

util/versionselector/versionselector.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,8 @@ def config_hook(app, config):
102102
if not config.plausible_script or not config.plausible_domain:
103103
return
104104

105-
app.add_js_file(config.plausible_script, {
106-
"defer": "defer", "data-domain": config.plausible_domain
107-
})
108-
print("Plausible analytics script added to this build")
105+
print(f"Adding Plausible analytics script added to this build: {config.plausible_domain}")
106+
app.add_js_file(config.plausible_script, loading_method="defer", **{"data-domain": config.plausible_domain})
109107

110108

111109
def setup(app):

0 commit comments

Comments
 (0)