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

Incorrect data source folders when config has no path #39

Open
modwyer42 opened this issue Mar 21, 2022 · 0 comments
Open

Incorrect data source folders when config has no path #39

modwyer42 opened this issue Mar 21, 2022 · 0 comments

Comments

@modwyer42
Copy link

When using custom paths for the data files and then running mkdocs build with no path to the config file, the data source folders list is created with an incorrect file structure.

Example:
mkdocs.yaml file include the block:

  - markdownextradata:
      data: docs/source_data

and the build is run from the base folder without a path for config:

mkdocs build -f mkdocs.yml

The base_path in the plugin will be set to '' and the f-string in the list comprehension will build the list with paths like /docs/source_data rather than either docs/source_data or ./docs/source_data

Given the lack of a path to config in the CLI is equivalent to ./, you could potentially set the base_path to the config dirname or '.' if it's an empty string.

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