Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/capnfabs/paperesque.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Tamp <fabian.tamp@gmail.com>2020-09-28 20:27:25 +0300
committerFabian Tamp <fabian.tamp@gmail.com>2020-09-28 20:27:25 +0300
commit228903d2bad09f92d4de8a2922806fafd24d3966 (patch)
treef3c7181300bd45de02ef2f82c6c8e2f896566e18
parent6351a6ff76652bfb212baaa20457efefe798d378 (diff)
Fix permalinks in Breadcrumbs.
Theoretically fixes https://github.com/capnfabs/paperesque/issues/10, but I couldn't repro that, so I'm not sure :)
-rw-r--r--layouts/_default/baseof.html17
-rw-r--r--layouts/_default/single.html7
-rw-r--r--layouts/taxonomy/taxonomy.html11
3 files changed, 15 insertions, 20 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4b4dba2..221dde7 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -29,8 +29,21 @@
<div class="nav-bkg">
<nav class="content-container pagewide-bar-padding">
<span class="divider">/ </span>
- <a href="{{ .Site.BaseURL }}" >{{ .Site.Title }}</a>
- {{ block "breadcrumbs" . }}{{ end }}
+ <a href="{{ .Site.Home.RelPermalink }}" >{{ .Site.Title }}</a>
+ {{ block "breadcrumbs" . }}
+ {{- with .Parent -}}
+ {{- if not .IsHome -}}
+ <span class="divider">/ </span>
+ <a href="{{ .RelPermalink }}">
+ {{- with .Params.breadcrumb_label -}}
+ {{- . -}}
+ {{- else -}}
+ {{- .Title -}}
+ {{- end -}}
+ </a>
+ {{- end -}}
+ {{- end -}}
+ {{ end }}
{{ partial "right-links" . }}
</nav>
</div>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index df373b0..9772a86 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -2,13 +2,6 @@
{{ if .Draft }}draft{{ end }} look-sheet-bkg
{{- end }}
-{{ define "breadcrumbs" }}
- {{- if not .Parent.IsHome -}}
- <span class="divider">/ </span>
- <a href="{{ .Site.BaseURL }}{{ .CurrentSection.Type }}">{{.CurrentSection.Name}}</a>
- {{- end -}}
-{{ end }}
-
{{ define "content" }}
{{- partial "single-article" . -}}
{{ end }}
diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html
index ffa6661..5cf1be3 100644
--- a/layouts/taxonomy/taxonomy.html
+++ b/layouts/taxonomy/taxonomy.html
@@ -1,14 +1,3 @@
-{{ define "breadcrumbs" }}
- <span class="divider">/ </span>
- <a href="{{ .Site.BaseURL }}{{ .Data.Plural }}">
- {{- with .Parent.Params.breadcrumb_label -}}
- {{- . -}}
- {{- else -}}
- {{- .Data.Plural -}}
- {{- end -}}
- </a>
-{{ end }}
-
{{ define "content" }}
<section id="main" class="content-container article-pad-v">
<div>