Skip to content

Commit

Permalink
Squashed 'docs/themes/docs-theme/' changes from 4dba9dd2e..d84a9b2e3
Browse files Browse the repository at this point in the history
d84a9b2e3 Change glossary path

git-subtree-dir: docs/themes/docs-theme
git-subtree-split: d84a9b2e3d94bc46382e79bb7b14775f5f9d29ff
  • Loading branch information
ChrisChinchilla committed Sep 15, 2020
1 parent d5fff76 commit fa9fe8b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/docs/glossary-terms.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ $glossaryBundle := site.GetPage "page" "reference/glossary" }}
{{ $glossaryBundle := site.GetPage "page" "glossary" }}
{{- if $glossaryBundle -}}
{{ $pages := $glossaryBundle.Resources.ByType "page" }}
{{- range site.Params.language_alternatives -}}
Expand All @@ -9,5 +9,5 @@
{{ end }}
{{- $.Scratch.Set "glossary_items" $pages -}}
{{- else -}}
{{- errorf "[%s] Glossary Bundle not found for language. Create at least an index.md file inside docs/reference/glossary" site.Language.Lang -}}
{{- errorf "[%s] Glossary Bundle not found for language. Create at least an index.md file inside docs/glossary" site.Language.Lang -}}
{{- end -}}
4 changes: 2 additions & 2 deletions layouts/shortcodes/glossary_definition.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{- $id := .Get "term_id" -}}
{{- $length := .Get "length" -}}
{{- $prepend := .Get "prepend" }}
{{- $glossaryBundle := site.GetPage "page" "reference/glossary" -}}
{{- $glossaryBundle := site.GetPage "page" "glossary" -}}
{{- $glossaryItems := $glossaryBundle.Resources.ByType "page" -}}
{{- $term_info := $glossaryItems.GetMatch (printf "%s.md" $id ) -}}
{{- if not $term_info -}}
{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./reference/glossary/* for a full list" site.Language.Lang .Page.Path $id -}}
{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./glossary/* for a full list" site.Language.Lang .Page.Path $id -}}
{{- end -}}
{{- with $term_info -}}
{{- if (strings.Contains "short" $length) -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/glossary_tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{{- else -}}
{{- $term_info := $glossary_items.GetMatch (printf "%s.md" $id ) -}}
{{- if not $term_info -}}
{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./reference/glossary/* for a full list" site.Language.Lang .Page.Path $id -}}
{{- errorf "[%s] %q: %q is not a valid glossary term_id, see ./glossary/* for a full list" site.Language.Lang .Page.Path $id -}}
{{- end }}
{{- with $term_info -}}
{{- $text := $text | default $term_info.Title -}}
Expand Down

0 comments on commit fa9fe8b

Please sign in to comment.