Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify social images and add ability to set per-page images (#36804)
* Simplify social images and add ability to set per-page images - Removes the homepage summary layout in favor of the larger image card (makes it more consistent with other pages) - Reuses new thumbnails for Webpack, Parcel, and Vite guides to add their new social images * Update default social card * Change description to subtitle, add longer description to match homepage * Remove social_image_path, use inline conditions for social images
- Loading branch information
Showing
7 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
{{ "<!-- Twitter -->" | safeHTML }} | ||
<meta name="twitter:card" content="{{ if .IsHome }}summary_large_image{{ else }}summary{{ end }}"> | ||
<meta name="twitter:card" content="summary_large_image"> | ||
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}"> | ||
<meta name="twitter:creator" content="@{{ .Site.Params.twitter }}"> | ||
<meta name="twitter:title" content="{{ .Title | markdownify }}"> | ||
<meta name="twitter:description" content="{{ .Page.Params.description | default .Site.Params.description | markdownify }}"> | ||
<meta name="twitter:image" content="{{ if .IsHome }}{{ .Site.Params.social_logo_path | absURL }}{{ else }}{{ .Site.Params.social_image_path | absURL }}{{ end }}"> | ||
<meta name="twitter:image" content="/docs/{{ .Site.Params.docs_version }}/assets/{{ if .Page.Params.thumbnail }}img/{{ .Page.Params.thumbnail }}{{else}}brand/bootstrap-social.png{{end}}"> | ||
|
||
{{ "<!-- Facebook -->" | safeHTML }} | ||
<meta property="og:url" content="{{ .Permalink }}"> | ||
<meta property="og:title" content="{{ .Title | markdownify }}"> | ||
<meta property="og:description" content="{{ .Page.Params.description | default .Site.Params.description | markdownify }}"> | ||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}"> | ||
<meta property="og:image" content="{{ .Site.Params.social_image_path | absURL }}"> | ||
<meta property="og:image:type" content="image/png"> | ||
<meta property="og:image:width" content="1000"> | ||
<meta property="og:image:height" content="500"> | ||
<meta property="og:image" content="/docs/{{ .Site.Params.docs_version }}/assets/{{ if .Page.Params.thumbnail }}img/{{ .Page.Params.thumbnail }}{{else}}brand/bootstrap-social.png{{end}}"> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.