Merge branch 'master' of github.com:lioman/Flex
This commit is contained in:
commit
ca99343527
8 changed files with 111 additions and 77 deletions
|
@ -1,4 +1,4 @@
|
|||
{% if 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT.extensions and 'jinja2.ext.i18n' not in JINJA_EXTENSIONS %}
|
||||
{% if 'jinja2.ext.i18n' not in JINJA_ENVIRONMENT.extensions %}
|
||||
{%- macro _(msg) -%}
|
||||
{{ msg % kwargs }}
|
||||
{%- endmacro -%}
|
||||
|
@ -70,6 +70,9 @@
|
|||
{% endif %}
|
||||
|
||||
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||
{% if USE_GOOGLE_FONTS != False %}
|
||||
<link href="https://fonts.googleapis.com/css?family=Merriweather:300,400|Open+Sans" rel="stylesheet">
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.css" />
|
||||
{% endif %}
|
||||
|
||||
|
@ -78,7 +81,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/font-awesome/css/solid.css">
|
||||
|
||||
{% if CUSTOM_CSS %}
|
||||
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
|
||||
<link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ CUSTOM_CSS }}">
|
||||
{% endif %}
|
||||
|
||||
{% if FEED_ALL_ATOM %}
|
||||
|
@ -114,19 +117,22 @@
|
|||
<meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}">
|
||||
{% endif %}
|
||||
|
||||
{% if REL_CANONICAL %}
|
||||
{% if page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ page.url }}">
|
||||
{% elif article %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
|
||||
{% elif page_name == 'index' and not articles_previous_page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}">
|
||||
{% elif author or category or tag or page_name == 'index' %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}">
|
||||
{% else %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if REL_CANONICAL %}
|
||||
{% if page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ page.url }}">
|
||||
{% elif article %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
|
||||
{% elif page_name == 'index' and not articles_previous_page %}
|
||||
<link rel="canonical" href="{{ SITEURL }}">
|
||||
{% elif author or category or tag or page_name == 'index' %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}">
|
||||
{% else %}
|
||||
<link rel="canonical" href="{{ SITEURL }}/{{ output_file }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% block meta %}
|
||||
<meta name="author" content="{{ AUTHOR }}" />
|
||||
<meta name="description" content="{{ SITEDESCRIPTION }}" />
|
||||
|
@ -157,7 +163,7 @@
|
|||
{% endif %}
|
||||
<aside>
|
||||
<div>
|
||||
<a href="{{ SITEURL }}">
|
||||
<a href="{{ SITEURL }}/">
|
||||
{% if SITELOGO %}
|
||||
<img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}">
|
||||
{% else %}
|
||||
|
@ -166,13 +172,13 @@
|
|||
</a>
|
||||
|
||||
<h1>
|
||||
<a href="{{ SITEURL }}">{{ SITETITLE }}</a>
|
||||
<a href="{{ SITEURL }}/">{{ SITETITLE }}</a>
|
||||
</h1>
|
||||
|
||||
{% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %}
|
||||
|
||||
{% if PLUGINS and 'tipue_search' in PLUGINS %}
|
||||
<form class="navbar-search" action="/search.html" role="search">
|
||||
<form class="navbar-search" action="{{ SITEURL }}/search.html" role="search">
|
||||
<input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}">
|
||||
</form>
|
||||
{% endif %}
|
||||
|
@ -249,7 +255,7 @@
|
|||
|
||||
{% if MAIN_MENU %}
|
||||
<nav>
|
||||
<a href="{{ SITEURL }}">{{ _('Home') }}</a>
|
||||
<a href="{{ SITEURL }}/">{{ _('Home') }}</a>
|
||||
|
||||
{% for title, link in MENUITEMS %}
|
||||
<a href="{{ link }}">{{ _(title) }}</a>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
{% if article.featured_image %}
|
||||
<img src="{{ article.featured_image }}">
|
||||
{% endif %}
|
||||
{{ article.summary }}
|
||||
<div>{{ article.summary }}</div>
|
||||
{% if article.content != article.summary %}
|
||||
<br>
|
||||
<a class="btn"
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if SITELOGO %}
|
||||
{% set default_cover = SITELOGO %}
|
||||
{% else %}
|
||||
{% set default_cover = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/img/profile.png' %}
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title|striptags }}",
|
||||
"headline": "{{ article.title|striptags }}",
|
||||
"datePublished": "{{ article.date }}",
|
||||
"dateModified": "{{ article.modified }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ article.author.name }}",
|
||||
"url": "{{ SITEURL }}/{{ article.author.url }}"
|
||||
},
|
||||
"image": "{{ article.metadata.get('cover', default_cover) }}",
|
||||
"url": "{{ SITEURL }}/{{ article.url }}",
|
||||
"description": "{{ article.summary|striptags }}"
|
||||
}
|
||||
</script>
|
||||
{% endif %}
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "BlogPosting",
|
||||
"name": "{{ article.title|striptags }}",
|
||||
"headline": "{{ article.title|striptags }}",
|
||||
"datePublished": "{{ article.date }}",
|
||||
"dateModified": "{{ article.modified }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ article.author.name }}",
|
||||
"url": "{{ SITEURL }}/{{ article.author.url }}"
|
||||
},
|
||||
"image": "{{ article.metadata.get('cover', default_cover) }}",
|
||||
"url": "{{ SITEURL }}/{{ article.url }}",
|
||||
"description": "{{ article.summary|striptags }}"
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITENAME }}"/>
|
||||
<meta property="og:description" content="{{ SITEDESCRIPTION }}"/>
|
||||
<meta property="og:locale" content="{{ default_locale }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}"/>
|
||||
{% if SITELOGO %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:type" content="blog"/>
|
||||
<meta property="og:title" content="{{ SITENAME }}"/>
|
||||
<meta property="og:description" content="{{ SITEDESCRIPTION }}"/>
|
||||
<meta property="og:locale" content="{{ default_locale }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}"/>
|
||||
{% if SITELOGO %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -1,23 +1,25 @@
|
|||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:title" content="{{ article.title|striptags|escape }}"/>
|
||||
<meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
|
||||
<meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
|
||||
<meta property="og:type" content="article"/>
|
||||
<meta property="article:published_time" content="{{ article.date }}"/>
|
||||
<meta property="article:modified_time" content="{{ article.modified }}"/>
|
||||
<meta property="article:author" content="{{ SITEURL }}/{{ article.author.url }}">
|
||||
<meta property="article:section" content="{{ article.category.name }}"/>
|
||||
{% for tag in article.tags %}
|
||||
<meta property="article:tag" content="{{ tag.name|escape }}"/>
|
||||
{% endfor %}
|
||||
{% if 'cover' in article.metadata %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.metadata['cover'] }}">
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% if not PLUGINS or 'seo' not in PLUGINS %}
|
||||
{% if OG_LOCALE %}
|
||||
{% set default_locale = OG_LOCALE %}
|
||||
{% else %}
|
||||
{% set default_locale = 'en_US' %}
|
||||
{% endif %}
|
||||
<meta property="og:site_name" content="{{ SITENAME }}"/>
|
||||
<meta property="og:title" content="{{ article.title|striptags|escape }}"/>
|
||||
<meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
|
||||
<meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
|
||||
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
|
||||
<meta property="og:type" content="article"/>
|
||||
<meta property="article:published_time" content="{{ article.date }}"/>
|
||||
<meta property="article:modified_time" content="{{ article.modified }}"/>
|
||||
<meta property="article:author" content="{{ SITEURL }}/{{ article.author.url }}">
|
||||
<meta property="article:section" content="{{ article.category.name }}"/>
|
||||
{% for tag in article.tags %}
|
||||
<meta property="article:tag" content="{{ tag.name|escape }}"/>
|
||||
{% endfor %}
|
||||
{% if 'cover' in article.metadata %}
|
||||
<meta property="og:image" content="{{ SITEURL }}/{{ article.metadata['cover'] }}">
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ SITELOGO }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue