LoginSignup
1
1

More than 5 years have passed since last update.

jekyllでheadタグから目次を自動作成するプラグイン。

Last updated at Posted at 2015-05-31

超シンプルな目次を自動で作成するjekyllプラグインを作成。

  • h1 ~ h6タグを検知してセクション番号を振り目次を作ってBodyタグに挿入。

  • h1 ~ h6タグにもセクション番号を挿入。

スクリーンショット 2015-05-31 14.44.50.png

スクリーンショット 2015-05-31 14.46.26.png

サンプルmarkdown
## AAAAAA

### BBBBB

### CCCCC

## DDDDD

### EEEEE

出力HTML
<h2>1 AAAAA</h2>
<h3>1.1 BBBBB</h3>
<h3>1.2 CCCCC</h3>

<h2>2 DDDDD</h2>
<h3>2.1 EEEEE</h3>

デモ
http://niiyz.com/googlemap-apiv3-matome.html

ソースはこちらに。
https://github.com/niiyz/TopicsGenerator

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1