mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 08:15:44 +00:00
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:
1 parent
d6cb9463da
commit
4cfd000001
2 files changed
+2
-2
No files matched your search
@@ -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 }}">
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user