diff --git a/archetypes/default.adoc b/archetypes/default.adoc index a396694..7fd1868 100644 --- a/archetypes/default.adoc +++ b/archetypes/default.adoc @@ -7,6 +7,7 @@ type: {{ .Type }} draft: true tags: - +toc: false // comtodon: --- diff --git a/config.toml b/config.toml index 67ebe9c..95d6a7c 100644 --- a/config.toml +++ b/config.toml @@ -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 diff --git a/content/posts/Ideas on a better content warning system for the Fediverse.adoc b/content/posts/Ideas on a better content warning system for the Fediverse.adoc index 59d4e3d..851dede 100644 --- a/content/posts/Ideas on a better content warning system for the Fediverse.adoc +++ b/content/posts/Ideas on a better content warning system for the Fediverse.adoc @@ -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] diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..568d48a --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,8 @@ +{{ if and (gt .WordCount 400 ) (.Params.toc) }} + +{{ end }} diff --git a/static/blog.css b/static/blog.css index fa4a686..660938f 100644 --- a/static/blog.css +++ b/static/blog.css @@ -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; +} diff --git a/themes/nocolor b/themes/nocolor index fdf4359..2a99951 160000 --- a/themes/nocolor +++ b/themes/nocolor @@ -1 +1 @@ -Subproject commit fdf4359998d92aadf25a3f7fc7232341346aec9c +Subproject commit 2a99951897d45e65b775d5d25a46679a0083e603