mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
feat: add support for custom heading css class (#381)
This commit is contained in:
parent
0b2444e0cc
commit
eb86a76010
@ -4,7 +4,10 @@
|
||||
<!-- prettier-ignore-start -->
|
||||
{{- if $showAnchor -}}
|
||||
<div class="gblog-post__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
<a data-clipboard-text="{{ .Page.Permalink }}#{{ .Anchor | safeURL }}" class="gblog-post__anchor clip flex align-center" aria-label="Anchor {{ .Text | safeHTML }}" href="#{{ .Anchor | safeURL }}">
|
||||
<svg class="gblog-icon gblog_link"><use xlink:href="#gblog_link"></use></svg>
|
||||
@ -13,7 +16,10 @@
|
||||
</div>
|
||||
{{- else -}}
|
||||
<div class="gblog-post__anchorwrap">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" {{- with .Attributes.class }}
|
||||
class="{{ . }}"
|
||||
{{- end }}
|
||||
>
|
||||
{{ .Text | safeHTML }}
|
||||
</h{{ .Level }}>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user