Skip to content

Commit a5bae1e

Browse files
committed
feat(toc): use markdown-toc directly to update inline
* https://github.com/jonschlinkert/markdown-toc - Generate a markdown TOC (table of contents) for any markdown files.
1 parent 0dc0dc4 commit a5bae1e

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
- go get github.com/myii/maintainer
4646
- maintainer contributor
4747

48+
# Update Tables of Content in the relevant `.md` files
49+
- npm install markdown-toc -D
50+
- markdown-toc -i CONTRIBUTING.md
51+
# - markdown-toc -i README.md
52+
- markdown-toc -i TOFS_pattern.md
53+
4854
# Install all dependencies required for `semantic-release`
4955
- npm install @semantic-release/changelog@3 -D
5056
- npm install @semantic-release/exec@3 -D

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# How to contribute
22

3+
<table><tr><th>Table of Contents</th></tr><tr><td>
4+
<!-- toc -->
5+
<!-- tocstop -->
6+
</td></tr></table>
7+
38
## Commit message formatting
49

510
### Automation of multiple processes

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ template-formula
1212
A SaltStack formula that is empty. It has dummy content to help with a quick
1313
start on a new formula and it serves as a style guide.
1414

15+
.. contents:: **Table of Contents**
16+
1517
**NOTE**
1618

1719
See the full `Salt Formulas installation and usage instructions

TOFS_pattern.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Modified by Daniel Dehennin <[email protected]>
77

88
All that follows is a proposal based on my experience with [Saltstack](http://www.saltstack.com/). The good thing of a piece of software like this is that you can "bend it" to suit your needs in many possible ways, and this is one of them. All the recommendations and thoughts are given "as it is" with no warranty of any type.
99

10+
<table><tr><th>Table of Contents</th></tr><tr><td>
11+
<!-- toc -->
12+
<!-- tocstop -->
13+
</td></tr></table>
14+
1015

1116
## Usage of values in pillar vs templates in file_roots
1217

0 commit comments

Comments
 (0)