Open Graph data helpers


#1

Is there any way to output the OG data independently? Like with some {{meta_title.og}} or something?


#2

yep

{{#post}}
    {{og_title}}
{{/post}}

Ref of available data/properties:


#3

Great, thanks! For future reference - these don’t include a fallback in case the value isn’t specified, so it can be done like this:

{{#post}}
	{{#if og_title}}
    	{{og_title}}
    		{{else}}
    	{{title}}
	{{/if}
{{/post}}

…or a bit shorter, like this:

{{#post}}
    {{og_title}}
    	{{#unless og_title}}
    		{{title}}
    	{{/unless}}
{{/post}}

closed #4

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.