hugo-xmin/exampleSite/content/post/2018-01-11-test-toc.md
2018-01-13 01:55:58 +08:00

1.8 KiB

title author date slug categories tags simpletoc
another toc solution for blogdown fixing the pure Chinese issue Heaven Zone 2018-01-11 another-toc-solution-for-blogdown-fixing-the-pure-Chinese-issue
R
R
blogdown
true

origination

after taking a little bit of effort to read these two articles in ENGLISH from yihui's blog: 1st, 2nd, I decided to make a pull request to give some feedbacks to Yihui.

As a amateur and beginneR, thanks for Yihui's GREAT present BLOGDOWN.

@yihui, I love reading your articles, especially the Chinese articles, like: 16 小时骑行——我的天津绝望之旅. Yihui's words are always sharp. I feel some sad that it has been a very very long time since you last updated your blog for Chinese articles as a literary youth.

feture

  1. Originally intended for fixing the issue that not generating the links for pure Chinese headlines
  2. Toc with fixed position floating right
  3. Automatically generate the sections numbers

usage

just add simpletoc: true into the block ---.

like this:

title: another toc solution for blogdown fixing the pure Chinese issue
author: Heaven Zone
date: '2018-01-11'
slug: another-toc-solution-for-blogdown-fixing-the-pure-Chinese-issue
categories:
  - R
tags:
  - R
  - blogdown
simpletoc: true

what i did for this pull requrest?

  1. add one partial file simpletoc.html
  2. add one js file simpletoc.js
  3. modified single.html appending three rows of codes
  4. add one post for example using custom param simpletoc: true for generating the toc

H4 Test Section

Test

H2 Test Section