Skip to content

Commit

Permalink
refactor: rename url_custom to links
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Rename `url_custom` to `links` if using it in the front matter of any
content file.

See #765
  • Loading branch information
gcushen committed Feb 13, 2019
1 parent 188505b commit 26df07a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion archetypes/project/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion archetypes/publication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/project/internal-project/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/publication/clothing-search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/publication/person-re-id/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/page_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/page_links_div.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 26df07a

Please sign in to comment.