Templates: New macro for Opengraph.
To be used inside the opengraph block. e.g {% block og %} {{ opengraph(title, description, image, url) }} {% endblock %}
This commit is contained in:
15
src/templates/_macros/_opengraph.pug
Normal file
15
src/templates/_macros/_opengraph.pug
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
//- Opengraph/Twitter cards for social media.
|
||||||
|
|
||||||
|
| {% macro opengraph(title, description, image, url) %}
|
||||||
|
meta(property="og:type", content="website")
|
||||||
|
meta(property="og:url", content="{{ url }}")
|
||||||
|
|
||||||
|
meta(property="og:title", content="{{ title }} on Blender Cloud")
|
||||||
|
meta(name="twitter:title", content="{{ title }} on Blender Cloud")
|
||||||
|
|
||||||
|
meta(property="og:description", content="{{ description }}")
|
||||||
|
meta(name="twitter:description", content="{{ description }}")
|
||||||
|
|
||||||
|
meta(property="og:image", content="{{ image }}")
|
||||||
|
meta(name="twitter:image", content="{{ image }}")
|
||||||
|
| {% endmacro %}
|
Reference in New Issue
Block a user