fix: correct bitbucket

Bitbucket (bitbucket.org) is different to BitbucketServer, so made sure to add the distinction. Also moved a declaration closer to where it's used.
This commit is contained in:
James Elliott
2022-01-20 11:43:20 +11:00
parent 1b6a1ca0cd
commit b063faaf37
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,4 @@
{{ $parts := slice .Site.Params.docsRepo }}
{{ $filePath := replace .File.Path "\\" "/" }}
{{ if (eq .Site.Params.repoHost "GitHub") }}
{{ $parts = $parts | append "blob" .Site.Params.docsRepoBranch }}
@ -8,6 +7,8 @@
{{ else if (eq .Site.Params.repoHost "GitLab") }}
{{ $parts = $parts | append "-/blob" .Site.Params.docsRepoBranch }}
{{ else if (eq .Site.Params.repoHost "Bitbucket") }}
{{ $parts = $parts | append "src" .Site.Params.docsRepoBranch }}
{{ else if (eq .Site.Params.repoHost "BitbucketServer") }}
{{ $parts = $parts | append "browse" .Site.Params.docsRepoBranch }}
{{ end }}
@ -17,6 +18,8 @@
{{ end }}
{{ end }}
{{ $filePath := replace .File.Path "\\" "/" }}
{{ if .Site.Params.options.multilingualMode }}
{{ $parts = $parts | append "content" .Lang $filePath }}
{{ else }}