Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bowler865/6fbc1e9daa856497dcc831b62b48d46b to your computer and use it in GitHub Desktop.
Save bowler865/6fbc1e9daa856497dcc831b62b48d46b to your computer and use it in GitHub Desktop.
Mura CMS: Sample Open Graph Meta Tags for a Mura CMS Website
<!--- Open Graph (http://ogp.me) --->
<meta property="og:site_name" content="#esapiEncode('html_attr', m.siteConfig('site'))#" />
<meta property="og.locale" content="#m.siteConfig('javalocale')#" />
<meta property="og:title" content="#esapiEncode('html_attr', m.content('title'))#" />
<meta property="og:type" content="website" />
<meta property="og:url" content="#m.createHref(filename=m.content('filename'), complete=true)#" />
<cfif Len(m.getURLForImage(fileid=m.content('fileid')))>
<meta property="og:image" content="#m.getURLForImage(fileid=m.content('fileid'), size='large', complete=true)#" />
</cfif>
<cfif Len(m.content('metadesc'))>
<meta property="og:description" content="#esapiEncode('html_attr', m.content('metadesc'))#" />
</cfif>
<cfif Len(m.content('releasedate'))>
<meta property="article:published_time" content="#DateFormat(m.content('releasedate'), 'yyyy-mm-dd')#" />
<cfelse>
<meta property="article:published_time" content="#DateFormat(m.content('created'), 'yyyy-mm-dd')#" />
</cfif>
<meta property="article:modified_time" content="#DateFormat(m.content('lastupdate'), 'yyyy-mm-dd')#" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment