Skip to content

Commit

Permalink
chore(config): update frontmatter configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsneighbour committed Oct 14, 2023
1 parent 191cfd3 commit 24696fe
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .frontmatter/config/content/pagefolders/blog.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"$schema": "https://frontmatter.codes/config/content.pagefolders.schema.json",
"title": "Blog Posts",
"path": "[[workspace]]/content/blog",
"previewPath": "/yyyy/",
//"previewPath": "/yyyy/",
"contentTypes": ["blog", "music2program2", "notes-from-the-laboratory"]
}
3 changes: 2 additions & 1 deletion .frontmatter/config/custom/scripts/screenshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
"command": "~/.nvm/versions/node/v20.4.0/bin/node",
"script": "./.frontmatter/scripts/screenshot-header-image.js",
"title": "Retrieve Screenshot"
"title": "Retrieve Screenshot",
"contentTypes": ["blog"]
}
3 changes: 2 additions & 1 deletion .frontmatter/config/custom/scripts/unsplash.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"$schema": "https://frontmatter.codes/config/custom.scripts.schema.json",
"command": "~/.nvm/versions/node/v20.4.0/bin/node",
"script": "./.frontmatter/scripts/retrieve-unsplash-header-image-info.mjs",
"title": "Retrieve Unsplash image"
"title": "Retrieve Unsplash image",
"contentTypes": ["blog"]
}
3 changes: 2 additions & 1 deletion .frontmatter/config/custom/scripts/youtube.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"title": "Generate social image for Youtube",
"script": "./.frontmatter/scripts/create-youtube-header-image.js",
"command": "~/.nvm/versions/node/v20.4.0/bin/node",
"type": "content"
"type": "content",
"contentTypes": ["blog"]
}
14 changes: 14 additions & 0 deletions .frontmatter/frontmatter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const path = require('path');
const uuid = require('uuid');
require('dotenv').config({
path: path.join(__dirname, `.env`)
});

module.exports = async (config) => {
return {
...config,
test: process.env.TESTING,
dir: __dirname,
id: uuid.v4(),
}
};
11 changes: 10 additions & 1 deletion frontmatter.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@
"frontMatter.content.supportedFileTypes": ["md"],
"frontMatter.taxonomy.dateFormat": "yyyy-MM-dd'T'H:mm:ssxxx",
"frontMatter.taxonomy.indentArrays": false,
"frontMatter.taxonomy.noPropertyValueQuotes": ["date"]
"frontMatter.taxonomy.noPropertyValueQuotes": ["date"],
"frontMatter.panel.actions.disabled": [
"openDashboard",
"createContent",
"optimizeSlug",
//"preview",
//"openOnWebsite",
"startStopServer",
"customActions"
]
}

0 comments on commit 24696fe

Please sign in to comment.