mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 01:54:23 +00:00
fix: remove redundant markup template
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
{{ $class := .Attributes.class }}
|
||||
{{ $text := chomp .Text }}
|
||||
{{ if site.Params.main.titleCase }}{{ $text = title $text }}{{ end }}
|
||||
|
||||
{{ if eq page.RelPermalink "/en/privacy/" }}
|
||||
{{ warnf "title: %s" (.Text | safeHTML) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if and site.Params.navigation.anchor $text }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading {{ with $class }}{{.}}{{end}}">
|
||||
{{- $text | safeHTML -}}
|
||||
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
|
||||
</a>
|
||||
</h{{ .Level }}>
|
||||
{{ else }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{ with $class }} class="{{.}}"{{end }}>{{ $text | safeHTML }}</h{{ .Level }}>
|
||||
{{ end }}
|
@@ -3,12 +3,12 @@
|
||||
{{ if site.Params.main.titleCase }}{{ $text = (title ($text | htmlUnescape)) | htmlEscape }}{{ end }}
|
||||
|
||||
{{ if and site.Params.navigation.anchor $text }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading {{ with $class }}{{.}}{{end}}">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading {{ with $class }}{{ . }}{{ end }}">
|
||||
{{- $text | safeHTML -}}
|
||||
<a href="#{{ .Anchor | safeURL }}" aria-labelledby="{{ .Anchor | safeURL }}">
|
||||
{{- partial "assets/icon.html" (dict "icon" "fas link anchor") }}
|
||||
</a>
|
||||
</h{{ .Level }}>
|
||||
{{ else }}
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{ with $class }} class="{{.}}"{{end }}>{{ $text | safeHTML }}</h{{ .Level }}>
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{ with $class }} class="{{ . }}"{{ end }}>{{ $text | safeHTML }}</h{{ .Level }}>
|
||||
{{ end }}
|
Reference in New Issue
Block a user