Skip to content
Snippets Groups Projects
Unverified Commit 6fc9bddd authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

Correction de l'ID des headings (#419)


Co-authored-by: Arnaud Levy's avatarArnaud Levy <arnaud.levy@noesya.coop>
Co-authored-by: default avataralexisben <alex@noesya.coop>
parent ac249951
No related branches found
No related tags found
No related merge requests found
{{ range . -}}
{{- if eq .kind "heading" }}
{{ $headingId := .slug | default (urlize .title) }}
<li>
<a href="#{{ urlize .title }}">{{ partial "PrepareHTML" .title }}</a>
<a href="#{{ $headingId }}">{{ partial "PrepareHTML" .title }}</a>
</li>
{{ end -}}
{{- end -}}
......@@ -4,12 +4,13 @@
{{- range .Params.contents -}}
{{ if eq .kind "block" }}
{{ $template := printf "blocks/templates/%s.html" .template }}
{{ partial $template (dict
"block" .
{{ partial $template (dict
"block" .
"context" $context
)}}
{{- else if (eq .kind "heading") -}}
<div class="heading container" id="{{ urlize .title }}">
{{ $headingId := .slug | default (urlize .title) }}
<div class="heading container" id="{{ $headingId }}">
<h2>{{ partial "PrepareHTML" .title }}</h2>
</div>
{{- end -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment