Skip to content
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

Support blob links as part of Github Directive #507

Open
Manish3323 opened this issue Mar 9, 2022 · 0 comments
Open

Support blob links as part of Github Directive #507

Manish3323 opened this issue Mar 9, 2022 · 0 comments

Comments

@Manish3323
Copy link

Manish3323 commented Mar 9, 2022

There is an issue in sbt-paradox plugin when we set github.base_url having blob for versioned link, source_urls are not pointing correctly to branch/ specific.

As an example,
In our documentation, we are setting "github.base_url" -> "https://github.com/org/repo/*blob*/0.2.0".
we snip from /src/build.sbt file & then the source url of the corresponding build.sbt gets generated as https://github.com/org/repo/tree/master/src/build.sbt where it should have been https://github.com/org/repo/blob/0.2.0/src/build.sbt

This issue can be reproduced by going over this versioned link & clicking on Edit this page button at the bottom of the page. It points to master branch, where as it should be pointing to 4.0.1 tag. In a sense branch should be whatever we have set to github.base_url.

I think blob should be handled by the paradox plugin.

Possible solution would be updatingThis file to handle BlobUrl as well along with TreeUrl.

  lazy val TreeUrl = (s"(.*$githubDomain/[^/]+/[^/]+/tree/[^/]+)").r
  lazy val BlobUrl = (s"(.*$githubDomain/[^/]+/[^/]+/blob/[^/]+)").r

Could be like following

Screenshot 2022-03-09 at 8 22 07 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant