docsy icon indicating copy to clipboard operation
docsy copied to clipboard

Add support for BitBucket

Open AntoineGlacet opened this issue 2 years ago • 1 comments

I have to work from Bitbucket and sadly, the Repository links feature does not work out of the box. Ideally, hugo.toml would have a section like below:

[params]
# choose between github, gitlab, bitbucket, aws codecommit,
repo_host = github 
repo_base_url = "https://github.com/google/docsy"
repo_branch = "main"

AntoineGlacet avatar Feb 12 '24 05:02 AntoineGlacet

can you provide the relevant urls?

{{ $viewURL := printf "%s/src/branch/%s" .repo.url .repo_path -}}
{{ $editURL := printf "%s/_edit/%s" .repo.url .repo_path -}}
{{ $issuesURL := printf "%s/issues/new?title=%s" .repo.url (safeURL $.Title ) -}}
{{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
{{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
{{ $newPageURL := printf "%s/_new/%s?%s" .repo.url (path.Dir .repo_path) $newPageQS }}
 {{ $project_issueURL := printf "%s/issues/new" .repo.project_url -}}

What does it need between the double quotes to make the correct urls?

smainz avatar Apr 24 '24 15:04 smainz