this repo has no description
at master 1.5 kB view raw
1{% macro og_preview() %} 2 <meta property="og:title" content="{{ social::og_title() }}" /> 3 <meta property="og:type" content="website"/> 4 {%- if current_url -%} 5 <meta property="og:url" content="{{ current_url }}"/> 6 {%- endif -%} 7 <meta property="og:description" content="{{ social::og_description() }}"/> 8 {%- if config.extra.og_preview_img -%} 9 <meta property="og:image" content="{{ get_url(path=config.extra.og_preview_img) }}"/> 10 {%- endif -%} 11{% endmacro og_preview %} 12 13{% macro og_description() %} 14 {%- if section -%} 15 {%- if section.description -%} 16 {{ section.description }} 17 {%- else -%} 18 {{ config.description }} 19 {%- endif -%} 20 {%- elif page -%} 21 {%- if page.summary | string -%} 22 {{ page.summary | striptags | truncate(length=200) }} 23 {%- elif page.description -%} 24 {{ page.description }} 25 {%- else -%} 26 {{ config.description }} 27 {%- endif -%} 28 {%- endif -%} 29{% endmacro og_description %} 30 31{% macro og_title() -%} 32 {{ config.title }} -&nbsp; 33 {%- if section -%} 34 {%- if section.title -%} 35 {{ section.title | striptags }} 36 {%- else -%} 37 {{ config.description }} 38 {%- endif -%} 39 {%- elif page -%} 40 {%- if page.title -%} 41 {{ page.title | striptags }} 42 {%- else -%} 43 {{ config.description }} 44 {%- endif -%} 45 {%- endif -%} 46{% endmacro og_title %}