spinicist / QUIT

A set of tools for processing Quantitative MR Images
Mozilla Public License 2.0
58 stars 20 forks source link

Edit links #12

Closed Lewiscowles1986 closed 6 years ago

Lewiscowles1986 commented 6 years ago

This repo was linked to me from reading about how to get mkdocs to display an edit link. It looks like you still use mkdocs, but no longer have the edit links. Any reason why?

spinicist commented 6 years ago

Hi,

Can you give a bit more detail? Which link directed you here? I think you mean the edit_uri link, which is auto-generated if you don't set it to null. In my case, because of the particular layout of my repo, the default edit_uri link wasn't valid, so I got rid of it. I'm happy with the repo_url link back to the Github main page.

Lewiscowles1986 commented 6 years ago

https://github.com/mkdocs/mkdocs/issues/1378#issuecomment-384340549 was the link, I'd never heard of mkdocs, a project I follow uses. I was looking for examples and 1378 was the first issue that showed up, I came searching your repo for what you'd done but couldn't find anything.

What was it about your docs structure that broke edit_url functionality, the repo I just PR'd had docs outside of the repo they wanted to showcase using material and I managed that with a relative path traversal ../ as the prefix (works a treat too).

spinicist commented 6 years ago

The problem is exactly the one described in the comment you have linked - I (foolishly) use Capitals on my directory names. Hence my docs_dir is "Docs" not "docs". mkdocs was forcing everything to lower-case, but github wasn't accepting the lower case version as a valid link.

If you are sane and use lower-case for yours "docs" directory, you should be fine.

Lewiscowles1986 commented 6 years ago

it looks like it's fixed now, I just cloned your repo and did some testing. Would you like a PR?

spinicist commented 6 years ago

Sure, thanks very much! Can you push it to the development branch instead of master please?

Lewiscowles1986 commented 6 years ago

absolutely glad to. I'll also include a docs_requirements.txt so others can pip install -r docs_requirements.txt --user

Lewiscowles1986 commented 6 years ago

Question. Do you want all documentation contributions to PR against development branch, or master? I think the PR may need amending before merge 😊

spinicist commented 6 years ago

Hi,

It should go to development. I'm following the gitflow model (roughly) so everything goes to development before master. If you did it against master then I'd have to merge/rebase it back into development.

Thanks again!

spinicist commented 6 years ago

Sorry, I missed that you had already generated the PR. I merged it and re-built the docs, the link works now. Great!