Skip to content

Commit

Permalink
Allow skipping spec versions in breadcrumb
Browse files Browse the repository at this point in the history
Otherwise it gets a bit unwieldy
  • Loading branch information
kzu committed Oct 1, 2024
1 parent 73b2825 commit f8fb3b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ gh_edit_view_mode: tree

# sponsorlink
spec: 2.0.1
spec_skip: ";2.0.0;2.0.0-rc.1;2.0.0-rc.2;"
issues_template: |
{{#if available}}
<p class="mt-6 issues-available">Your one-time sponsorships can be assigned to fund specific issues.</p>
Expand Down
11 changes: 7 additions & 4 deletions docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ has_toc: false

{%- assign versions = site[page.collection]
| default: site.html_pages
| where: "parent", page.title -%}
| where: "parent", page.title -%}

{% for spec in versions -%}
{% if spec.title == site.spec -%}
{%- assign delimited = ';' | append: spec.title | append: ';' -%}
{%- unless site.spec_skip contains delimited -%}
{% if spec.title == site.spec -%}
[{{ spec.title }}]({{ spec.url | relative_url }}){: .btn .btn-blue }
{% else -%}
{% else -%}
[{{ spec.title }}]({{ spec.url | relative_url }}){: .btn }
{% endif -%}
{% endif -%}
{%- endunless -%}
{% endfor -%}

{% capture source %}{% include_relative spec/{{ site.spec }}.md %}{% endcapture %}
Expand Down

0 comments on commit f8fb3b1

Please sign in to comment.