Skip to content

Use README.md as index.html also if use_directory_urls is false#2081

Merged
waylan merged 3 commits intomkdocs:masterfrom
oprypin:readmeindex
Apr 26, 2020
Merged

Use README.md as index.html also if use_directory_urls is false#2081
waylan merged 3 commits intomkdocs:masterfrom
oprypin:readmeindex

Conversation

@oprypin
Copy link
Copy Markdown

@oprypin oprypin commented Apr 25, 2020

Right now, just like any foo/index.md, any foo/README.md becomes foo/index.html, but that works only if use_directory_urls is on.
But the use_directory_urls feature is for changing foo/bar.md into foo/bar/index.html and should not prevent the former from working.

I'm hoping that this is more of an oversight (due to the source code for the two things being very related) than an intentional exclusion.
So I'm sending a small pull request to fix that and also unify the code paths. But feel free to discuss this as an issue in case it's not as agreeable as I thought.

@oprypin

This comment was marked as abuse.

@waylan
Copy link
Copy Markdown
Contributor

waylan commented Apr 25, 2020

I just searched through the old discussions about this and can't find any reason for the current behavior of only working when use_directory_urls is True. Additionally, the documentation makes no suggestion of a difference in behavior here. Seems like this was an oversight. Thanks for the report and the work.

@waylan
Copy link
Copy Markdown
Contributor

waylan commented Apr 25, 2020

One thing is missing. We need a note added to the release notes. Here:

## Version 1.1.1 (in development)
* Bugfix: Ignore links which start with a backslash (#1680).
* Bugfix: Pass `builder` to the `on_serve` event so that it can be passed to
`server.watch` by plugins (#1952).
* Bugfix: Use `lunr[languages]==0.5.8` to avoid `nltk` incompatibilities (#2062).
* Bugfix: Ensure wheel is Python 3 only (#2021).
* Bugfix: Clean up `dev_addr` validation and disallow `0.0.0.0` (#2022).
* Add support for `min_search_length` parameter for search plugin (#2014).
* Bugfix: `readthedocs` theme `code` colors (#2027).

@oprypin

This comment was marked as abuse.

@waylan waylan merged commit 1ad6a91 into mkdocs:master Apr 26, 2020
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

Successfully merging this pull request may close these issues.

2 participants