Add TOC support.
This commit is contained in:
parent
21d5202af6
commit
656e80ec2f
|
@ -7,6 +7,7 @@ type: {{ .Type }}
|
|||
draft: true
|
||||
tags:
|
||||
-
|
||||
toc: false
|
||||
// comtodon: <Status ID>
|
||||
---
|
||||
|
||||
|
|
|
@ -64,3 +64,9 @@ enableGitInfo = true
|
|||
name = "Sourcecode"
|
||||
url = "https://schlomp.space/tastytea/thoughtpile"
|
||||
weight = 2
|
||||
|
||||
[markup]
|
||||
[markup.tableOfContents]
|
||||
startLevel = 2
|
||||
endLevel = 4
|
||||
ordered = false
|
||||
|
|
|
@ -9,9 +9,12 @@ tags:
|
|||
- Fediverse
|
||||
- ActivityPub
|
||||
comtodon: A2dFPz1XlA6JZYdAAa
|
||||
toc: true
|
||||
---
|
||||
|
||||
:source-highlighter: pygments
|
||||
:toc:
|
||||
:toclevels: 2
|
||||
|
||||
:fn-Masto-cw-original: footnote:[https://github.com/tootsuite/mastodon/issues/239]
|
||||
:fn-AP-cw-subject: footnote:AP-cw-subject[https://github.com/w3c/activitypub/issues/232]
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{{ if and (gt .WordCount 400 ) (.Params.toc) }}
|
||||
<aside class="toc">
|
||||
<header>
|
||||
<h2>Table of contents</h2>
|
||||
</header>
|
||||
{{.TableOfContents}}
|
||||
</aside>
|
||||
{{ end }}
|
|
@ -9,3 +9,18 @@
|
|||
{
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.toc
|
||||
{
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
padding: 0 0.2em;
|
||||
max-width: 40ch;
|
||||
box-shadow: 0 0 0.1em;
|
||||
border-radius: 0.1em;
|
||||
}
|
||||
|
||||
.toc h2, .toc ul, .toc ol
|
||||
{
|
||||
margin: 0 0;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit fdf4359998d92aadf25a3f7fc7232341346aec9c
|
||||
Subproject commit 2a99951897d45e65b775d5d25a46679a0083e603
|
Reference in New Issue