Skip to content

Commit

Permalink
Initial Front Matter CMS config.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-fenton-octopus committed Nov 2, 2023
1 parent 4027da2 commit 7af0a37
Show file tree
Hide file tree
Showing 9 changed files with 943 additions and 6 deletions.
1 change: 1 addition & 0 deletions .frontmatter/database/mediaDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"users":{"steve":{"repos":{"astro-accelerator":{"public":{"img":{"astro-lighthouse.png":{"caption":"Lighthouse Score","alt":"Lighthouse score for Astro Accelerator","title":""},"frankenstein.png":{"alt":"The green leather cover of Mary Shelley's Frankenstein, decorated with silver hearts."},"surface-accessories.png":{"alt":"An oak desk with a Microsoft Suface Book, ergonomic keyboard, a modern headset."},"load-balancing-with-arr.png":{"alt":"DNS passing requests to ARR in IIS, which distributes requests between two web servers running IIS."},"test-jpg.jpg":{"alt":"A Microsoft keyboard and mouse in JPG format."},"test-webp.webp":{"alt":"A Microsoft keyboard and mouse in WEBP format."}}}}}}}}
1 change: 1 addition & 0 deletions .frontmatter/database/pinnedItemsDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions .frontmatter/database/taxonomyDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"taxonomy":{"tags":["Not Published Tag","Other","Technology","Test","Test Tag"],"categories":["Example","Sample","Test Category"]}}
30 changes: 30 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "0.2",
"language": "en-GB",
"words": [
"anim",
"astro",
"datetime",
"elem",
"emptytitle",
"figcaption",
"frontmatter",
"resp",
"sourcedata",
"srcset",
"typeof",
"vocab",
"webp"
],
"flagWords": [
"hte"
],
"ignorePaths": [
"cspell.json",
"package.json",
"package-lock.yaml",
"pnpm-lock.yaml",
"docs/credits.md",
"node_modules/**"
]
}
117 changes: 117 additions & 0 deletions frontmatter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"$schema": "https://frontmatter.codes/frontmatter.schema.json",
"frontMatter.framework.id": "astro",
"frontMatter.preview.host": "http://localhost:3000",
"frontMatter.content.publicFolder": "public/img",
"frontMatter.content.supportedFileTypes": [
"md",
"mdx"
],
"frontMatter.content.pageFolders": [
{
"title": "pages",
"path": "[[workspace]]/src/pages"
}
],
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": false,
"previewPath": "",
"filePrefix": null,
"clearEmpty": true,
"fields": [
{
"title": "layout",
"name": "layout",
"type": "string"
},
{
"title": "title",
"name": "title",
"type": "string"
},
{
"title": "subtitle",
"name": "subtitle",
"type": "string"
},
{
"title": "description",
"name": "description",
"type": "string"
},
{
"title": "pubDate",
"name": "pubDate",
"type": "datetime",
"isPublishDate": true
},
{
"title": "modDate",
"name": "modDate",
"type": "datetime",
"isModifiedDate": true
},
{
"title": "navTitle",
"name": "navTitle",
"type": "string"
},
{
"title": "navSection",
"name": "navSection",
"type": "string"
},
{
"title": "navOrder",
"name": "navOrder",
"type": "number"
}
]
}
],
"frontMatter.framework.startCommand": "pnpm dev",
"frontMatter.snippets.wrapper.enabled": false,
"frontMatter.content.snippets": {
"Image": {
"description": "Standard image",
"body": [
":::figure",
"![{{alt}}]({{&mediaUrl}})",
"::figcaption[{{caption}}]",
":::"
],
"openingTags": "{{",
"closingTags": "}}",
"isMediaSnippet": true
},
"Information box": {
"description": "Highlighted boxes.",
"body": [
":::div{.[[type]]}",
"[[message]]",
":::"
],
"fields": [
{
"name": "type",
"title": "type",
"type": "choice",
"choices": [
"note"
],
"single": true,
"default": ""
},
{
"name": "message",
"title": "message",
"type": "string",
"single": true,
"default": ""
}
]
}
}
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
"dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
"stats": "node --no-experimental-fetch ./src/themes/accelerator/utilities/stats.mjs",
"spellcheck": "git fetch origin main:refs/remotes/origin/main && git diff origin/main --name-only --diff-filter=ACMRTUXB | cspell --no-must-find-files --file-list stdin",
"test": "astro build && npx playwright install --with-deps && npx playwright test",
"build": "astro build",
"preview": "astro preview",
Expand All @@ -33,6 +34,7 @@
"@astrojs/mdx": "^1.1.1",
"astro": "^3.2.4",
"astro-accelerator-utils": "^0.3.2",
"cspell": "^7.3.7",
"csv": "^6.3.5",
"hast-util-from-selector": "^3.0.0",
"html-to-text": "^9.0.5",
Expand Down
Loading

0 comments on commit 7af0a37

Please sign in to comment.