Skip to content

Adding projects from submodules leads to some incompatibilities with plugins #6970

@leandrolerena

Description

@leandrolerena

Context

I use the projects plugin to evaluate mkdocs for a documentation project. Therefore, I need documentation to be aggregated from different repositories.

In particular, I have two issues, one with git-authors, the other with pymdownx.snippets, which make me wonder if the following statement:

Since the projects plugin will invoke local builds in the directory of where your submodules are located, this plugin should work without problems, as it does not use temporary directories.

as the local build works perfectly.

See discussion on git-authors here: timvink/mkdocs-git-authors-plugin#79

Bug description

git-authors plugin reports the following on the project included:

WARNING - [project://.zebbra-mkdocs-dummyproject] [git-authors-plugin] /home/USER/projects/zebbra-mkdocs/submodules/zebbra-mkdocs-dummyproject/docs/index.md has not been committed yet. Lines are not counted ... 

pymdownx.snippets do not work

Related links

Reproduction

reproduction.zip

Steps to reproduce

  1. Clone https://github.com/zebbra/zebbra-mkdocs/tree/mkdocs_projects (make sure the branch is mkdocs_projects, as I am testing different approaches)
  2. git submodule init
  3. git submodule update
  4. pipenv install
  5. make serve

This will reproduce the error from snippets, you can remove the snippets by clearing the file content in submodules/zebbra-mkdocs-dummyproject/docs/index.md

  1. Open in browser
  2. Click on Test in the navigation (this will lead to the project included with the plugin)
  3. Observe that git authors are empty)

Browser

No response

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions