gitdocs icon indicating copy to clipboard operation
gitdocs copied to clipboard

Add TOC max-depth custom config support & styling

Open rontalx opened this issue 6 years ago • 2 comments

Issue: Current implementation would render maximum header depth of 2 inside the TOC without an ability to customise that. Headers with level > 2 were not being rendered nor linkable inside the TOC.

Fix:

  • Added support for passing custom max_depth configuration in .gitdocs.json to allow overriding the default value.
  • Added styling of nested headers inside the TOC

After: image

Before (having headers in the .md file from h1 to h5, it displays only level 1 & 2 without any visual indications of their level ): image

rontalx avatar Oct 26 '19 16:10 rontalx

@zsherman hey there, not sure if anyone still maintains this, anyway I opened this small PR a small improvement, would be glad if you can have a look, tnx :)

rontalx avatar Oct 27 '19 08:10 rontalx

Hi @rontalx we appreciate the PR! We're not actively using Gitdocs but are happy to take a look, it looks like there's a linting error in CI but once that's fixed up I'd be happy to merge.

zsherman avatar Oct 28 '19 13:10 zsherman