diff --git a/CHANGELOG.md b/CHANGELOG.md index cc5fcfdd..d64b70d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Sort individual tag/category pages by date - Add extra builtin shortcode for Streamable videos - `path` and `permalink` now end with a `/` +- Generate table of contents for each page ## 0.0.6 (2017-05-24) diff --git a/README.md b/README.md index a813649a..f26e0f12 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,34 @@ You can also paginate section, including the index by setting the `paginate_by` This represents the number of pages for each pager of the paginator. You will need to access pages through the `paginator` object. (TODO: document that). +### Table of contents + +Each page/section will generate a table of content based on the title. It is accessible through `section.toc` and +`page.toc`. It is a list of headers that contains a `permalink`, a `title` and `children`. +Here is an example on how to make a ToC using that: + +```jinja2 +