From d7203acf3ac27616a67fdbe91cdb6d6d512e5907 Mon Sep 17 00:00:00 2001 From: Jorge Arias Date: Fri, 13 Nov 2015 02:14:27 -0300 Subject: [PATCH] Sections display in sorted of the configuration The content in index.html is now sorted in _config.yml pages_list order. * Close PanosSakkos/personal-jekyll-theme#40 issue * Moved latest-posts to latest-post.html for conflict with blog.html * Changed the ID in sections for page.section-type * Subtracted 50 in offset Scrollspy --- _config.yml | 2 +- _includes/about.html | 2 +- _includes/career.html | 2 +- _includes/contact.html | 2 +- _includes/latest-post.html | 2 +- _layouts/index.html | 28 +++++++--------------------- blog.html => latest-post.html | 1 + 7 files changed, 13 insertions(+), 26 deletions(-) rename blog.html => latest-post.html (77%) diff --git a/_config.yml b/_config.yml index 089ff76..c746d09 100755 --- a/_config.yml +++ b/_config.yml @@ -118,7 +118,7 @@ social: pages_list: About: 'about' - Blog: 'blog' + Blog: 'latest-post' Career: 'career' Contact: 'contact' diff --git a/_includes/about.html b/_includes/about.html index deb525e..639b533 100644 --- a/_includes/about.html +++ b/_includes/about.html @@ -1,7 +1,7 @@ -
+
{{ page.content | markdownify }} diff --git a/_includes/career.html b/_includes/career.html index ccfad47..756bd66 100644 --- a/_includes/career.html +++ b/_includes/career.html @@ -1,7 +1,7 @@ -
+
diff --git a/_includes/contact.html b/_includes/contact.html index ae52cad..5d217da 100644 --- a/_includes/contact.html +++ b/_includes/contact.html @@ -1,7 +1,7 @@ -
+
diff --git a/_includes/latest-post.html b/_includes/latest-post.html index 171a72e..b71f584 100644 --- a/_includes/latest-post.html +++ b/_includes/latest-post.html @@ -1,7 +1,7 @@ -
+
diff --git a/_layouts/index.html b/_layouts/index.html index 4613a50..c851271 100755 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -6,32 +6,18 @@ {% include head.html %} - + {% include navigation.html %} {% include header.html %} - {% for page in site.pages %} - - {% if page.section-type == "about" %} - - {% include about.html %} - - {% elsif page.section-type == "latest-post" %} - - {% include latest-post.html %} - - {% elsif page.section-type == "career" %} - - {% include career.html %} - - {% elsif page.section-type == "contact" %} - - {% include contact.html %} - - {% endif %} - + {% for p in site.pages_list %} + {% for page in site.pages %} + {% if p[1] == page.section-type%} + {% include {{ page.path }} %} + {% endif %} + {% endfor %} {% endfor %} {% include footer.html %} diff --git a/blog.html b/latest-post.html similarity index 77% rename from blog.html rename to latest-post.html index 1017128..7957b23 100644 --- a/blog.html +++ b/latest-post.html @@ -1,4 +1,5 @@ --- section-type: latest-post +title: Blog --- ## Blog