1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-09 05:00:45 +02:00

templates: use urls.JoinPath when handling URLs

This commit is contained in:
XhmikosR
2024-03-03 08:00:52 +02:00
parent 192b7f785e
commit b3bca581f1
6 changed files with 9 additions and 8 deletions

View File

@@ -1,11 +1,11 @@
{{- $pageTitle := .Title | markdownify -}}
{{- $pageDescription := .Page.Params.description | default .Site.Params.description | markdownify -}}
{{- $socialImagePath := printf "/docs/%s/assets" .Site.Params.docs_version -}}
{{- $socialImagePath := urls.JoinPath "/docs" .Site.Params.docs_version "assets" -}}
{{- if .Page.Params.thumbnail -}}
{{- $socialImagePath = path.Join $socialImagePath "img/" .Page.Params.thumbnail -}}
{{- $socialImagePath = urls.JoinPath $socialImagePath "img" .Page.Params.thumbnail -}}
{{- else -}}
{{- $socialImagePath = path.Join $socialImagePath "brand/bootstrap-social.png" -}}
{{- $socialImagePath = urls.JoinPath $socialImagePath "brand/bootstrap-social.png" -}}
{{- end -}}
<meta name="twitter:card" content="summary_large_image">