From 3bd495f1d4f25fb4f81f73e6744048c176c4a943 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Mon, 7 Mar 2016 10:27:07 -0500 Subject: [PATCH] Remove extensions from _includes to simplify naming --- _includes/absolute-url.liquid | 1 - _includes/archive-list-single | 8 +++++ _includes/archive-list-single.html | 8 ----- .../{author-profile.html => author-profile} | 2 +- _includes/base_path | 1 + _includes/{breadcrumbs.html => breadcrumbs} | 4 +-- .../{browser-upgrade.html => browser-upgrade} | 0 .../{disqus-comments.html => disqus-comments} | 0 _includes/feed-footer.html | 4 --- _includes/{footer.html => footer} | 0 _includes/gallery | 8 ++--- .../{group-by-array.html => group-by-array} | 0 _includes/head | 30 +++++++++++++++++++ _includes/head.html | 30 ------------------- _includes/navigation | 19 ++++++++++++ _includes/navigation.html | 19 ------------ _includes/{scripts.html => scripts} | 6 ++-- _includes/{seo.html => seo} | 6 ++-- _includes/social-share | 14 +++++++++ _includes/social-share.html | 14 --------- _includes/toc | 7 +++++ _includes/toc.html | 9 ------ _layouts/default.html | 20 ++++++------- _layouts/single.html | 10 +++---- _pages/category-archive.html | 6 ++-- _pages/collection-archive.html | 4 +-- _pages/home.md | 4 +-- _pages/page-archive.html | 4 +-- _pages/portfolio-archive.html | 6 ++-- _pages/recipes-archive.html | 6 ++-- _pages/sitemap.md | 10 +++---- _pages/tag-archive.html | 6 ++-- _pages/theme-setup.md | 16 +++++----- _pages/year-archive.html | 4 +-- ...2-01-03-template-table-of-contents-post.md | 18 +++++------ 35 files changed, 148 insertions(+), 156 deletions(-) delete mode 100644 _includes/absolute-url.liquid create mode 100644 _includes/archive-list-single delete mode 100644 _includes/archive-list-single.html rename _includes/{author-profile.html => author-profile} (97%) create mode 100644 _includes/base_path rename _includes/{breadcrumbs.html => breadcrumbs} (68%) rename _includes/{browser-upgrade.html => browser-upgrade} (100%) rename _includes/{disqus-comments.html => disqus-comments} (100%) delete mode 100644 _includes/feed-footer.html rename _includes/{footer.html => footer} (100%) rename _includes/{group-by-array.html => group-by-array} (100%) create mode 100644 _includes/head delete mode 100644 _includes/head.html create mode 100644 _includes/navigation delete mode 100644 _includes/navigation.html rename _includes/{scripts.html => scripts} (72%) rename _includes/{seo.html => seo} (96%) create mode 100644 _includes/social-share delete mode 100644 _includes/social-share.html create mode 100644 _includes/toc delete mode 100644 _includes/toc.html diff --git a/_includes/absolute-url.liquid b/_includes/absolute-url.liquid deleted file mode 100644 index 7809e99..0000000 --- a/_includes/absolute-url.liquid +++ /dev/null @@ -1 +0,0 @@ -{% capture absurl %}{{ site.url }}{{ site.baseurl }}{% endcapture %} \ No newline at end of file diff --git a/_includes/archive-list-single b/_includes/archive-list-single new file mode 100644 index 0000000..37d421d --- /dev/null +++ b/_includes/archive-list-single @@ -0,0 +1,8 @@ +
+ {% if post.link %} +

{% if post.id %}{{ post.title | markdownify | remove: "

" | remove: "

" }}{% else %}{{ post.title }}{% endif %}

+ {% else %} +

{% if post.id %}{{ post.title | markdownify | remove: "

" | remove: "

" }}{% else %}{{ post.title }}{% endif %}

+ {% endif %} + {% if post.excerpt %}

{{ post.excerpt | markdownify | strip_html | truncate: 160 }}

{% endif %} +
\ No newline at end of file diff --git a/_includes/archive-list-single.html b/_includes/archive-list-single.html deleted file mode 100644 index 3b4032b..0000000 --- a/_includes/archive-list-single.html +++ /dev/null @@ -1,8 +0,0 @@ -
- {% if post.link %} -

{% if post.id %}{{ post.title | markdownify | remove: "

" | remove: "

" }}{% else %}{{ post.title }}{% endif %}

- {% else %} -

{% if post.id %}{{ post.title | markdownify | remove: "

" | remove: "

" }}{% else %}{{ post.title }}{% endif %}

- {% endif %} - {% if post.excerpt %}

{{ post.excerpt | markdownify | strip_html | truncate: 160 }}

{% endif %} -
\ No newline at end of file diff --git a/_includes/author-profile.html b/_includes/author-profile similarity index 97% rename from _includes/author-profile.html rename to _includes/author-profile index 29458ce..76bb326 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile @@ -7,7 +7,7 @@ {% if author.avatar contains "http" %} {{ author.name }} photo {% else %} - {{ author.name }} photo + {{ author.name }} photo {% endif %}

{{ author.name }}

diff --git a/_includes/base_path b/_includes/base_path new file mode 100644 index 0000000..8c7dc62 --- /dev/null +++ b/_includes/base_path @@ -0,0 +1 @@ +{% capture base_path %}{{ site.url }}{{ site.baseurl }}{% endcapture %} \ No newline at end of file diff --git a/_includes/breadcrumbs.html b/_includes/breadcrumbs similarity index 68% rename from _includes/breadcrumbs.html rename to _includes/breadcrumbs index 8a12274..3caff14 100644 --- a/_includes/breadcrumbs.html +++ b/_includes/breadcrumbs @@ -5,7 +5,7 @@ {% for crumb in crumbs offset: 1 %} {% if forloop.first %}
  • - {{ site.breadcrumb_home_label }} + {{ site.breadcrumb_home_label }}
  • {{ site.breadcrumb_separator }} @@ -15,7 +15,7 @@ {% else %} {% assign i = i | plus: 1 %}
  • - {{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }} + {{ crumb | replace: '-', ' ' | replace: '%20', ' ' | capitalize }}
  • {{ site.breadcrumb_separator }} diff --git a/_includes/browser-upgrade.html b/_includes/browser-upgrade similarity index 100% rename from _includes/browser-upgrade.html rename to _includes/browser-upgrade diff --git a/_includes/disqus-comments.html b/_includes/disqus-comments similarity index 100% rename from _includes/disqus-comments.html rename to _includes/disqus-comments diff --git a/_includes/feed-footer.html b/_includes/feed-footer.html deleted file mode 100644 index 59faf91..0000000 --- a/_includes/feed-footer.html +++ /dev/null @@ -1,4 +0,0 @@ -{% 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 similarity index 100% rename from _includes/footer.html rename to _includes/footer diff --git a/_includes/gallery b/_includes/gallery index db1b0a2..4f1f77b 100644 --- a/_includes/gallery +++ b/_includes/gallery @@ -1,4 +1,4 @@ -{% include absolute-url.liquid %} +{% include base_path %} {% if include.id %} {% assign gallery = page.[include.id] %} @@ -23,14 +23,14 @@ {% if img.url contains "http" %} "{{ img.url }}" {% else %} - "{{ img.url | prepend: "/images/" | prepend: absurl }}" + "{{ img.url | prepend: "/images/" | prepend: base_path }}" {% endif %} > {% if img.alt %}{{ img.alt }}{% endif %} @@ -39,7 +39,7 @@ {% if img.image_path contains "http" %} "{{ img.image_path }}" {% else %} - "{{ img.image_path | prepend: "/images/" | prepend: absurl }}" + "{{ img.image_path | prepend: "/images/" | prepend: base_path }}" {% endif %} alt="{% if img.alt %}{{ img.alt }}{% endif %}"> {% endif %} diff --git a/_includes/group-by-array.html b/_includes/group-by-array similarity index 100% rename from _includes/group-by-array.html rename to _includes/group-by-array diff --git a/_includes/head b/_includes/head new file mode 100644 index 0000000..38a4355 --- /dev/null +++ b/_includes/head @@ -0,0 +1,30 @@ + + +{% include seo %} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/head.html b/_includes/head.html deleted file mode 100644 index dfd62a5..0000000 --- a/_includes/head.html +++ /dev/null @@ -1,30 +0,0 @@ - - -{% include seo.html %} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_includes/navigation b/_includes/navigation new file mode 100644 index 0000000..0400597 --- /dev/null +++ b/_includes/navigation @@ -0,0 +1,19 @@ + diff --git a/_includes/navigation.html b/_includes/navigation.html deleted file mode 100644 index 27aff53..0000000 --- a/_includes/navigation.html +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/_includes/scripts.html b/_includes/scripts similarity index 72% rename from _includes/scripts.html rename to _includes/scripts index 746e9f5..c8b4714 100644 --- a/_includes/scripts.html +++ b/_includes/scripts @@ -1,6 +1,6 @@ - - + + {% if site.google_analytics %}