lovasoa / SQLpage

SQL-only webapp builder, empowering data analysts to build websites and applications quickly
https://sql.ophir.dev
MIT License
882 stars 62 forks source link

Request to Add Essential Meta Properties for Rich Previews #392

Closed amrutadotorg closed 1 week ago

amrutadotorg commented 3 weeks ago

Hi, I'd like to request adding some essential meta properties to the <head> section via the shell component. These properties are necessary to enable "rich previews" or "link previews" when the website's links are shared.

    <meta property="og:title" content="Your Website Title">
    <meta property="og:description" content="Description of your website">
    <meta property="og:image" content="URL of the image you want to display">
    <meta property="og:url" content="URL of your website">
    <meta property="og:type" content="website">

These properties will ensure that platforms like social media or messaging apps can generate previews with a title, description, and image when our website's links are shared.

Could we please implement this for all users?

Thank you!

EDIT some of them (description, title ...) are already present in the shell component, so we could use them

lovasoa commented 3 weeks ago

We do have a meta description available already. The title and URL are taken from the webpage by default; do you have an use case where you need to customize them ? Or change the og:type ?

The ne thing that I think could be a good idea to add is og:image. Do you want to open a pull request for it ?

amrutadotorg commented 3 weeks ago

There's no need to change go:type (at least in my case).

Having the image would be great. I can try with the PR. Would you like me to grab the variables from the shell (like title, etc.) and insert them into the og: tags? I'm not sure if   <meta name="description" content="Description of your website"/> is treated the same way as <meta property="og:description" content="Description of your website">

lovasoa commented 3 weeks ago

Most platforms just use the page title and description anyway, no need for og tags for them.

But a PR allowing for something like 'cat.jpg' social_image in the shell component would be welcome!

amrutadotorg commented 3 weeks ago

Done #393

added as image_og but I can change to social_image if you want.

lovasoa commented 1 week ago

fixed by https://github.com/lovasoa/SQLpage/pull/393