From 34c1143204e90e513e77f5492d9d908bfe0fe5f5 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Sat, 22 Apr 2017 03:41:39 -0300 Subject: [PATCH] Fixes. --- CHANGELOG.md | 4 ++++ README.md | 8 +++++--- templates/article.html | 7 ++++--- templates/authors.html | 1 + templates/base.html | 2 ++ templates/categories.html | 1 + templates/page.html | 1 + templates/partial/cc_license.html | 2 +- templates/partial/copyright.html | 2 +- templates/partial/disqus.html | 2 ++ templates/partial/duoshuo.html | 27 ++++++++++++++++----------- templates/partial/github.html | 18 +++++++++++++++++- templates/partial/gtm.html | 20 +++++++++++++------- templates/partial/og_article.html | 6 +++--- templates/tags.html | 1 + 15 files changed, 72 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89f4030..0f807b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.2.0 + +TODO + ## 2.1.0 - Italian translation [#60](https://github.com/alexandrevicenzi/Flex/issues/60) diff --git a/README.md b/README.md index 4e3f616..fd0a25f 100644 --- a/README.md +++ b/README.md @@ -23,17 +23,19 @@ DON'T send any questions, issues or anything related to Flex to my personal emai - [AddThis](http://www.addthis.com/) Share Buttons and Related Posts - [Disqus](https://disqus.com/) -- [Gauges](http://get.gaug.es/) +- [duoshuo](http://duoshuo.com/) (new in 2.2) +- [Gauges Analytics](http://get.gaug.es/) - [Google AdSense](https://www.google.com.br/adsense/start/) (new in 2.1) - [Google Analytics](https://www.google.com/analytics/web/) - [Google Tag Manager](https://www.google.com/tagmanager/) -- [Piwik](http://piwik.org/) +- [Piwik Analytics](http://piwik.org/) - [StatusCake](https://www.statuscake.com/) -- [Github Corners](https://github.com/tholman/github-corners) (new in 2.2) ## Plugins Support +- [Github Corners](https://github.com/tholman/github-corners) (new in 2.2) - [I18N Sub-sites](https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites) (new in 2.0) +- [Minute read](https://github.com/getpelican/pelican-plugins/tree/master/post_stats)) (new in 2.0) - [Related Posts](https://github.com/getpelican/pelican-plugins/tree/master/related_posts) - [Representative image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) (new in 2.2) diff --git a/templates/article.html b/templates/article.html index 004043d..f1e8cb1 100644 --- a/templates/article.html +++ b/templates/article.html @@ -2,12 +2,13 @@ {% block meta %} - - + + + {% include "partial/og_article.html" %} {% endblock %} -{% block title %} – {{ article.title|striptags }}{% endblock %} +{% block title %} – {{ article.title|striptags|escape }}{% endblock %} {% block content %}
diff --git a/templates/authors.html b/templates/authors.html index d802130..46f6bba 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Authors') }}{% endblock %} {% block content %} diff --git a/templates/base.html b/templates/base.html index 8f79b77..105a236 100644 --- a/templates/base.html +++ b/templates/base.html @@ -54,6 +54,8 @@ + + {% endif %} {% block meta %} diff --git a/templates/categories.html b/templates/categories.html index 1153874..9b7f29c 100644 --- a/templates/categories.html +++ b/templates/categories.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Categories') }}{% endblock %} {% block content %} diff --git a/templates/page.html b/templates/page.html index c7fb212..f9c2aac 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ page.title }}{% endblock %} {% block content %} diff --git a/templates/partial/cc_license.html b/templates/partial/cc_license.html index af0ac4c..87dbece 100644 --- a/templates/partial/cc_license.html +++ b/templates/partial/cc_license.html @@ -1,5 +1,5 @@

- © {{ AUTHOR }} {{ COPYRIGHT_YEAR }} - This work is licensed under a {{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License + © {{ COPYRIGHT_NAME }} {{ COPYRIGHT_YEAR }} - This work is licensed under a {{ CC_LICENSE['name'] }} {{ CC_LICENSE['version'] }} International License

{% include "partial/flex.html" %}

diff --git a/templates/partial/copyright.html b/templates/partial/copyright.html index ac5e872..5426dfd 100644 --- a/templates/partial/copyright.html +++ b/templates/partial/copyright.html @@ -1,4 +1,4 @@ -

© {{ AUTHOR }} {{ COPYRIGHT_YEAR }}

+

© {{ COPYRIGHT_NAME }} {{ COPYRIGHT_YEAR }}

{% include "partial/flex.html" %} {% if STATUSCAKE %} {% include "partial/statuscake.html" %} diff --git a/templates/partial/disqus.html b/templates/partial/disqus.html index 7fcb403..bcc35fc 100644 --- a/templates/partial/disqus.html +++ b/templates/partial/disqus.html @@ -1,4 +1,5 @@ {% if DISQUS_SITENAME %} +
- {% endif %} \ No newline at end of file + + (function() { + var ds = document.createElement('script'); + ds.type = 'text/javascript';ds.async = true; + ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; + ds.charset = 'UTF-8'; + (document.getElementsByTagName('head')[0] + || document.getElementsByTagName('body')[0]).appendChild(ds); + })(); + + + +{% endif %} diff --git a/templates/partial/github.html b/templates/partial/github.html index 3ce4800..98c521d 100644 --- a/templates/partial/github.html +++ b/templates/partial/github.html @@ -1,3 +1,19 @@ - + + diff --git a/templates/partial/gtm.html b/templates/partial/gtm.html index f1b33a0..69d266d 100644 --- a/templates/partial/gtm.html +++ b/templates/partial/gtm.html @@ -1,9 +1,15 @@ - - + + diff --git a/templates/partial/og_article.html b/templates/partial/og_article.html index c2c1cef..31f70b0 100644 --- a/templates/partial/og_article.html +++ b/templates/partial/og_article.html @@ -4,8 +4,8 @@ {% set default_locale = 'en_US' %} {% endif %} - - + + @@ -14,7 +14,7 @@ {% for tag in article.tags %} - + {% endfor %} {% if 'cover' in article.metadata %} diff --git a/templates/tags.html b/templates/tags.html index 1005fa9..df36fda 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -1,4 +1,5 @@ {% extends "base.html" %} + {% block title %} – {{ _('Tags') }}{% endblock %} {% block content %}