From a6fd7b5cba69cad049046b3a372d0f2d6c495abe Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 23 Aug 2011 10:53:49 -0400 Subject: Renamed *.txt -> *.md in docs. --- docs/extensions/toc.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/extensions/toc.md (limited to 'docs/extensions/toc.md') diff --git a/docs/extensions/toc.md b/docs/extensions/toc.md new file mode 100644 index 0000000..032c25c --- /dev/null +++ b/docs/extensions/toc.md @@ -0,0 +1,50 @@ +Table of Contents +================= + +Summary +------- + +Adds a Table of Contents to a Markdown document. + +This extension is included with the Markdown library since version 2.0. + +Syntax +------ + +Place a marker in the document where you would like the table of contents to +appear. Then, a nested list of all the headers in the document will replace the +marker. The marker defaults to ``[TOC]`` so the following document: + + [TOC] + + # Header 1 + + ## Header 2 + +would generate the following output: + +
+ +
+

Header 1

+

Header 2

+ +Configuration Options +--------------------- + +The following options are provided to configure the output: + +* **marker**: Text to find and replace with the Table of Contents. Defaults + to ``[TOC]``. +* **slugify**: Callable to generate anchors based on header text. Defaults to a + built in ``slugify`` method. The callable must accept one argument which + contains the text content of the header and return a string which will be + used as the anchor text. +* **title**: Title to insert in TOC ``
``. Defaults to ``None``. +* **anchorlink**: Set to ``True`` to have the headers link to themselves. + Default is ``False``. -- cgit v1.2.3