diff --git a/.mattrbld/collections/pages.json b/.mattrbld/collections/pages.json new file mode 100644 index 0000000..6e918aa --- /dev/null +++ b/.mattrbld/collections/pages.json @@ -0,0 +1,21 @@ +{ + "allowedTypes": [], + "defaultFilename": null, + "dir": "/src", + "disableComments": false, + "disablePreview": false, + "draftByDefault": false, + "linkable": true, + "maxSize": null, + "permissions": { + "everybody": [ + "everything" + ] + }, + "rawEntityNames": false, + "schemas": [ + "/.mattrbld/schemas/page.json" + ], + "type": "md", + "urlTemplate": "/:title/" +} \ No newline at end of file diff --git a/.mattrbld/config.json b/.mattrbld/config.json index dd72ebb..0650a3c 100644 --- a/.mattrbld/config.json +++ b/.mattrbld/config.json @@ -4,23 +4,6 @@ "corsProxy": "/corsprox", "name": "mattrbld-test", "sidebar": [ - { - "label": "The sidebar has not yet been configured for this project" - }, - { - "icon": "wrench-and-driver", - "label": "Configure now", - "target": { - "name": "Project.Settings", - "query": { - "tab": "sidebar" - } - }, - "onlyPrivileged": true - }, - { - "separator": true - }, { "label": "Dashboard", "icon": "grid", @@ -29,6 +12,16 @@ }, "protected": true }, + { + "icon": "globe-alt", + "label": "pages", + "target": { + "name": "Project.Collection", + "params": { + "path": "/.mattrbld/collections/pages.json" + } + } + }, { "label": "Media Library", "icon": "image-stack", @@ -62,9 +55,68 @@ "previewUrl": null, "languages": [], "media": { - "advanced": false, - "customFields": null, - "dir": null, + "advanced": true, + "customFields": [ + { + "type": "text", + "default": null, + "icon": "text-input", + "key": "alt", + "label": "Alternative Text", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "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": "title", + "label": "Title", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "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 + } + } + } + ], + "dir": "/src/images", "maxSize": null, "outputPath": null, "permissions": { diff --git a/.mattrbld/media/dscf-3866.JPG.json b/.mattrbld/media/dscf-3866.JPG.json new file mode 100644 index 0000000..22e7d9f --- /dev/null +++ b/.mattrbld/media/dscf-3866.JPG.json @@ -0,0 +1,4 @@ +{ + "alt": "chickadee", + "title": null +} \ No newline at end of file diff --git a/.mattrbld/schemas/page.json b/.mattrbld/schemas/page.json new file mode 100644 index 0000000..20ae492 --- /dev/null +++ b/.mattrbld/schemas/page.json @@ -0,0 +1,138 @@ +{ + "fields": [ + { + "type": "text", + "default": null, + "icon": "text-input", + "key": "title", + "label": "Title", + "localised": false, + "options": { + "wrapping": true, + "multiline": false + }, + "tab": "data", + "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": "image", + "default": null, + "icon": "image", + "key": "hero", + "label": "Hero image", + "options": { + "resolutionHint": "", + "removable": true, + "simple": false + }, + "tab": "data", + "validation": { + "max": null, + "required": false, + "unit": "filesize (MB)" + }, + "value": null, + "version": 1, + "visibility": { + "hidden": false, + "showByValue": { + "field": null + } + } + }, + { + "type": "rich text", + "default": null, + "icon": "text", + "key": "content", + "label": "Body", + "localised": false, + "options": { + "outputFormat": "markdown", + "blockFormats": [ + "blockquote", + "heading", + "hr", + "orderedList", + "unorderedList", + "image", + "codeBlock" + ], + "inlineFormats": [ + "em", + "strong", + "link", + "code", + "strike" + ], + "formatOptions": [ + "allowQuoteFooters", + "allowNestedLists", + "allowImageCaptions" + ], + "inputRuleOptions": [ + "autoquotes", + "dashes", + "ellipsis", + "noDoubleCaps", + "noDoubleSpace" + ], + "minHeading": 2, + "maxHeading": 4, + "codeLangs": [ + "html", + "css", + "javascript", + "markdown" + ], + "allowRaw": false, + "urlTemplate": "/:title/", + "urlSuffix": "", + "linkOptions": [ + "allowExternal", + "allowInternal" + ] + }, + "tab": "data", + "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 + } + } + } + ], + "tabs": [ + { + "label": "data", + "groupAs": null + } + ] +} \ No newline at end of file diff --git a/src/images/.gitkeep b/src/images/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/src/images/dscf-3866.JPG b/src/images/dscf-3866.JPG new file mode 100644 index 0000000..811ff22 Binary files /dev/null and b/src/images/dscf-3866.JPG differ diff --git a/src/index.md b/src/index.md new file mode 100644 index 0000000..8fbcedb --- /dev/null +++ b/src/index.md @@ -0,0 +1,61 @@ +--- +title: This is my home page +hero: + src: /src/images/dscf-3866.JPG + alt: chickadee + title: null +___mb_schema: /.mattrbld/schemas/page.json +--- +## Here’s an h2 + +This is a paragraph. + +This is another paragraph. It might be a bit longer. + +- Here’s a list. + +- It’s nice, the editor automatically turns dashes into lists + + +And I can double-enter to get out of the list. + +### Here’s an h3 + +Similarly, the editor understands markdown notation for headings. That’s really handy. I also like that I can prevent editors from creating h1s (or h5/h6, who needs those). + +#### Let’s do some formatting + +*Italics.* **Bold!** ***Bold and italic.*** There’s even ~~strikethrough~~. + +Inline `code blocks` work as well, though they don’t pick up on markdown formatting. + +> Blockquotes work like this. + +Let’s add a link. Here’s my [website](https://leecat.art). They let you choose internal vs. external. Annoyingly, in the rich text editor links are only distinguishable via color, so that’s a bit of an accessibility fail. + +## Let’s do more with lists + +1. Here’s an ordered list + + 1. it has a nested ordered list inside of it! + + 2. How fancy. + +2. You can of course tab and shift+tab to change your list level. + + +--- + +We’ve got some lovely horizontal rules as well. + +## Markdown attrs plugin + +Now, let’s see if our markdown attributes feature works. Here’s my [website again](https://leecat.art){rel=”external”}. I suspect the smart quotes will cause issues! So that may not work. + +## Images + +![chickadee! wahoo!](/src/images/dscf-3866.JPG) + +We’ve added an image above. I tried to add alt text, but I’m not sure that Eleventy will pick up on that. + +Ok, let’s push this and see what we get.