-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Allow content creation to create a single file or content folder #141
Comments
@drwilkins I worked on the first implementation to support page bundles. In order to use it, you'll need to specify the new As example: "frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": true,
"fields": [
{
"name": "title",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "date",
"type": "datetime"
},
{
"name": "preview",
"type": "image"
},
{
"name": "draft",
"type": "boolean"
},
{
"name": "tags",
"type": "tags"
},
{
"name": "categories",
"type": "categories"
}
]
}
] Setting it on content type level allows you to specify multiple CTs and define which ones should create these page bundles. |
@drwilkins you can now test it out in the beta version of the extension: https://beta.frontmatter.codes/docs/getting-started#beta-version Important: In order to test it, you will have to uninstall the main version of the extension. As both cannot run and be installed at the same time. Any of your configuration will not be lost in the uninstall process. |
Hey Elio, Thanks, this looks promising! So I installed the beta after uninstalling my existing version. I guess I don't understand where the json structure above should be added...Do I create a new file in .frontmatter/content? I tried adding |
Hi @drwilkins, you will need to specify this on content type level in the Templates do not yet support the folder creation, this will be added next, but you'll still use the content type. |
In the next beta version that gets released in a couple of minutes. Content created from templates now also supporting the page bundles. |
Fantastic, thanks! FYI, I don't have a frontmatter.json file. I got the approach above to work by adding your content type parameter list to .vscode/settings.json. |
Discussed in #140
Originally posted by drwilkins October 10, 2021
I'm using doks to create my site's documentation and blog. It expects blog entries to be bundled in a new subfolder; e.g. blog/new-blog-entry/, which contains index.md and any images.
Can this structure be created using vscode-front-matter when I click "Create Content" on the Dashboard?
Requirements
New global settingfrontmatter.content.folderCreation (boolean - default: false)
pageBundle
property. By default a file gets created, if you want to create page bundles, add thepageBundle: true
setting to the Content Type.Ideas
Does the creation of a folder always need to happen? Or is this specific per content type?
The text was updated successfully, but these errors were encountered: