Add support for tables of contents in articles #1

Open
lucidiot wants to merge 1 commits from lucidiot/tilde-wiki:toc-extension into master

In the #javapool article, ~m455 used vim-markdown-toc to add a nice little table of contents. This probably works with most Markdown flavors including Pandoc, but the Python Markdown package is pretty strict to the original Markdown spec (not even following CommonMark 😢) and does not add id attributes to titles, so clicking any link in this TOC will not work at all.

This just adds the official TocExtension from the package so we can add [TOC] to any Markdown file and get that table of contents with id attributes on titles.

In the [#javapool](http://tilde.town/wiki/socializing/irc/channels/javapool.html) article, ~m455 used [vim-markdown-toc](https://github.com/mzlogin/vim-markdown-toc) to add a nice little table of contents. This probably works with most Markdown flavors including Pandoc, but the Python Markdown package is pretty strict to the original Markdown spec (not even following [CommonMark](https://commonmark.org/) 😢) and does not add `id` attributes to titles, so clicking any link in this TOC will not work at all. This just adds the official [TocExtension](https://python-markdown.github.io/extensions/toc/) from the package so we can add `[TOC]` to any Markdown file and get that table of contents with `id` attributes on titles.

Sounds good, lucidiot!

Sounds good, lucidiot!
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b lucidiot-toc-extension master
git pull toc-extension

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff lucidiot-toc-extension
git push origin master
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tildetown/tilde-wiki#1
There is no content yet.