summaryrefslogtreecommitdiff
path: root/layouts/partials/docs
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/docs')
-rw-r--r--layouts/partials/docs/git-footer.html4
-rw-r--r--layouts/partials/docs/html-head.html2
-rw-r--r--layouts/partials/docs/mobile-header.html2
-rw-r--r--layouts/partials/docs/shared.html12
4 files changed, 10 insertions, 10 deletions
diff --git a/layouts/partials/docs/git-footer.html b/layouts/partials/docs/git-footer.html
index b9bcd39..1fc589d 100644
--- a/layouts/partials/docs/git-footer.html
+++ b/layouts/partials/docs/git-footer.html
@@ -3,14 +3,14 @@
{{ with .GitInfo }}
<div>
<a href="{{ $.Site.Params.BookRepo }}/commit/{{ .Hash }}" title='Last modified {{ .AuthorDate.Local.Format "January 2, 2006 15:04 MST" }} by {{ .AuthorName }}' target="_blank" rel="noopener">
- <img src="{{ "svg/code-merge.svg" | absURL }}" /> {{ .AuthorDate.Local.Format "Last Modified Jan 2, 2006" }}
+ <img src="{{ "svg/code-merge.svg" | relURL }}" /> {{ .AuthorDate.Local.Format "Last Modified Jan 2, 2006" }}
</a>
</div>
{{ end }}
{{ with .Site.Params.BookEditPath }}
<div>
<a href="{{ $.Site.Params.BookRepo }}/{{ . }}/{{ $.File.Path }}" target="_blank" rel="noopener">
- <img src="{{ "svg/code-fork.svg" | absURL }}" /> Edit this page
+ <img src="{{ "svg/code-fork.svg" | relURL }}" /> Edit this page
</a>
</div>
{{ end }}
diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html
index b15fe78..5d6f1c1 100644
--- a/layouts/partials/docs/html-head.html
+++ b/layouts/partials/docs/html-head.html
@@ -3,7 +3,7 @@
<title>{{- template "title" . }} | {{ .Site.Title -}}</title>
<link href="https://fonts.googleapis.com/css?family=Oxygen|Oxygen+Mono:300,400,700" rel="stylesheet">
-<link rel="stylesheet" href="{{ "normalize.min.css" | absURL }}">
+<link rel="stylesheet" href="{{ "normalize.min.css" | relURL }}">
{{ $styles := resources.Get "book.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $styles.RelPermalink }}">
diff --git a/layouts/partials/docs/mobile-header.html b/layouts/partials/docs/mobile-header.html
index 7ddd06d..7febbad 100644
--- a/layouts/partials/docs/mobile-header.html
+++ b/layouts/partials/docs/mobile-header.html
@@ -1,6 +1,6 @@
<header class="align-center justify-between book-header">
<label for="menu-control">
- <img src="{{ "svg/menu.svg" | absURL }}" />
+ <img src="{{ "svg/menu.svg" | relURL }}" />
</label>
<strong>{{- template "title" . }}</strong>
</header>
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