Hexo Support Directory

content:


The power of Hexo is that there are many plugins to extend the function, and the Hexo support directory is also very simple.

Install

First, install a hexo-toc plugin, the code is as follows:

npm install hexo-toc --save

configure

Then, configure the site configuration file _config.yml:

toc:
  maxdepth: 3
  class: toc
  slugify: transliteration
  decodeEntities: false
  anchor:
    position: after
    symbol: '#'
    style: header-anchor

use

Add placeholders for TOC in Markdown articles:

<!-- toc -->

Effect

Please see this article.

 

 
Send a big red envelope


original address

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326241486&siteId=291194637