add extrahead
This commit is contained in:
45
overrides/main.html
Normal file
45
overrides/main.html
Normal file
@ -0,0 +1,45 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
{% set title = config.site_name %}
|
||||
{% if page and page.meta and page.meta.title %}
|
||||
{% set title = title ~ " - " ~ page.meta.title %}
|
||||
{% elif page and page.title and not page.is_homepage %}
|
||||
{% set title = title ~ " - " ~ page.title | striptags %}
|
||||
{% endif %}
|
||||
|
||||
{% if page and page.meta and page.meta.summaryimage %}
|
||||
{% set summaryimg = page.meta.summaryimage %}
|
||||
{% else %}
|
||||
{% set summaryimg = "trent.png" %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if page and page.meta and page.meta.summaryimagew and page.meta.summaryimageh %}
|
||||
{% set summaryimgw = page.meta.summaryimagew %}
|
||||
{% set summaryimgh = page.meta.summaryimageh %}
|
||||
{% else %}
|
||||
{% set summaryimgw = 1120 %}
|
||||
{% set summaryimgh = 1120 %}
|
||||
{% endif %}
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ title }}" />
|
||||
<meta property="og:description" content="{{ config.site_description }}" />
|
||||
<meta property="og:url" content="{{ page.canonical_url }}" />
|
||||
<meta property="og:image" content="{{ config.site_url }}photos/{{ summaryimg }}" />
|
||||
<meta property="og:image:type" content="image/png" />
|
||||
<meta property="og:image:width" content="{{ summaryimgw }}" />
|
||||
<meta property="og:image:height" content="{{ summaryimgh }}" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="@BoringTrent" />
|
||||
<meta name="twitter:creator" content="@BoringTrent" />
|
||||
<meta name="twitter:title" content="{{ title }}" />
|
||||
<meta name="twitter:description" content="{{ config.site_description }}" />
|
||||
<meta name="twitter:image" content="{{ config.site_url }}photos/{{ summaryimg }}" />
|
||||
|
||||
<link href="{{ config.site_url }}feed_rss_created.xml" type="application/rss+xml" rel="alternate" title="Trent's Blog - RSS Feed Created"/>
|
||||
<link href="{{ config.site_url }}feed_rss_updated.xml" type="application/rss+xml" rel="alternate" title="Trent's Blog - RSS Feed Updated"/>
|
||||
|
||||
{% endblock %}
|
Reference in New Issue
Block a user