Skip to content

Commit

Permalink
Merge 7514881 into ad78d5f
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond committed Mar 12, 2024
2 parents ad78d5f + 7514881 commit 5899979
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
persist-credentials: false

- name: Run cspell
uses: streetsidesoftware/cspell-action@v5
uses: streetsidesoftware/cspell-action@v6
with:
config: ".cspell.json"
files: "**/*.md"
Expand Down
6 changes: 4 additions & 2 deletions site/layouts/_default/_markup/render-heading.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}
{{- $id := .Anchor | safeURL -}}
{{- $text := .Text | safeHTML -}}
<h{{ .Level }} id="{{ $id }}">{{ $text }}
{{- if and (ge .Level .Page.Site.Params.anchors.min) (le .Level .Page.Site.Params.anchors.max) }}{{" " -}}
<a class="anchor-link" href="#{{ .Anchor | safeURL }}" aria-label="Link to this section: {{ .Text | safeHTML }}"></a>
<a class="anchor-link" href="#{{ $id }}" aria-label="Link to this section: {{ $text }}"></a>
{{- end -}}
</h{{ .Level }}>
10 changes: 7 additions & 3 deletions site/layouts/partials/docs-versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
{{- $versions_link = printf "%s/" $page_slug -}}
{{- end }}

{{- $added_in_51 := eq (string .Page.Params.added) "5.1" -}}
{{- $added_in_52 := eq (string .Page.Params.added) "5.2" -}}
{{- $added_in_53 := eq (string .Page.Params.added) "5.3" -}}

<li class="nav-item dropdown">
<button class="nav-link nav-icon dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
<span class="d-lg-none" aria-hidden="true">Boosted&nbsp;</span><span class="visually-hidden">Boosted&nbsp;</span>v{{ .Site.Params.docs_version }} <span class="visually-hidden">(switch to other versions)</span>
Expand All @@ -23,21 +27,21 @@
</a>
</li>
<li>
{{- if (eq .Page.Params.added "5.3") }}
{{- if ($added_in_53) }}
<div class="dropdown-item disabled">v5.2.3</div>
{{- else }}
<a class="dropdown-item" href="https://boosted.orange.com/docs/5.2/{{ $versions_link }}">v5.2.3</a>
{{- end }}
</li>
<li>
{{- if or (eq .Page.Params.added "5.2") (eq .Page.Params.added "5.3") }}
{{- if (or $added_in_52 $added_in_53) }}
<div class="dropdown-item disabled">v5.1.3</div>
{{- else }}
<a class="dropdown-item" href="https://boosted.orange.com/docs/5.1/{{ $versions_link }}">v5.1.3</a>
{{- end }}
</li>
<li>
{{- if or (eq .Page.Params.added "5.1") (eq .Page.Params.added "5.2") (eq .Page.Params.added "5.3") }}
{{- if (or $added_in_51 $added_in_52 $added_in_53) }}
<div class="dropdown-item disabled">v5.0.2</div>
{{- else }}
<a class="dropdown-item" href="https://boosted.orange.com/docs/5.0/{{ $versions_link }}">v5.0.2</a>
Expand Down

0 comments on commit 5899979

Please sign in to comment.