From 862a606590b3e5d7ad8f589fe78ca889c235301e Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Thu, 9 Jul 2020 22:42:23 +0300 Subject: [PATCH] Add custom JS support. CLose #42 --- README.md | 3 +++ layouts/partials/head.html | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index f131846..99ccf97 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Anubis is a simple minimalist theme for [Hugo blog engine](https://gohugo.io/). - Disqus - RSS feeds - Translations (en, ru, fr, pl) +- Custom CSS/JS - Multilingual mode - Robots.txt - Favorite posts @@ -60,6 +61,8 @@ params: - images/og-featured.png # relative path to "static" directory customCSS: - css/my.css # relative path to "static" directory + customJS: + - js/main.js # relative path to "static" directory dateFormat: "2006-01-02" paginationSinglePost: true style: light-without-switcher diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b3e1d6d..93b3731 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -22,6 +22,10 @@ {{- end }} +{{ range .Site.Params.customJS -}} + +{{- end }} + {{ template "_internal/opengraph.html" . }} {{ template "_internal/twitter_cards.html" . }}