components custom script - fitizens/hugo-modules GitHub Wiki

Custom Script component

Install Module

Add the following code to your module list in the config/_default/module.toml file.

[[imports]]
path = "github.com/gethugothemes/hugo-modules/components/custom-script"

custom-script Implementation

Call it, as a partial in your theme head.

<!-- custom script -->
{{ partialCached "custom-script.html" . }}

Configure it in the config/_default/params.toml file.

# custom script on header, example: custom_script= "<script>console.log(\"Hello World\")</script>"
custom_script = ""
⚠️ **GitHub.com Fallback** ⚠️