diff --git a/layouts/partials/cite.html b/layouts/partials/cite.html index fb2d928..cf39d3e 100644 --- a/layouts/partials/cite.html +++ b/layouts/partials/cite.html @@ -12,8 +12,11 @@ */ -}} +{{- $citeText := default .Params.cite ( .Scratch.Get "cite" ) }} +{{- $replacedCite := replaceRE `^([a-z]+?://)?(www)?` "" $citeText }} +{{- $startOfCite := delimit ( findRE `^([a-z]+?://)?(www)?` $citeText 1 ) "" }} +{{- $cite := replaceRE `^` $startOfCite ( trim ( $replacedCite | .Page.RenderString ) "\r\n" ) -}} -{{- $cite := trim ( default .Params.cite ( .Scratch.Get "cite" ) | .Page.RenderString ) "\r\n" -}} {{- $title := trim ( default .Params.title ( .Scratch.Get "title" ) | .Page.RenderString ) "\r\n" -}} {{- $titleLang := default .Params.titleLang ( .Scratch.Get "titleLang" ) -}} {{- $titleTr := default .Params.titleTr ( .Scratch.Get "titleTr" ) -}} @@ -45,7 +48,6 @@ {{- end -}} - {{- $itemType := default "CreativeWork" $schemaType -}} {{- if ( or ( in $.Site.Data.itemtypes $itemType ) ( eq .Params.suppress "true" ) ) -}} {{- with .Params.href -}}