diff --git a/_includes/meta.html b/_includes/meta.html index dc73122d2..c8a62ad6d 100644 --- a/_includes/meta.html +++ b/_includes/meta.html @@ -16,15 +16,28 @@ - {{site.title}} - {{ page.title}} - - - + {% capture title %} + {%- if page.title -%}{{- page.title | strip_html }} | {% endif -%}{{ site.title -}} + {% endcapture %} + {% capture description %} + {%- if page.url == "/" -%} + {{- site.description -}} + {%- elsif page.description -%} + {{- page.description | truncate: 160 -}} + {%- else -%} + {{- page.content | markdownify | strip_html | normalize_whitespace | strip | truncate: 160 -}} + {%- endif -%} + {% endcapture %} + + {{title}} + + + - - + +