publication: Add optional DOI link (#677)

This commit is contained in:
Andrew Fowlie authored and gcushen committed 2018-09-15 17:49:13 +01:00
1 parent 7919efd7a3
commit 02d84dff98
4 files changed
+14

No files matched your search

+3
View File
@@ -57,6 +57,9 @@ url_source = ""
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
# url_custom = [{name = "Custom Link", url = "http://example.org"}]
# Digital Object Identifier (DOI)
doi = ""
# Does this page contain LaTeX math? (true/false)
math = false
@@ -57,6 +57,9 @@ url_source = "#"
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
url_custom = [{name = "Custom Link", url = "http://example.org"}]
# Digital Object Identifier (DOI)
doi = ""
# Does this page contain LaTeX math? (true/false)
math = true
@@ -57,6 +57,9 @@ url_source = ""
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
# url_custom = [{name = "Custom Link", url = "http://example.org"}]
# Digital Object Identifier (DOI)
doi = ""
# Does this page contain LaTeX math? (true/false)
math = true
+5
View File
@@ -66,6 +66,11 @@
{{ i18n "btn_source" }}
</a>
{{ end }}
{{ with $.Params.doi }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="https://doi.org/{{ . }}" target="_blank" rel="noopener">
DOI
</a>
{{ end }}
{{ range $.Params.url_custom }}
<a class="btn btn-outline-primary my-1 mr-1{{ if $is_list }} btn-sm{{end}}" href="{{ .url | relURL }}" target="_blank" rel="noopener">
{{ .name }}