From 24a16f8557e87c5a8dd9fee1df34770f3601f554 Mon Sep 17 00:00:00 2001 From: Devin Haska Date: Thu, 1 Feb 2024 21:31:31 -0800 Subject: [PATCH] feat: add books collection --- src/content/books/a-test-book.md | 7 +++++++ src/content/books/books.json | 5 +++++ src/content/pages/books.md | 10 ++++++++++ 3 files changed, 22 insertions(+) create mode 100644 src/content/books/a-test-book.md create mode 100644 src/content/books/books.json create mode 100644 src/content/pages/books.md diff --git a/src/content/books/a-test-book.md b/src/content/books/a-test-book.md new file mode 100644 index 0000000..f427607 --- /dev/null +++ b/src/content/books/a-test-book.md @@ -0,0 +1,7 @@ +--- +title: Here is my test book +--- + +# A test book + +Here we go!! diff --git a/src/content/books/books.json b/src/content/books/books.json new file mode 100644 index 0000000..f955713 --- /dev/null +++ b/src/content/books/books.json @@ -0,0 +1,5 @@ +{ + "layout": "base", + "tags": "books", + "permalink": "books/{{ page.fileSlug }}/index.html" +} diff --git a/src/content/pages/books.md b/src/content/pages/books.md new file mode 100644 index 0000000..9e0b05a --- /dev/null +++ b/src/content/pages/books.md @@ -0,0 +1,10 @@ +--- +permalink: /books/index.html +layout: "base" +--- + +# Books page + +{% for book in collections.books %} +{{ book.data.title }} +{% endfor %}