diff options
author | Queensferry <queensferry.me@gmail.com> | 2022-04-01 10:48:16 +0300 |
---|---|---|
committer | Queensferry <queensferry.me@gmail.com> | 2022-04-01 10:48:16 +0300 |
commit | 15e74554cdc7091649f219916776942bcfa700d4 (patch) | |
tree | 12e5c028b7c6c92e1c844025de2b912f25fdb148 | |
parent | 813f2fd8b9d75fa875b9da6b2843f84a05de2456 (diff) |
feat: allow custom js
-rw-r--r-- | config.toml | 6 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/config.toml b/config.toml index 8855498..6716386 100644 --- a/config.toml +++ b/config.toml @@ -54,7 +54,7 @@ minifyOutput = false # output asset minimization [params] description = "an example site for hugo theme TeXify" # website description -favicon = "/favicon.ico" # path to website icon +favicon = "favicon.ico" # path to website icon, relative to ./static footnote = """ Follow me on <a class=link href=https://github.com/queensferryme>GitHub</a>, <a class=link href=https://twitter.com/queensferryme>Twitter</a> or @@ -63,8 +63,8 @@ Follow me on <a class=link href=https://github.com/queensferryme>GitHub</a>, """ # notes in the website footer keywords = ["hugo", "latex", "theme"] # website keywords -customCSS = [] # path to custom css files, relative to './static/css/' -customJS = [] # path to custom js files, relative to './static/js/' +customCSS = [] # path to custom css files, relative to ./static +customJS = [] # path to custom js files, relative to ./static dateFormat = "2006-01-02" # date format, see https://gohugo.io/functions/format/ enableFullRSS = true # rss full-text output enableHanEmph = true # use dots to emphasize chinese texts, see https://zh.wikipedia.org/wiki/%E7%9D%80%E9%87%8D%E5%8F%B7 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c82b5ad..687c478 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -19,7 +19,7 @@ {{ end }} <!-- favicon --> - <link rel="icon" href="{{ .Site.Params.favicon }}"> + <link rel="icon" href="{{ .Site.Params.favicon | absURL }}"> <!-- keywords --> {{ if .Keywords }} @@ -73,6 +73,11 @@ <link media="screen" rel="stylesheet" href="{{ . | absURL }}" /> {{ end }} + <!-- custom js --> + {{ range .Site.Params.customJS }} + <script src="{{ . | absURL }}"></script> + {{ end }} + <!-- google analytics --> {{ template "_internal/google_analytics_async.html" . }} |