mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 02:14:21 +00:00
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:
1 parent
061b56a088
commit
089d72ff62
2 files changed
+3
-4
No files matched your search
File renamed without changes.
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user