From f870ecd50c94b5845051007787b9d05be65a55c3 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Thu, 2 Jan 2020 20:51:47 -0600 Subject: [PATCH] Switches to use more obvious markup menu template for eleventy-navigation --- .eleventy.js | 3 ++- _includes/layouts/base.njk | 15 +++++++-------- about/index.md | 2 +- archive.njk | 2 +- package.json | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 2eadfa6..adb44cd 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -78,8 +78,9 @@ module.exports = function(eleventyConfig) { // If you don’t have a subdirectory, use "" or "/" (they do the same thing) // This is only used for link URLs (it does not affect your file structure) - // You can also pass this in on the command line using `--pathprefix` + // Best paired with the `url` filter: https://www.11ty.io/docs/filters/url/ + // You can also pass this in on the command line using `--pathprefix` // pathPrefix: "/", markdownTemplateEngine: "liquid", diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index 8866888..41be5c1 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -13,20 +13,19 @@

{{ metadata.title }}

- {#- Read more about `eleventy-navigation` at https://github.com/11ty/eleventy-navigation #} - {{ collections.all | eleventyNavigation | eleventyNavigationToHtml({ - listClass: "nav", - listItemClass: "nav-item", - activeListItemClass: "nav-item-active", - activeKey: eleventyNavigation.key - }) | safe }} + {#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #} +
  1. Edit the _data/metadata.json with your blog’s information.
  2. -
  3. (Optional) Edit .eleventy.js with your configuration preferences.
  4. +
  5. (Optional) Edit .eleventy.js with your [configuration preferences](https://www.11ty.dev/docs/config/).
  6. Delete this message from _includes/layouts/base.njk.

This is an Eleventy project created from the eleventy-base-blog repo.

diff --git a/about/index.md b/about/index.md index 95f70a4..c74e8ba 100644 --- a/about/index.md +++ b/about/index.md @@ -4,7 +4,7 @@ title: About Me templateClass: tmpl-post eleventyNavigation: key: About Me - order: 2 + order: 3 --- I am a person that writes stuff. diff --git a/archive.njk b/archive.njk index 232f770..0b277a8 100644 --- a/archive.njk +++ b/archive.njk @@ -3,7 +3,7 @@ layout: layouts/home.njk permalink: /posts/ eleventyNavigation: key: Archive - order: 3 + order: 2 ---

Archive

diff --git a/package.json b/package.json index e78baf3..ac2a0e9 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ "homepage": "https://github.com/11ty/eleventy-base-blog#readme", "devDependencies": { "@11ty/eleventy": "^0.9.0", - "@11ty/eleventy-navigation": "^0.1.1", + "@11ty/eleventy-navigation": "^0.1.3", "@11ty/eleventy-plugin-rss": "^1.0.7", - "@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3", - "luxon": "^1.12.0", + "@11ty/eleventy-plugin-syntaxhighlight": "^3.0.0", + "luxon": "^1.21.3", "markdown-it": "^8.4.2", - "markdown-it-anchor": "^5.0.2" + "markdown-it-anchor": "^5.2.5" } }