-
Notifications
You must be signed in to change notification settings - Fork 148
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
"Edit page" URLs incorrect #1
Comments
The material theme by default assumes the docs are hosted on a GitHub repository but we build them from the retropie wiki itself (which is technically a repository to but not the type that's expected) https://github.com/RetroPie/RetroPie-Setup/wiki Two options for us are to remove the edit on github links, or find a way to point them to where they actually reside. My preference would be the former. |
What would happen if you changed The other config possibility is to use the |
So from the docs mkdocs appends the Changing the repo url wouldn't really solve it. for example: The default (incorrect) link to edit the home page is:
This assumes it's hosted on a github wiki, but even if we switched it to
lets say we manually redefine the edit_uri to just the root path You still would get:
which doesn't work as the wiki edit urls resolve to:
(btw the home page will always be perpetually broken since the github wiki's home page is named So if there is a way to have the edit_uri use variables or wildcards (perhaps that's what they mean by fragments or query characters) of sorts like
It might work for all but the home page. but I haven't tested it. note this is all conjecture based on how I understand the docs, I haven't validated it with any real tests as of yet |
From my tests: using something like
On the installation page it will resolve to:
which redirects to:
And even if we were able to append _edit to the URL it would yield this:
Instead of the correct page:
So unless I'm missing some fancy querying sorcery to strip the markdown extension and append |
I have implemented a workaround for this using a small php script on our server that redirects to the correct page. This avoids having to modify mkdocs. |
@joolswills - I've submitted a request for MkDocs to support wiki URLs. But I'm wondering: would this JavaScript snippet have also done the trick? https://github.com/mkdocs/mkdocs/wiki/MkDocs-Recipes#associate-github-page-with-current-mkdoc-page |
Could be yeah, although I will probably just stick with the current solution for now. Thanks for submitting a request upstream. |
The "edit page" button (pencil icon) link on the docs site does not work. For example, on this page https://retropie.org.uk/docs/ the link goes to https://github.com/RetroPie/RetroPie-Setup/edit/master/docs/index.md. What should the correct link be? I don't see where these source markdown files are located. Within the RetroPie-Docs repo?
The text was updated successfully, but these errors were encountered: