Skip to content

Commit

Permalink
Poprawka w breadcrumbsach
Browse files Browse the repository at this point in the history
  • Loading branch information
wprzyb committed Jul 13, 2024
1 parent 3315c36 commit 41710d8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ breadcrumbs_override:
authors: "Autorzy"
puk: "Projekty"

breadcrumbs_overrideurl:
'2017': "talks"
'2018': "talks"
'2019': "talks"
'2020': "talks"
'2022': "talks"
'2023': "talks"
'2024': "talks"

collections:
puk:
output: true
Expand Down
3 changes: 2 additions & 1 deletion _includes/breadcrumbs.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{% assign i = 1 %}
{% for crumb in crumbs offset: 1 %}
{% assign overridencrumb = site.breadcrumbs_override[crumb] %}
{% assign overridencrumburl = site.breadcrumbs_overrideurl[crumb] %}
{% if forloop.first %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ '/' | relative_url }}" itemprop="item"><span itemprop="name">{{ site.data.ui-text[site.locale].breadcrumb_home_label | default: "Home" }}</span></a>
Expand All @@ -31,7 +32,7 @@
{% else %}
{% assign i = i | plus: 1 %}
<li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
<a href="{{ crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ overridencrumb | default: crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
<a href="{{ overridencrumburl |default: crumb | downcase | replace: '%20', '-' | prepend: path_type | prepend: crumb_path | relative_url }}" itemprop="item"><span itemprop="name">{{ overridencrumb | default: crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}</span></a>
<meta itemprop="position" content="{{ i }}" />
</li>
<span class="sep">{{ site.data.ui-text[site.locale].breadcrumb_separator | default: "/" }}</span>
Expand Down

0 comments on commit 41710d8

Please sign in to comment.