diff --git a/README.md b/README.md index 3e6a74c..474b365 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ An accessibility-friendly Hugo theme, ported from the [original Cupper](https:// - [Syntax highlighting](#syntax-highlighting) - [Disable toc for a blog post](#disable-toc-for-a-blog-post) - [Localization](#localization) -- [Custom css](#custom-css) +- [Custom CSS and JS](#custom-css-and-js) - [Getting help](#getting-help) - [Credits](#credits) @@ -92,11 +92,13 @@ The strings in the templates of this theme can be localized. Make a copy of ` { + console.log(message); +}; diff --git a/exampleSite/static/js/custom_02.js b/exampleSite/static/js/custom_02.js new file mode 100644 index 0000000..4fb8691 --- /dev/null +++ b/exampleSite/static/js/custom_02.js @@ -0,0 +1,3 @@ +const yourCustomFunction02 = (message) => { + console.log(message); +}; diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2f20857..490f21d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -26,9 +26,9 @@ {{ $styles := $templateStyles | resources.ExecuteAsTemplate "css/styles.css" . }} - {{ range .Site.Params.customCss -}} + {{ range .Site.Params.customCss }} - {{- end }} + {{ end }}