We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cbd2e9b + ad6b3f1 commit f129449Copy full SHA for f129449
themes/story/layouts/_default/single.html
@@ -2,7 +2,7 @@
2
3
{{ define "main" }}
4
<article class="center bg-white br-3 pv1 ph4 lh-copy f5 nested-links mw8">
5
- {{ .Content }}
+ {{ .Content | replaceRE "(<h[2-9] id=\"([^\"]+)\".+)(</h[2-9]+>)" "${1} <a class=\"headline-hash\" href=\"#${2}\">#</a> ${3}" | safeHTML }}
6
</article>
7
{{ end }}
8
themes/story/static/css/story.css
@@ -417,3 +417,4 @@ img[src~="3dbook"] {
417
.hljs-link {
418
text-decoration: underline;
419
}
420
+a.headline-hash {opacity: 40%; text-decoration: none;}
0 commit comments