Added <script> tag support to customJS Added a "readmore" class to the read more links to enable finegrained css
Ahmed Alsuwaidi aasuwaidi24@gmail.com
Sun, 27 Feb 2022 13:10:25 +0400
2 files changed,
3 insertions(+),
1 deletions(-)
M
layouts/index.html
→
layouts/index.html
@@ -24,7 +24,7 @@ {{ else }}
{{ .Summary }}… {{ end }} </div> - <a href="{{ .RelPermalink }}">Read more ⟶</a> + <a class="readmore" href="{{ .RelPermalink }}">Read more ⟶</a> </section> {{ end }} {{ template "partials/paginator.html" . }}
M
layouts/partials/header.html
→
layouts/partials/header.html
@@ -54,6 +54,8 @@ {{- end -}}
{{- 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 }}