mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
flip the orders?
This commit is contained in:
parent
a530313d15
commit
2382503785
1 changed files with 10 additions and 10 deletions
|
|
@ -47,19 +47,19 @@ const instanceName = async () => {
|
||||||
|
|
||||||
const tpl = async ({ title, type, url, image, description }: OpenGraphTemplateOpts): Promise<string> =>
|
const tpl = async ({ title, type, url, image, description }: OpenGraphTemplateOpts): Promise<string> =>
|
||||||
html`\
|
html`\
|
||||||
<meta property="og:title" content="${title}">
|
<meta content="${title}" property="og:title">
|
||||||
<meta property="og:type" content="${type}">
|
<meta content="${type}" property="og:type">
|
||||||
<meta property="og:url" content="${url}">
|
<meta content="${url}" property="og:url">
|
||||||
<meta property="og:description" content="${description}">
|
<meta content="${description}" property="og:description">
|
||||||
<meta property="og:site_name" content="${await instanceName()}">
|
<meta content="${await instanceName()}" property="og:site_name">
|
||||||
|
|
||||||
${
|
${
|
||||||
image
|
image
|
||||||
? r(html`
|
? r(html`
|
||||||
<meta property="og:image" content="${image.url}">
|
<meta content="${image.url}" property="og:image">
|
||||||
<meta property="og:image:width" content="${image.w}">
|
<meta content="${image.w}" property="og:image:width">
|
||||||
<meta property="og:image:height" content="${image.h}">
|
<meta content="${image.h}" property="og:image:height">
|
||||||
${image.alt ? r(html`<meta property="og:image:alt" content="${image.alt}">`) : ''}
|
${image.alt ? r(html`<meta content="${image.alt}" property="og:image:alt">`) : ''}
|
||||||
`)
|
`)
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
|
@ -71,7 +71,7 @@ ${
|
||||||
image
|
image
|
||||||
? r(html`
|
? r(html`
|
||||||
<meta name="twitter:image" content="${image.url}">
|
<meta name="twitter:image" content="${image.url}">
|
||||||
${image.alt ? r(html`<meta property="twitter:image:alt" content="${image.alt}">`) : ''}
|
${image.alt ? r(html`<meta content="${image.alt}" property="twitter:image:alt">`) : ''}
|
||||||
`)
|
`)
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue