Closed CieNTi closed 2 years ago
Good find, thnx for reporting!
I guess we'll then also have to account for the situation when both are present.
The whole thing is a bit hacky way to find the path to the root of the site, but it works :)
I'll pick this up next time I work on some OS projects :)
Thanks for the prompt reply!
I just updated the issue description, by adding what MkDocs says about index vs README precedence, and the updated proposal (I did a wrong intermediate edit, in case you received that notification :D)
I was able to use an attribute named is_homepage
instead. Thanks for doing the research for this issue!
Released in https://github.com/timvink/mkdocs-charts-plugin/releases/tag/v0.0.8
Much better and elegant :D Thanks!
First, thanks for this plugin, super simple and it works really well.
Description
Currently it is assumed that the index file is named
index.md
, and if usingREADME.md
the build fails:It is widely used the one named
README.md
, and MkDocs supports it:Proposal 1
I did a fast & dirty successful test, by modifying the following line:
https://github.com/timvink/mkdocs-charts-plugin/blob/8f0c6c08aa85a222c03d2b574178a5632a20c7ef/mkdocs_charts_plugin/plugin.py#L69
into:
It would be possible to you to add support for
README.md
too? I didn't want to make a full PR for a partial line addition :DThanks a lot in advance!
Proposal 2
I do not have deep knowledge of
pythonic
ways, and I don't like to repeat myself (2 x self.homepage ..), but it seems this could be a simple solution, in where both are supported and preference is forindex.md
: