lmnwest/themes/simple/templates/open_graph.html
2021-08-04 10:19:09 -07:00

35 lines
2.0 KiB
HTML

{% if article is defined %}
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" />
<meta property="og:title" content="{{ article.title | replace("\"", "&quot;") }}" />
<meta property="og:description" content="{{ article.content | striptags | replace("\"", "&quot;") | truncate(196, False, '...') }}" />
<meta property="og:image" content="{{ SITEURL }}/images/{{ article.summaryimage }}" />
<meta property="twitter:title" content="{{ article.title | replace("\"", "&quot;") }}" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:description" content="{{ article.content | striptags | replace("\"", "&quot;") | truncate(196, False, '...') }}" />
{% elif page is defined %}
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ SITEURL }}/{{ page.url }}" />
<meta property="og:title" content="{{ SITENAME }} - {{ page.title | replace("\"", "&quot;") }}" />
<meta property="og:description" content="{{ page.content | striptags | replace("\"", "&quot;") | truncate(196, False, '...') }}" />
<meta property="og:image" content="{{ SITEURL }}/images/LMNW+Logo+only.jpg" />
<meta property="twitter:title" content="{{ SITENAME }} - {{ page.title | replace("\"", "&quot;") }}" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:description" content="{{ page.content | striptags | replace("\"", "&quot;") | truncate(196, False, '...') }}" />
{% else %}
<meta property="og:type" content="website" />
<meta property="og:url" content="{{ SITEURL }}/{{ output_file }}" />
<meta property="og:title" content="{{ SITENAME }}" />
<meta property="og:description" content="A page on Landscape Materials NW" />
<meta property="og:image" content="{{ SITEURL }}/images/LMNW+Logo+only.jpg" />
<meta property="twitter:title" content="{{ SITENAME }}" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:description" content="A page on Landscape Materials NW" />
{% endif %}