feat(pub): Only generate Cite button when cite.bib is present

Enables users to place other *.bib files in the folder, to be used for
other purposes such as Blogdown bibliographies.

Close #1157
This commit is contained in:
George Cushen committed 2019-06-25 21:21:14 +01:00
1 parent d6cb9463da
commit 4cfd000001
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@
{{ i18n "btn_pdf" }}
</a>
{{ end }}
{{ $resource := $page.Resources.GetMatch "*.bib" }}
{{ $resource := $page.Resources.GetMatch "cite.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="{{ .RelPermalink }}">
+1 -1
View File
@@ -10,7 +10,7 @@
{{ $pdf_link = true }}
{{ end }}
{{ $resource := $page.Resources.GetMatch "*.bib" }}
{{ $resource := $page.Resources.GetMatch "cite.bib" }}
{{ with $resource }}
{{ $cite_link = true }}
{{ end }}