Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/athul/archie.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmed Alsuwaidi <aasuwaidi24@gmail.com>2022-02-27 12:10:25 +0300
committerAthul Cyriac Ajay <athul8720@gmail.com>2022-03-03 20:33:05 +0300
commit5fbc45536a2999a697cebf8eb375d07acf0c6503 (patch)
tree7b248d9d4ddd32a647ea5e1de35a50549f016e99
parent57ff9c6ee9d44c0aac539c5b0b57c87370995c1a (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.html2
-rw-r--r--layouts/partials/header.html2
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 }}&hellip;
{{ 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 }}