Redocly / Redocly/redoc

Support #custom-id in ToC

Open
#1,079 1 comment 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

ReDoc can include headers (# Header, ## Sub Header or similar) in markdown into table of contents.
Link ids (#id-here) are automatically generated from text in header.

I think it would be benefical if user can customize link ids using custom id extension, so

  • it is table when text are changed (e.g. fixed typo).
  • it can be consistent in translated API Docs (see below):
// In English page
# API Convention {#api-convention}

// In Japanese page
# API の慣習 {#api-convention}

// In Russian page
# API условность {#api-convention}

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 markdown heading and table-of-contents generation path in the TypeScript codebase. Check how headings currently receive generated link ids, then verify that custom ids such as {#api-convention} are preserved in the table of contents across translated headings.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.