diff options
author | Ahmed Alsuwaidi <aasuwaidi24@gmail.com> | 2022-02-27 12:10:25 +0300 |
---|---|---|
committer | Athul Cyriac Ajay <athul8720@gmail.com> | 2022-03-03 20:33:05 +0300 |
commit | 5fbc45536a2999a697cebf8eb375d07acf0c6503 (patch) | |
tree | 7b248d9d4ddd32a647ea5e1de35a50549f016e99 | |
parent | 57ff9c6ee9d44c0aac539c5b0b57c87370995c1a (diff) |
Added <script> tag support to customJS
Added a "readmore" class to the read more links to enable finegrained css
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/layouts/index.html b/layouts/index.html index 77490de..c556e82 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -24,7 +24,7 @@ {{ .Summary }}… {{ end }} </div> - <a href="{{ .RelPermalink }}">Read more ⟶</a> + <a class="readmore" href="{{ .RelPermalink }}">Read more ⟶</a> </section> {{ end }} {{ template "partials/paginator.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 9fed977..f3c9e82 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -54,6 +54,8 @@ {{- range .Site.Params.customJS }} {{- if or (hasPrefix . "http://") (hasPrefix . "https://") }} <script src="{{ . }}"></script> + {{- else if (hasPrefix . "<script")}} + {{ .| safeHTML }} {{- else }} <script src="{{ $.Site.BaseURL }}{{ . }}"></script> {{- end }} |