Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nav tree displaying root from markmap #33

Closed
andynameistaken opened this issue Oct 24, 2021 · 2 comments
Closed

nav tree displaying root from markmap #33

andynameistaken opened this issue Oct 24, 2021 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@andynameistaken
Copy link

andynameistaken commented Oct 24, 2021

Config:

mkdocs.yml:

site_name: test

theme:
    name: 'material'
    palette:

    # Light mode
    - media: "(prefers-color-scheme: light)"
      scheme: default
      primary: pink
      accent: indigo
      toggle:
        icon: material/toggle-switch-off-outline
        name: Switch to dark mode

    # Dark mode
    - media: "(prefers-color-scheme: dark)"
      scheme: slate
      primary: pink
      accent: blue
      toggle:
        icon: material/toggle-switch
        name: Switch to light mode

# Extensions
markdown_extensions:
  - footnotes
  - toc:
      permalink: true

plugins:
  - search
  - markmap

docs:

index.md:

Look at this beautiful mindmap:

{!mindmap.mm.md!}

mindmap.mm.md:

# Root 1
* Point 1
# Root 2

## Branch 1

* Branchlet 1a
* Branchlet 1b

## Branch 2

* Branchlet 2a
* Branchlet 2b

Logs:

INFO     -  script downloaded: https://unpkg.com/[email protected]/dist/d3.min.js
INFO     -  script downloaded: https://unpkg.com/[email protected]/dist/browser/index.min.js
INFO     -  script downloaded: https://unpkg.com/[email protected]/dist/index.min.js
INFO     -  no markmap found: mindmap.mm

Problem:

Root from mindmap is on nav bar:
image

@neatc0der
Copy link
Member

neatc0der commented Nov 2, 2021

This is easy to fix. Simply adjust your file structure and add the following configuration:

  1. Move your mindmaps to a different directory than docs, e.g. mindmaps.
  2. Adjust the default base_path for mkdocs-markmap:
plugins:
  - markmap:
      base_path: mindmaps

Then, tools crawling for other markdown files will not be able to falsely identify markmaps as content.

Highlighting this on a troubleshooting section in the readme might be helpful, though. Thanks for pointing this out.

@neatc0der neatc0der added the documentation Improvements or additions to documentation label Nov 2, 2021
@neatc0der neatc0der self-assigned this Nov 2, 2021
neatc0der pushed a commit that referenced this issue Nov 4, 2021
@neatc0der
Copy link
Member

v2.2.0 released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants