mirror of https://github.com/docker/docs.git
Fix URL used for images in twitter/og previews (#19989)
* Fix URL used for images in twitter/og previews * Use absURL to create absolute URLs for meta tag URLs * Update other uses of base URL generation to use absURL helper
This commit is contained in:
parent
0349f806c6
commit
efadb1fdcc
|
@ -11,7 +11,7 @@
|
|||
<!-- favicon -->
|
||||
{{ partialCached "favicon.html" "favicon" }}
|
||||
<!-- make the latest API version the canonical page as that's what we want users to be using mostly -->
|
||||
<link rel="canonical" href="{{ site.BaseURL }}/docker-hub/api/latest/" />
|
||||
<link rel="canonical" href="{{ "/docker-hub/api/latest/" | relURL }}" />
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
User-agent: *
|
||||
|
||||
|
||||
Sitemap: {{ site.BaseURL }}/sitemap.xml
|
||||
Sitemap: {{ "sitemap.xml" | absURL }}
|
||||
{{- else -}}
|
||||
# Disable all indexing on staging websites and Netlify previews to prevent
|
||||
# them showing up in search results.
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<meta name="twitter:url" content="https://twitter.com/docker_docs" />
|
||||
<meta
|
||||
name="twitter:image:src"
|
||||
content="{{ site.BaseURL }}/assets/images/thumbnail.webp"
|
||||
content="{{ "assets/images/thumbnail.webp" | absURL }}"
|
||||
/>
|
||||
<meta name="twitter:image:alt" content="Docker Documentation" />
|
||||
<meta property="og:title" content="{{ $title }}" />
|
||||
|
@ -49,7 +49,7 @@
|
|||
<meta
|
||||
property="og:image"
|
||||
itemprop="image primaryImageOfPage"
|
||||
content="{{ site.BaseURL }}/assets/images/thumbnail.webp"
|
||||
content="{{ "assets/images/thumbnail.webp" | absURL }}"
|
||||
/>
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
|
|
Loading…
Reference in New Issue