Comments (7)
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.
from retropie-docs.
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.
from retropie-docs.
What would happen if you changed repo_url
within https://github.com/RetroPie/RetroPie-Docs/blob/master/mkdocs.yml to "https://github.com/RetroPie/RetroPie-Setup/wiki"?
The other config possibility is to use the edit_uri
config option: http://www.mkdocs.org/user-guide/configuration/#edit_uri.
from retropie-docs.
So from the docs mkdocs appends the repo_url
with the edit_uri
to get an editable link.
Changing the repo url wouldn't really solve it. for example:
The default (incorrect) link to edit the home page is:
https://github.com/Retropie/RetroPie-Setup/edit/master/docs/index.md
This assumes it's hosted on a github wiki, but even if we switched it to https://github.com/RetroPie/RetroPie-Setup/wiki
it wouldn't work since it would append an edit path incorrectly:
https://github.com/RetroPie/RetroPie-Setup/wiki/edit/master/docs/index.md
lets say we manually redefine the edit_uri to just the root path /
You still would get:
https://github.com/RetroPie/RetroPie-Setup/wiki/edit/index.md
which doesn't work as the wiki edit urls resolve to:
https://github.com/RetroPie/RetroPie-Setup/wiki/Home/_edit
(btw the home page will always be perpetually broken since the github wiki's home page is named Home.md
whereas mkdocs looks for index.md
as the home page so in our conversion script we end up renaming Home.md
to index.md
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
/wiki/$pagename/_edit
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 retropie-docs.
From my tests:
using something like
edit_uri: '/RetroPie/RetroPie-Setup/wiki/'
On the installation page it will resolve to:
https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation.md
which redirects to:
https://raw.githubusercontent.com/wiki/RetroPie/RetroPie-Setup/First-Installation.md
And even if we were able to append _edit to the URL it would yield this:
https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation.md/_edit
Instead of the correct page:
https://github.com/RetroPie/RetroPie-Setup/wiki/First-Installation/_edit
So unless I'm missing some fancy querying sorcery to strip the markdown extension and append _edit
this just wasn't designed for our conversion use case.
from retropie-docs.
@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
from retropie-docs.
Could be yeah, although I will probably just stick with the current solution for now.
Thanks for submitting a request upstream.
from retropie-docs.
Related Issues (15)
- N64 Controller Config Instructions do not work HOT 4
- Getting Errors on mkdocs serve HOT 2
- Joycon connects but doesnโt work ingame HOT 1
- Online Updater is outdadte as in way to turn it on
- Emulators are not showing after install and reboot 0 games still showing HOT 3
- Commodore libretro docs outdated HOT 3
- Missing documentation/config for CEC support HOT 2
- Proposed modification "First installation" HOT 3
- Quasi88 not installable on the pi4 HOT 2
- List formatting breaks when generating the doc site HOT 2
- GameMaker Games are no longer available HOT 1
- Nintendo Switch Pro controller docs need updating HOT 1
- 3DO BIOS md5 hash incorrect or filename incorrect HOT 1
- References deleted post HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retropie-docs.