docsifyjs / docsifyjs/docsify

ability to specify the `nav` element

Open
#1,525 3 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.