feat: Add OpenGraph - #1056
Merged
Merged
feat: Add OpenGraph#1056
Conversation
Contributor
Author
|
@jprochazk I think it would make sense if you review it as well. This is my first time working with j2 files. |
jprochazk
reviewed
Aug 30, 2026
jprochazk
left a comment
Contributor
There was a problem hiding this comment.
https://docs.rs/minijinja/latest/minijinja/syntax/index.html#-block-
If you want to print a block multiple times, you can, however, use the special self variable and call the block with that name
Co-authored-by: jprochazk <pjanv42@gmail.com>
pajlada
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I also looked into oEmbed but that requires a query parameter called url that says which page is called, so I think that doesn't really make sense for a static page.
What we could think about is to render an oembed file per page with a dummy url, like
/changelog.oembed.json?url=dummyor/changelog/oembed.json?url=dummyand as said that file for every site where the content changes.The json would be something like:
{ "version": "1.0", "type": "link", "title": "Changelog - Chatterino", "provider_name": "Chatterino", "provider_url": "https://chatterino.com" }in j2 maybe something like:
{ "version": "1.0", "type": "link", "title": "{{ page_title | trim }}", "provider_name": "Chatterino", "provider_url": "https://chatterino.com" }where we then would need to update the
titleproperty depending on theurlquery parameter. If we do it with different files I think we'd need to add alinktag with a different value for each page tobase.j2and have different json files built with a different content while ignoring theurlquery parameter, which also seems overly complex.This PR only implements the OpenGraph part, if we decide against adding oEmbed then this PR also solves #477
PS:

Closes #477