Redocly / Redocly/redoc

Create a shareable anchor to a paragraph without creating a tag in sidebar

Open
#2,250 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hello!

I want to create an anchor for a specific place in my documentation, so I will be able to share it with another people. But I don't want to create a tag for this in the left sidebar.

Let me explain on your example from your showcase.

Let's say I have a very big text in https://redocly.github.io/redoc/#tag/pet/operation/getPetById with examples and I want to create a link to a string "Returns a single pet" somewhere in the top of document without creating a specific tag in the left side of document. How can I do this?

If I make something like

[Single pet](#single_pet)

in the description in top of documentation and then

    <a name="single_pet"></a>
    ### Returns a single pet

in the description of a tag "Find pet by ID", next thing will occur:
I click to a link https://redocly.github.io/redoc/#single_pet and get to the required paragraph. But if I copy resulting URL in browser, i will get the same https://redocly.github.io/redoc/#tag/pet/operation/getPetById, because this markdown-like anchor (https://redocly.github.io/redoc/#single_pet) that I created, is not shareable and is accessible for navigation only to a person, who already opened this documentation.

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 reproducing the behavior at the linked Redoc showcase URL with the provided markdown and HTML anchor examples. Trace how the generated documentation handles fragment URLs and sidebar tags; done means a copied URL opens the target paragraph directly without creating a sidebar tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.