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

Generate nav with links to headers #3701

Open
nicoabie opened this issue May 10, 2024 · 1 comment
Open

Generate nav with links to headers #3701

nicoabie opened this issue May 10, 2024 · 1 comment

Comments

@nicoabie
Copy link

I've googled and searched in the issued but couldn't find a way to make this work.

This old https://join-monster.readthedocs.io/en/stable/ is built with mkdocs version 0.17.3 using "pages:"
The new https://join-monster-test.readthedocs.io/en/latest/ is built with mkdocs version 1.5.3 using "nav:"

But the navigation in the old one has links to headers inside pages. Anyone knows how to do this with the new version?

This is the configuration (before instead of nav:, pages: was used instead)

site_name: Join Monster
site_description: A GraphQL-to-SQL execution layer.
repo_url: https://github.com/join-monster/join-monster
site_favicon: img/join_monster.ico
theme: readthedocs
extra_javascript:
  # MkDocs includes an old version of highlight.js, but it doesn't recognize all modern JS syntax, import a newer version
  - //cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js
  - custom.js
extra_css: 
  - custom.css
nav:
  - Introduction: index.md
  - "The Problem We Solve": problem.md
  - "How It Works": how-it-works.md
  - "Pros & Cons": pros-cons.md
  - "Basic Usage":
    - "1. Declare Data Model": data-model.md
    - "2. Map Objects to Tables": map-to-table.md
    - "3. Add Metadata to Fields": field-metadata.md
    - "4. Calling Join Monster": call-function.md
    - "5. Where Conditions": where.md
    - "6. Joining Objects": start-joins.md
    - "7. Arbitrary Depth": arbitrary-depth.md
    - "8. Many-to-Many Joins": many-to-many.md
    - "9. Order By": order-by.md
  - "Query Planning":
    - "What & Why": query-planning.md
    - "One-to-many Batch": batch-one-many.md
    - "Many-to-many Batch": batch-many-many.md
  - "Advanced Usage":
    - "Misc. Properties": misc.md
    - "Union & Interface Types": unions.md
    - "Aggregation Tricks": aggregation.md
    - "Pagination": pagination.md
    - "Relay Support": relay.md
  - "SQL Dialects": dialects.md
  - Warnings: warnings.md
  - API: API.md
  - "Change Log": CHANGELOG.md

Thanks in advance and let me know if I can by of any help

@nicoabie
Copy link
Author

I've found that all of our MD pages have ## headers

putting an empty # header on top of each solves this issue

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

No branches or pull requests

1 participant