|
| 1 | +{% macro meta_macro() -%} |
| 2 | + {% if meta is defined %} |
| 3 | + {% if meta.description %}{{ meta_global.meta('description', meta.description) }}{% endif %} |
| 4 | + {% if meta.keywords %}{{ meta_global.meta_list('keywords', meta.keywords) }}{% endif %} |
| 5 | + {% if meta.extra_props %}{{ meta_global.meta_extras(meta.extra_props) }}{% endif %} |
| 6 | + {% if meta.extra_custom_props %}{{ meta_global.custom_meta_extras(meta.extra_custom_props) }}{% endif %} |
| 7 | + {% if meta.use_title_tag %} |
| 8 | + {% if meta.title %}{{ meta_global.title_prop(meta.title) }}{% endif %} |
| 9 | + {% endif %} |
| 10 | + {% if meta.use_og %} |
| 11 | + {% if meta.title %}{{ meta_global.og_prop('title', meta.title) }}{% endif %} |
| 12 | + {% if meta.url %}{{ meta_global.og_prop('url', meta.url) }}{% endif %} |
| 13 | + {% if meta.og_description %}{{ meta_global.og_prop('description', meta.og_description) }} |
| 14 | + {% elif meta.description %}{{ meta_global.og_prop('description', meta.description) }}{% endif %} |
| 15 | + {% if meta.image %}{{ meta_global.og_prop('image', meta.image) }}{% endif %} |
| 16 | + {% if meta.og_type %}{{ meta_global.og_prop('type', meta.og_type) }} |
| 17 | + {% elif meta.object_type %}{{ meta_global.og_prop('type', meta.object_type) }}{% endif %} |
| 18 | + {% if meta.site_name %}{{ meta_global.og_prop('site_name', meta.site_name) }}{% endif %} |
| 19 | + {% if meta.og_author_url %}{{ meta_global.generic_prop('article', 'author', meta.og_author_url) }} |
| 20 | + {% elif meta.og_author %}{{ meta_global.generic_prop('article', 'author', meta.og_author) }}{% endif %} |
| 21 | + {% if meta.published_time %}{{ meta_global.generic_prop('article', 'published_time', meta.published_time) }}{% endif %} |
| 22 | + {% if meta.modified_time %}{{ meta_global.generic_prop('article', 'modified_time', meta.modified_time) }}{% endif %} |
| 23 | + {% if meta.expiration_time %}{{ meta_global.generic_prop('article', 'expiration_time', meta.expiration_time) }}{% endif %} |
| 24 | + {% if meta.og_publisher %}{{ meta_global.generic_prop('article', 'publisher', meta.og_publisher) }}{% endif %} |
| 25 | + {% if meta.og_app_id %}{{ meta_global.facebook_prop('app_id', meta.og_app_id) }} |
| 26 | + {% elif meta.facebook_app_id %}{{ meta_global.facebook_prop('app_id', meta.facebook_app_id) }}{% endif %} |
| 27 | + {% if meta.fb_pages %}{{ meta_global.facebook_prop('pages', meta.fb_pages) }}{% endif %} |
| 28 | + {% if meta.og_profile_id %}{{ meta_global.facebook_prop('profile_id', meta.og_profile_id) }}{% endif %} |
| 29 | + {% if meta.tag %}{{ meta_global.generic_prop('article', 'tag', meta.tag) }}{% endif %} |
| 30 | + {% if meta.locale %}{{ meta_global.og_prop('locale', meta.locale) }}{% endif %} |
| 31 | + {% endif %} |
| 32 | + {% if meta.use_twitter %} |
| 33 | + {{ meta_global.twitter_prop('domain', meta.get_domain) }} |
| 34 | + {% if meta.twitter_type %}{{ meta_global.twitter_prop('card', meta.twitter_type) }} |
| 35 | + {% elif meta.twitter_card %}{{ meta_global.twitter_prop('card', meta.twitter_card) }}{% endif %} |
| 36 | + {% if meta.title %}{{ meta_global.twitter_prop('title', meta.title) }}{% endif %} |
| 37 | + {% if meta.url %}{{ meta_global.twitter_prop('url', meta.url) }}{% endif %} |
| 38 | + {% if meta.twitter_description %}{{ meta_global.twitter_prop('description', meta.twitter_description) }} |
| 39 | + {% elif meta.description %}{{ meta_global.twitter_prop('description', meta.description) }}{% endif %} |
| 40 | + {% if meta.image %}{{ meta_global.twitter_prop('image', meta.image) }}{% endif %} |
| 41 | + {% if meta.twitter_creator %}{{ meta_global.twitter_prop('creator', meta.twitter_creator) }}{% endif %} |
| 42 | + {% if meta.twitter_site %}{{ meta_global.twitter_prop('site', meta.twitter_site) }}{% endif %} |
| 43 | + {% endif %} |
| 44 | + {% if meta.use_googleplus %} |
| 45 | + {% if meta.gplus_author %}<link rel="author" href="https://plus.google.com/{{ meta.gplus_author }}"/>{% endif %} |
| 46 | + {% if meta.gplus_publisher %}<link rel="publisher" href="https://plus.google.com/{{ meta.gplus_publisher }}"/>{% endif %} |
| 47 | + {% if meta.title %}{{ meta_global.googleplus_prop('name', meta.title) }}{% endif %} |
| 48 | + {% if meta.published_time %}{{ meta_global.googleplus_prop('datePublished', meta.published_time) }}{% endif %} |
| 49 | + {% if meta.modified_time %}{{ meta_global.googleplus_prop('dateModified', meta.modified_time) }}{% endif %} |
| 50 | + {% if meta.url %}{{ meta_global.googleplus_prop('url', meta.url) }}{% endif %} |
| 51 | + {% if meta.gplus_description %}{{ meta_global.googleplus_prop('description', meta.gplus_description) }} |
| 52 | + {% elif meta.description %}{{ meta_global.googleplus_prop('description', meta.description) }}{% endif %} |
| 53 | + {% if meta.image %}{{ meta_global.googleplus_prop('image', meta.image) }}{% endif %} |
| 54 | + {% endif %} |
| 55 | + {% endif %} |
| 56 | +{%- endmacro %} |
0 commit comments