backstage / mkdocs-monorepo-plugin

✚ Build multiple documentation folders in a single Mkdocs. Designed for large codebases.
https://backstage.github.io/mkdocs-monorepo-plugin/
Apache License 2.0
314 stars 75 forks source link

Warnings during build ("duplicate filename") #50

Closed FredrikMeyer closed 2 years ago

FredrikMeyer commented 3 years ago

Thanks for the great plugin!

This is maybe just a question, not an issue, but here goes:

We have a lot of "sub-documentations", and during build of the root mkdocs.yml, we get a lot of warnings during build:

WARNING -  Duplicate filename: 'protocol.md' exists at both '/var/folders/s5/d5n7fmn927q89ky03v4tbz_00000gn/T/docs_vokpwu1o/something/protocol.md' and '/var/folders/s5/d5n7fmn927q89ky03v4tbz_00000gn/T/docs_vokpwu1o/something/protocol.md'
WARNING -  Duplicate filename: 'engine.md' exists at both '/var/folders/s5/d5n7fmn927q89ky03v4tbz_00000gn/T/docs_vokpwu1o/xx/engine.md' and '/var/folders/s5/d5n7fmn927q89ky03v4tbz_00000gn/T/docs_vokpwu1o/xx/engine.md'

Is this a known thing, or do we maybe have a configuration error? I cannot see what is immediately wrong about reusing a file name as long as they are in different directories.

camilaibs commented 2 years ago

Hi @FredrikMeyer thanks for opening the issue, is it still happening for you? I tried to simulate in simple-docs folder that we have at the root of the project and I couldn't see this warning.

Version:

Command:

cd simple-docs
mkdocs build -v

Folder structure:

.
├── docs
│   ├── authentication.md
│   └── index.md
├── mkdocs.yml
├── v1
│   ├── docs
│   │   ├── changelog.md
│   │   └── reference.md
│   └── mkdocs.yml
├── v2
│   ├── docs
│   │   ├── changelog.md
│   │   ├── migrating.md
│   │   └── reference.md
│   └── mkdocs.yml
└── v3
    ├── docs
    │   ├── changelog.md
    │   ├── migrating.md
    │   └── reference.md
    └── mkdocs.yml
FredrikMeyer commented 2 years ago

Thanks for your answer!

I tried checking out the repo and trying the minimal example, and I don't see them either.

So I did some digging, and it turns out that the warnings came from another plugin (the autolinks plugin, https://github.com/midnightprioriem/mkdocs-autolinks-plugin). (which I just removed from our project since we weren't using it)

Sorry for the issue!

camilaibs commented 2 years ago

Thanks for the quick response, I'll close the issue 🙂