https://github.com/dblock/danger-toc
A danger.systems plugin for your markdown TOC.
https://github.com/dblock/danger-toc
danger danger-plugin kramdown markdown
Last synced: 15 days ago
JSON representation
A danger.systems plugin for your markdown TOC.
- Host: GitHub
- URL: https://github.com/dblock/danger-toc
- Owner: dblock
- License: mit
- Created: 2017-11-05T04:19:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-28T20:57:15.000Z (about 6 years ago)
- Last Synced: 2025-01-12T00:50:16.069Z (9 months ago)
- Topics: danger, danger-plugin, kramdown, markdown
- Language: Ruby
- Homepage:
- Size: 242 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# danger-toc
A plugin for [danger.systems](http://danger.systems) that makes sure your project’s `README.md` has a TOC.
[](https://badge.fury.io/rb/danger-toc)
[](https://travis-ci.org/dblock/danger-toc)## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [toc.files](#tocfiles)
- [toc.header](#tocheader)
- [toc.check!](#toccheck)
- [Contributing](#contributing)
- [Copyright](#copyright)## Installation
Add `danger-toc` to your Gemfile.
```
gem 'danger-toc', '~> 0.1'
```Add `toc.check` to your Dangerfile. Make a pull request and see this plugin in action.
## Usage
Methods and settings from this plugin are available in your `Dangerfile` under the `toc` namespace.
### toc.files
List of files to ensure TOC in, default is `README.md`.
```ruby
config.files = [ 'README.md', 'DEV.md' ]
```### toc.header
The Table of Contents header, without `#`, default is `Table of Contents`.
```ruby
config.header = 'Custom Table of Contents'
```### toc.check!
Run all checks.
## Contributing
See [CONTRIBUTING](CONTRIBUTING.md).
## Copyright
Copyright (c) Daniel Doubrovkine, 2017-2019
MIT License, see [LICENSE](LICENSE.txt) for details.