From 4297ab1c088fd14e037c019b1aabcba9577ba2d6 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Wed, 13 Feb 2019 23:31:13 +0100 Subject: #22: Move href hack to partial --- layouts/partials/docs/shared.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'layouts/partials/docs/shared.html') diff --git a/layouts/partials/docs/shared.html b/layouts/partials/docs/shared.html index 2027007..8354e6a 100644 --- a/layouts/partials/docs/shared.html +++ b/layouts/partials/docs/shared.html @@ -9,3 +9,18 @@ {{- default $title .Title -}} {{- end -}} {{ end }} + +{{ define "hrefhack" }} + {{ $attrEq := "$=" }} + {{ $attrVal := .RelPermalink }} + {{ if eq .RelPermalink "/" }} + {{ $attrEq = "=" }} + {{ $attrVal = .Permalink }} + {{ end }} + + +{{ end }} \ No newline at end of file -- cgit v1.2.3