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)
This commit is contained in:
George Cushen committed 2018-10-17 00:07:31 +01:00
1 parent 061b56a088
commit 089d72ff62
2 files changed
+3 -4

No files matched your search

+3 -4
View File
@@ -11,11 +11,10 @@
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ $directory := "static/files/citations/" }}
{{ $filename := printf "%s%s.bib" $directory $.File.TranslationBaseName }}
{{ if fileExists $filename }}
{{ $resource := $.Resources.GetMatch "*.bib" }}
{{ with $resource }}
<button type="button" class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}} js-cite-modal"
data-filename="{{ printf "files/citations/%s.bib" $.File.TranslationBaseName | relURL }}">
data-filename="{{ .RelPermalink }}">
{{ i18n "btn_cite" }}
</button>
{{ end }}