From 1dbb9656307e74ac09d31c18d3ae6bcc033f0f1d Mon Sep 17 00:00:00 2001 From: Lee Cattarin Date: Fri, 25 Sep 2026 10:25:19 -0700 Subject: [PATCH] nav setup --- .mattrbld/schemas/page.json | 116 ++++++++++++++++++++++++++++++++++++ src/pages/about-cat.md | 10 ++++ src/pages/about.md | 10 ++++ src/pages/contact.md | 5 ++ src/pages/index.md | 5 ++ 5 files changed, 146 insertions(+) create mode 100644 src/pages/about-cat.md create mode 100644 src/pages/about.md diff --git a/.mattrbld/schemas/page.json b/.mattrbld/schemas/page.json index 5bf8036..bb2094e 100644 --- a/.mattrbld/schemas/page.json +++ b/.mattrbld/schemas/page.json @@ -100,12 +100,128 @@ "field": null } } + }, + { + "type": "text", + "default": null, + "icon": "text-input", + "key": "key", + "label": "Key", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "tab": "Navigation", + "validation": { + "enforceMinMax": true, + "max": null, + "min": null, + "regex": null, + "regexError": null, + "required": true, + "unit": "length" + }, + "value": null, + "version": 1, + "visibility": { + "hidden": false, + "showByValue": { + "field": null + } + } + }, + { + "type": "text", + "default": null, + "icon": "text-input", + "key": "title", + "label": "Title (will default to key if not set)", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "tab": "Navigation", + "validation": { + "enforceMinMax": true, + "max": null, + "min": null, + "regex": null, + "regexError": null, + "required": false, + "unit": "length" + }, + "value": null, + "version": 1, + "visibility": { + "hidden": false, + "showByValue": { + "field": null + } + } + }, + { + "type": "text", + "default": null, + "icon": "text-input", + "key": "parent", + "label": "Parent key (for nested menus)", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "tab": "Navigation", + "validation": { + "enforceMinMax": true, + "max": null, + "min": null, + "regex": null, + "regexError": null, + "required": false, + "unit": "length" + }, + "value": null, + "version": 1, + "visibility": { + "hidden": false, + "showByValue": { + "field": null + } + } + }, + { + "type": "number", + "default": null, + "icon": "number", + "key": "order", + "label": "Order in nav (1, 2, 3...)", + "localised": false, + "tab": "Navigation", + "validation": { + "max": null, + "min": "", + "required": false + }, + "value": null, + "version": 1, + "visibility": { + "hidden": false, + "showByValue": { + "field": null + } + } } ], "tabs": [ { "label": "Content", "groupAs": null + }, + { + "label": "Navigation", + "groupAs": "eleventyNavigation" } ] } \ No newline at end of file diff --git a/src/pages/about-cat.md b/src/pages/about-cat.md new file mode 100644 index 0000000..0f6f207 --- /dev/null +++ b/src/pages/about-cat.md @@ -0,0 +1,10 @@ +--- +title: About my cat +eleventyNavigation: + key: about my cat + title: null + parent: about + order: null +___mb_schema: /.mattrbld/schemas/page.json +--- +I love my cat diff --git a/src/pages/about.md b/src/pages/about.md new file mode 100644 index 0000000..ff04b92 --- /dev/null +++ b/src/pages/about.md @@ -0,0 +1,10 @@ +--- +title: About me +eleventyNavigation: + key: about + title: null + parent: null + order: 3 +___mb_schema: /.mattrbld/schemas/page.json +--- +Here’s some body text diff --git a/src/pages/contact.md b/src/pages/contact.md index 1de188c..bfb9caa 100644 --- a/src/pages/contact.md +++ b/src/pages/contact.md @@ -1,5 +1,10 @@ --- title: Contact ___mb_schema: /.mattrbld/schemas/page.json +eleventyNavigation: + key: contact + title: '' + parent: null + order: 2 --- Here’s how to contact me. diff --git a/src/pages/index.md b/src/pages/index.md index 650844b..3d05dad 100644 --- a/src/pages/index.md +++ b/src/pages/index.md @@ -2,5 +2,10 @@ permalink: index.html title: Home ___mb_schema: /.mattrbld/schemas/page.json +eleventyNavigation: + key: home + title: null + parent: null + order: 1 --- Hello! Welcome to my website.