From 6fab4bc3bc154133ac695bac027a0b2f48c6ac05 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Sun, 3 Sep 2017 15:23:30 +0100 Subject: [PATCH] docs: Add `toc` shortcode --- exampleSite/content/post/writing-markdown-latex.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/exampleSite/content/post/writing-markdown-latex.md b/exampleSite/content/post/writing-markdown-latex.md index 1a0c8cfc..220658f6 100644 --- a/exampleSite/content/post/writing-markdown-latex.md +++ b/exampleSite/content/post/writing-markdown-latex.md @@ -8,6 +8,8 @@ math = true Content can be written using [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet), [LaTeX math](https://en.wikibooks.org/wiki/LaTeX/Mathematics), and [Hugo Shortcodes](http://gohugo.io/extras/shortcodes/). Additionally, HTML may be used for advanced formatting. This article gives an overview of the most common formatting options. +{{% toc %}} + ## Sub-headings ## Heading 2 @@ -233,3 +235,7 @@ This will display the following *warning* block: {{% alert warning %}} Here's some important information... {{% /alert %}} + +## Table of Contents + +A table of contents may be particularly useful for long posts or tutorial/documentation type content. Use the `{{%/* toc */%}}` shortcode anywhere you wish within your Markdown content to automatically generate a table of contents.