Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add og:images generation #45

Closed
wants to merge 14 commits into from
Closed

Add og:images generation #45

wants to merge 14 commits into from

Conversation

teleginzhenya
Copy link
Collaborator

@teleginzhenya teleginzhenya commented Apr 21, 2023

  • separate page for og:images preview
  • pass custom meta for libraries
  • script which runs puppeteer and makes screenshots
  • github action which commits it and push to repositry

design of og:images not final

@teleginzhenya
Copy link
Collaborator Author

not sure how gh-actions will work :]
but main idea to create images, commit them and then run deployment

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view text is so tiny

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

design of og:images not final

const { id } = libs[i];
await page.goto(`http://localhost:3000/preview/${id}`, { waitUntil: 'networkidle0' });
await page.setViewport({ width: 1200, height: 630 });
await page.screenshot({ path: `public/og-images/${id}.jpg` })
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that, but I don't like it. :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

94fcdba moved to function :D

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, I'm talking about using headless browser :)

next.config.js Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+

src/components/Layout/Layout.tsx Outdated Show resolved Hide resolved
src/components/Layout/Meta/Meta.tsx Outdated Show resolved Hide resolved
src/components/Layout/Meta/Meta.tsx Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@teleginzhenya
Copy link
Collaborator Author

closed in favor of #236

@teleginzhenya teleginzhenya deleted the feature/og-images branch August 8, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants