{% capture title %} {%- if page.share-title -%} {{ page.share-title }} {%- elsif page.title -%} {{ page.title }} {%- else -%} {{ site.title }} {%- endif -%} {% endcapture %} {% capture description %} {%- if page.share-description -%} {{ page.share-description }} {%- elsif page.subtitle -%} {{ page.subtitle }} {%- else -%} {%- assign excerpt_length = site.excerpt_length | default: 50 -%} {{ page.content | strip_html | xml_escape | truncatewords: excerpt_length | strip }} {%- endif -%} {% endcapture %}