Skip to content

Theme files override docs_dir files on Windows #1876

@wilhelmer

Description

@wilhelmer

As investigated and discussed in squidfunk/mkdocs-material#1282, custom files in docs_dir are overriden by theme files.

For example, if you use the default MkDocs theme and create a custom favicon.ico in docs/img, the custom icon does not appear in the output. It is overwritten by the theme's own favicon.

The issue was already brought up in #1671 and fixed by #1672.

However, the fix (#1672) only works on Unix systems (including Mac). It does not work on Windows.

Windows handles path names differently, so I suppose the issue must be caused by that. See especially the use of os.path in files.py (f8ac3c7ee).

I had a similar issue in mkdocs-exclude, see here: apenwarr/mkdocs-exclude#2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions