mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 20:15:25 +00:00
refactor: rename url_custom to links
BREAKING CHANGE: Rename `url_custom` to `links` if using it in the front matter of any content file. See #765
This commit is contained in:
1 parent
188505b375
commit
26df07a634
7 files changed
+7
-7
No files matched your search
@@ -31,7 +31,7 @@ url_poster = ""
|
||||
|
||||
# Custom links (optional).
|
||||
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
|
||||
# url_custom = [{icon_pack = "fab", icon="twitter", name="Follow", url = "https://twitter.com"}]
|
||||
# links = [{icon_pack = "fab", icon="twitter", name="Follow", url = "https://twitter.com"}]
|
||||
|
||||
# Featured image
|
||||
# To use, add an image named `featured.jpg/png` to your page's folder.
|
||||
|
||||
@@ -65,7 +65,7 @@ url_source = ""
|
||||
|
||||
# Custom links (optional).
|
||||
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
|
||||
# url_custom = [{name = "Custom Link", url = "http://example.org"}]
|
||||
# links = [{name = "Custom Link", url = "http://example.org"}]
|
||||
|
||||
# Featured image
|
||||
# To use, add an image named `featured.jpg/png` to your page's folder.
|
||||
|
||||
@@ -31,7 +31,7 @@ url_code = ""
|
||||
|
||||
# Custom links (optional).
|
||||
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
|
||||
url_custom = [{icon_pack = "fab", icon="twitter", name="Follow", url = "https://twitter.com/georgecushen"}]
|
||||
links = [{icon_pack = "fab", icon="twitter", name="Follow", url = "https://twitter.com/georgecushen"}]
|
||||
|
||||
# Featured image
|
||||
# To use, add an image named `featured.jpg/png` to your project's folder.
|
||||
|
||||
@@ -57,7 +57,7 @@ url_source = "#"
|
||||
|
||||
# Custom links (optional).
|
||||
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
|
||||
url_custom = [{name = "Custom Link", url = "http://example.org"}]
|
||||
links = [{name = "Custom Link", url = "http://example.org"}]
|
||||
|
||||
# Does this page contain LaTeX math? (true/false)
|
||||
math = true
|
||||
|
||||
@@ -65,7 +65,7 @@ url_source = ""
|
||||
|
||||
# Custom links (optional).
|
||||
# Uncomment line below to enable. For multiple links, use the form `[{...}, {...}, {...}]`.
|
||||
# url_custom = [{name = "Custom Link", url = "http://example.org"}]
|
||||
# links = [{name = "Custom Link", url = "http://example.org"}]
|
||||
|
||||
# Does this page contain LaTeX math? (true/false)
|
||||
math = true
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
DOI
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range $.Params.url_custom }}
|
||||
{{ range $.Params.links }}
|
||||
{{ $pack := or .icon_pack "fas" }}
|
||||
{{ $pack_prefix := $pack }}
|
||||
{{ if in (slice "fab" "fas" "far" "fal") $pack }}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{ $cite_link = true }}
|
||||
{{ end }}
|
||||
|
||||
{{ if $cite_link | or $pdf_link | or .Params.external_link | or .Params.url_preprint | or .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_source | or .Params.url_code | or .Params.url_dataset | or .Params.url_poster | or .Params.url_project | or .Params.url_custom | or .Params.projects | or .Params.slides }}
|
||||
{{ if $cite_link | or $pdf_link | or .Params.external_link | or .Params.url_preprint | or .Params.url_pdf | or .Params.url_slides | or .Params.url_video | or .Params.url_source | or .Params.url_code | or .Params.url_dataset | or .Params.url_poster | or .Params.url_project | or .Params.links | or .Params.projects | or .Params.slides }}
|
||||
<div class="btn-links mb-3">
|
||||
{{ with .Params.external_link }}
|
||||
<a class="btn btn-outline-primary my-1" href="{{ . }}" target="_blank" rel="noopener">{{ i18n "open_project_site" }}</a>
|
||||
|
||||
Reference in new issue
Block a user