Skip to content

Commit 5d9cd08

Browse files
committed
Merge branch 'dev'
2 parents ebbaeda + 7b943c7 commit 5d9cd08

File tree

13 files changed

+336
-26
lines changed

13 files changed

+336
-26
lines changed

.frontmatter/database/mediaDb.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

content/changelog/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change Log
22

3-
## [9.4.0] - 2023-xx-xx
3+
## [9.4.0] - 2023-12-12 - [Release notes](https://beta.frontmatter.codes/updates/v9.4.0)
44

55
### ✨ New features
66

@@ -17,6 +17,7 @@
1717
- [#709](https://github.com/estruyf/vscode-front-matter/issues/709): Take "where clause" into account on content creation
1818
- [#710](https://github.com/estruyf/vscode-front-matter/issues/710): Hide child field when parent field its "when clause" is not met, also remove the fields from the content
1919
- [#713](https://github.com/estruyf/vscode-front-matter/issues/713): Add the ability to always use quotes around string values in front matter
20+
- [#722](https://github.com/estruyf/vscode-front-matter/issues/722): Allow to create sub-content which shows a dialog to select the parent folder
2021

2122
### ⚡️ Optimizations
2223

@@ -37,7 +38,9 @@
3738
- [#711](https://github.com/estruyf/vscode-front-matter/issues/711): Fix in character mapping in the slug field
3839
- [#712](https://github.com/estruyf/vscode-front-matter/issues/712): Keep the search context when deleting media files
3940
- [#714](https://github.com/estruyf/vscode-front-matter/issues/714): Fix for taxonomy filtering from taxonomy view to content view
41+
- [#717](https://github.com/estruyf/vscode-front-matter/issues/717): Fix in loading yaml data files
4042
- [#718](https://github.com/estruyf/vscode-front-matter/issues/718): Fix JSON schema for the `frontMatter.panel.actions.disabled` setting
43+
- [#719](https://github.com/estruyf/vscode-front-matter/issues/719): Fix styling on data view with objects views
4144

4245
## [9.3.1] - 2023-10-27
4346

content/changelog/v8.4.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Version 8.4.0 release notes
33
description: Get ready to level up your Front Matter CMS experience with the latest 8.4.0 release! 🚀 We've packed this update with a ton of new features including support for external UI scripts, implementation of Front Matter AI powered by mendable.ai, added taxonomy AI suggestions for GitHub sponsors, and more! 💪
44
date: 2023-04-03T15:00:03.981Z
5-
lastmod: 2023-11-02T15:02:48.410Z
6-
slug: ""
5+
lastmod: 2023-12-12T15:37:03.329Z
6+
slug: v8.4.0
77
type: changelog
88
---
99

content/changelog/v9.0.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Version 9.0.0 release notes
33
description: Discover the new features and enhancements of version 9.0.0 of Front Matter CMS, including multilingual support, Astro assets, and more.
44
date: 2023-08-20T09:28:11.087Z
5-
lastmod: 2023-08-21T09:27:44.331Z
6-
slug: ""
5+
lastmod: 2023-12-12T15:37:11.100Z
6+
slug: v9.0.0
77
type: changelog
88
---
99

content/changelog/v9.3.0.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Version 9.3.0 release notes
33
description: Discover the features and enhancements of v9.3.0 of Front Matter CMS, Content types from Astro Content Collection, new fieldCollection field, and much more
44
date: 2023-10-06T11:20:22.074Z
5-
lastmod: 2023-10-06T14:30:35.774Z
6-
slug: ""
5+
lastmod: 2023-12-12T15:37:16.101Z
6+
slug: v9.3.0
77
type: changelog
88
---
99

content/changelog/v9.4.0.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
title: Version 9.4.0 release notes
3+
description: Learn about the new localization support, custom script enhancements, and more in the Version 9.4.0 release notes of Front Matter CMS.
4+
date: 2023-12-12T08:32:08.859Z
5+
lastmod: 2023-12-12T15:37:20.732Z
6+
slug: v9.4.0
7+
type: changelog
8+
---
9+
10+
## Localization of Front Matter CMS
11+
12+
Now both the webviews and the extension dialogs, messages, and notifications are localized. Currently we support the following languages:
13+
14+
- German
15+
- Spanish
16+
- French
17+
- Italian
18+
- Japanese
19+
- Korean
20+
- Portuguese (Brazil)
21+
- English
22+
23+
> **Important**: If a human translation is not available for the language, it will be translated using Azure Translation Services. This means that the translation might not be 100% accurate. In case you want to help us translate Front Matter CMS to your language, please check out the [localization documentation](/docs/contributing#translating-the-extension).
24+
25+
## Custom script enhancements
26+
27+
With the [@frontmatter/extensibility](https://www.npmjs.com/package/@frontmatter/extensibility) package, it is easier to create custom scripts for Front Matter CMS and it allows you to do more like asking questions to the user.
28+
29+
### Getting the arguments
30+
31+
Previously, you had to manually parse the arguments from the `process.argv` array. Now you can use the `getArguments` function from the `@frontmatter/extensibility` package.
32+
33+
```ts
34+
import { ContentScript, MediaScript } from '@frontmatter/extensibility';
35+
36+
// In content scripts
37+
const contentScriptArgs = ContentScript.getArguments();
38+
39+
// In media scripts
40+
const mediaScriptArgs = MediaScript.getArguments();
41+
```
42+
43+
> **Info**: More information can be found in the [creating a content script](/docs/custom-actions#creating-a-content-script) and [creating a media script](/docs/custom-actions#creating-a-media-script) documentation.
44+
45+
### Asking questions
46+
47+
You can now ask questions to the user when running a script. This can be done by using the `askQuestion` function from the `@frontmatter/extensibility` package.
48+
49+
```ts
50+
import { MediaScript } from '@frontmatter/extensibility';
51+
52+
const mediaScriptArgs = MediaScript.getArguments();
53+
54+
const answers = mediaScriptArgs.answers;
55+
if (!answers) {
56+
MediaScript.askQuestions([{
57+
name: "width",
58+
message: "What is the width of the image?",
59+
default: image.width
60+
}]);
61+
return;
62+
}
63+
64+
const width = answers.width;
65+
66+
// Do something with the width
67+
```
68+
69+
> **Info**: More information can be found in the [asking questions to users](/docs/custom-actions#asking-questions-to-users) documentation.
70+
71+
## Scheduled content
72+
73+
You can now filter and group the content dashboard by scheduled content. This allows you to see which content is scheduled to be published in the future.
74+
75+
![Scheduled content](/releases/v9.4.0/scheduled-content.png)
76+
77+
## Creating sub-content
78+
79+
When creating sub-content, you can now select the parent folder. This allows you to create you content in any folder you want.
80+
81+
You can enable this feature on the content type by setting the `allowAsSubContent` or `isSubContent` property to `true`.
82+
83+
> **Info**: More information can be found in the [creating sub-content](/docs/content-creation/content-types#creating-sub-content) documentation.
84+
85+
## Content type name shown in the panel
86+
87+
A small enhancement which we added in this release to the editor panel is the content type name in the metadata section. Now you can easily see which content type your content is using.
88+
89+
![Content type name](/releases/v9.4.0/content-type-name.png)
90+
91+
## Related issues/enhancements
92+
93+
### ✨ New features
94+
95+
- Localization implemented for the whole extension
96+
97+
### 🎨 Enhancements
98+
99+
- [#273](https://github.com/estruyf/vscode-front-matter/issues/273): Allow single value arrays to be set as a string with the `singleValueAsString` field property
100+
- [#686](https://github.com/estruyf/vscode-front-matter/issues/686): Allow script authors to ask questions during script execution
101+
- [#688](https://github.com/estruyf/vscode-front-matter/issues/688): Allow to show the scheduled articles in the content dashboard (filter and group)
102+
- [#690](https://github.com/estruyf/vscode-front-matter/issues/690): Added the ability to filter values in the `contentRelationship` field
103+
- [#700](https://github.com/estruyf/vscode-front-matter/issues/700): Added the `{{pathToken.relPath}}` placeholder for the `previewPath` property
104+
- [#706](https://github.com/estruyf/vscode-front-matter/issues/706): Show the error of scripts failing in the Front Matter output panel
105+
- [#709](https://github.com/estruyf/vscode-front-matter/issues/709): Take "where clause" into account on content creation
106+
- [#710](https://github.com/estruyf/vscode-front-matter/issues/710): Hide child field when parent field its "when clause" is not met, also remove the fields from the content
107+
- [#713](https://github.com/estruyf/vscode-front-matter/issues/713): Add the ability to always use quotes around string values in front matter
108+
- [#722](https://github.com/estruyf/vscode-front-matter/issues/722): Allow to create sub-content which shows a dialog to select the parent folder
109+
110+
### ⚡️ Optimizations
111+
112+
- Dashboard layout grid optimizations
113+
- Added the content-type name to the metadata section in the panel
114+
- New implementation of the combobox for the `contentRelationship` field
115+
116+
### 🐞 Fixes
117+
118+
- [#685](https://github.com/estruyf/vscode-front-matter/issues/685): Fix when using non-string values in the tag picker
119+
- [#691](https://github.com/estruyf/vscode-front-matter/issues/691): Silent authentication retrieval for GitHub sponsors
120+
- [#694](https://github.com/estruyf/vscode-front-matter/issues/694): Start terminal session from the folder where the `frontmatter.json` file is located
121+
- [#696](https://github.com/estruyf/vscode-front-matter/issues/696): Close the local server terminal on restart
122+
- [#699](https://github.com/estruyf/vscode-front-matter/issues/699): Changing border theme variable for the dashboard header
123+
- [#703](https://github.com/estruyf/vscode-front-matter/issues/703): Fix retrieval of Astro Collections for `pnpm` projects
124+
- [#704](https://github.com/estruyf/vscode-front-matter/issues/704): Fix `zod` schema script for optional fields
125+
- [#707](https://github.com/estruyf/vscode-front-matter/issues/707): Fix `clearEmpty` issue with `draft` and `boolean` fields which are by default set to `true`
126+
- [#711](https://github.com/estruyf/vscode-front-matter/issues/711): Fix in character mapping in the slug field
127+
- [#712](https://github.com/estruyf/vscode-front-matter/issues/712): Keep the search context when deleting media files
128+
- [#714](https://github.com/estruyf/vscode-front-matter/issues/714): Fix for taxonomy filtering from taxonomy view to content view
129+
- [#717](https://github.com/estruyf/vscode-front-matter/issues/717): Fix in loading yaml data files
130+
- [#718](https://github.com/estruyf/vscode-front-matter/issues/718): Fix JSON schema for the `frontMatter.panel.actions.disabled` setting
131+
- [#719](https://github.com/estruyf/vscode-front-matter/issues/719): Fix styling on data view with objects views

content/docs/content-creation/content-type.md

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Content types
33
slug: content-creation/content-types
44
description: null
55
date: 2022-03-14T08:43:17.483Z
6-
lastmod: 2023-09-11T07:47:18.146Z
6+
lastmod: 2023-12-08T09:13:41.283Z
77
weight: 200.1
88
---
99

@@ -128,6 +128,8 @@ For the content type you can configure the following properties:
128128
| `postScript` | `string` | An optional post script that can be used after new content creation. In order to use this, you will have to set the value to the ID of your [content script][04] | `null` |
129129
| `previewPath` | `string` | Defines a custom preview path for the content type. When the preview path is not set, the value from the [`frontMatter.preview.pathName`][03] setting will be used | `null` |
130130
| `template` | `string` | Specify a path to a template file that will be used when creating new content with the content type | `null` |
131+
| `allowAsSubContent` | `boolean` | Allow the content type to be used as sub-content | `false` |
132+
| `isSubContent` | `boolean` | Defines the content type as sub-content | `false` |
131133

132134
## Define your own type
133135

@@ -180,6 +182,61 @@ type: documentation
180182

181183
> **Fields**: Check out the [fields][05] section to learn which fields are supported.
182184
185+
## Creating sub-content
186+
187+
By default, when you create new content, it will always be created in one of your defined folders
188+
in the `frontMatter.content.pageFolders` setting.
189+
190+
In some cases, you want to create a hierarchy of content. For example, you want to create a
191+
documentation site, where each topic has its own folder. The starting point is a page bundle which
192+
contains the `index.md` file and all the related topics are created as separate files in the same
193+
folder.
194+
195+
To support this, you can now make use of the `allowAsSubContent` and `isSubContent` properties on
196+
your content type.
197+
198+
### Allow as sub-content
199+
200+
The `allowAsSubContent` property is intended to be used for content types with a page bundle
201+
(`pageBundle: true`). When you set this property to `true`, during the content creation, you will be
202+
able to choose if you want to create content as parent or sub-content.
203+
204+
```json {{ "title": "Using the allowAsSubContent property" }}
205+
{
206+
"frontMatter.taxonomy.contentTypes": [
207+
{
208+
"name": "parent",
209+
"pageBundle": true,
210+
"allowAsSubContent": true,
211+
"fields": [
212+
...
213+
]
214+
}
215+
]
216+
}
217+
```
218+
219+
### Is sub-content
220+
221+
The `isSubContent` property is intended to be used for content types which will always be created as
222+
sub-content. When you set this property to `true`, during the content creation, you be able to
223+
select the parent folder.
224+
225+
```json {{ "title": "Using the isSubContent property" }}
226+
{
227+
"frontMatter.taxonomy.contentTypes": [
228+
{
229+
"name": "child",
230+
"pageBundle": true,
231+
"isSubContent": true,
232+
"fields": [
233+
...
234+
]
235+
}
236+
]
237+
}
238+
```
239+
183240
## Using a template with the content type
184241

185242
When creating content that requires a pre-defined structure, you can use the `template` property.

content/docs/content-creation/fields.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Fields
33
slug: content-creation/fields
44
description: null
55
date: 2022-03-14T08:42:21.626Z
6-
lastmod: 2023-12-01T09:24:51.920Z
6+
lastmod: 2023-12-08T08:57:08.344Z
77
weight: 200.2
88
---
99

@@ -447,6 +447,8 @@ When the tag is created, you will be able to re-use it for other content.
447447

448448
- `taxonomyLimit`: Defines the maximum number of items that can be selected. By default set to `0`
449449
which allows unlimited items to be selected.
450+
- `singleValueAsString`: When set to `true`, a single value will be added as a string value instead
451+
of an array.
450452

451453
> **Info**: When a limit is defined, this will get reflected in the UI as well:
452454
@@ -479,6 +481,8 @@ The `categories` field is similar to the [tags][09] field. Categories are also s
479481

480482
- `taxonomyLimit`: Defines the maximum number of items that can be selected. By default set to `0`
481483
which allows unlimited items to be selected.
484+
- `singleValueAsString`: When set to `true`, a single value will be added as a string value instead
485+
of an array.
482486

483487
```json {{ "title": "Usage" }}
484488
{
@@ -506,6 +510,8 @@ taxonomy values and structure.
506510
which allows unlimited items to be selected.
507511
- `taxonomyId`: Set the id of your custom taxonomy definition defined in the
508512
`frontMatter.taxonomy.customTaxonomy` setting.
513+
- `singleValueAsString`: When set to `true`, a single value will be added as a string value instead
514+
of an array.
509515

510516
### Custom taxonomy
511517

0 commit comments

Comments
 (0)