Skip to content

Commit

Permalink
fix(utils/open-graph): replace screenshot method
Browse files Browse the repository at this point in the history
  • Loading branch information
ythecombinator committed Apr 29, 2024
1 parent 73f7c54 commit b5caa11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
<url><loc>https://www.albuquerque.dev/talks</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/talks/radar</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/talks/rider</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/clients</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/life</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/speaker-rider</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/uses</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/posts/how-expensive-is-prague</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/posts/2022-wrapped</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/posts/jheniffer-was-always-my-favorite-color</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
Expand All @@ -20,6 +16,10 @@
<url><loc>https://www.albuquerque.dev/posts/a-whole-day-playing-with-ipfs</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/posts/swift-in-the-sky-with-types</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/posts/o-que-ha-de-novo-com-o-angularjs</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/clients</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/life</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/speaker-rider</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/about/uses</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/talks/a-decade-reacts-rhapsody-of-life</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/talks/speed-at-scale-optimizing-the-largest-cx-platform-out-there</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://www.albuquerque.dev/talks/hydration-islands-streaming-resumability-oh-my</loc><changefreq>daily</changefreq><priority>0.7</priority></url>
Expand Down
3 changes: 1 addition & 2 deletions src/utils/open-graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ async function generateImage({ width, height, content }: Required<ImageProps>) {
visible: true,
});

const element = await page.$('#body');
const image = await element!.screenshot();
const image = await page.screenshot();
await browser.close();

return image;
Expand Down

0 comments on commit b5caa11

Please sign in to comment.