Open melMass opened 2 years ago
Hey @melMass,
Thanks! Happy new year to you as well.
Thanks for spotting this; unfortunately right now I don't see a good way to fix it for good. MkDocs generates the edit URL from the repo_url
or alternatively an edit_url
config option plus the path of the file in the build path. Now, the issue is that all the files that Pydoc-Markdown generates or copies into the build folder with a different path or name will not match whatever MkDocs generates.
So for example, the Pydoc-Markdown documentation README.md
at build time is copied to docs/build/content/index.md
. MkDocs then generates a URL as edit_url +"/index.md"
, which obviously will never point to the README.md
file in the Git repository, no matter what value we configure for edit_url
.
I've at least fixed it for the Getting Started, Migrate and Configuration pages with the above referenced commit. Should be able to also fix it for the Read the Docs page, just need to find out how it ends up renaming readthedocs.md
to read-the-docs.md
in the build directory. :)
On a side note; if MkDocs supported some way of defining an edit URL per page, that would be great but so far I haven't found a way to do that.
Just found this; might give it a shot later https://gitlab.com/paulrbr/mkdocs-edit-url/
The edit URL issue should be resolved when using the new Novella based system being worked on in #245 because the Markdown source files actually exist in your repository.
Hello Niklas,
I was quite busy lately, sorry for not finishing that PR, I see that you fixed & merged it! Great. I'm iterating again on the same documentation I was working on and I noticed a small bug in the documentation of pydoc-markdown. All the
Edit on Github
links are dead.Happy new year 🥂