diff --git a/config/collections/index.js b/config/collections/index.js index 3cc0c44..3149ab1 100644 --- a/config/collections/index.js +++ b/config/collections/index.js @@ -30,6 +30,6 @@ const catalogueByType = (collection) => { }; module.exports = { - postsByTag, catalogueByType, + postsByTag, }; diff --git a/eleventy.config.js b/eleventy.config.js index 1a6adbf..95ede1b 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,8 +1,8 @@ const pluginRss = require("@11ty/eleventy-plugin-rss"); const { - postsByTag, catalogueByType, + postsByTag, } = require("./config/collections/index.js"); const { dir } = require("./config/constants.js"); const { @@ -29,8 +29,8 @@ module.exports = (eleventyConfig) => { eleventyConfig.addPlugin(pluginRss); // --------------------- Custom Collections ----------------------- - eleventyConfig.addCollection("postsByTag", postsByTag); eleventyConfig.addCollection("catalogueByType", catalogueByType); + eleventyConfig.addCollection("postsByTag", postsByTag); // --------------------- Custom Filters ----------------------- eleventyConfig.addFilter("allTagCounts", allTagCounts); diff --git a/src/_data/preloads.js b/src/_data/preloads.js index 1e21ac8..3f00dff 100644 --- a/src/_data/preloads.js +++ b/src/_data/preloads.js @@ -1,4 +1,4 @@ -const { getFontUrl } = require("../../config/utils"); +const { getFontUrl } = require("../utils/fonts"); const fonts = require("../../config/design-tokens/fonts.json"); const preloads = [ diff --git a/src/about.md b/src/about.md index 022ab67..1db195f 100644 --- a/src/about.md +++ b/src/about.md @@ -2,6 +2,7 @@ layout: "layouts/base" permalink: /about/index.html title: About +tags: ["page"] --- Hello! Ahoj! Welcome to my site! diff --git a/src/admin/config.njk b/src/admin/config.njk new file mode 100644 index 0000000..ce4b25f --- /dev/null +++ b/src/admin/config.njk @@ -0,0 +1,84 @@ +--- +permalink: /admin/config.yml +--- + +backend: + name: github + repo: wonderfulfrog/wonderfulfrog.com + branch: main + +media_folder: "" + +collections: + - name: "post" + label: "Post" + folder: "src/posts" + create: true + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Excerpt", name: "excerpt", widget: "string" } + - { label: "Tags", name: "tags", widget: "list" } + - { label: "Using YouTube", name: "youtube", widget: "boolean", hint: "If using the YouTube shortcode, enable this option to append the lite-youtube script." } + - { label: "Body", name: "body", widget: "markdown" } + - label: "Page" + name: "page" + create: false + files: + {% for page in collections.page %} + - label: "{{ page.data.title }}" + name: "{{ page.fileSlug }}" + file: "{{ page.inputPath | replace("./", "") }}" + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Permalink", name: "permalink", widget: "string" } + - { label: "Layout", name: "layout", widget: "hidden", default: "layouts/base" } + - { label: "Body", name: "body", widget: "markdown" } + {% endfor %} + - name: "book" + label: "Book" + folder: "src/catalogue/books" + create: true + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Subtitle", name: "subtitle", widget: "string" } + - { label: "Author", name: "author", widget: "string" } + - { label: "Rating", name: "rating", widget: "number", min: 1, max: 5 } + - { label: "Image", name: "image", widget: "string", hint: "A CDN URL."} + - { label: "Tags", name: "tags", widget: "list" } + - { label: "Body", name: "body", widget: "markdown" } + - name: "game" + label: "Game" + folder: "src/catalogue/games" + create: true + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Subtitle", name: "subtitle", widget: "string" } + - { label: "Year", name: "year", widget: "string" } + - { label: "Rating", name: "rating", widget: "number", min: 1, max: 5 } + - { label: "Image", name: "image", widget: "string", hint: "A CDN URL."} + - { label: "Tags", name: "tags", widget: "list" } + - { label: "Body", name: "body", widget: "markdown" } + - name: "comic" + label: "Comic" + folder: "src/catalogue/comics" + create: true + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "Publisher", name: "publisher", widget: "string" } + - { label: "Author", name: "author", widget: "string" } + - { label: "Year", name: "year", widget: "string" } + - { label: "Rating", name: "rating", widget: "number", min: 1, max: 5 } + - { label: "Image", name: "image", widget: "string", hint: "A CDN URL."} + - { label: "Tags", name: "tags", widget: "list" } + - { label: "Body", name: "body", widget: "markdown" } + - name: "podcast" + label: "Podcast" + folder: "src/catalogue/podcasts" + create: true + fields: + - { label: "Title", name: "title", widget: "string" } + - { label: "URL", name: "url", widget: "string", hint: "A URL for someone to listen to the podcast." } + - { label: "Rating", name: "rating", widget: "number", min: 1, max: 5 } + - { label: "Image", name: "image", widget: "string", hint: "A CDN URL."} + - { label: "Tags", name: "tags", widget: "list" } + - { label: "Body", name: "body", widget: "markdown" } diff --git a/src/admin/index.html b/src/admin/index.html new file mode 100644 index 0000000..41ba161 --- /dev/null +++ b/src/admin/index.html @@ -0,0 +1,17 @@ +--- +permalink: admin/index.html +--- + + + +
+ + + +