Jekyll Generate article Tree configuration

Source: Internet
Author: User

Jekyll's Plugins page mentions a plugin jekyll-toc-generator, but there is no need to use plug-ins because Jekyll markdown renderer Kramdown already has this feature. We just need to enable it.
Enable kramdown#

Open the _config.yml file to ensure that the following line exists:
Markdown:kramdown
Generate toc#

The next step is to identify the build location of the TOC in the article:
* Catalogue
{: TOC}

# Chen San

# # Chen San's Blog
Please note that the * directory is a required line that represents a list of trees, please feel free to write what's behind the asterisk
If you want to exclude a title from the tree, write {:. No_toc} on the next line of the heading
The depth of the directory can be customized by adding the Toc_levels option to the Config.yml file, which defaults to 1..6, which indicates that title one to title six is all rendered
{: TOC} The list of directories generated by default will add ID value Markdown-toc, we can customize the ID value, such as {: TOC #chenxsan}, the generated directory list added ID will be chenxsan.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.