{{ $filePath := replace .File.Path "\\" "/" }} {{ $editPath := "null" }} {{ if (eq .Site.Params.repoHost "GitHub") }} {{ $editPath = "/blob/" }} {{ else if (eq .Site.Params.repoHost "Gitea") }} {{ $editPath = "/_edit/" }} {{ else if (eq .Site.Params.repoHost "GitLab") }} {{ $editPath = "/-/blob/" }} {{ end }} {{ $contentPath := print .Site.Params.docsRepo $editPath .Site.Params.docsRepoBranch "/content/" }} {{ $url := print $contentPath $filePath }} {{ if .Site.Params.options.multilingualMode }} {{ $url = print $contentPath .Lang "/" $filePath }} {{ end }}