Skip to content

Subsite does not prefix its navigation #3

@martymichal

Description

@martymichal

Description of the problem

Subsites added to a documentation do not prepend base_path to the path of the documentation files. This causes problems when there are documentation files with the same file structure.

How to reproduce

File structure

├── bar/
|   ├── docs/
|   |  ├── index.md
|   ├── mkdocs.yaml
├── docs/
|   ├── index.md
├── mkdocs.yaml  

Main documentation (Foo)

mkdocs.yaml file contains:

site_name: Foo
plugins:
  subsite:
    sites:
      - base_path: Bar
        nav_path: Subdocumentation/Bar
nav:
  - Index: 'index.md'
  - Subdocumentation:
      - Bar: []

Sub documentation (Bar)

site_name: Bar
nav:
  - Index: 'index.md'

Current behaviour

Navigating to Index shows the index page of documentation Foo.
Navigating to Subdocumentation/Bar/Index shows the index page of documentation Foo.

Desired behaviour

Navigating to Index should show the index page of documentation Foo.
Navigating to Subdocumentation/Bar/Index should show the index page of documentation Bar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions