Skip to content

Commit

Permalink
fixed return type - 4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Aug 27, 2024
1 parent 43d1672 commit b3a308a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xylabs/meta-server",
"version": "4.1.1",
"version": "4.1.2",
"description": "Meta Server - adjusts meta data on index.html for served static site",
"keywords": [
"xylabs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,15 @@ export const getImageMeta = (
logger: Logger = new IdLogger(console, () => `dynamicShare|getImageMeta|${url}`),
): Meta => {
logger.log('generating')
const [imageUrl, title] = getImageUrlFromPage(url, renderedHtml)
const imageUrl = getImageUrlFromPage(url, renderedHtml)
const type = getContentType(imageUrl) || 'image/png'
const og: OpenGraphMeta = {
image: {
'': imageUrl, height, 'secure_url': imageUrl, type, 'url': imageUrl, width,
},
}
const twitter: TwitterMeta = { card: 'summary_large_image', image: { '': imageUrl } }
const meta = {
og, twitter, title,
}
logger.log(`generated [${title}]`)
const meta = { og, twitter }
logger.log(`generated [${imageUrl}]`)
return meta
}

0 comments on commit b3a308a

Please sign in to comment.