From 1ab41b1021f7ee6b7e995d29ad20022097d9c090 Mon Sep 17 00:00:00 2001 From: reuixiy Date: Fri, 10 Jan 2020 18:23:19 +0800 Subject: [PATCH] fix: delimit function --- layouts/partials/components/markdownify.html | 2 +- layouts/partials/minimal-footer.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/components/markdownify.html b/layouts/partials/components/markdownify.html index eb52ddbc..a24c21b9 100644 --- a/layouts/partials/components/markdownify.html +++ b/layouts/partials/components/markdownify.html @@ -4,7 +4,7 @@ {{- $Deliver.Scratch.Set "Content" $raw -}} -{{- $enableEmoji := replaceRE `enableEmoji = (.+)` `$1` (delimit (readFile "config.toml" | findRE `enableEmoji = (.+)` | uniq) "") -}} +{{- $enableEmoji := replaceRE `enableEmoji = (.+)` `$1` (delimit (readFile "config.toml" | findRE `enableEmoji = (.+)` | uniq) " ") -}} {{- $Content := $Deliver.Scratch.Get "Content" -}} diff --git a/layouts/partials/minimal-footer.html b/layouts/partials/minimal-footer.html index 1842ce38..eb02590b 100644 --- a/layouts/partials/minimal-footer.html +++ b/layouts/partials/minimal-footer.html @@ -72,7 +72,7 @@ {{ with .Params.categories }}
{{ if $.Site.Params.enableVerticalBarStructure }} - {{- $currentTopLevelCategory := (delimit (first 1 .) "") -}} + {{- $currentTopLevelCategory := (delimit (first 1 .) " ") -}} {{- $url := urls.Parse ($currentTopLevelCategory | urlize) -}} {{- $path := $url.Path -}} {{- with $.Site.GetPage (printf `/categories/%s` $path) -}} @@ -81,7 +81,7 @@ {{- $.Scratch.Delete "topLevelCategories" -}} {{- range $.Site.RegularPages -}} {{- with .Param "categories" -}} - {{- $topLevelCategory := (delimit (first 1 .) "" | urlize) -}} + {{- $topLevelCategory := ((delimit (first 1 .) " ") | urlize) -}} {{- $.Scratch.Add "topLevelCategories" (slice $topLevelCategory) -}} {{- end -}} {{- end -}}