Skip to content

Scripts relative to mkdocs.yml file? #5

@rudolfbyker

Description

@rudolfbyker

It would be great to be able to specify scripts relative to the mkdocs.yml file.

Use case

In my mkdocs.yml file:

plugins:
  - gen-files:
      scripts:
        - gen_pages.py

If the current working directory is the folder containing mkdocs.yml, this works:

mkdocs build

But if I want to run this from somewhere else, this does not work:

mkdocs build -f /absolute/path/to/mkdocs.yml

This is very cumbersome for all kinds of CI/CD situations. It would be nice for mkdocs-gen-files to be consistent with the rest of the ecosystem, where everything is relative to the mkdocs.yml file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions