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

What's the height of a documentation library? 😋 #236

Open
melMass opened this issue Jan 6, 2022 · 4 comments
Open

What's the height of a documentation library? 😋 #236

melMass opened this issue Jan 6, 2022 · 4 comments
Assignees
Labels

Comments

@melMass
Copy link
Contributor

melMass commented Jan 6, 2022

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 🥂

NiklasRosenstein added a commit that referenced this issue Jan 6, 2022
@NiklasRosenstein
Copy link
Owner

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. :)

@NiklasRosenstein
Copy link
Owner

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.

@NiklasRosenstein
Copy link
Owner

Just found this; might give it a shot later https://gitlab.com/paulrbr/mkdocs-edit-url/

@NiklasRosenstein
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants