google / docsy

A set of Hugo doc templates for launching open source content.
https://docsy.dev
Apache License 2.0
2.51k stars 879 forks source link

Feature Request - add Azure Repos links support #794

Open di9383 opened 2 years ago

di9383 commented 2 years ago

Hi! As mentioned here GitHub is the only repository that is supported by Repository Links.

Is it possible to add Azure Repos support or at least guide, which files/modules/etc. should be adjusted by one not mature enough with Go but ready to dive in and contribute?

LisaFC commented 2 years ago

Hi there,

Here's the file we use for the repository links, if you want to take a look - you can also override this file for just your own project if you don't want to have to deal yet with all the potential conditionals etc. you'd need to add to the main theme: https://github.com/google/docsy/blob/master/layouts/partials/page-meta-links.html

@chalin did the most recent work on it so might be able to help at some stage.

chalin commented 2 years ago

Hi @di9383. Can you provide some examples of the kinds of repo links that you'd need and/or links to a public docs website and the associated Azure repo?

di9383 commented 2 years ago

Hi @chalin, thank you for your support. So basically, if we consider to edit _index.md landing page, this is how url will look like when azure git repo is used:

https://dev.azure.com/<org_name>/<project_name>/_git/<repo_name>?path=/content/en/docs/_index.md

while this is how the same page looks in github:

https://github.com/<org_name>/<repo_name>/edit/master/content/en/docs/_index.md

Also it seems that Azure Repos URL uses the default branch (main or master usually) unless otherwise is set. And if I change the branch it is added in the end, like this:

https://dev.azure.com/<org_name>/<project_name>/_git/<repo_name>?path=%2Fcontent%2Fen%2F_index.md&version=GBmain&_a=contents

So it is rather cumbersome behavior and link composition, but I believe even adding default URL format support is enough for the purpose of functionality these links provide.

chalin commented 2 years ago

Thanks for those examples. I have a couple of ideas that I'll explore as soon as I can.

di9383 commented 2 years ago

Hi @chalin. Just for understanding, do you have any timelines for this?

chalin commented 2 years ago

Hi @di9383 - while I have ideas on how to generalize the repo-links layout, other docsy tasks seem to be more pressing. My hope is to get to this in the first half of the year. If you can get others to upvote this issue, maybe it will get some attention earlier.

erwin-faceit commented 4 months ago

See https://github.com/google/docsy/pull/1310