Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.27 KB

2016-10-30-automatic-toc-in-jekyll.md

File metadata and controls

45 lines (33 loc) · 1.27 KB
layout title menutitle date tags category author published redirect_from language comments
post
Automatic Table of Contents for Jekyll Blogs
Automatic Table of Contents for Jekyll Blogs
2016-10-30 16:58:00 +0000
Automatic Table of Contents Jekyll Blogs
Website
am
true
/2016-10-30-automatic-toc-in-jekyll/
EN
true

Download the source code for this page here

Contents

{:.no_toc}

  • This will become a table of contents (this text will be scraped). {:toc}

Introduction

This is more of a personal bookmark so I don't forget this super simple solution

Method

Include the following in the _config.yml file

markdown: kramdown

then add this line where you want the TOC to appear in the markdown blog entry

* This will become a table of contents (this text will be scraped).
{:toc}

This will also include Contents inside TOC which looks dumb.

Correct this by {:.no_toc} following a title you don't want in the TOC.

References