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 setting frontmatter.content.folderCreation (boolean - default: false)
New Content Type pageBundle property. By default a file gets created, if you want to create page bundles, add the pageBundle: true setting to the Content Type.
Folder creation logic
Allow the insert media to be focussed immediately on the content folder of the content.
Ideas
Does the creation of a folder always need to happen? Or is this specific per content type?
### Discussed in https://github.com/estruyf/vscode-front-matter/discussions/140
<div type='discussions-op-text'>
<sup>Originally posted by **drwilkins** October 10, 2021</sup>
I'm using [doks](https://getdoks.org/) 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?
</div>
### Requirements
- ~~New global setting `frontmatter.content.folderCreation (boolean - default: false)`~~
- New Content Type `pageBundle` property. By default a file gets created, if you want to create page bundles, add the `pageBundle: true` setting to the Content Type.
- Folder creation logic
- Allow the insert media to be focussed immediately on the content folder of the content.
### Ideas
Does the creation of a folder always need to happen? Or is this specific per content type?
<!-- github-sync-id:1022022837 -->
@drwilkins I worked on the first implementation to support page bundles. In order to use it, you'll need to specify the new pageBundle property on the content type of your choice.
Setting it on content type level allows you to specify multiple CTs and define which ones should create these page bundles.
@drwilkins I worked on the first implementation to support page bundles. In order to use it, you'll need to specify the new `pageBundle` property on the content type of your choice.
As example:
```json
"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.
<!-- github-comment-id:939761131 -->
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.
@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.
<!-- github-comment-id:939763746 -->
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 pageBundle: true to a blog.md file in .frontmatter/templates/blog.md and then creating a new entry through frontmatter from this template, which didn't seem to work.
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 `pageBundle: true` to a blog.md file in .frontmatter/templates/blog.md and then creating a new entry through frontmatter from this template, which didn't seem to work.
<!-- github-comment-id:940218724 -->
Templates do not yet support the folder creation, this will be added next, but you'll still use the content type.
Hi @drwilkins, you will need to specify this on content type level in the `frontmatter.json` file. More information can be read here: https://beta.frontmatter.codes/docs/content-types#content-type-properties
Templates do not yet support the folder creation, this will be added next, but you'll still use the content type.
<!-- github-comment-id:940374512 -->
In the next beta version that gets released in a couple of minutes. Content created from templates now also supporting the page bundles.
In the next beta version that gets released in a couple of minutes. Content created from templates now also supporting the page bundles.
<!-- github-comment-id:940391435 -->
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.
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.
<!-- github-comment-id:940398265 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Discussed in https://github.com/estruyf/vscode-front-matter/discussions/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)pageBundleproperty. By default a file gets created, if you want to create page bundles, add thepageBundle: truesetting to the Content Type.Ideas
Does the creation of a folder always need to happen? Or is this specific per content type?
@drwilkins I worked on the first implementation to support page bundles. In order to use it, you'll need to specify the new
pageBundleproperty on the content type of your choice.As example:
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
pageBundle: trueto a blog.md file in .frontmatter/templates/blog.md and then creating a new entry through frontmatter from this template, which didn't seem to work.Hi @drwilkins, you will need to specify this on content type level in the
frontmatter.jsonfile. More information can be read here: https://beta.frontmatter.codes/docs/content-types#content-type-propertiesTemplates 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.