Skip to content

What is the expected behavior of readme.md? #2846

@drts01

Description

@drts01

According to the docs, Writing-your-docs:Index-pages, README.md will render into index.html. There is no mention of readme.md. The implementation reflects this behavior:

return 'index' if stem in ('index', 'README') else stem

But the check in get_files() ignores casing:

if filename.lower() == 'readme.md' and 'index.md' in filenames:
log.warning(f"Both index.md and readme.md found. Skipping readme.md from {source_dir}")

I believe it should be:

if filename == 'README.md' and 'index.md' in filenames:
    log.warning(f"Both index.md and README.md found. Skipping README.md from {source_dir}")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions