mirror of
				https://github.com/gristlabs/grist-core.git
				synced 2025-06-13 20:53:59 +00:00 
			
		
		
		
	Use svg instead of png for preview
This commit is contained in:
		
							parent
							
								
									b2d0803cfe
								
							
						
					
					
						commit
						b0da3350a5
					
				| @ -295,7 +295,7 @@ function getPageMetadataHtmlSnippet(req: express.Request, config: GristLoadConfi | ||||
|   metadataElements.push(`<meta property="og:description" content="${escapedDescription}">`); | ||||
|   metadataElements.push(`<meta name="twitter:description" content="${escapedDescription}">`); | ||||
| 
 | ||||
|   const icon = maybeDoc?.options?.icon ?? new URL('img/icon-grist.png', staticBaseUrl).href; | ||||
|   const icon = maybeDoc?.options?.icon ?? new URL('icons/grist.svg', staticBaseUrl).href; | ||||
|   const escapedIcon = handlebars.Utils.escapeExpression(icon); | ||||
|   metadataElements.push(`<meta name="thumbnail" content="${escapedIcon}">`); | ||||
|   metadataElements.push(`<meta property="og:image" content="${escapedIcon}">`); | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 9.9 KiB | 
| @ -140,7 +140,7 @@ describe('HomeIntro', function() { | ||||
|     assert.equal(await driver.find('meta[name="twitter:description"]').getAttribute('content'), expectedDescription); | ||||
|     assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription); | ||||
| 
 | ||||
|     const gristIconFileName = 'icon-grist.png'; | ||||
|     const gristIconFileName = 'grist.svg'; | ||||
|     assert.include(await driver.find('meta[name="thumbnail"]').getAttribute('content'), gristIconFileName); | ||||
|     assert.include(await driver.find('meta[name="twitter:image"]').getAttribute('content'), gristIconFileName); | ||||
|     assert.include(await driver.find('meta[property="og:image"]').getAttribute('content'), gristIconFileName); | ||||
|  | ||||
| @ -29,7 +29,7 @@ describe('NewDocument.ntest', function() { | ||||
|     assert.equal(await driver.find('meta[name="twitter:description"]').getAttribute('content'), expectedDescription); | ||||
|     assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription); | ||||
| 
 | ||||
|     const gristIconFileName = 'icon-grist.png'; | ||||
|     const gristIconFileName = 'grist.svg'; | ||||
|     assert.include(await driver.find('meta[name="thumbnail"]').getAttribute('content'), gristIconFileName); | ||||
|     assert.include(await driver.find('meta[name="twitter:image"]').getAttribute('content'), gristIconFileName); | ||||
|     assert.include(await driver.find('meta[property="og:image"]').getAttribute('content'), gristIconFileName); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user