oprypin / mkdocs-literate-nav

MkDocs plugin to specify the navigation in Markdown instead of YAML
https://oprypin.github.io/mkdocs-literate-nav
MIT License
73 stars 8 forks source link

literate-nav ignores my original nav: and generates only new nav dir. #27

Closed matankley closed 1 year ago

matankley commented 1 year ago

I'm using literate-nav to generate a nav from SUMMARY.txt. But unfortunately the output is just a nav dir of the summary.txt instead of my original nav and subdir of the summary.txt

Here is my nav structure:

nav:
- Docs:
  - index.md
  - Beginners guide:
      - src/beginners-guide/index.md
      - Simple task: src/beginners-guide/simple-task.md
      - Controlling task behavior: src/beginners-guide/controlling-task-behavior.md
      - Debugging tasks: src/beginners-guide/debugging-tasks.md
      - Recap: src/beginners-guide/recap.md
  - Features:
    - src/features/index.md
    - Chat:
        - src/features/chat/index.md
        - Chat memory:
          - src/features/chat/chat-memory/index.md
          - File Memory: src/features/chat/chat-memory/file-memory.md
          - Redis Memory: src/features/chat/chat-memory/redis-memory.md
          - MongoDB Memory: src/features/chat/chat-memory/mongodb-memory.md
          - PostgreSQL Memory: src/features/chat/chat-memory/postgresql-memory.md
        - Controlling chat behavior: src/features/chat/controlling-chat-behavior.md
        - Debugging chat: src/features/chat/debugging-chat.md
        - Customizing chat response: src/features/chat/customizing-chat-response.md
        - Advanced initialization: src/features/chat/advanced-initialization.md
        - Control LLM parameters: src/features/language-model-parameters
    - Control LLM parameters: src/features/language-model-parameters
    - Magic: src/features/magic.md
    - Multi models and providers: src/features/multi-model-multi-provider.md
    - Middlewares:
        - src/features/middlewares/index.md
    - Evals:
        - src/features/evals/index.md
  - Best practices:
      - src/best-practices/index.md
  - Providers:
      - src/providers/index.md
      - src/providers/openai.md
  - Integrations:
      - src/integrations/index.md
  - Examples:
    - Deployments:
      - src/examples/deployments/index.md
  - Newsletter: src/newsletter.md
- Reference:
  - declarai: reference/SUMMARY.md
- Changelog: src/changelog.md
- Contribute: src/contribute.md

  - gen-files:
      scripts:
        - gen_ref_pages.py
  - literate-nav:
      nav_file: SUMMARY.txt

Any idea how can I fix it ?

oprypin commented 1 year ago

Please share more.

what's in gen_ref_pages? what exactly do you expect to get and what exactly do you get instead? why are there discrepancies between naming - is it SUMMARY.md or SUMMARY.txt

did you really mean declarai: reference/SUMMARY.md or should it be declarai: reference/

matankley commented 1 year ago

Sorry for not providing the full information, I was able to fix it myself. What happened is I wanted to use hybrid navigation, but accidentally put the SUMMARY.md file on the docs root folder, This caused my original nav to dissapear.

We can close the issue, thanks for helping :)