markmap / mkdocs-markmap

MkDocs plugin and extension to create mindmaps from markdown using markmap
MIT License
47 stars 5 forks source link

Markmap does not work in SPA after navigation #42

Closed andynameistaken closed 1 year ago

andynameistaken commented 2 years ago
neatc0der commented 2 years ago

I'm unable to reproduce the issue. Please provide more information:

andynameistaken commented 2 years ago

Repository

repo_name: ''

repo_url: ''

Copyright

copyright: 'Copyright © 2022 Andrzej Zahorski'

Plugins

Plugins

plugins:

Extensions

markdown_extensions:

================================================

THEME

================================================

theme: name: material font:

text: Sarala

text: Montserrat

features:

extra_css:

Customisation

extra: social:

extra_javascript:

LaTeX support

- `Python 3.10.6`
- `pip freeze`:

anyio==3.6.1 appnope==0.1.3 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 asttokens==2.0.8 attrs==20.3.0 Babel==2.10.3 backcall==0.2.0 beautifulsoup4==4.11.1 bleach==5.0.1 certifi==2022.6.15 cffi==1.15.1 charset-normalizer==2.1.1 click==8.1.3 debugpy==1.6.3 decorator==5.1.1 defusedxml==0.7.1 EditorConfig==0.12.3 entrypoints==0.4 executing==1.0.0 fastjsonschema==2.16.1 ghp-import==2.1.0 idna==3.3 importlib-metadata==4.12.0 ipykernel==6.15.2 ipython==8.5.0 ipython-genutils==0.2.0 jedi==0.18.1 Jinja2==3.1.2 jsbeautifier==1.14.6 json5==0.9.10 jsonschema==4.15.0 jupyter-core==4.11.1 jupyter-server==1.18.1 jupyter_client==7.3.5 jupyterlab==3.4.6 jupyterlab-pygments==0.2.2 jupyterlab_server==2.15.1 jupytext==1.14.1 lxml==4.9.1 Markdown==3.3.7 markdown-it-py==2.1.0 MarkupSafe==2.1.1 matplotlib-inline==0.1.6 mdit-py-plugins==0.3.0 mdurl==0.1.2 mergedeep==1.3.4 mistune==0.8.4 mkdocs==1.3.1 mkdocs-autolinks-plugin==0.6.0 mkdocs-jupyter==0.21.0 mkdocs-literate-nav==0.4.1 mkdocs-markmap==2.3.0 mkdocs-material==8.4.3 mkdocs-material-extensions==1.0.3 mkdocs-mermaid2-plugin==0.6.0 mkdocs-roamlinks-plugin==0.2.0 nbclassic==0.4.3 nbclient==0.6.7 nbconvert==6.5.3 nbformat==5.4.0 nest-asyncio==1.5.5 notebook==6.4.12 notebook-shim==0.1.0 packaging==21.3 pandocfilters==1.5.0 parso==0.8.3 pexpect==4.8.0 pickleshare==0.7.5 prometheus-client==0.14.1 prompt-toolkit==3.0.31 psutil==5.9.2 ptyprocess==0.7.0 pure-eval==0.2.2 pycparser==2.21 Pygments==2.13.0 pymdown-extensions==9.5 pyparsing==3.0.9 pyrsistent==0.18.1 python-dateutil==2.8.2 pytz==2022.2.1 PyYAML==6.0 pyyaml_env_tag==0.1 pyzmq==23.2.1 requests==2.28.1 Send2Trash==1.8.0 six==1.16.0 sniffio==1.3.0 soupsieve==2.3.2.post1 stack-data==0.5.0 terminado==0.15.0 tinycss2==1.1.1 toml==0.10.2 tornado==6.2 traitlets==5.3.0 urllib3==1.26.12 watchdog==2.1.9 wcwidth==0.2.5 webencodings==0.5.1 websocket-client==1.4.1 zipp==3.8.1

neatc0der commented 2 years ago

I prefer minimalistic examples that reproduce the issue, but OK. Let's try it with your input.

Here's what I did:

$ vim requirements.txt  # insert your `pip freeze` output
$ vim mkdocs.yml  # insert your `mkdocs.yml` output except for "custom_dir: overrides"
$ conda create -n markmap-reload -c conda-forge python=3.10.6
$ conda activate markmap-reload
$ pip install -r requirements.txt
$ mkdocs build  # used minimalistic input with index.md that references a simple markmap

Then, I opened it up in Firefox 104.0.2 on macOS 12.6: everything works just fine... Still unable to reproduce.

My suggestion: Please provide a minimalistic example that reproduces the issue for you, e.g.: docs/index.md

Look at this beautiful mindmap:

```markmap
# Root

## Branch 1

## Branch 2
libukai commented 1 year ago

I apologize for the previous incorrect statement. What should really be turned off is the navigation.instant feature of the theme. This feature preloads pages to improve page load speed, but it affects the re-execution of JS files. Turning off this attribute allows for automatic refresh when navigating between pages.

CleanShot 2023-10-04 at 18 06 09@2x