aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/docs/shared.html
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2019-02-20 10:37:48 +0100
committerAlex Shpak <alex-shpak@users.noreply.github.com>2019-02-20 10:37:48 +0100
commiteb67ab58aa0e083729a4b4906b2522842ccf4954 (patch)
tree7f4a5447807387962b0bdbd5a598ae20c22c7c92 /layouts/partials/docs/shared.html
parent0cfb8a08a41e72670b271ab22a1ca10808efe597 (diff)
Refactor theme to use relative urls everywhere
Diffstat (limited to 'layouts/partials/docs/shared.html')
-rw-r--r--layouts/partials/docs/shared.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html
index 923545a..ec303f5 100644
--- a/layouts/partials/docs/shared.html
+++ b/layouts/partials/docs/shared.html
@@ -1,5 +1,5 @@
{{/*These templates contains some more complex logic and shared between partials*/}}
-{{ define "title" }}
+{{- define "title" -}}
{{- if .Pages -}}
{{ $sections := split (trim .Dir "/") "/" }}
{{ $title := index ($sections | last 1) 0 | humanize | title }}
@@ -8,9 +8,9 @@
{{ $title := .File | humanize | title }}
{{- default $title .Title -}}
{{- end -}}
-{{ end }}
+{{- end -}}
-{{ define "hrefhack" }}
+{{- define "hrefhack" -}}
{{ $attrEq := "$=" }}
{{ $attrVal := .RelPermalink }}
{{ if eq .RelPermalink "/" }}
@@ -23,9 +23,9 @@
color: {{ default "#004ed0" .Site.Params.BookMenuBundleActiveLinkColor }};
}
</style>
-{{ end }}
+{{- end -}}
-{{ define "jsmenu" }}
+{{- define "jsmenu" -}}
<script>
(function() {
var menu = document.querySelector('aside.book-menu nav')
@@ -36,4 +36,4 @@
menu.scrollTop = localStorage.getItem('menu.scrollTop')
})()
</script>
-{{ end }} \ No newline at end of file
+{{- end -}} \ No newline at end of file