Skip to content

Commit

Permalink
Use absolute links for images in <head>
Browse files Browse the repository at this point in the history
  • Loading branch information
oclero committed Nov 17, 2023
1 parent c4e6ace commit 8ea07c7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions docs/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
{{- $pageTitle = print $title "&nbsp;—&nbsp;" $siteName -}}
{{- end -}}

{{- $baseURL := .Site.BaseURL -}}
{{- $pageFullURL := .Permalink -}}

{{- $themeColor := "#2e1b66" -}}
Expand Down Expand Up @@ -108,7 +107,7 @@
rel="icon"
type="image/png"
sizes="{{ $iconSize }}"
href="{{ $resizedImage.RelPermalink }}" />
href="{{ $resizedImage.Permalink }}" />
{{- end -}}


Expand All @@ -120,7 +119,7 @@
<link
rel="apple-touch-icon"
sizes="{{ $iconSize }}"
ref="{{ $resizedImage.RelPermalink }}" />
ref="{{ $resizedImage.Permalink }}" />
{{- end -}}


Expand All @@ -132,7 +131,7 @@
<link
rel="shortcut icon"
sizes="{{ $iconSize }}"
href="{{ $resizedImage.RelPermalink }}" />
href="{{ $resizedImage.Permalink }}" />
{{- end -}}


Expand All @@ -147,22 +146,22 @@
{{- $resizedImage := $faviconResource.Fit (print $iconSize " png") -}}
<meta
name="{{ $iconName }}"
content="{{ $resizedImage.RelPermalink }}" />
content="{{ $resizedImage.Permalink }}" />
{{- end -}}
{{- range $size := (slice "270") -}}
{{- $iconSize := (print $size "x" $size) -}}
{{- $resizedImage := $faviconResource.Fit (print $iconSize " png") -}}
<meta
name="msapplication-TileImage"
content="{{ $resizedImage.RelPermalink }}" />
content="{{ $resizedImage.Permalink }}" />
{{- end -}}
<meta
name="msapplication-config"
content="none" />

<!-- Facebook OpenGraph -->
{{- $facebookThumbnail := $thumbnailResource.Fit "1200x630 jpg q90 Lanczos Smart" -}}
{{- $facebookThumbnailUrl := print $facebookThumbnail.RelPermalink -}}
{{- $facebookThumbnailUrl := $facebookThumbnail.Permalink -}}
<meta
property="og:locale"
content="en_US" />
Expand Down Expand Up @@ -199,7 +198,7 @@

<!-- Twitter -->
{{- $twitterThumbnail := $thumbnailResource.Fit "1200x600 jpg q90 Lanczos Smart" -}}
{{- $twitterThumbnailUrl := print $twitterThumbnail.RelPermalink -}}
{{- $twitterThumbnailUrl := $twitterThumbnail.Permalink -}}
<meta
name="twitter:card"
content="summary_large_image" />
Expand Down

0 comments on commit 8ea07c7

Please sign in to comment.