From 8c033276477435221aa6537023d6c9a680e00c1e Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Sat, 20 Feb 2016 22:10:01 -0500 Subject: [PATCH 01/22] Feature: Refactor layouts and includes From 4348fc59b3016d09566b05005a7766b58552a077 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Mon, 22 Feb 2016 14:58:16 -0500 Subject: [PATCH 02/22] Remove "_" from includes --- .../{_author-bio.html => author-bio.html} | 0 ...wser-upgrade.html => browser-upgrade.html} | 0 ...qus_comments.html => disqus-comments.html} | 0 .../{_feed-footer.html => feed-footer.html} | 0 _includes/{_footer.html => footer.html} | 0 _includes/{_head.html => head.html} | 2 +- .../{_navigation.html => navigation.html} | 0 .../{_open-graph.html => open-graph.html} | 0 _includes/{_scripts.html => scripts.html} | 2 +- .../{_social-share.html => social-share.html} | 0 _includes/{_toc.html => toc.html} | 0 _layouts/home.html | 12 +++++----- _layouts/page.html | 14 ++++++------ _layouts/post-index.html | 12 +++++----- _layouts/post.html | 14 ++++++------ feed.xml | 2 +- theme-setup/index.md | 22 +++++++++---------- 17 files changed, 40 insertions(+), 40 deletions(-) rename _includes/{_author-bio.html => author-bio.html} (100%) rename _includes/{_browser-upgrade.html => browser-upgrade.html} (100%) rename _includes/{_disqus_comments.html => disqus-comments.html} (100%) rename _includes/{_feed-footer.html => feed-footer.html} (100%) rename _includes/{_footer.html => footer.html} (100%) rename _includes/{_head.html => head.html} (98%) rename _includes/{_navigation.html => navigation.html} (100%) rename _includes/{_open-graph.html => open-graph.html} (100%) rename _includes/{_scripts.html => scripts.html} (96%) rename _includes/{_social-share.html => social-share.html} (100%) rename _includes/{_toc.html => toc.html} (100%) diff --git a/_includes/_author-bio.html b/_includes/author-bio.html similarity index 100% rename from _includes/_author-bio.html rename to _includes/author-bio.html diff --git a/_includes/_browser-upgrade.html b/_includes/browser-upgrade.html similarity index 100% rename from _includes/_browser-upgrade.html rename to _includes/browser-upgrade.html diff --git a/_includes/_disqus_comments.html b/_includes/disqus-comments.html similarity index 100% rename from _includes/_disqus_comments.html rename to _includes/disqus-comments.html diff --git a/_includes/_feed-footer.html b/_includes/feed-footer.html similarity index 100% rename from _includes/_feed-footer.html rename to _includes/feed-footer.html diff --git a/_includes/_footer.html b/_includes/footer.html similarity index 100% rename from _includes/_footer.html rename to _includes/footer.html diff --git a/_includes/_head.html b/_includes/head.html similarity index 98% rename from _includes/_head.html rename to _includes/head.html index d8d07542..4d6b271d 100644 --- a/_includes/_head.html +++ b/_includes/head.html @@ -6,7 +6,7 @@ {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %} {% endif %} -{% include _open-graph.html %} +{% include open-graph.html %} {% if site.owner.google.verify %} {% endif %} diff --git a/_includes/_navigation.html b/_includes/navigation.html similarity index 100% rename from _includes/_navigation.html rename to _includes/navigation.html diff --git a/_includes/_open-graph.html b/_includes/open-graph.html similarity index 100% rename from _includes/_open-graph.html rename to _includes/open-graph.html diff --git a/_includes/_scripts.html b/_includes/scripts.html similarity index 96% rename from _includes/_scripts.html rename to _includes/scripts.html index 42d75b3e..be1e84d3 100644 --- a/_includes/_scripts.html +++ b/_includes/scripts.html @@ -19,5 +19,5 @@ {% endif %} {% if page.comments %} - {% include _disqus_comments.html %} + {% include disqus-comments.html %} {% endif %} diff --git a/_includes/_social-share.html b/_includes/social-share.html similarity index 100% rename from _includes/_social-share.html rename to _includes/social-share.html diff --git a/_includes/_toc.html b/_includes/toc.html similarity index 100% rename from _includes/_toc.html rename to _includes/toc.html diff --git a/_layouts/home.html b/_layouts/home.html index a918d74b..e8930839 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -4,14 +4,14 @@ -{% include _head.html %} +{% include head.html %} -{% include _browser-upgrade.html %} +{% include browser-upgrade.html %} -{% include _navigation.html %} +{% include navigation.html %} {% if page.image.feature %}
@@ -30,7 +30,7 @@

Recent Posts

@@ -49,11 +49,11 @@ -{% include _scripts.html %} +{% include scripts.html %} diff --git a/_layouts/page.html b/_layouts/page.html index b6108fce..4f3ec1b5 100644 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -4,14 +4,14 @@ -{% include _head.html %} +{% include head.html %} -{% include _browser-upgrade.html %} +{% include browser-upgrade.html %} -{% include _navigation.html %} +{% include navigation.html %} {% if page.image.feature %}
@@ -30,7 +30,7 @@

{{ page.title }}

@@ -38,7 +38,7 @@ {{ content }} {% if page.share != false %}
- {% include _social-share.html %} + {% include social-share.html %} {% endif %}
{% if site.owner.disqus-shortname and page.comments == true %} @@ -49,11 +49,11 @@ -{% include _scripts.html %} +{% include scripts.html %} diff --git a/_layouts/post-index.html b/_layouts/post-index.html index 3d29f29a..fa2d9051 100644 --- a/_layouts/post-index.html +++ b/_layouts/post-index.html @@ -4,14 +4,14 @@ -{% include _head.html %} +{% include head.html %} -{% include _browser-upgrade.html %} +{% include browser-upgrade.html %} -{% include _navigation.html %} +{% include navigation.html %} {% if page.image.feature %}
@@ -30,7 +30,7 @@

{{ page.title }}

@@ -55,11 +55,11 @@ -{% include _scripts.html %} +{% include scripts.html %} diff --git a/_layouts/post.html b/_layouts/post.html index a8543cd6..0094ae9f 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -4,14 +4,14 @@ -{% include _head.html %} +{% include head.html %} -{% include _browser-upgrade.html %} +{% include browser-upgrade.html %} -{% include _navigation.html %} +{% include navigation.html %} {% if page.image.feature %}
@@ -30,7 +30,7 @@
@@ -44,7 +44,7 @@ {{ content }}
- {% if page.share != false %}{% include _social-share.html %}{% endif %} + {% if page.share != false %}{% include social-share.html %}{% endif %}
@@ -67,11 +67,11 @@
{% endif %}
- {% include _footer.html %} + {% include footer.html %}
-{% include _scripts.html %} +{% include scripts.html %} diff --git a/feed.xml b/feed.xml index 8a89e8c3..1ebf68f2 100644 --- a/feed.xml +++ b/feed.xml @@ -36,7 +36,7 @@ sitemap: false {{ post.content | xml_escape }} - {% include _feed-footer.html %} + {% include feed-footer.html %} {% endfor %} diff --git a/theme-setup/index.md b/theme-setup/index.md index d22fdaf0..c2e9d713 100644 --- a/theme-setup/index.md +++ b/theme-setup/index.md @@ -9,7 +9,7 @@ image: creditlink: http://wegraphics.net/downloads/free-ultimate-blurred-background-pack/ --- -{% include _toc.html %} +{% include toc.html %} ## Installation @@ -59,14 +59,14 @@ How Minimal Mistakes is organized and what the various files are. All posts, lay {% highlight text %} minimal-mistakes/ ├── _includes/ -| ├── _author-bio.html # bio stuff layout. pulls optional owner data from _config.yml -| ├── _browser-upgrade.html # prompt to install a modern browser for < IE9 -| ├── _disqus_comments.html # Disqus comments script -| ├── _footer.html # site footer -| ├── _head.html # site head -| ├── _navigation.html # site top navigation -| ├── _open-graph.html # Twitter Cards and Open Graph meta data -| └── _scripts.html # site scripts +| ├── author-bio.html # bio stuff layout. pulls optional owner data from _config.yml +| ├── browser-upgrade.html # prompt to install a modern browser for < IE9 +| ├── disqus-comments.html # Disqus comments script +| ├── footer.html # site footer +| ├── head.html # site head +| ├── navigation.html # site top navigation +| ├── open-graph.html # Twitter Cards and Open Graph meta data +| └── scripts.html # site scripts ├── _layouts/ | ├── home.html # homepage layout | ├── page.html # page layout @@ -265,7 +265,7 @@ author: billy_rick To include an auto-generated **table of contents** for posts and pages, add the following `_include` before the actual content. [Kramdown will take care of the rest](http://kramdown.rubyforge.org/converter/html.html#toc) and convert all headlines into list of links. {% highlight html %} -{% raw %}{% include _toc.html %}{% endraw %} +{% raw %}{% include toc.html %}{% endraw %} {% endhighlight %} ### Paragraph Indentation @@ -300,7 +300,7 @@ Not sure if this only effects Kramdown or if it's an issue with Markdown in gene ### Social Sharing Links -Social sharing links for Twitter, Facebook, and Google+ are included on posts/pages by default. To hide them on specific posts or pages add `share: false` to the YAML Front Matter. If you'd like to use different social networks modify `_includes/_social-share.html` to your liking. Icons are set using [Font Awesome](http://fontawesome.io). +Social sharing links for Twitter, Facebook, and Google+ are included on posts/pages by default. To hide them on specific posts or pages add `share: false` to the YAML Front Matter. If you'd like to use different social networks modify `_includes/social-share.html` to your liking. Icons are set using [Font Awesome](http://fontawesome.io). --- From 97b4571370bda5f0064d93fec45d6a908839560c Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Mon, 22 Feb 2016 16:16:15 -0500 Subject: [PATCH 03/22] Add support for `baseurl` --- _includes/author-bio.html | 92 ++++++++++++++++++++++++++----------- _includes/feed-footer.html | 5 +- _includes/footer.html | 2 +- _includes/head.html | 27 ++++++----- _includes/navigation.html | 12 ++--- _includes/scripts.html | 4 +- _includes/social-share.html | 6 +-- _layouts/home.html | 10 ++-- _layouts/page.html | 4 +- _layouts/post-index.html | 8 ++-- _layouts/post.html | 10 ++-- 11 files changed, 115 insertions(+), 65 deletions(-) diff --git a/_includes/author-bio.html b/_includes/author-bio.html index 7fd24e34..36b0a175 100644 --- a/_includes/author-bio.html +++ b/_includes/author-bio.html @@ -4,32 +4,72 @@
-{% if author.avatar contains 'http' %} - {{ author.name }} bio photo -{% else %} - {{ author.name }} bio photo -{% endif %} + {% if author.avatar contains 'http' %} + {{ author.name }} bio photo + {% else %} + {{ author.name }} bio photo + {% endif %}

{{ author.name }}

-

{{ author.bio }}

- {% if author.email %} Email{% endif %} - {% if author.twitter %} Twitter{% endif %} - {% if author.facebook %} Facebook{% endif %} - {% if author.google.plus %} Google+{% endif %} - {% if author.linkedin %} LinkedIn{% endif %} - {% if author.xing %} XING{% endif %} - {% if author.instagram %} Instagram{% endif %} - {% if author.tumblr %} Tumblr{% endif %} - {% if author.github %} Github{% endif %} - {% if author.stackoverflow %} Stackoverflow{% endif %} - {% if author.lastfm %} Last.fm{% endif %} - {% if author.dribbble %} Dribbble{% endif %} - {% if author.pinterest %} Pinterest{% endif %} - {% if author.foursquare %} Foursquare{% endif %} - {% if author.steam %} Steam{% endif %} - {% if author.youtube %} Youtube{% endif %} - {% if author.soundcloud %} Soundcloud{% endif %} - {% if author.weibo %} Weibo{% endif %} - {% if author.flickr %} Flickr{% endif %} - {% if author.codepen %} CodePen{% endif %} + {% if author.bio %}

{{ author.bio }}

{% endif %} + {% if author.email %} + Email + {% endif %} + {% if author.twitter %} + Twitter + {% endif %} + {% if author.facebook %} + Facebook + {% endif %} + {% if author.google.plus %} + Google+ + {% endif %} + {% if author.linkedin %} + LinkedIn + {% endif %} + {% if author.xing %} + XING + {% endif %} + {% if author.instagram %} + Instagram + {% endif %} + {% if author.tumblr %} + Tumblr + {% endif %} + {% if author.github %} + Github + {% endif %} + {% if author.stackoverflow %} + Stackoverflow + {% endif %} + {% if author.lastfm %} + Last.fm + {% endif %} + {% if author.dribbble %} + Dribbble + {% endif %} + {% if author.pinterest %} + Pinterest + {% endif %} + {% if author.foursquare %} + Foursquare + {% endif %} + {% if author.steam %} + Steam + {% endif %} + {% if author.youtube %} + Youtube + {% endif %} + {% if author.soundcloud %} + Soundcloud + {% endif %} + {% if author.weibo %} + Weibo + {% endif %} + {% if author.flickr %} + Flickr + {% endif %} + {% if author.codepen %} + CodePen + {% endif %}
diff --git a/_includes/feed-footer.html b/_includes/feed-footer.html index 02a94f6a..59faf918 100644 --- a/_includes/feed-footer.html +++ b/_includes/feed-footer.html @@ -1 +1,4 @@ -<p><a href="{{ site.url }}{{ post.url }}">{{ post.title | xml_escape }}</a> was originally published by {{ site.owner.name }} at <a href="{{ site.url }}">{{ site.title }}</a> on {{ post.date | date: "%B %d, %Y" }}.</p> \ No newline at end of file +{% capture feed_footer %} +

{{ post.title }} was originally published by {{ site.owner.name }} on {{ site.title }}

+{% endcapture %} +{{ feed_footer | markdownify | xml_escape }} \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html index 90d904df..9b166cf9 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,7 +1,7 @@ {% if site.owner.google.ad-client and site.owner.google.ad-slot %}