BobbyWibowo / lolisafe

Blazing fast file uploader and awesome bunker written in node! 🚀
MIT License
317 stars 56 forks source link

[FEATURE REQUEST] Discord embedding / customizable Open Graph tags #323

Closed soren11 closed 3 years ago

soren11 commented 3 years ago

From the config creator, you'd be able to customize Open Graph image tags for embedding on Discord. (og:title, og:description, og:site_name, and "theme-color" all embed on Discord.)

BobbyWibowo commented 3 years ago

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. https://github.com/BobbyWibowo/lolisafe/blob/13afe9a75e24654d11aef78df0c2b23b58f4b62b/views/_layout.njk#L32-L58

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.

soren11 commented 3 years ago

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">

BobbyWibowo commented 3 years ago

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.

soren11 commented 3 years ago

Alright, thanks