Skip to content

Using Nunjucks to generate Open Graph images #581

Answered by oscarotero
cgwrench asked this question in Q&A
Discussion options

You must be logged in to vote

The advantage of Satori is it can output SVG using simple CSS and HTML, which is easier than generating the SVG code using a text-based engine like Nunjucks. But maybe this plugins should allow both options. I'll work on that for next versions.
Meanwhile, you can reuse the existing nunjucks environment:

const format = site.formats.search(".njk"); // Get the configuration for the .njk file extension
const env = format.engines[0]; // Get the engine for Nunjucks

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cgwrench
Comment options

Answer selected by cgwrench
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants