Skip to content

Commit 051f98b

Browse files
committed
Refine glossary for vanilla docsy
1 parent 1cef596 commit 051f98b

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed
File renamed without changes.
File renamed without changes.

layouts/docs/glossary.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
{{ define "main" }}
66
<h1>{{ .Title }}</h1>
7-
<link href="{{ "css/glossary.css" | relURL }}" rel="stylesheet">
8-
<script src="{{ "js/glossary.js" | relURL }}"></script>
7+
{{- with resources.Get "css/glossary.css" -}}
8+
<link href="{{ .RelPermalink }}" rel="stylesheet">
9+
{{- end -}}
910
<p>{{ T "layouts_docs_glossary_description" }}</p>
1011
<div id="tag-container">
1112
<p>{{ T "layouts_docs_glossary_filter" }}</p>

layouts/partials/hooks/head-end.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,12 @@
2323
{{- $zoomJs := resources.Get "js/zoom.js" -}}
2424
<script defer src="{{ $zoomJs.RelPermalink }}"></script>
2525
{{- end -}}
26+
{{- end -}}
27+
28+
{{- if eq .Layout "glossary" -}}
29+
{{- with resources.Get "js/glossary.js" -}}
30+
<script defer src="{{ .RelPermalink }}"></script>
31+
{{- else -}}
32+
{{- errorf "Unable to find the glossary helper script" -}}
33+
{{- end -}}
2634
{{- end -}}

0 commit comments

Comments
 (0)