From 6229f7fe2040f107b6365129838b03296a4439bd Mon Sep 17 00:00:00 2001 From: zzossig Date: Tue, 30 Jun 2020 23:22:41 +0900 Subject: [PATCH] [bug fix] cite.bib not found fix #293 fix #295 --- layouts/partials/head/meta_json_ld.html | 4 ++-- layouts/partials/publication/pub-links.html | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/layouts/partials/head/meta_json_ld.html b/layouts/partials/head/meta_json_ld.html index 41d3d67..105dc02 100644 --- a/layouts/partials/head/meta_json_ld.html +++ b/layouts/partials/head/meta_json_ld.html @@ -7,7 +7,7 @@ "datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }}, "dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}, "url" : {{ .Permalink }}, - "description": "{{ with (.Description | default (replaceRE "\n" " " (.Summary | truncate 170))) }}{{ . }}{{ end }}", + "description": {{ with (.Description | default (replaceRE "\n" " " (.Summary | truncate 170))) }}{{ . }}{{ else }}""{{ end }}, {{ with .Params.tags -}} "keywords": {{ . }}, {{ end -}} @@ -16,7 +16,7 @@ "url" : {{ .Permalink }}, "name": {{ .Title }}, {{ with $.Param "description" -}} - "description": "{{ . }}", + "description": {{ . }}, {{ end -}} {{ end -}} {{ with $.Param "image" -}} diff --git a/layouts/partials/publication/pub-links.html b/layouts/partials/publication/pub-links.html index f6bdd55..5201cc8 100644 --- a/layouts/partials/publication/pub-links.html +++ b/layouts/partials/publication/pub-links.html @@ -18,8 +18,10 @@ + {{ $langprefix := $.Site.Language.Lang }} + {{ $folderPathWithoutLangPrefix := replace .RelPermalink (print "/" $langprefix "/") "/" }} + {{ $filePath := print "/content/" $langprefix $folderPathWithoutLangPrefix "cite.bib" }}
- {{ $filePath := print "/content" (print .Permalink "cite.bib" | relURL) }} {{ if fileExists $filePath }} {{ end }}
- + {{ if fileExists $filePath }} + + {{ end }}