jdoiro3 / mkdocs-multirepo-plugin

Build documentation in multiple repos into one site.
MIT License
135 stars 47 forks source link

Using ssh-uri repos in combination with edit urls #119

Closed auduny closed 6 months ago

auduny commented 1 year ago

Hi. We use github enterprise and are looking into using the multirepo plugin there but ran into some issuses combining ssh-git urls edit urls.

  - multirepo:
      cleanup: true
      keep_docs_dir: true
      repos:
        - section: ops
          import_url: 'git@github.ourenterprise.com:ops/docs/?edit_uri=/blob/master/''

This works, but the edit button will go to http://127.0.0.1:8000/ops/git@github.ourenterprise.com:ops/docs/edit/master/README.md

This is solveable by using https and tokens, but that makes it a bit harder for people to build the repos themselves on their machine. I tried to modify the edit_uri to include ?edit_uri=https://github.ourenterprise.com/docs/ops/edit/master/ but that just adds the whole url at the end :-)

Would be cool that if edit_uri starts with http(s):// then it's it's used as the root uri for edit/viewing. That is supposed to work in normal mkdocs

auduny commented 1 year ago

Added a pullrequest to hack around this

luishernandezv commented 11 months ago

Instead of changing the import URI I worked around this limitation by configuring git this way

git config --global url."git@github.ourenterprise.com:".insteadof "https://github.ourenterprise.com/"