Skip to content

Commit d59bc46

Browse files
committed
add sponsor to readme
and some minor linting
1 parent f920342 commit d59bc46

File tree

6 files changed

+151
-75
lines changed

6 files changed

+151
-75
lines changed

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.verb.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Quick Start
1+
## Quick Start
22
Assuming you want to add a TOC to README.md:
33
1. `$ npm install -g markdown-toc`
44
2. Edit README.md and insert the following line where you want the TOC inserted:<br />`<!-- toc -->`
@@ -66,7 +66,7 @@ toc('# One\n\n# Two').content;
6666
To allow customization of the output, an object is returned with the following properties:
6767

6868
- `content` **{String}**: The generated table of contents. Unless you want to customize rendering, this is all you need.
69-
- `highest` **{Number}**: The highest level heading found. This is used to adjust indentation.
69+
- `highest` **{Number}**: The highest level heading found. This is used to adjust indentation.
7070
- `tokens` **{Array}**: Headings tokens that can be used for custom rendering
7171

7272
## API
@@ -102,7 +102,7 @@ Results in:
102102

103103
### toc.json
104104

105-
Object for creating a custom TOC.
105+
Object for creating a custom TOC.
106106

107107
```js
108108
toc('# AAA\n## BBB\n### CCC\nfoo').json;
@@ -116,7 +116,7 @@ toc('# AAA\n## BBB\n### CCC\nfoo').json;
116116

117117
### toc.insert
118118

119-
Insert a table of contents immediately after an _opening_ `<!!-- toc -->` code comment, or replace an existing TOC if both an _opening_ comment and a _closing_ comment (`<!!-- tocstop -->`) are found.
119+
Insert a table of contents immediately after an _opening_ `<!!-- toc -->` code comment, or replace an existing TOC if both an _opening_ comment and a _closing_ comment (`<!!-- tocstop -->`) are found.
120120

121121
_(This strategy works well since code comments in markdown are hidden when viewed as HTML, like when viewing a README on GitHub README for example)._
122122

@@ -160,8 +160,8 @@ var toc = require('markdown-toc');
160160
```
161161
- `toc.bullets()`: render a bullet list from an array of tokens
162162
- `toc.linkify()`: linking a heading `content` string
163-
- `toc.slugify()`: slugify a heading `content` string
164-
- `toc.strip()`: strip words or characters from a heading `content` string
163+
- `toc.slugify()`: slugify a heading `content` string
164+
- `toc.strip()`: strip words or characters from a heading `content` string
165165

166166
**Example**
167167

@@ -191,15 +191,15 @@ Type: `Function`
191191

192192
Default: `undefined`
193193

194-
Params:
194+
Params:
195195

196196
- `str` **{String}** the actual heading string
197197
- `ele` **{Objecct}** object of heading tokens
198198
- `arr` **{Array}** all of the headings objects
199199

200200
**Example**
201201

202-
From time to time, we might get junk like this in our TOC.
202+
From time to time, we might get junk like this in our TOC.
203203

204204
```
205205
[.aaa([foo], ...) another bad heading](#-aaa--foo--------another-bad-heading)
@@ -263,3 +263,13 @@ Type: `Boolean`
263263
Default: `true`
264264

265265
Strip extraneous HTML tags from heading text before slugifying. This is similar to GitHub markdown behavior.
266+
267+
## Sponsors
268+
269+
The following companies, organizations, and individuals support the ongoing maintenance and development of {%= name %}. [Become a Sponsor](https://github.com/sponsors/jonschlinkert) to add your logo to this README, or any of [my other projects](https://github.com/jonschlinkert?tab=repositories&q=&type=&language=&sort=stargazers)
270+
271+
### Gold Sponsors
272+
273+
| [<img src="https://github.com/jonschlinkert/clone-deep/assets/383994/98036489-2cae-48a2-8d29-7dec58ea05c4" alt="https://jaake.tech/" width="100"/>](https://jaake.tech/) |
274+
|:---:|
275+
| [https://jaake.tech/](https://jaake.tech/) |

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2017, Jon Schlinkert.
3+
Copyright (c) 2013-2023, Jon Schlinkert.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
21+
THE SOFTWARE.

README.md

Lines changed: 102 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
# markdown-toc [![NPM version](https://img.shields.io/npm/v/markdown-toc.svg?style=flat)](https://www.npmjs.com/package/markdown-toc) [![NPM monthly downloads](https://img.shields.io/npm/dm/markdown-toc.svg?style=flat)](https://npmjs.org/package/markdown-toc) [![NPM total downloads](https://img.shields.io/npm/dt/markdown-toc.svg?style=flat)](https://npmjs.org/package/markdown-toc) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/markdown-toc.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/markdown-toc) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/markdown-toc.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/markdown-toc)
1+
# markdown-toc [![NPM version](https://img.shields.io/npm/v/markdown-toc.svg?style=flat)](https://www.npmjs.com/package/markdown-toc) [![NPM monthly downloads](https://img.shields.io/npm/dm/markdown-toc.svg?style=flat)](https://npmjs.org/package/markdown-toc) [![NPM total downloads](https://img.shields.io/npm/dt/markdown-toc.svg?style=flat)](https://npmjs.org/package/markdown-toc) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/markdown-toc.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/markdown-toc)
22

33
> Generate a markdown TOC (table of contents) with Remarkable.
44
5-
## Table of Contents
5+
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
66

7-
- [Install](#install)
8-
- [CLI](#cli)
97
- [Highlights](#highlights)
108
- [Usage](#usage)
119
- [API](#api)
@@ -21,6 +19,8 @@
2119
* [options.maxdepth](#optionsmaxdepth)
2220
* [options.firsth1](#optionsfirsth1)
2321
* [options.stripHeadingTags](#optionsstripheadingtags)
22+
- [Sponsors](#sponsors)
23+
* [Gold Sponsors](#gold-sponsors)
2424
- [About](#about)
2525

2626
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_
@@ -33,6 +33,14 @@ Install with [npm](https://www.npmjs.com/):
3333
$ npm install --save markdown-toc
3434
```
3535

36+
## Quick Start
37+
38+
Assuming you want to add a TOC to README.md:
39+
40+
1. `$ npm install -g markdown-toc`
41+
2. Edit README.md and insert the following line where you want the TOC inserted:<br />`<!-- toc -->`
42+
3. `$ markdown-toc -i README.md`
43+
3644
## CLI
3745

3846
```
@@ -41,7 +49,26 @@ Usage: markdown-toc [options] <input>
4149
input: The Markdown file to parse for table of contents,
4250
or "-" to read from stdin.
4351
44-
-i: Edit the <input> file directly, injecting the TOC at <!-- toc -->;
52+
-i: Edit the <input> file directly, injecting the TOC at - [Highlights](#highlights)
53+
- [Usage](#usage)
54+
- [API](#api)
55+
* [toc.plugin](#tocplugin)
56+
* [toc.json](#tocjson)
57+
* [toc.insert](#tocinsert)
58+
* [Utility functions](#utility-functions)
59+
- [Options](#options)
60+
* [options.append](#optionsappend)
61+
* [options.filter](#optionsfilter)
62+
* [options.slugify](#optionsslugify)
63+
* [options.bullets](#optionsbullets)
64+
* [options.maxdepth](#optionsmaxdepth)
65+
* [options.firsth1](#optionsfirsth1)
66+
* [options.stripHeadingTags](#optionsstripheadingtags)
67+
- [Sponsors](#sponsors)
68+
* [Gold Sponsors](#gold-sponsors)
69+
- [About](#about)
70+
71+
_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_;
4572
(Without this flag, the default is to print the TOC to stdout.)
4673
4774
--json: Print the TOC in JSON format
@@ -59,6 +86,9 @@ Usage: markdown-toc [options] <input>
5986
6087
--no-stripHeadingTags: Do not strip extraneous HTML tags from heading
6188
text before slugifying
89+
90+
--indent: Provide the indentation to use - defaults to ' '
91+
(to specify a tab, use the bash-escaped $'\t')
6292
```
6393

6494
## Highlights
@@ -285,46 +315,38 @@ Default: `true`
285315

286316
Strip extraneous HTML tags from heading text before slugifying. This is similar to GitHub markdown behavior.
287317

288-
## About
318+
## Sponsors
289319

290-
### Related projects
320+
The following companies, organizations, and individuals support the ongoing maintenance and development of markdown-toc. [Become a Sponsor](https://github.com/sponsors/jonschlinkert) to add your logo to this README, or any of [my other projects](https://github.com/jonschlinkert?tab=repositories&q=&type=&language=&sort=stargazers)
291321

292-
* [gfm-code-blocks](https://www.npmjs.com/package/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string. | [homepage](https://github.com/jonschlinkert/gfm-code-blocks "Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string.")
293-
* [markdown-link](https://www.npmjs.com/package/markdown-link): Micro util for generating a single markdown link. | [homepage](https://github.com/jonschlinkert/markdown-link "Micro util for generating a single markdown link.")
294-
* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Micro-utils for creating markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils "Micro-utils for creating markdown snippets.")
295-
* [pretty-remarkable](https://www.npmjs.com/package/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules. | [homepage](https://github.com/jonschlinkert/pretty-remarkable "Plugin for prettifying markdown with Remarkable using custom renderer rules.")
296-
* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable "Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.")
322+
### Gold Sponsors
297323

298-
### Contributing
324+
| [<img src="https://github.com/jonschlinkert/clone-deep/assets/383994/98036489-2cae-48a2-8d29-7dec58ea05c4" alt="https://jaake.tech/" width="100"/>](https://jaake.tech/) |
325+
|:---:|
326+
| [https://jaake.tech/](https://jaake.tech/) |
327+
328+
## About
329+
330+
<details>
331+
<summary><strong>Contributing</strong></summary>
299332

300333
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
301334

302-
### Contributors
335+
</details>
303336

304-
| **Commits** | **Contributor** |
305-
| --- | --- |
306-
| 196 | [jonschlinkert](https://github.com/jonschlinkert) |
307-
| 4 | [stefanwalther](https://github.com/stefanwalther) |
308-
| 3 | [Marsup](https://github.com/Marsup) |
309-
| 2 | [dvcrn](https://github.com/dvcrn) |
310-
| 2 | [maxogden](https://github.com/maxogden) |
311-
| 2 | [twang2218](https://github.com/twang2218) |
312-
| 2 | [angrykoala](https://github.com/angrykoala) |
313-
| 2 | [zeke](https://github.com/zeke) |
314-
| 1 | [Vortex375](https://github.com/Vortex375) |
315-
| 1 | [owzim](https://github.com/owzim) |
316-
| 1 | [chendaniely](https://github.com/chendaniely) |
317-
| 1 | [Daniel-Mietchen](https://github.com/Daniel-Mietchen) |
318-
| 1 | [Feder1co5oave](https://github.com/Feder1co5oave) |
319-
| 1 | [garygreen](https://github.com/garygreen) |
320-
| 1 | [TehShrike](https://github.com/TehShrike) |
321-
| 1 | [citizenmatt](https://github.com/citizenmatt) |
322-
| 1 | [rafaelsteil](https://github.com/rafaelsteil) |
323-
| 1 | [RichardBradley](https://github.com/RichardBradley) |
324-
| 1 | [sethvincent](https://github.com/sethvincent) |
325-
| 1 | [lu22do](https://github.com/lu22do) |
326-
327-
### Building docs
337+
<details>
338+
<summary><strong>Running Tests</strong></summary>
339+
340+
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
341+
342+
```sh
343+
$ npm install && npm test
344+
```
345+
346+
</details>
347+
348+
<details>
349+
<summary><strong>Building docs</strong></summary>
328350

329351
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
330352

@@ -334,26 +356,59 @@ To generate the readme, run the following command:
334356
$ npm install -g verbose/verb#dev verb-generate-readme && verb
335357
```
336358

337-
### Running tests
359+
</details>
338360

339-
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
361+
### Related projects
340362

341-
```sh
342-
$ npm install && npm test
343-
```
363+
You might also be interested in these projects:
364+
365+
* [gfm-code-blocks](https://www.npmjs.com/package/gfm-code-blocks): Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string. | [homepage](https://github.com/jonschlinkert/gfm-code-blocks "Extract gfm (GitHub Flavored Markdown) fenced code blocks from a string.")
366+
* [markdown-link](https://www.npmjs.com/package/markdown-link): Micro util for generating a single markdown link. | [homepage](https://github.com/jonschlinkert/markdown-link "Micro util for generating a single markdown link.")
367+
* [markdown-utils](https://www.npmjs.com/package/markdown-utils): Tiny helpers for creating consistenly-formatted markdown snippets. | [homepage](https://github.com/jonschlinkert/markdown-utils "Tiny helpers for creating consistenly-formatted markdown snippets.")
368+
* [pretty-remarkable](https://www.npmjs.com/package/pretty-remarkable): Plugin for prettifying markdown with Remarkable using custom renderer rules. | [homepage](https://github.com/jonschlinkert/pretty-remarkable "Plugin for prettifying markdown with Remarkable using custom renderer rules.")
369+
* [remarkable](https://www.npmjs.com/package/remarkable): Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in… [more](https://github.com/jonschlinkert/remarkable) | [homepage](https://github.com/jonschlinkert/remarkable "Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.")
370+
371+
### Contributors
372+
373+
| **Commits** | **Contributor** |
374+
| --- | --- |
375+
| 198 | [jonschlinkert](https://github.com/jonschlinkert) |
376+
| 9 | [doowb](https://github.com/doowb) |
377+
| 4 | [dbooth-boston](https://github.com/dbooth-boston) |
378+
| 3 | [sapegin](https://github.com/sapegin) |
379+
| 3 | [Marsup](https://github.com/Marsup) |
380+
| 2 | [dvcrn](https://github.com/dvcrn) |
381+
| 2 | [maxogden](https://github.com/maxogden) |
382+
| 2 | [twang2218](https://github.com/twang2218) |
383+
| 2 | [zeke](https://github.com/zeke) |
384+
| 1 | [Vortex375](https://github.com/Vortex375) |
385+
| 1 | [chendaniely](https://github.com/chendaniely) |
386+
| 1 | [Daniel-Mietchen](https://github.com/Daniel-Mietchen) |
387+
| 1 | [Feder1co5oave](https://github.com/Feder1co5oave) |
388+
| 1 | [garygreen](https://github.com/garygreen) |
389+
| 1 | [TehShrike](https://github.com/TehShrike) |
390+
| 1 | [citizenmatt](https://github.com/citizenmatt) |
391+
| 1 | [mgroenhoff](https://github.com/mgroenhoff) |
392+
| 1 | [rafaelsteil](https://github.com/rafaelsteil) |
393+
| 1 | [RichardBradley](https://github.com/RichardBradley) |
394+
| 1 | [sethvincent](https://github.com/sethvincent) |
395+
| 1 | [shanehughes3](https://github.com/shanehughes3) |
396+
| 1 | [bcho](https://github.com/bcho) |
397+
| 1 | [lu22do](https://github.com/lu22do) |
344398

345399
### Author
346400

347401
**Jon Schlinkert**
348402

349-
* [github/jonschlinkert](https://github.com/jonschlinkert)
350-
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
403+
* [GitHub Profile](https://github.com/jonschlinkert)
404+
* [Twitter Profile](https://twitter.com/jonschlinkert)
405+
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
351406

352407
### License
353408

354-
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
409+
Copyright © 2023, [Jon Schlinkert](https://github.com/jonschlinkert).
355410
Released under the [MIT License](LICENSE).
356411

357412
***
358413

359-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 19, 2017._
414+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on July 12, 2023._

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*!
44
* markdown-toc <https://github.com/jonschlinkert/markdown-toc>
55
*
6-
* Copyright © 2013-2017, Jon Schlinkert.
6+
* Copyright © 2013-2023, Jon Schlinkert.
77
* Released under the MIT License.
88
*/
99

package.json

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,31 +61,56 @@
6161
"strip-color": "^0.1.0"
6262
},
6363
"devDependencies": {
64-
"gulp-format-md": "^0.1.11",
65-
"mocha": "^3.2.0"
64+
"gulp-format-md": "^2.0.0",
65+
"mocha": "^10.2.0"
6666
},
6767
"keywords": [
6868
"anchor",
69+
"API documentation",
70+
"code documentation",
6971
"commonmark",
72+
"content navigation",
73+
"content organization",
74+
"developer tools",
7075
"docs",
76+
"document structure",
7177
"document",
78+
"documentation tool",
7279
"documentation",
7380
"glossary",
7481
"heading",
82+
"headings",
7583
"index",
84+
"javascript",
7685
"links",
86+
"markdown parser",
87+
"markdown tools",
88+
"Markdown-based",
89+
"markdown-toc",
7790
"markdown",
91+
"markup language",
92+
"md files",
93+
"md parser",
94+
"md-toc",
7895
"md",
96+
"node.js",
97+
"npm",
98+
"open-source",
99+
"outline",
100+
"package.json",
79101
"plugin",
102+
"README tool",
80103
"readme",
81104
"reference",
82105
"remarkable",
83106
"remarkableplugin",
84107
"render",
85108
"renderer",
86-
"table",
109+
"structure",
87110
"table of contents",
88111
"table-of-contents",
112+
"table",
113+
"toc-generator",
89114
"toc",
90115
"write"
91116
],

0 commit comments

Comments
 (0)