Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Apr 26, 2020

Conversation

oprypin
Copy link
Member

@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
Copy link
Member Author

@oprypin oprypin commented Apr 25, 2020

Best viewed with "hide whitespace changes"

@waylan
Copy link
Member

@waylan 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
Member

@waylan 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
Copy link
Member Author

@oprypin oprypin commented Apr 26, 2020

That is done BTW.

Perhaps you could mention that the convention is to add the release notes line as the first item in the list under "(in development)". That is not trivial to deduce :)
This detail could also be added into CONTRIBUTING.md.

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

None yet

2 participants