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

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

Open
rontalx wants to merge 2 commits into
vectordotdev:masterfrom
rontalx:fix/toc_depth_custom_config_and_nested_styling
Open

Add TOC max-depth custom config support & styling#174
rontalx wants to merge 2 commits into
vectordotdev:masterfrom
rontalx:fix/toc_depth_custom_config_and_nested_styling

Conversation

@rontalx
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown

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