Skip to content

Support blob links as part of Github Directive #507

Open
@Manish3323

Description

@Manish3323

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions