mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
Use png as svg does not work in previews
This commit is contained in:
parent
b0da3350a5
commit
fbe9664e18
@ -295,7 +295,7 @@ function getPageMetadataHtmlSnippet(req: express.Request, config: GristLoadConfi
|
|||||||
metadataElements.push(`<meta property="og:description" content="${escapedDescription}">`);
|
metadataElements.push(`<meta property="og:description" content="${escapedDescription}">`);
|
||||||
metadataElements.push(`<meta name="twitter:description" content="${escapedDescription}">`);
|
metadataElements.push(`<meta name="twitter:description" content="${escapedDescription}">`);
|
||||||
|
|
||||||
const icon = maybeDoc?.options?.icon ?? new URL('icons/grist.svg', staticBaseUrl).href;
|
const icon = maybeDoc?.options?.icon ?? new URL('icons/grist.png', staticBaseUrl).href;
|
||||||
const escapedIcon = handlebars.Utils.escapeExpression(icon);
|
const escapedIcon = handlebars.Utils.escapeExpression(icon);
|
||||||
metadataElements.push(`<meta name="thumbnail" content="${escapedIcon}">`);
|
metadataElements.push(`<meta name="thumbnail" content="${escapedIcon}">`);
|
||||||
metadataElements.push(`<meta property="og:image" content="${escapedIcon}">`);
|
metadataElements.push(`<meta property="og:image" content="${escapedIcon}">`);
|
||||||
|
@ -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[name="twitter:description"]').getAttribute('content'), expectedDescription);
|
||||||
assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription);
|
assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription);
|
||||||
|
|
||||||
const gristIconFileName = 'grist.svg';
|
const gristIconFileName = 'grist.png';
|
||||||
assert.include(await driver.find('meta[name="thumbnail"]').getAttribute('content'), gristIconFileName);
|
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[name="twitter:image"]').getAttribute('content'), gristIconFileName);
|
||||||
assert.include(await driver.find('meta[property="og: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[name="twitter:description"]').getAttribute('content'), expectedDescription);
|
||||||
assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription);
|
assert.equal(await driver.find('meta[property="og:description"]').getAttribute('content'), expectedDescription);
|
||||||
|
|
||||||
const gristIconFileName = 'grist.svg';
|
const gristIconFileName = 'grist.png';
|
||||||
assert.include(await driver.find('meta[name="thumbnail"]').getAttribute('content'), gristIconFileName);
|
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[name="twitter:image"]').getAttribute('content'), gristIconFileName);
|
||||||
assert.include(await driver.find('meta[property="og:image"]').getAttribute('content'), gristIconFileName);
|
assert.include(await driver.find('meta[property="og:image"]').getAttribute('content'), gristIconFileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user