Add render-heading.html
This commit is contained in:
1
layouts/_default/_markup/render-heading.html
Normal file
1
layouts/_default/_markup/render-heading.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }}<a class="small paigeheaderlink" href="#{{ .Anchor | safeURL }}">#</a></h{{ .Level }}>
|
@@ -7,7 +7,7 @@
|
|||||||
{{ if .Scratch.Get "paige_show_full_pages" }}
|
{{ if .Scratch.Get "paige_show_full_pages" }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ .Content | replaceRE `(<h[1-6] id="([^"]+)".+)(</h[1-6]+>)` `${1}<a class="small paigeheaderlink" href="#${2}">#</a>${3}` | safeHTML }}
|
{{ .Content }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user