mkdocs-monorepo-plugin icon indicating copy to clipboard operation
mkdocs-monorepo-plugin copied to clipboard

Better support with `macros` plugin to override `extras`

Open Fokko opened this issue 1 year ago • 0 comments

I'm not sure if I should ask this here, or at the macros repository.

Consider the following setup:

# /mkdocs.yml
site_name: Cats API

nav:
  - Intro: 'index.md'
  - Authentication: 'authentication.md'
  - API:
    - v1: '!include ./v1/mkdocs.yml'
    - v2: '!include ./v2/mkdocs.yml'

plugins:
  - monorepo

extras:
    version: v2  # default
# /src/v1/mkdocs.yml
site_name: versions/v1

nav:
  - Reference: "reference.md"
  - Changelog: "changelog.md"

extras:
    version: v1
# /src/v2/mkdocs.yml
site_name: versions/v2

nav:
  - Migrating to v2: "migrating.md"
  - Reference: "reference.md"
  - Changelog: "changelog.md"

I would love to have the version variable be overridden by the v1 in the earlier version, but it looks like the included extras are not evaluated.

Fokko avatar May 30 '24 12:05 Fokko