jdsteinbach / eleventy-plugin-toc

11ty plugin to generate a TOC from page content
61 stars 19 forks source link

feat(options): allow default options when `addPlugin` #8

Closed MichaelSolati closed 4 years ago

MichaelSolati commented 4 years ago

Instead of needing to add options to the templates as a string, this would allow default options to be set when you add the plugin to the 11ty config. Also I added the option to use ul instead of ol.

jdsteinbach commented 4 years ago

Thanks @MichaelSolati - that's a lot of really helpful ground covered in this PR. I'm especially excited about the default options feature!

I made several changes this morning: can you please pull those in & retest?

Also, I noticed some boilerplate formatting changes (semi-colons, etc). Rather than flipping those automated changes back & forth, this could use an eslint config file (assuming that's the tool you use?). Let me know if you'd like to create one. My only strong preferences are 2 space indentation and single quotes, not double. I'm not very opinionated on semicolons & trailing commas.

MichaelSolati commented 4 years ago

@jdsteinbach I brought the code up to date with the changes you made in master and formatted the code for consistency. In regards to the linter, I thought it would be best to do that as a separate PR, so I created PR #14

MichaelSolati commented 4 years ago

@jdsteinbach any thoughts on the changes?