Configuration
The Gauguin configuration is written using the yaml format inside the gauguin.yaml
file.
It must be placed in the root of your Gauguin project.
Given that configuration, we're telling Gauguin that we want the following routes:
/articles/opengraph
/users/opengraph
for each route, we want to specify the query string parameters that will define the dynamic content of our og:image
That means that if we have a blog and we want to generate a new opengraph image for our blog, we just need to call the following url specifying the previously declared querystring parameters:
Generate New Article og:image
GET
http://localhost:8080/articles/opengraph?image=&title=&author=
Query Parameters
image
string
URL of the image of your blog post
author
string
The author of your blog post
title
string
The title of your blog post
For each route, we also want to specify the size of the image that we want to generate using the following format: WIDTHxHEIGHT
Last but not least, we tell the template that we want to render on that specific route.
Last updated
Was this helpful?