Giter Site home page Giter Site logo

Comments (8)

ernestoresende avatar ernestoresende commented on August 17, 2024 1

@danstepanov @hqasmei Is the objective here to have dynamic OG generation based on the docs page content metadata? Also, do we already have a defined design/layout for how they should look like?

If so, we can probably achieve this with @vercel/og (https://www.kozhuhds.com/blog/generating-static-open-graph-og-images-in-astro-using-vercel-og) and an on-demand server rendering. For a while now, Astro allows to be partial about what parts of the Astro application we want to run on the server, while keeping the rest of the application static.

from create-expo-stack.

danstepanov avatar danstepanov commented on August 17, 2024 1

The goal would be to have custom previews for different pages of the website (docs, landing, etc). We used to have code generated images prior to the migration to astro.

from create-expo-stack.

danstepanov avatar danstepanov commented on August 17, 2024

this is temporarily fixed with static assets but is not using the automatically generated image based on jsx code

from create-expo-stack.

hqasmei avatar hqasmei commented on August 17, 2024

Hey @ernestoresende thanks for sharing those resources. Will check them out.
For the www repo, I think when we were working on it we set the output as static. Forgot why. It wasn't working otherwise.
For the docs repo, I don't believe we have the output set to anything so I'll try to see if we can get the @vercel/og image working there.

Screenshot 2024-01-10 at 12 22 27 PM

from create-expo-stack.

hqasmei avatar hqasmei commented on August 17, 2024

Hey @danstepanov what would you want the custom previews look like?
The previous code you doesn't seem like it's dynamic. Would you want something similar to Next.js, have the log in the center with the title underneath?

Example:
Screenshot 2024-01-10 at 12 29 29 PM

Example made with OG Image Playground:

12237f2b-806d-4e1a-9147-eba09471f374

from create-expo-stack.

hqasmei avatar hqasmei commented on August 17, 2024

Created a branch docs/og, I updated the code, the og image is in the head but the og image isn't loading it gives me this.
Im using the preview generated by vercel, not sure if it's a server setup thing.

Screenshot 2024-01-10 at 2 31 57 PM

from create-expo-stack.

hqasmei avatar hqasmei commented on August 17, 2024

https://github.com/danstepanov/create-expo-stack/blob/docs/og/docs/astro.config.mjs

Screenshot 2024-01-10 at 2 35 46 PM

from create-expo-stack.

hqasmei avatar hqasmei commented on August 17, 2024

Was figured out can find more about in PR #184

from create-expo-stack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.