DavidWells / DavidWells/markdown-magic

Feature Request: Override TOC transform `maxDepth` parameter in single place

Open
#57 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
868
Forks
223
PR merge metrics
No merged PRs in 30d

Description

In my use case I have multiple markdown files that use TOC transform, some of which have multiple nested headings requiring to specify the maxDepth parameter for those individual files.

It would be great if maxDepth could be provided for all files in a single place, e.g. in markdown.config.js file or via CLI params. This would reduce the need to specify it in every file with nested headings.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TOC transform and the configuration handling for markdown.config.js and CLI parameters. Trace how maxDepth is currently supplied per file, then determine how a shared value should be resolved and verified across files. Done means users can set maxDepth once and have it apply to all relevant TOC transforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.