vnphanquang / svelte-put

Useful svelte stuff to put in your projects
https://svelte-put.vnphanquang.com
MIT License
836 stars 25 forks source link

toc page mentions anchor config in passing but not explicitly #255

Open newtmitch opened 11 months ago

newtmitch commented 11 months ago

Looks like the use:toc param allows for an anchor: boolean setting as part of its configuration to not include an anchor tag as part of the output. You mention it in passing under the data-tag-anchor toc attributes at the bottom, but nowhere else (that I could see) that it's an option you can pass in for the anchor tag not to be generated at all. It might be good to include that explicitly as an option the user can pass in to suppress the anchor tag generation in the final output.

Sorry if I missed it, though. I looked several times. :)

vnphanquang commented 11 months ago

@newtmitch thanks for the suggestion. Apologies for not explicitly including that in the doc page. The toc param interface overall is pretty hefty, however; see here for full API. So when writing the doc I was conflicted with whether to be comprehensive or just keep it minimal and link to the raw API. But perhaps there is no reason not to do both :)

I'm currently focusing on organizing a Svelte meetup here in Vietnam so will come back here as soon as I can. In the meantime, happy December and (upcoming) holidays!

newtmitch commented 11 months ago

Thanks for the update! I ended up going to that source file, or another one like it, to find the param was actually available. I think even a link to that file as the API for the toc component would be a good addition vs. me (and others) rooting around through the source to find the right source file describing the API. I agree with you, though, outlining that entire API might be a bit onerous.