ability to specify the `nav` element
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 31.5k
- Forks
- 5.8k
- Avg merge
- 9d 8h
- Merged PRs (30d)
- 2
Description
I'm trying to embed docsify within an existing template, but I'm having a problem where docsify is hijacking my template's <nav> tag.
Looking through the source, it seems like docsify chooses the first <nav> on the page.
Is there any chance we could get a nav_el config option that lets us specify the id of the <nav> element we want to use?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/core/render/index.js at line 404, where docsify selects the first
element. Trace how configuration is read and how that navigation element is chosen. Done means an optional nav_el setting lets an embedded docsify instance target the specified nav element without hijacking another in the host template.Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100