Skip to content

Instantly share code, notes, and snippets.

@allanwhite
allanwhite / G+ metadata
Last active May 6, 2024 05:18
A Jade snippet for spitting out Open Graph meta tags based on a simple array. Note: various social networks have different requirements about images, etc.
- 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}')