bashtage / sphinx-material

A material-based, responsive theme inspired by mkdocs-material
Other
312 stars 91 forks source link

Cannot make version_json work #102

Closed Yura52 closed 3 years ago

Yura52 commented 3 years ago

Hi! I am trying to use the version_info option my project, this is the link to the snapshot I am experimenting with: https://github.com/Yura52/zero/tree/fad396badd87975b365eddbd5496df5ad60f25da

I do the following locally on my Mac:

  1. Create "versions.json":

    mkdir -p docsrc/source/_static
    echo '"{"release": "", "devel": "devel"}' > docsrc/source/_static/versions.json
  2. Add the line html_static_path = ['_static'] to "docsrc/source/conf.py".

  3. In "docsrc/source/conf.py/html_theme_options": comment "version_info" add "version_json": "_static/versions.json"

  4. make clean && make _docs

  5. Let's pretend we have "devel" docs also cp -r docsrc/build/html devel && mv devel docsrc/build/html

  6. open docsrc/build/html/index.html

I get "Other versions not found" instead of the version dropdown. Could you give a hint where the mistake might be? P.S. The same workflow but with "version_info" instead of "version_json" works as expected.