From 7d8f5b68486f00fb498d257e0c7a6a7cbf59fb3d Mon Sep 17 00:00:00 2001 From: Eugene Bannykh Date: Mon, 8 Oct 2018 11:33:58 -0500 Subject: [PATCH] Build all navigations from _data/*.yml Converts footer links to the .yml data --- _data/footer-links.yml | 21 ++++++++++++++++++ _includes/layout/footer-links.html | 22 +++++-------------- .../layout/{toc-entry.html => nav-item.html} | 15 ++++++------- _includes/layout/navigation.html | 6 ++--- _includes/layout/sidebar.html | 6 ++--- 5 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 _data/footer-links.yml rename _includes/layout/{toc-entry.html => nav-item.html} (83%) diff --git a/_data/footer-links.yml b/_data/footer-links.yml new file mode 100644 index 00000000000..e48593d2687 --- /dev/null +++ b/_data/footer-links.yml @@ -0,0 +1,21 @@ +- label: Become a Contributor + url: https://github.com/magento/devdocs/blob/master/.github/CONTRIBUTING.md + +- label: Glossary + url: https://magento.github.io/glossary/index.html?audience=developer + +- label: Privacy Policy + url: https://magento.com/legal/terms/privacy/ + +- label: Terms of Service + url: https://magento.com/legal/terms/ + +- label: License/Trademark FAQ + url: https://magento.com/legal/licensing/ + +- label: Release Notes + url: /release-notes/bk-release-notes.html + +- label: Third-Party Licenses + url: /magento-third-party.html + versionless: true diff --git a/_includes/layout/footer-links.html b/_includes/layout/footer-links.html index b8347571764..026b60db3d7 100644 --- a/_includes/layout/footer-links.html +++ b/_includes/layout/footer-links.html @@ -1,19 +1,7 @@ +{% assign items = site.data.footer-links %} + diff --git a/_includes/layout/toc-entry.html b/_includes/layout/nav-item.html similarity index 83% rename from _includes/layout/toc-entry.html rename to _includes/layout/nav-item.html index f57a1c66119..e30668b6e5f 100644 --- a/_includes/layout/toc-entry.html +++ b/_includes/layout/nav-item.html @@ -26,17 +26,16 @@ {% assign compare_url = page.url | prepend: site.baseurl %}
  • {% if item.url %} - {{ item.label }} + {{ item.label }} {% else %} - {{ item.label }} + {{ item.label }} {% endif %} - {% if children %} - + {% endif %}
  • {% endif %} diff --git a/_includes/layout/navigation.html b/_includes/layout/navigation.html index 5a853b7c6cd..941fc52df76 100644 --- a/_includes/layout/navigation.html +++ b/_includes/layout/navigation.html @@ -21,12 +21,12 @@ {% else if %} - {% include layout/main-nav-item.html item=subsection %} + {% include layout/nav-item.html section=subsection %} {% endif %} {% endfor %} {% endcapture %} @@ -47,4 +47,4 @@ {% endfor %} - \ No newline at end of file + diff --git a/_includes/layout/sidebar.html b/_includes/layout/sidebar.html index a1586b80848..9286f56dbed 100644 --- a/_includes/layout/sidebar.html +++ b/_includes/layout/sidebar.html @@ -4,12 +4,12 @@ - \ No newline at end of file +