Chris Connelly Posted on Sep 30, 2020 How to add custom javascript to Hugo #hugo #javascript #go Add the following to your config.toml custom_js = ["js/custom.js"] Enter fullscreen mode Exit fullscreen mode in your head.html {{ range .Site.Params.custom_js -}} <link rel="stylesheet" href="{{ . | absURL }}"> {{- end }} Enter fullscreen mode Exit fullscreen mode Under static -->js save your custom.js file! Rebuild Top comments (0) Subscribe Submit Preview Dismiss Code of Conduct • Report abuse
Top comments (0)