Skip to content

Commit

Permalink
Refine glossary for vanilla docsy
Browse files Browse the repository at this point in the history
  • Loading branch information
dipesh-rawat committed Aug 7, 2024
1 parent 1cef596 commit 051f98b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

{{ define "main" }}
<h1>{{ .Title }}</h1>
<link href="{{ "css/glossary.css" | relURL }}" rel="stylesheet">
<script src="{{ "js/glossary.js" | relURL }}"></script>
{{- with resources.Get "css/glossary.css" -}}
<link href="{{ .RelPermalink }}" rel="stylesheet">
{{- end -}}
<p>{{ T "layouts_docs_glossary_description" }}</p>
<div id="tag-container">
<p>{{ T "layouts_docs_glossary_filter" }}</p>
Expand Down
8 changes: 8 additions & 0 deletions layouts/partials/hooks/head-end.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@
{{- $zoomJs := resources.Get "js/zoom.js" -}}
<script defer src="{{ $zoomJs.RelPermalink }}"></script>
{{- end -}}
{{- end -}}

{{- if eq .Layout "glossary" -}}
{{- with resources.Get "js/glossary.js" -}}
<script defer src="{{ .RelPermalink }}"></script>
{{- else -}}
{{- errorf "Unable to find the glossary helper script" -}}
{{- end -}}
{{- end -}}

0 comments on commit 051f98b

Please sign in to comment.