diff --git a/site/_docs/assets.md b/site/_docs/assets.md index c2965bdf..e82ddb30 100644 --- a/site/_docs/assets.md +++ b/site/_docs/assets.md @@ -1,8 +1,6 @@ --- layout: docs title: Assets -prev_section: datafiles -next_section: migrations permalink: /docs/assets/ --- diff --git a/site/_docs/collections.md b/site/_docs/collections.md index 2acf7dae..fcda98ba 100644 --- a/site/_docs/collections.md +++ b/site/_docs/collections.md @@ -1,8 +1,6 @@ --- layout: docs title: Collections -prev_section: variables -next_section: datafiles permalink: /docs/collections/ --- diff --git a/site/_docs/configuration.md b/site/_docs/configuration.md index 488bb86e..ad34fb68 100644 --- a/site/_docs/configuration.md +++ b/site/_docs/configuration.md @@ -1,8 +1,6 @@ --- layout: docs title: Configuration -prev_section: structure -next_section: frontmatter permalink: /docs/configuration/ --- diff --git a/site/_docs/continuous-integration.md b/site/_docs/continuous-integration.md index 0e2b3a5c..5e8a700b 100644 --- a/site/_docs/continuous-integration.md +++ b/site/_docs/continuous-integration.md @@ -1,8 +1,6 @@ --- layout: docs title: Continuous Integration -prev_section: deployment-methods -next_section: troubleshooting permalink: /docs/continuous-integration/ --- diff --git a/site/_docs/contributing.md b/site/_docs/contributing.md index e3dbe807..9f4a334f 100644 --- a/site/_docs/contributing.md +++ b/site/_docs/contributing.md @@ -1,8 +1,6 @@ --- layout: docs title: Contributing -prev_section: upgrading -next_section: history permalink: /docs/contributing/ --- diff --git a/site/_docs/datafiles.md b/site/_docs/datafiles.md index 7088fec4..7f54a279 100644 --- a/site/_docs/datafiles.md +++ b/site/_docs/datafiles.md @@ -1,8 +1,6 @@ --- layout: docs title: Data Files -prev_section: collections -next_section: assets permalink: /docs/datafiles/ --- diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index 2ab929b2..ddf571d4 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -1,8 +1,6 @@ --- layout: docs title: Deployment methods -prev_section: github-pages -next_section: continuous-integration permalink: /docs/deployment-methods/ --- diff --git a/site/_docs/drafts.md b/site/_docs/drafts.md index 959964d0..2f2f12b5 100644 --- a/site/_docs/drafts.md +++ b/site/_docs/drafts.md @@ -1,8 +1,6 @@ --- layout: docs title: Working with drafts -prev_section: posts -next_section: pages permalink: /docs/drafts/ --- diff --git a/site/_docs/extras.md b/site/_docs/extras.md index 5bdf2c73..2af6a305 100644 --- a/site/_docs/extras.md +++ b/site/_docs/extras.md @@ -1,8 +1,6 @@ --- layout: docs title: Extras -prev_section: plugins -next_section: github-pages permalink: /docs/extras/ --- diff --git a/site/_docs/frontmatter.md b/site/_docs/frontmatter.md index 998be544..9ce032df 100644 --- a/site/_docs/frontmatter.md +++ b/site/_docs/frontmatter.md @@ -1,8 +1,6 @@ --- layout: docs title: Front Matter -prev_section: configuration -next_section: posts permalink: /docs/frontmatter/ --- diff --git a/site/_docs/github-pages.md b/site/_docs/github-pages.md index 83af0b3c..eac7d1ea 100644 --- a/site/_docs/github-pages.md +++ b/site/_docs/github-pages.md @@ -1,8 +1,6 @@ --- layout: docs title: GitHub Pages -prev_section: extras -next_section: deployment-methods permalink: /docs/github-pages/ --- diff --git a/site/_docs/history.md b/site/_docs/history.md index 6485dada..01b77d27 100644 --- a/site/_docs/history.md +++ b/site/_docs/history.md @@ -2,7 +2,6 @@ layout: docs title: History permalink: "/docs/history/" -prev_section: contributing --- ## 2.5.3 / 2014-12-22 diff --git a/site/_docs/index.md b/site/_docs/index.md index 27b2da25..633d7534 100644 --- a/site/_docs/index.md +++ b/site/_docs/index.md @@ -1,7 +1,6 @@ --- layout: docs title: Welcome -next_section: quickstart permalink: /docs/home/ --- diff --git a/site/_docs/installation.md b/site/_docs/installation.md index 058879e9..0f4398b3 100644 --- a/site/_docs/installation.md +++ b/site/_docs/installation.md @@ -1,8 +1,6 @@ --- layout: docs title: Installation -prev_section: quickstart -next_section: usage permalink: /docs/installation/ --- diff --git a/site/_docs/migrations.md b/site/_docs/migrations.md index a080c6c6..0544341a 100644 --- a/site/_docs/migrations.md +++ b/site/_docs/migrations.md @@ -1,8 +1,6 @@ --- layout: docs title: Blog migrations -prev_section: assets -next_section: templates permalink: /docs/migrations/ --- diff --git a/site/_docs/pages.md b/site/_docs/pages.md index ea59649e..d3008daf 100644 --- a/site/_docs/pages.md +++ b/site/_docs/pages.md @@ -1,8 +1,6 @@ --- layout: docs title: Creating pages -prev_section: drafts -next_section: variables permalink: /docs/pages/ --- diff --git a/site/_docs/pagination.md b/site/_docs/pagination.md index 245ba36f..c2662f04 100644 --- a/site/_docs/pagination.md +++ b/site/_docs/pagination.md @@ -1,8 +1,6 @@ --- layout: docs title: Pagination -prev_section: permalinks -next_section: plugins permalink: /docs/pagination/ --- diff --git a/site/_docs/permalinks.md b/site/_docs/permalinks.md index dbcee2e2..7a47cc68 100644 --- a/site/_docs/permalinks.md +++ b/site/_docs/permalinks.md @@ -1,8 +1,6 @@ --- layout: docs title: Permalinks -prev_section: templates -next_section: pagination permalink: /docs/permalinks/ --- diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md index 0bcbe3ab..cf0aab6e 100644 --- a/site/_docs/plugins.md +++ b/site/_docs/plugins.md @@ -1,8 +1,6 @@ --- layout: docs title: Plugins -prev_section: pagination -next_section: extras permalink: /docs/plugins/ --- diff --git a/site/_docs/posts.md b/site/_docs/posts.md index 504ea2fb..b1508c3e 100644 --- a/site/_docs/posts.md +++ b/site/_docs/posts.md @@ -1,8 +1,6 @@ --- layout: docs title: Writing posts -prev_section: frontmatter -next_section: drafts permalink: /docs/posts/ --- diff --git a/site/_docs/quickstart.md b/site/_docs/quickstart.md index 66cd9450..666ac03d 100644 --- a/site/_docs/quickstart.md +++ b/site/_docs/quickstart.md @@ -1,8 +1,6 @@ --- layout: docs title: Quick-start guide -prev_section: home -next_section: installation permalink: /docs/quickstart/ --- diff --git a/site/_docs/resources.md b/site/_docs/resources.md index 6acba837..71447b53 100644 --- a/site/_docs/resources.md +++ b/site/_docs/resources.md @@ -1,8 +1,6 @@ --- layout: docs title: Resources -prev_section: sites -next_section: upgrading permalink: /docs/resources/ --- diff --git a/site/_docs/sites.md b/site/_docs/sites.md index 4e57aba7..c11da820 100644 --- a/site/_docs/sites.md +++ b/site/_docs/sites.md @@ -1,8 +1,6 @@ --- layout: docs title: Sites using Jekyll -prev_section: troubleshooting -next_section: resources permalink: /docs/sites/ --- diff --git a/site/_docs/structure.md b/site/_docs/structure.md index 2dca3e6b..848f1cce 100644 --- a/site/_docs/structure.md +++ b/site/_docs/structure.md @@ -1,8 +1,6 @@ --- layout: docs title: Directory structure -prev_section: usage -next_section: configuration permalink: /docs/structure/ --- diff --git a/site/_docs/templates.md b/site/_docs/templates.md index c0825702..12a70fc4 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -1,8 +1,6 @@ --- layout: docs title: Templates -prev_section: migrations -next_section: permalinks permalink: /docs/templates/ --- diff --git a/site/_docs/troubleshooting.md b/site/_docs/troubleshooting.md index 4bb12be8..87da91fb 100644 --- a/site/_docs/troubleshooting.md +++ b/site/_docs/troubleshooting.md @@ -1,8 +1,6 @@ --- layout: docs title: Troubleshooting -prev_section: deployment-methods -next_section: sites permalink: /docs/troubleshooting/ --- diff --git a/site/_docs/upgrading.md b/site/_docs/upgrading.md index 3a3f1670..879546c6 100644 --- a/site/_docs/upgrading.md +++ b/site/_docs/upgrading.md @@ -1,8 +1,6 @@ --- layout: docs title: Upgrading -prev_section: resources -next_section: contributing permalink: /docs/upgrading/ --- diff --git a/site/_docs/usage.md b/site/_docs/usage.md index 7fb719ee..38dabf7f 100644 --- a/site/_docs/usage.md +++ b/site/_docs/usage.md @@ -1,8 +1,6 @@ --- layout: docs title: Basic Usage -prev_section: installation -next_section: structure permalink: /docs/usage/ --- diff --git a/site/_docs/variables.md b/site/_docs/variables.md index 1c62bf83..628a9904 100644 --- a/site/_docs/variables.md +++ b/site/_docs/variables.md @@ -1,8 +1,6 @@ --- layout: docs title: Variables -prev_section: pages -next_section: collections permalink: /docs/variables/ --- diff --git a/site/_docs/windows.md b/site/_docs/windows.md index 81e909c9..7642592c 100644 --- a/site/_docs/windows.md +++ b/site/_docs/windows.md @@ -1,8 +1,6 @@ --- layout: docs title: Jekyll on Windows -prev_section: configuration -next_section: posts permalink: /docs/windows/ --- diff --git a/site/_includes/section_nav.html b/site/_includes/section_nav.html index edba1931..2016997e 100644 --- a/site/_includes/section_nav.html +++ b/site/_includes/section_nav.html @@ -1,22 +1,39 @@ -
-
- {% if page.prev_section != null %} - - {% else %} - Back - {% endif %} -
-
- {% if page.next_section != null %} - - {% else %} - Next - {% endif %} -
-
-
+{% comment %} +Map grabs the doc sections, giving us an array of arrays. Join, flattens all +the items to a comma delimited string. Split turns it into an array again. +{% endcomment %} +{% assign docs = site.data.docs | map: 'docs' | join: ',' | split: ',' %} +{% comment %} +Because this is built for every page, lets find where we are in the ordered +document list by comparing url strings. Then if there's something previous or +next, lets build a link to it. +{% endcomment %} + +{% for document in docs %} + {% assign document_url = document | prepend:"/docs/" | append:"/" %} + {% if document_url == page.url %} +
+
+ {% if forloop.first %} + Back + {% else %} + {% assign previous = forloop.index0 | minus: 1 %} + {% assign previous_page = docs[previous] | prepend:"/docs/" | append:"/" %} + + {% endif %} +
+
+ {% if forloop.last %} + Next + {% else %} + {% assign next = forloop.index0 | plus: 1 %} + {% assign next_page = docs[next] | prepend:"/docs/" | append:"/" %} + + {% endif %} +
+
+
+ {% break %} + {% endif %} +{% endfor %} \ No newline at end of file