mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) Add Open Graph image tags
Summary: Adds a few missing Open Graph tags to Grist pages. Test Plan: Manual. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3586
This commit is contained in:
parent
0c5441b176
commit
360d838578
@ -164,12 +164,16 @@ function getPageMetadataHtmlSnippet(config: GristLoadConfig): string {
|
||||
if (description) {
|
||||
const content = handlebars.Utils.escapeExpression(description);
|
||||
metadataElements.push(`<meta name="description" content="${content}">`);
|
||||
metadataElements.push(`<meta property="og:description" content="${content}">`);
|
||||
metadataElements.push(`<meta name="twitter:description" content="${content}">`);
|
||||
}
|
||||
|
||||
const thumbnail = maybeDoc?.options?.icon;
|
||||
if (thumbnail) {
|
||||
const content = handlebars.Utils.escapeExpression(thumbnail);
|
||||
const icon = maybeDoc?.options?.icon;
|
||||
if (icon) {
|
||||
const content = handlebars.Utils.escapeExpression(icon);
|
||||
metadataElements.push(`<meta name="thumbnail" content="${content}">`);
|
||||
metadataElements.push(`<meta property="og:image" content="${content}">`);
|
||||
metadataElements.push(`<meta name="twitter:image" content="${content}">`);
|
||||
}
|
||||
|
||||
return metadataElements.join('\n');
|
||||
|
Loading…
Reference in New Issue
Block a user