mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +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) {
 | 
					  if (description) {
 | 
				
			||||||
    const content = handlebars.Utils.escapeExpression(description);
 | 
					    const content = handlebars.Utils.escapeExpression(description);
 | 
				
			||||||
    metadataElements.push(`<meta name="description" content="${content}">`);
 | 
					    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;
 | 
					  const icon = maybeDoc?.options?.icon;
 | 
				
			||||||
  if (thumbnail) {
 | 
					  if (icon) {
 | 
				
			||||||
    const content = handlebars.Utils.escapeExpression(thumbnail);
 | 
					    const content = handlebars.Utils.escapeExpression(icon);
 | 
				
			||||||
    metadataElements.push(`<meta name="thumbnail" content="${content}">`);
 | 
					    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');
 | 
					  return metadataElements.join('\n');
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user