-
-
Save takouhai/fda8809a7dfaa471472e2649457f13da to your computer and use it in GitHub Desktop.
Pug snippet for spitting out Open Graph meta tags based on a simple array. Note: various social networks have different requirements about images, etc.
This file contains 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
- var site = {title: 'site name', url: 'http:site.com', image: '/images/thumbnail-site-square.jpg', favicon: '/favicon.ico', description: 'Site Description'} | |
each val, key in site // Open Graph metadata | |
meta( property = 'og:' + key , content = val ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment