From 089d72ff6268f13276c7ef6d672d33ee43c5b3e1 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 17 Oct 2018 00:07:31 +0100 Subject: [PATCH] feat(pub): convert citation system to use page bundles Close #733 BREAKING CHANGE: To create a publication cite link, place a `*.bib` file in a publication's own folder (see Hugo's new Page Bundle feature) --- .../publication/clothing-search/cite.bib} | 0 layouts/partials/publication_links.html | 7 +++---- 2 files changed, 3 insertions(+), 4 deletions(-) rename exampleSite/{static/files/citations/clothing-search.bib => content/publication/clothing-search/cite.bib} (100%) diff --git a/exampleSite/static/files/citations/clothing-search.bib b/exampleSite/content/publication/clothing-search/cite.bib similarity index 100% rename from exampleSite/static/files/citations/clothing-search.bib rename to exampleSite/content/publication/clothing-search/cite.bib diff --git a/layouts/partials/publication_links.html b/layouts/partials/publication_links.html index ed2273de..186f3142 100644 --- a/layouts/partials/publication_links.html +++ b/layouts/partials/publication_links.html @@ -11,11 +11,10 @@ {{ i18n "btn_pdf" }} {{ end }} -{{ $directory := "static/files/citations/" }} -{{ $filename := printf "%s%s.bib" $directory $.File.TranslationBaseName }} -{{ if fileExists $filename }} +{{ $resource := $.Resources.GetMatch "*.bib" }} +{{ with $resource }} {{ end }}