A plugin for danger.systems that makes sure your project’s README.md
has a TOC.
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.
The plugin supports following configuration options:
Danger::Toc.configure do |config|
config.files = [ 'README.md' ]
config.header = 'Table of Contents'
end
Methods and attributes from this plugin are available in your Dangerfile
under the toc
namespace.
List of files to ensure TOC in, default is README.md
.
The Table of Contents header, without #
, default is Table of Contents
.
Run all checks with defaults.
See CONTRIBUTING.
Copyright (c) Daniel Doubrovkine, 2017
MIT License, see LICENSE for details.