Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
Add custom JS support. CLose #42
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitrichius committed Jul 9, 2020
1 parent 2b180e6 commit 862a606
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<link rel="stylesheet" href="{{ . | absURL }}?rnd={{ now.Unix }}">
{{- end }}

{{ range .Site.Params.customJS -}}
<script src="{{ . | absURL }}?rnd={{ now.Unix }}" type="text/javascript" charset="utf-8"></script>
{{- end }}

{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

Expand Down

0 comments on commit 862a606

Please sign in to comment.