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

Feature Request - Allow ability for sidebar to auto create links to headers in Md file #170

Open
davidscottturner opened this issue Dec 19, 2021 · 1 comment

Comments

@davidscottturner
Copy link

davidscottturner commented Dec 19, 2021

It would be nice to have the ability to have the sidebar reference an anchor in a MD file or to auto generate links based on headings a in the file.

I tried to make a sidebar config to be:

pages:
- group: Quick start again
expanded: true
pages:
- label: Introduction
page: developer-portal/quickstart/index.md#Introduction

which would render something like:

Quick start
|_ Introduction (would navigate to the Introduction heading in the quickstart/index.md file).

UPDATE:

I did try the href feature and got it to work using a relative path to host:
For example

pages:
- group: Quick start again
expanded: true
pages:
- label: Introduction
href: "/developer-portal/quickstart/#Introduction" (renders the URL correctly and works)

It would still be a nice feature to have an option to auto generate it from the sidebar.

@spacedsweden
Copy link

+1 on this

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

No branches or pull requests

2 participants