verbose / verb

HEADS UP! Verb is going though a major transition, we've completely refactored everything from the ground up. If you're interested, please see the dev branch.
MIT License
480 stars 32 forks source link

0.9.0: passing options to `toc` (for example `opts.filter`), and expose TOC helper to template #95

Closed tunnckoCore closed 8 years ago

tunnckoCore commented 8 years ago

Because currently it is not exposed for use with {%= toc() %}, you can do only using html comment. Also passing custom options to toc isn't possible, overwriting also is not possible, even through verb config - for example verb.toc.footer does not overwrite the default footer of toc.

<!-- toc('*.md', {filter: fn}) -->
jonschlinkert commented 8 years ago

closing since there is no toc logic verb. If necessary, create this issue on verb-readme-generator, wich uses verb-toc middleware. Options are already passed to the middleware, but it doesn't do the things you probably want. You might better off creating a custom toc middleware or helper that does what you want.

tunnckoCore commented 8 years ago

Options are already passed to

And how to pass filter option? And what options "works"?

jonschlinkert commented 8 years ago

And how to pass filter option? And what options "works"?

I can make sure options are passed to markdown-toc if that's what you mean. but that would be an issue for verb-toc