diff --git a/_includes/layouts/page.njk b/_includes/layouts/page.njk new file mode 100644 index 0000000..41de18b --- /dev/null +++ b/_includes/layouts/page.njk @@ -0,0 +1,51 @@ +--- +layout: layouts/base.njk +withSidebar: true +--- +{# Layout for slash pages (/about, /now, /uses, etc.) #} +{# These are root-level pages created via Indiekit's page post type #} + +
+
+

+ {{ title }} +

+ {% if summary %} +

+ {{ summary }} +

+ {% endif %} + {% if updated %} +

+ Last updated: +

+ {% endif %} +
+ +
+ {{ content | safe }} +
+ + {# Categories/tags if present #} + {% if category %} + + {% endif %} + + {# Hidden metadata for microformats #} + + +
diff --git a/eleventy.config.js b/eleventy.config.js index a6c5238..7dc717a 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -339,6 +339,14 @@ export default function (eleventyConfig) { .sort((a, b) => b.date - a.date); }); + // Pages collection - root-level slash pages (about, now, uses, etc.) + // These are stored in content/pages/ and output to /{slug}/ + eleventyConfig.addCollection("pages", function (collectionApi) { + return collectionApi + .getFilteredByGlob("content/pages/**/*.md") + .sort((a, b) => (a.data.title || "").localeCompare(b.data.title || "")); + }); + // All content combined for homepage feed eleventyConfig.addCollection("feed", function (collectionApi) { return collectionApi diff --git a/slashes.njk b/slashes.njk new file mode 100644 index 0000000..3a1de7b --- /dev/null +++ b/slashes.njk @@ -0,0 +1,107 @@ +--- +layout: layouts/base.njk +title: Slash Pages +withSidebar: true +permalink: /slashes/ +--- +
+

Slash Pages

+

+ Root-level pages on this site. Inspired by slashpages.net. + ({{ collections.pages.length }} total) +

+ + {# Static pages (hardcoded in theme) #} +
+

Site Pages

+ +
+ + {# Dynamic pages (created via Indiekit) #} + {% if collections.pages.length > 0 %} +
+

Dynamic Pages

+ +
+ {% endif %} + + {# Inspiration section #} +
+

Want more slash pages?

+

+ Check out slashpages.net + for inspiration on pages like /now, /uses, /colophon, /blogroll, and more. +

+
+