diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 16f68a6..2287d1f 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,7 +1,6 @@ {{- $currentPage := .Page -}} {{- $text := .Text -}} {{- $destination := .Destination -}} - {{- $u := urls.Parse $destination -}} {{- if not $u.Scheme -}} {{- $page := site.GetPage $destination -}} @@ -17,16 +16,22 @@ {{- $bib := strings.TrimPrefix "/library/" $destination -}} {{- $b := index site.Data.books.catalog $bib -}} {{- if not $b.title -}} - {{- warnf "In %s bib:%s not found." $currentPage.RelPermalink $bib -}} + {{- with $currentPage.File -}} + {{- warnf "In /%s bib:%s not found." .Path $bib -}} + {{- end -}} {{- end -}} {{- if not $text -}} {{- $text = $b.title|default "" -}} {{- end -}} library⁄{{- $text -}} {{- else -}} - {{- warnf "In %s broken link: %s" $currentPage.RelPermalink $destination -}} + {{- with $currentPage.File -}} + {{- warnf "In /%s broken link: %s" .Path $destination -}} + {{- end -}} {{- end -}} {{- else -}} - www⁄{{- if .Text }}{{ .Text }}{{- else -}}{{- .Destination -}}{{- end -}} + {{- if hasPrefix $destination "http" -}} + www⁄ + {{- end -}}{{- if .Text }}{{ .Text }}{{- else -}}{{- $destination -}}{{- end -}} {{- end -}} {{- /* chomp trailing newline */ -}} diff --git a/layouts/partials/graph-menu.html b/layouts/partials/graph-menu.html index 046866a..f9df0c8 100644 --- a/layouts/partials/graph-menu.html +++ b/layouts/partials/graph-menu.html @@ -1,7 +1,8 @@ {{- $cursiveMenuPrefix := .cursiveMenuPrefix -}} {{- $menuSection := .menuSection -}} {{- $pagePaths := .pagePaths -}} -
Chunks up a document into paged media flows and applies print styles