Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.

Add TOC max-depth custom config support & styling #174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add TOC max-depth custom config support & styling #174

wants to merge 2 commits into from

Conversation

rontalx
Copy link

@rontalx rontalx commented Oct 26, 2019

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
Copy link
Author

rontalx commented Oct 27, 2019

@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 :)

@zsherman
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants