Giter Site home page Giter Site logo

Comments (4)

BobbyWibowo avatar BobbyWibowo commented on July 26, 2024

I need more details about this one. Which pages specifically that you want to have their Open Graph tags better?

Like, right off the bat, Open Graph tags are only applicable to HTML pages, meaning pages such as the homepage, auth page, FAQ, or album public pages.
For those examples above, we already have pretty decent Open Graph tags support built-in.

The following screenshots are taken on Discord:

Homepage:
image

A public album:
image

Those are intended to be customized from within views/_globals.njk, and optionally views/_layout.njk for even more direct control.

{% block opengraph %}
<!-- Open Graph tags -->
<meta property="og:url" content="{{ url }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ metaDesc or globals.description }}" />
{%- if metaImage %}
<meta property="og:image" content="{{ metaImage }}" />
{%- endif %}
<meta property="og:image" content="{{ root }}/icons/600px.png{{ versions[2] }}" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="600" />
<meta property="og:image" content="{{ root }}/images/fb_share.png{{ versions[2] }}" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:locale" content="en_US" />
<!-- Twitter Card tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ title }}">
<meta name="twitter:description" content="{{ metaDesc or globals.description }}">
{%- if metaImage %}
<meta name="twitter:image" content="{{ metaImage }}">
{% else %}
<meta name="twitter:image" content="{{ root }}/icons/600px.png{{ versions[2] }}">
{%- endif %}
{% endblock %}

Making them to be customizable from the config file would be too cumbersome, so I was never against making changes directly to those two files, or more. After all, git stash is plenty reliable to stash your changes prior to pulling updates, then popping them back in.

from lolisafe.

soren11 avatar soren11 commented on July 26, 2024

I was actually referring to OG tags for the images themselves.
Vb32hW7xBr
Which would be customizable by the user uploading the image.
The viewer would be an HTML page including that'd include
<meta name="twitter:card" content="summary_large_image">
<meta id="discord" name="twitter:image" content="https://example.com/linktotherawimage.png">

from lolisafe.

BobbyWibowo avatar BobbyWibowo commented on July 26, 2024

Unfortunately something like that would require having a landing page for uploads, which we do not have.
The concept with this safe in particular is instead to share direct links to each uploads.

from lolisafe.

soren11 avatar soren11 commented on July 26, 2024

Alright, thanks

from lolisafe.

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.