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:
parent
1b6a1ca0cd
commit
b063faaf37
|
@ -66,7 +66,7 @@ alertDismissable = true
|
|||
alertText = "Introducing the Doks child theme, several DX + UX updates, and more! <a class=\"alert-link stretched-link\" href=\"https://getdoks.org/blog/doks-v0.2/\">Check out Doks v0.2</a>"
|
||||
|
||||
# Edit Page
|
||||
# repoHost [Github | Gitea | GitLab | Bitbucket ] is used for building the edit link based on git hoster
|
||||
# repoHost [Github | Gitea | GitLab | Bitbucket | BitbucketServer ] is used for building the edit link based on git hoster
|
||||
repoHost = "GitHub"
|
||||
#repoHost = "Gitea"
|
||||
docsRepo = "https://github.com/h-enk/doks"
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in New Issue