Unverified Commit b063faaf authored by James Elliott's avatar James Elliott
Browse files

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.
parent 1b6a1ca0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"
+4 −1
Original line number Diff line number Diff line
{{ $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 }}