From d6618f16b2035ba8a47c1bafdcab44bc110b1504 Mon Sep 17 00:00:00 2001 From: pajowu Date: Sat, 6 Feb 2016 19:14:41 +0200 Subject: [PATCH 1/9] added support for twitter cards --- README.md | 7 +++++++ templates/article.html | 30 ++++++++++++++++++++++++++++++ templates/base.html | 13 +++++++++++++ 3 files changed, 50 insertions(+) diff --git a/README.md b/README.md index b367010..2271c6b 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,13 @@ Accept many analytics: - Gauges: ``GAUGES`` - Piwik: ``PIWIK_URL`` and ``PIWIK_SITE_ID``. +### Twitter cards + +Twitter cards are automatically generated if TWITTER_HANDLE is set: +```python +TWITTER_HANDLE = "myprofile" +``` + ### Other configuration - If ``ADDTHIS_PUBID`` is defined sharing buttons from AddThis will appear diff --git a/templates/article.html b/templates/article.html index 943f0aa..686967e 100755 --- a/templates/article.html +++ b/templates/article.html @@ -18,6 +18,36 @@ {% endblock %} +{% block twitter_card %} + {% if TWITTER_HANDLE %} + {% if article.header_cover %} + + + {% elif HEADER_COVER %} + + + {% else %} + + + {% endif %} + + + {% if description %} + + {% elif article.headline %} + + {% else %} + + {% endif %} + {% if article.header_cover %} + + {% elif HEADER_COVER %} + + {% else %} + + {% endif %} + {% endif %} +{% endblock %} {% block opengraph %} {{ super() }} diff --git a/templates/base.html b/templates/base.html index d366ec6..40913c2 100644 --- a/templates/base.html +++ b/templates/base.html @@ -77,6 +77,19 @@ {% endfor %} {% endblock opengraph %} + {% block twitter_card %} + {% if TWITTER_HANDLE %} + + + + + {% if HEADER_COVER %} + + {% else %} + + {% endif %} + {% endif %} + {% endblock twitter_card %} From f395a646f0a0766a4abbf2e5aee8fa11bc6cca6d Mon Sep 17 00:00:00 2001 From: pajowu Date: Sat, 6 Feb 2016 19:19:49 +0200 Subject: [PATCH 2/9] use SITESUBTITLE in base.html if set --- templates/base.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 40913c2..9d55948 100644 --- a/templates/base.html +++ b/templates/base.html @@ -82,7 +82,11 @@ - + {% if SITESUBTITLE %} + + {% else %} + + {% endif %} {% if HEADER_COVER %} {% else %} From d44238f7a8b7730717bc38d14d8560e10291eac3 Mon Sep 17 00:00:00 2001 From: "Mr. Senko" Date: Fri, 12 Feb 2016 14:14:26 +0200 Subject: [PATCH 3/9] New feature: define external feeds in SOCIAL --- README.md | 7 +++++++ templates/base.html | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b367010..de5dd24 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,13 @@ SOCIAL = (('twitter', 'https://twitter.com/myprofile'), If you have new links add them to SOCIAL. The Name has to be the name of the corresponding FontAwesome icon. +### External feed URL + +You can specify an external feed URL (e.g. FeedBurner) in ``SOCIAL`` using the +``rss`` or ``rss-square`` icons. The icon will be shown in the footer with the +rest of your ``SOCIAL`` accounts. A tag for the external feed will be +placed in instead of the default Pelican feeds. + ### Code highlights This theme contains this color schemes: diff --git a/templates/base.html b/templates/base.html index 0c4c777..df0301e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,6 +15,9 @@ {% block title %}{{ SITENAME }}{% if SITESUBTITLE and SHOW_SITESUBTITLE_IN_HTML %} - {{ SITESUBTITLE }}{% endif %}{% endblock title %} + {% for name,link in SOCIAL if name in ['rss', 'rss-square'] %} + + {% else %} {% if FEED_ALL_ATOM %} {% endif %} @@ -39,7 +42,7 @@ {% if TAG_FEED_RSS and tag %} {% endif %} - + {% endfor %} From 31099533fa926648b37f5913aa21925f382b7390 Mon Sep 17 00:00:00 2001 From: "Mr. Senko" Date: Fri, 12 Feb 2016 15:17:34 +0200 Subject: [PATCH 4/9] Update meta tags and add support for og:image --- README.md | 8 +++++++- templates/article.html | 44 ++++++++++++++++++++++++++++++++++-------- templates/base.html | 2 -- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b367010..8727174 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,11 @@ Accept many analytics: ### Articles -To customize header cover to articles, insert the metadata ``header_cover``: +To customize header cover to articles, insert the metadata ``header_cover``. +To customize OpenGraph images, insert the metadata ``og_image``, otherwise +``header_cover``, ``HEADER_COVER`` or a default image is used. You can also +use absolute URLs for ``og_image``. Example: + - To RST ```rst @@ -113,6 +117,7 @@ My super title :authors: Alexis Metaireau, Conan Doyle :summary: Short version for index and feeds :header_cover: /images/posts/super-title/cover.png +:og_image: /images/posts/super-title/facebook_cover.png ``` - To Markdown @@ -126,6 +131,7 @@ Slug: my-super-post Authors: Alexis Metaireau, Conan Doyle Summary: Short version for index and feeds Header_Cover: /images/posts/super-title/cover.png +Og_Image: http://example.com/facebook_cover.png This is the content of my super blog post. ``` diff --git a/templates/article.html b/templates/article.html index 943f0aa..12332b0 100755 --- a/templates/article.html +++ b/templates/article.html @@ -5,28 +5,56 @@ {{ super() }} {% for keyword in article.keywords %} - + {% endfor %} - {% for description in article.description %} - + {% if description %} + + {% elif article.headline %} + + {% elif article.summary %} + + {% endif %} + + {% for author in article.authors %} + {% endfor %} {% for tag in article.tags %} - + {% endfor %} - {% endblock %} {% block opengraph %} {{ super() }} - + {% for author in article.authors %} + + {% endfor %} - - + {% if description %} + + {% elif article.headline %} + + {% elif article.summary %} + + {% endif %} + + {% if article.og_image %} + {% if article.og_image|lower|truncate(4, True, '') == "http" %} + + {% else %} + + {% endif %} + {% elif article.header_cover %} + + {% elif HEADER_COVER %} + + {% else %} + + {% endif %} {% endblock %} {% block header %} diff --git a/templates/base.html b/templates/base.html index 0c4c777..5f2be18 100644 --- a/templates/base.html +++ b/templates/base.html @@ -6,8 +6,6 @@ - - {% if GOOGLE_SITE_VERIFICATION %} From e6ec8247eb96a0356af875201c3ca179150ff97c Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Sun, 14 Feb 2016 11:52:23 -0200 Subject: [PATCH 5/9] better support for `summary` plugin --- templates/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/index.html b/templates/index.html index 59f58dc..227219a 100755 --- a/templates/index.html +++ b/templates/index.html @@ -34,6 +34,8 @@ {% if SHOW_FULL_ARTICLE %} {{ article.content }} + {% elif article.has_summary %} + {{ article.summary }} {% elif article.summary %} {{ article.summary|truncate(140) }} {% endif %} From a6ce793b7d35ec0a840325e79a66882ade8d2b0b Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Sun, 14 Feb 2016 21:19:35 -0200 Subject: [PATCH 6/9] add image `auto resize` in css files --- static/css/clean-blog.css | 5 +++++ static/css/clean-blog.min.css | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/css/clean-blog.css b/static/css/clean-blog.css index 782a33f..1688595 100755 --- a/static/css/clean-blog.css +++ b/static/css/clean-blog.css @@ -387,6 +387,11 @@ form .row:first-child .floating-label-form-group { text-shadow: none; background: #0085a1; } +img { + max-width: 100%; + height: auto; + width: auto\9; /* ie8 */ +} img::selection { color: white; background: transparent; diff --git a/static/css/clean-blog.min.css b/static/css/clean-blog.min.css index e23d6cc..954fdff 100755 --- a/static/css/clean-blog.min.css +++ b/static/css/clean-blog.min.css @@ -2,4 +2,4 @@ * Clean Blog v1.0.0 (http://startbootstrap.com) * Copyright 2014 Start Bootstrap * Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE) - */body{font-family:'Open Sans',Lora,'Times New Roman',serif;font-size:18px;font-weight:300;color:#404040}p{line-height:1.5;margin:30px 0}p a{text-decoration:underline}h1,h2,h3,h4,h5,h6{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:800}a{color:#404040}a:focus,a:hover{color:#0085a1}a img:focus,a img:hover{cursor:zoom-in}blockquote{color:gray;font-style:italic}pre{background-color:transparent}hr.small{max-width:100px;margin:15px auto;border-width:4px;border-color:#fff}.navbar-custom{position:absolute;top:0;left:0;width:100%;z-index:3;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif}.navbar-custom .navbar-brand{font-weight:800}.navbar-custom .nav li a{text-transform:uppercase;font-size:12px;font-weight:800;letter-spacing:1px}@media only screen and (min-width:768px){.navbar-custom{background:0 0;border-bottom:1px solid transparent}.navbar-custom .navbar-brand{color:#fff;padding:20px}.navbar-custom .navbar-brand:focus,.navbar-custom .navbar-brand:hover{color:rgba(255,255,255,.8)}.navbar-custom .nav li a{color:#fff;padding:20px}.navbar-custom .nav li a:focus,.navbar-custom .nav li a:hover{color:rgba(255,255,255,.8)}}@media only screen and (min-width:1170px){.navbar-custom{-webkit-transition:background-color .3s;-moz-transition:background-color .3s;transition:background-color .3s;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.navbar-custom.is-fixed{position:fixed;top:-61px;background-color:rgba(255,255,255,.9);border-bottom:1px solid #f2f2f2;-webkit-transition:-webkit-transform .3s;-moz-transition:-moz-transform .3s;transition:transform .3s}.navbar-custom.is-fixed .navbar-brand{color:#404040}.navbar-custom.is-fixed .navbar-brand:focus,.navbar-custom.is-fixed .navbar-brand:hover{color:#0085a1}.navbar-custom.is-fixed .nav li a{color:#404040}.navbar-custom.is-fixed .nav li a:focus,.navbar-custom.is-fixed .nav li a:hover{color:#0085a1}.navbar-custom.is-visible{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-o-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.intro-header{background:center center/cover no-repeat;-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;margin-bottom:50px}.intro-header .page-heading,.intro-header .post-heading,.intro-header .site-heading{padding:100px 0 50px;color:#fff}@media only screen and (min-width:768px){.intro-header .page-heading,.intro-header .post-heading,.intro-header .site-heading{padding:150px 0}}.intro-header .page-heading,.intro-header .site-heading{text-align:center}.intro-header .page-heading h1,.intro-header .site-heading h1{margin-top:0;font-size:50px}.intro-header .page-heading .subheading,.intro-header .site-heading .subheading{font-size:24px;line-height:1.1,display:block;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:300;margin:10px 0 0}@media only screen and (min-width:768px){.intro-header .page-heading h1,.intro-header .site-heading h1{font-size:80px}}.intro-header .post-heading h1{font-size:35px}.intro-header .post-heading .meta,.intro-header .post-heading .subheading{line-height:1.1;display:block}.intro-header .post-heading .subheading{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;font-size:24px;margin:10px 0 30px;font-weight:600}.intro-header .post-heading .meta{font-family:Lora,'Times New Roman',serif;font-style:italic;font-weight:300;font-size:20px}.intro-header .post-heading .meta a{color:#fff}@media only screen and (min-width:768px){.intro-header .post-heading h1{font-size:55px}.intro-header .post-heading .subheading{font-size:30px}}.post-preview>a{color:#404040}.post-preview>a:focus,.post-preview>a:hover{text-decoration:none;color:#0085a1}.post-preview>a>.post-title{font-size:30px;margin-top:30px;margin-bottom:10px}.post-preview>a>.post-subtitle{margin:0 0 10px;font-weight:300}.post-preview>.post-meta{color:gray;font-size:18px;font-style:italic;margin-top:0}.post-preview>.post-meta>a{text-decoration:none;color:#404040}.post-preview>.post-meta>a:focus,.post-preview>.post-meta>a:hover{color:#0085a1;text-decoration:underline}@media only screen and (min-width:768px){.post-preview>a>.post-title{font-size:36px}}.section-heading{font-size:36px;margin-top:60px;font-weight:700}.caption{text-align:center;font-size:14px;padding:10px;font-style:italic;margin:0;display:block;border-bottom-right-radius:5px;border-bottom-left-radius:5px}footer{padding:50px 0 65px}footer .list-inline{margin:0;padding:0}footer .copyright{font-size:14px;text-align:center;margin-bottom:0}.floating-label-form-group{font-size:14px;position:relative;margin-bottom:0;padding-bottom:.5em;border-bottom:1px solid #eee}.floating-label-form-group input,.floating-label-form-group textarea{z-index:1;position:relative;padding-right:0;padding-left:0;border:none;border-radius:0;font-size:1.5em;background:0 0;box-shadow:none!important;resize:none}.floating-label-form-group label{display:block;z-index:0;position:relative;top:2em;margin:0;font-size:.85em;line-height:1.764705882em;vertical-align:middle;vertical-align:baseline;opacity:0;-webkit-transition:top .3s ease,opacity .3s ease;-moz-transition:top .3s ease,opacity .3s ease;-ms-transition:top .3s ease,opacity .3s ease;transition:top .3s ease,opacity .3s ease}.floating-label-form-group::not(:first-child){padding-left:14px;border-left:1px solid #eee}.floating-label-form-group-with-value label{top:0;opacity:1}.floating-label-form-group-with-focus label{color:#0085a1}form .row:first-child .floating-label-form-group{border-top:1px solid #eee}.btn{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;text-transform:uppercase;font-size:14px;font-weight:800;letter-spacing:1px;border-radius:0;padding:15px 25px}.btn-lg{font-size:16px;padding:25px 35px}.btn-default:focus,.btn-default:hover{background-color:#0085a1;border:1px solid #0085a1;color:#fff}.pager{margin:20px 0 0}.pager li>a,.pager li>span{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;text-transform:uppercase;font-size:14px;font-weight:800;letter-spacing:1px;padding:15px 25px;background-color:#fff;border-radius:0}.pager li>a:focus,.pager li>a:hover{color:#fff;background-color:#0085a1;border:1px solid #0085a1}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:gray;background-color:#404040;cursor:not-allowed}::-moz-selection{color:#fff;text-shadow:none;background:#0085a1}::selection{color:#fff;text-shadow:none;background:#0085a1}img::selection{color:#fff;background:0 0}img::-moz-selection{color:#fff;background:0 0}body{webkit-tap-highlight-color:#0085a1} + */a,body{color:#404040}.caption,.intro-header .page-heading,.intro-header .site-heading,footer .copyright{text-align:center}body{font-family:'Open Sans',Lora,'Times New Roman',serif;font-size:18px;font-weight:300;webkit-tap-highlight-color:#0085a1}.intro-header .page-heading .subheading,.intro-header .post-heading .subheading,.intro-header .site-heading .subheading,.navbar-custom,h1,h2,h3,h4,h5,h6{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif}p{line-height:1.5;margin:30px 0}p a{text-decoration:underline}h1,h2,h3,h4,h5,h6{font-weight:800}a:focus,a:hover{color:#0085a1}a img:focus,a img:hover{cursor:zoom-in}blockquote{color:grey;font-style:italic}pre{background-color:transparent}hr.small{max-width:100px;margin:15px auto;border-width:4px;border-color:#fff}.navbar-custom{position:absolute;top:0;left:0;width:100%;z-index:3}.navbar-custom .navbar-brand{font-weight:800}.navbar-custom .nav li a{text-transform:uppercase;font-size:12px;font-weight:800;letter-spacing:1px}@media only screen and (min-width:768px){.navbar-custom{background:0 0;border-bottom:1px solid transparent}.navbar-custom .navbar-brand{color:#fff;padding:20px}.navbar-custom .navbar-brand:focus,.navbar-custom .navbar-brand:hover{color:rgba(255,255,255,.8)}.navbar-custom .nav li a{color:#fff;padding:20px}.navbar-custom .nav li a:focus,.navbar-custom .nav li a:hover{color:rgba(255,255,255,.8)}}@media only screen and (min-width:1170px){.navbar-custom{-webkit-transition:background-color .3s;-moz-transition:background-color .3s;transition:background-color .3s;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.navbar-custom.is-fixed{position:fixed;top:-61px;background-color:rgba(255,255,255,.9);border-bottom:1px solid #f2f2f2;-webkit-transition:-webkit-transform .3s;-moz-transition:-moz-transform .3s;transition:transform .3s}.navbar-custom.is-fixed .navbar-brand{color:#404040}.navbar-custom.is-fixed .navbar-brand:focus,.navbar-custom.is-fixed .navbar-brand:hover{color:#0085a1}.navbar-custom.is-fixed .nav li a{color:#404040}.navbar-custom.is-fixed .nav li a:focus,.navbar-custom.is-fixed .nav li a:hover{color:#0085a1}.navbar-custom.is-visible{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);-ms-transform:translate3d(0,100%,0);-o-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.intro-header{background:center center no-repeat;-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;-o-background-size:cover;margin-bottom:50px}.intro-header .page-heading,.intro-header .post-heading,.intro-header .site-heading{padding:100px 0 50px;color:#fff}.intro-header .page-heading h1,.intro-header .site-heading h1{margin-top:0;font-size:50px}.intro-header .page-heading .subheading,.intro-header .site-heading .subheading{font-size:24px;line-height:1.1,display: block;font-weight:300;margin:10px 0 0}@media only screen and (min-width:768px){.intro-header .page-heading,.intro-header .post-heading,.intro-header .site-heading{padding:150px 0}.intro-header .page-heading h1,.intro-header .site-heading h1{font-size:80px}}.intro-header .post-heading h1{font-size:35px}.intro-header .post-heading .meta,.intro-header .post-heading .subheading{line-height:1.1;display:block}.intro-header .post-heading .subheading{font-size:24px;margin:10px 0 30px;font-weight:600}.intro-header .post-heading .meta{font-family:Lora,'Times New Roman',serif;font-style:italic;font-weight:300;font-size:20px}.intro-header .post-heading .meta a{color:#fff}@media only screen and (min-width:768px){.intro-header .post-heading h1{font-size:55px}.intro-header .post-heading .subheading{font-size:30px}}.post-preview>a{color:#404040}.post-preview>a:focus,.post-preview>a:hover{text-decoration:none;color:#0085a1}.post-preview>a>.post-title{font-size:30px;margin-top:30px;margin-bottom:10px}.post-preview>a>.post-subtitle{margin:0 0 10px;font-weight:300}.post-preview>.post-meta{color:grey;font-size:18px;font-style:italic;margin-top:0}.post-preview>.post-meta>a{text-decoration:none;color:#404040}.post-preview>.post-meta>a:focus,.post-preview>.post-meta>a:hover{color:#0085a1;text-decoration:underline}@media only screen and (min-width:768px){.post-preview>a>.post-title{font-size:36px}}.section-heading{font-size:36px;margin-top:60px;font-weight:700}.btn,.pager li>a,.pager li>span{font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;text-transform:uppercase;font-weight:800;letter-spacing:1px}.caption{font-size:14px;padding:10px;font-style:italic;margin:0;display:block;border-bottom-right-radius:5px;border-bottom-left-radius:5px}footer{padding:50px 0 65px}footer .list-inline{margin:0;padding:0}footer .copyright{font-size:14px;margin-bottom:0}.floating-label-form-group{font-size:14px;position:relative;margin-bottom:0;padding-bottom:.5em;border-bottom:1px solid #eee}.floating-label-form-group input,.floating-label-form-group textarea{z-index:1;position:relative;padding-right:0;padding-left:0;border:none;border-radius:0;font-size:1.5em;background:0 0;box-shadow:none!important;resize:none}.floating-label-form-group label{display:block;z-index:0;position:relative;top:2em;margin:0;font-size:.85em;line-height:1.764705882em;vertical-align:middle;vertical-align:baseline;opacity:0;-webkit-transition:top .3s ease,opacity .3s ease;-moz-transition:top .3s ease,opacity .3s ease;-ms-transition:top .3s ease,opacity .3s ease;transition:top .3s ease,opacity .3s ease}.floating-label-form-group::not(:first-child){padding-left:14px;border-left:1px solid #eee}.floating-label-form-group-with-value label{top:0;opacity:1}.floating-label-form-group-with-focus label{color:#0085a1}form .row:first-child .floating-label-form-group{border-top:1px solid #eee}.btn{font-size:14px;border-radius:0;padding:15px 25px}.btn-lg{font-size:16px;padding:25px 35px}.btn-default:focus,.btn-default:hover{background-color:#0085a1;border:1px solid #0085a1;color:#fff}.pager{margin:20px 0 0}.pager li>a,.pager li>span{font-size:14px;padding:15px 25px;background-color:#fff;border-radius:0}.pager li>a:focus,.pager li>a:hover{color:#fff;background-color:#0085a1;border:1px solid #0085a1}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:grey;background-color:#404040;cursor:not-allowed}::-moz-selection{color:#fff;text-shadow:none;background:#0085a1}::selection{color:#fff;text-shadow:none;background:#0085a1}img::selection{color:#fff;background:0 0}img::-moz-selection{color:#fff;background:0 0}img{max-width:100%;height:auto;width:auto\9} From 58e57c3bab6102e5584bf3863f9fb7e2198a2bbd Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Sun, 14 Feb 2016 21:45:19 -0200 Subject: [PATCH 7/9] add `HEADER_COLOR` option to render header with a simple color --- templates/archives.html | 2 ++ templates/article.html | 2 ++ templates/author.html | 2 ++ templates/authors.html | 2 ++ templates/categories.html | 2 ++ templates/category.html | 2 ++ templates/index.html | 2 ++ templates/page.html | 2 ++ templates/period_archives.html | 2 ++ templates/tag.html | 2 ++ templates/tags.html | 2 ++ 11 files changed, 22 insertions(+) diff --git a/templates/archives.html b/templates/archives.html index 5d38c29..15149cb 100755 --- a/templates/archives.html +++ b/templates/archives.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/article.html b/templates/article.html index 4fbdcda..3474864 100755 --- a/templates/article.html +++ b/templates/article.html @@ -93,6 +93,8 @@
{% elif HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/author.html b/templates/author.html index e18b291..5399bbc 100755 --- a/templates/author.html +++ b/templates/author.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/authors.html b/templates/authors.html index 1eb418f..74917a8 100755 --- a/templates/authors.html +++ b/templates/authors.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/categories.html b/templates/categories.html index 789f940..7af5236 100755 --- a/templates/categories.html +++ b/templates/categories.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/category.html b/templates/category.html index 129627d..53b8879 100755 --- a/templates/category.html +++ b/templates/category.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/index.html b/templates/index.html index 227219a..98f8bce 100755 --- a/templates/index.html +++ b/templates/index.html @@ -5,6 +5,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/page.html b/templates/page.html index ee406cf..b7c8d71 100755 --- a/templates/page.html +++ b/templates/page.html @@ -8,6 +8,8 @@
{% elif HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/period_archives.html b/templates/period_archives.html index e45d927..19fdaa9 100755 --- a/templates/period_archives.html +++ b/templates/period_archives.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/tag.html b/templates/tag.html index 8090efd..108d5be 100755 --- a/templates/tag.html +++ b/templates/tag.html @@ -3,6 +3,8 @@ {% block header %} {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} diff --git a/templates/tags.html b/templates/tags.html index 076949d..bab699f 100755 --- a/templates/tags.html +++ b/templates/tags.html @@ -6,6 +6,8 @@ {% if HEADER_COVER %}
+ {% elif HEADER_COLOR %} +
{% else %}
{% endif %} From 081b418aa958f2518183ef69be251c68b31724af Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Mon, 22 Feb 2016 10:22:01 -0300 Subject: [PATCH 8/9] update readme (add HEAD_COLOR option) --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb69c36..f6129bd 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,16 @@ To define custom header cover, set the property ``HEADER_COVER`` in ``pelicancon HEADER_COVER = 'static/my_image.png' ``` +### Header Color + +To define a simple header background color, set the property ``HEADER_COLOR`` in ``pelicanconf.py``: + +```python +HEADER_COLOR = 'black' +``` + +you can use any valid css color. + ### Social URLs Github, Twitter and Facebook URLs set these properties: @@ -90,12 +100,12 @@ will not see the desired results. Accept many analytics: - Google Analytics: ``GOOGLE_ANALYTICS``; - - Gauges: ``GAUGES`` + - Gauges: ``GAUGES`` - Piwik: ``PIWIK_URL`` and ``PIWIK_SITE_ID``. ### Twitter cards -Twitter cards are automatically generated if TWITTER_HANDLE is set: +Twitter cards are automatically generated if TWITTER_HANDLE is set: ```python TWITTER_HANDLE = "myprofile" ``` From 4818dbb5f77f4aeccee1edce5a4d0ff33a378c38 Mon Sep 17 00:00:00 2001 From: Diego Garcia Date: Mon, 22 Feb 2016 10:30:50 -0300 Subject: [PATCH 9/9] fix "unsafe" html tags in README markdown --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f6129bd..5f38b81 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ If you have new links add them to SOCIAL. The Name has to be the name of the cor You can specify an external feed URL (e.g. FeedBurner) in ``SOCIAL`` using the ``rss`` or ``rss-square`` icons. The icon will be shown in the footer with the -rest of your ``SOCIAL`` accounts. A tag for the external feed will be -placed in instead of the default Pelican feeds. +rest of your ``SOCIAL`` accounts. A ```` tag for the external feed will be +placed in ```` instead of the default Pelican feeds. ### Code highlights @@ -118,7 +118,7 @@ TWITTER_HANDLE = "myprofile" - Set ``SHOW_FULL_ARTICLE`` to True to show full article content on index.html instead of summary; - Set ``SHOW_SITESUBTITLE_IN_HTML`` to True to make use of the ``SITESUBTITLE`` - variable inside the HTML tag; + variable inside the ``<title>`` HTML tag; ### Articles