Merge branch 'master' of github.com:lioman/Flex
This commit is contained in:
commit
ca99343527
8 changed files with 111 additions and 77 deletions
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -1,3 +1,24 @@
|
|||
## 2.4.0
|
||||
|
||||
- Update translations (Italian, Spanish, Portuguese, German, Turkish)
|
||||
- Include settings for canonical URLS [#238](https://github.com/alexandrevicenzi/Flex/issues/238)
|
||||
- Remove pelican plugins dependency [#255](https://github.com/alexandrevicenzi/Flex/issues/255)
|
||||
|
||||
This version includes cs, de, en, es, es_ES, et, fa_IR, fr, hu_HU, id, it, nl_NL, pl_PL, pt, pt_BR, pt_PT, ro_RO, ru, tr_TR, zh_CN translations.
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- Support dark theme [#213](https://github.com/alexandrevicenzi/Flex/pull/213)
|
||||
- Support Isso comments [#200](https://github.com/alexandrevicenzi/Flex/pull/200)
|
||||
- Support Pelican 4.5 [#248](https://github.com/alexandrevicenzi/Flex/pull/248)
|
||||
- Support Tipue search [#193](https://github.com/alexandrevicenzi/Flex/pull/193)
|
||||
- Upgrade Font-Awesome to 5 [#156](https://github.com/alexandrevicenzi/Flex/pull/156)
|
||||
- Add social icons (keybase, twitch, mastodon, diaspora, flickr, last.fm
|
||||
- Fix layouts
|
||||
- Update translations (zh)
|
||||
|
||||
This version includes cs, de, en, es, es_ES, et, fa_IR, fr, hu_HU, id, it, nl_NL, pl_PL, pt, pt_BR, pt_PT, ro_RO, ru, tr_TR, zh_CN translations.
|
||||
|
||||
## 2.2.0
|
||||
|
||||
- Update Pygments - New themes available!
|
||||
|
|
|
@ -44,6 +44,7 @@ The minimalist [Pelican](http://blog.getpelican.com/) theme.
|
|||
- [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image)
|
||||
- [Neighbors](https://github.com/getpelican/pelican-plugins/tree/master/neighbors)
|
||||
- [Tipue Search](https://github.com/getpelican/pelican-plugins/blob/master/tipue_search/)
|
||||
- [SEO](https://github.com/pelican-plugins/seo)
|
||||
|
||||
## Install
|
||||
|
||||
|
|
2
static/tipuesearch/tipuesearch.min.css
vendored
2
static/tipuesearch/tipuesearch.min.css
vendored
|
@ -1 +1 @@
|
|||
@import url(https://fonts.googleapis.com/css?family=Merriweather:300,400|Open+Sans|Source+Code+Pro);#tipue_search_input{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f3f3f3;border:none;padding:9px 0 10px 18px;border-radius:3px;-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:0}#tipue_search_input:-webkit-autofill,#tipue_search_input:-webkit-autofill:focus,#tipue_search_input:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px #f3f3f3 inset}.tipue_search_button{position:relative;float:left;width:49px;height:56px;margin-left:-3px;background-color:#f3f3f3;border:none;border-top-right-radius:3px;border-bottom-right-radius:3px;box-sizing:border-box;cursor:pointer;outline:0}.tipue_search_icon{float:left;font:24px/1 'Open Sans',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#333;transform:rotate(-45deg);-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:-1px 0 0 16px}.tipue_search_group:after{content:"";display:table;clear:both}#tipue_search_content{max-width:100%;margin:0}.tipue_search_content_title{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-weight:300;line-height:1.1;font-size:2em}.tipue_search_content_title a{color:#d9411e;text-decoration:none}.tipue_search_content_title a:hover{color:#ff5a09}.tipue_search_result{margin:0 8% 2%;line-height:inherit}#tipue_search_results_count,.tipue_search_content_debug{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;text-transform:uppercase;color:#999;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#tipue_search_results_count{padding-top:9px}#tipue_search_error,#tipue_search_replace,.tipue_search_content_url,.tipue_search_note,.tipue_search_related{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#666;padding-top:7px;word-wrap:break-word;hyphens:auto}#tipue_search_replace a,#tipue_search_replace a:hover,.tipue_search_content_url a,.tipue_search_note a,.tipue_search_related a{color:#339e41;text-decoration:none}.tipue_search_content_url a:hover,.tipue_search_note a:hover,.tipue_search_related a:hover{color:#666}#tipue_search_replace,.tipue_search_related{margin-top:7px}#tipue_search_error{color:#333;margin-top:17px}.tipue_search_content_text{margin:0;padding:0;background-color:#fff;color:#242121;font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-size:1.02em;line-height:1.2em}.tipue_search_content_bold{font-weight:bold;color:#333}.tipue_search_content_debug{margin:7px 0 2px 0}.tipue_search_image{padding:17px 0 6px 0}.tipue_search_img{width:100%;max-width:330px;height:auto;transition:.5s;border-radius:2px}.tipue_search_img:hover{opacity:.9}#tipue_search_zoom_text{font:12px/1.7 'Source Code Pro',monospace;color:#ccc;text-transform:uppercase;letter-spacing:1px;padding-top:9px}#tipue_search_zoom_text a{color:#ccc;text-decoration:none;border-bottom:2px solid #f7f7f7}#tipue_search_zoom_text a:hover{border:0}.tipue_search_image_zoom{cursor:pointer}#tipue_search_image_modal{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.9)}.tipue_search_image_close{position:absolute;top:0;right:0;font:22px/1 'Source Code Pro',monospace;color:#ccc;padding:25px 30px;cursor:pointer}.tipue_search_image_block{margin:0 auto;max-width:900px;padding:73px 30px 30px 30px;box-sizing:border-box;color:#fff}#tipue_search_zoom_img{max-width:100%;height:auto}#tipue_search_zoom_text,.tipue_search_zoom_options{padding-top:9px}#tipue_search_foot{margin:51px 0 21px 0}#tipue_search_foot_boxes{font:14px 'Source Code Pro',sans-serif;text-transform:uppercase;color:#333;padding:0;margin:0;cursor:pointer}#tipue_search_foot_boxes li{display:inline;list-style:none;margin:0;padding:0}#tipue_search_foot_boxes li a{background-color:#f7f7f7;color:#666;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-decoration:none;text-align:center;transition:.3s}#tipue_search_foot_boxes li.current{background:#252525;color:#ccc;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-align:center}#tipue_search_foot_boxes li a:hover{background:#252525;color:#ccc}
|
||||
#tipue_search_input{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#333;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f3f3f3;border:none;padding:9px 0 10px 18px;border-radius:3px;-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:0}#tipue_search_input:-webkit-autofill,#tipue_search_input:-webkit-autofill:focus,#tipue_search_input:-webkit-autofill:hover{-webkit-box-shadow:0 0 0 1000px #f3f3f3 inset}.tipue_search_button{position:relative;float:left;width:49px;height:56px;margin-left:-3px;background-color:#f3f3f3;border:none;border-top-right-radius:3px;border-bottom-right-radius:3px;box-sizing:border-box;cursor:pointer;outline:0}.tipue_search_icon{float:left;font:24px/1 'Open Sans',sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#333;transform:rotate(-45deg);-moz-appearance:none;-webkit-appearance:none;box-sizing:border-box;box-shadow:none;outline:0;margin:-1px 0 0 16px}.tipue_search_group:after{content:"";display:table;clear:both}#tipue_search_content{max-width:100%;margin:0}.tipue_search_content_title{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-weight:300;line-height:1.1;font-size:2em}.tipue_search_content_title a{color:#d9411e;text-decoration:none}.tipue_search_content_title a:hover{color:#ff5a09}.tipue_search_result{margin:0 8% 2%;line-height:inherit}#tipue_search_results_count,.tipue_search_content_debug{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;text-transform:uppercase;color:#999;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#tipue_search_results_count{padding-top:9px}#tipue_search_error,#tipue_search_replace,.tipue_search_content_url,.tipue_search_note,.tipue_search_related{font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;color:#666;padding-top:7px;word-wrap:break-word;hyphens:auto}#tipue_search_replace a,#tipue_search_replace a:hover,.tipue_search_content_url a,.tipue_search_note a,.tipue_search_related a{color:#339e41;text-decoration:none}.tipue_search_content_url a:hover,.tipue_search_note a:hover,.tipue_search_related a:hover{color:#666}#tipue_search_replace,.tipue_search_related{margin-top:7px}#tipue_search_error{color:#333;margin-top:17px}.tipue_search_content_text{margin:0;padding:0;background-color:#fff;color:#242121;font-family:Source Sans Pro,Roboto,Open Sans,Liberation Sans,DejaVu Sans,Verdana,Helvetica,Arial,sans-serif;font-size:1.02em;line-height:1.2em}.tipue_search_content_bold{font-weight:bold;color:#333}.tipue_search_content_debug{margin:7px 0 2px 0}.tipue_search_image{padding:17px 0 6px 0}.tipue_search_img{width:100%;max-width:330px;height:auto;transition:.5s;border-radius:2px}.tipue_search_img:hover{opacity:.9}#tipue_search_zoom_text{font:12px/1.7 'Source Code Pro',monospace;color:#ccc;text-transform:uppercase;letter-spacing:1px;padding-top:9px}#tipue_search_zoom_text a{color:#ccc;text-decoration:none;border-bottom:2px solid #f7f7f7}#tipue_search_zoom_text a:hover{border:0}.tipue_search_image_zoom{cursor:pointer}#tipue_search_image_modal{display:none;position:fixed;z-index:1000;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgba(0,0,0,.9)}.tipue_search_image_close{position:absolute;top:0;right:0;font:22px/1 'Source Code Pro',monospace;color:#ccc;padding:25px 30px;cursor:pointer}.tipue_search_image_block{margin:0 auto;max-width:900px;padding:73px 30px 30px 30px;box-sizing:border-box;color:#fff}#tipue_search_zoom_img{max-width:100%;height:auto}#tipue_search_zoom_text,.tipue_search_zoom_options{padding-top:9px}#tipue_search_foot{margin:51px 0 21px 0}#tipue_search_foot_boxes{font:14px 'Source Code Pro',sans-serif;text-transform:uppercase;color:#333;padding:0;margin:0;cursor:pointer}#tipue_search_foot_boxes li{display:inline;list-style:none;margin:0;padding:0}#tipue_search_foot_boxes li a{background-color:#f7f7f7;color:#666;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-decoration:none;text-align:center;transition:.3s}#tipue_search_foot_boxes li.current{background:#252525;color:#ccc;padding:10px 17px 11px 17px;border-radius:3px;margin-right:7px;text-align:center}#tipue_search_foot_boxes li a:hover{background:#252525;color:#ccc}
|
|
@ -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 %}
|
||||
|
||||
{% 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…
Reference in a new issue