Last active
July 8, 2019 18:26
-
-
Save stevewithington/96cb649ec0ec487ec71f8575a09b6d60 to your computer and use it in GitHub Desktop.
Mura CMS: Sample Open Graph Meta Tags for a Mura CMS Website
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
<!--- 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