Skip to content

Commit 7304348

Browse files
committed
v10.8.0 release
1 parent 9619f64 commit 7304348

File tree

5 files changed

+106
-38
lines changed

5 files changed

+106
-38
lines changed

Diff for: content/changelog/CHANGELOG.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22

33
## [10.8.0] - 2025-02-xx
44

5-
### ✨ New features
6-
75
### 🎨 Enhancements
86

97
- [#915](https://github.com/estruyf/vscode-front-matter/issues/915): Added a new setting `frontMatter.panel.openOnSupportedFile` which allows you to open the panel view on supported files
108
- [#921](https://github.com/estruyf/vscode-front-matter/issues/921): Improve the filename sanitization
11-
12-
### ⚡️ Optimizations
9+
- [#922](https://github.com/estruyf/vscode-front-matter/issues/922): Added `{{fileName}}` and `{{sluggedFileName}}` placeholders for the slug template setting
1310

1411
### 🐞 Fixes
1512

Diff for: content/changelog/v10.8.0.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Version 10.8.0 release notes
3+
description: Discover the key features and enhancements in Front Matter CMS version 10.8.0, including new settings and improved filename sanitization.
4+
date: 2024-12-31T14:22:26.767Z
5+
lastmod: 2025-02-27T11:06:34.618Z
6+
slug: v10.8.0
7+
fmContentType: changelog
8+
---
9+
10+
## New setting to open the panel view on supported files
11+
12+
With the new setting `frontMatter.panel.openOnSupportedFile`, you can now configure if the Front Matter CMS panel view should open automatically when you open a supported file. The default value is `false`.
13+
14+
```json
15+
{
16+
"frontMatter.panel.openOnSupportedFile": true
17+
}
18+
```
19+
20+
## New placeholders for the slug template setting
21+
22+
Two new placeholders have been added to the slug template setting:
23+
24+
- `{{fileName}}`: This will be replaced with the filename of the file.
25+
- `{{sluggedFileName}}`: This will be replaced with the slugged version of the filename.
26+
27+
> **Info**: You can find more information about in the [slug placeholders](/docs/content-creation/placeholders#slug-placeholders) documentation section.
28+
29+
## Improved filename sanitization
30+
31+
The filename sanitization has been improved to handle more edge cases.
32+
33+
## Related issues/enhancements
34+
35+
### 🎨 Enhancements
36+
37+
- [#915](https://github.com/estruyf/vscode-front-matter/issues/915): Added a new setting `frontMatter.panel.openOnSupportedFile` which allows you to open the panel view on supported files
38+
- [#921](https://github.com/estruyf/vscode-front-matter/issues/921): Improve the filename sanitization
39+
- [#922](https://github.com/estruyf/vscode-front-matter/issues/922): Added `{{fileName}}` and `{{sluggedFileName}}` placeholders for the slug template setting
40+
41+
### 🐞 Fixes
42+
43+
- Fix for media folder parsing on Windows
44+
- Refresh button was not available on the media dashboard when having custom scripts defined
45+
- [#909](https://github.com/estruyf/vscode-front-matter/issues/909): Schema fix for the view modes
46+
- [#913](https://github.com/estruyf/vscode-front-matter/issues/913): Fix for relative media paths in page bundles
47+
- [#914](https://github.com/estruyf/vscode-front-matter/issues/914): Fix sanitizing of default filenames with an `_` in it

Diff for: content/docs/content-creation/placeholders.md

+37-31
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Placeholders
33
slug: content-creation/placeholders
44
description: Learn how to use placeholders in Front Matter CMS
55
date: 2022-03-14T08:42:21.626Z
6-
lastmod: 2024-09-16T12:13:56.139Z
6+
lastmod: 2025-02-27T11:05:16.924Z
77
weight: 200.51
88
---
99

@@ -36,37 +36,39 @@ The following placeholders can be used in the fields `default` property,
3636
The slug placeholders are used to generate a slug based on the title of the page. The following
3737
placeholders can be used in the `slugTemplate` property:
3838

39-
| Placeholder | Description |
40-
| --- | --- |
39+
| Placeholder | Description |
40+
| ----------------------- | -------------------------------------------------------------------------------------------------- |
4141
| `{{seoTitle}}` | This creates a SEO friendly slug from the title. More info can be found in the [slug][02] section. |
42-
| `{{date\|<format>}}` | Use the publishing date of your article in the preview URL. Example: `{{date\|yyyy-MM}}` |
43-
| `{{fm.<field name>}}` | The value of the field in the front matter |
44-
| `{{pathToken.<index>}}` | The value of the path token at the index |
45-
| `{{pathToken.relPath}}` | The relative value path staring from the page folder' path |
42+
| `{{fileName}}` | The filename of the file. |
43+
| `{{sluggedFileName}}` | The slugged version of the filename. |
44+
| `{{date\|<format>}}` | Use the publishing date of your article in the preview URL. Example: `{{date\|yyyy-MM}}` |
45+
| `{{fm.<field name>}}` | The value of the field in the front matter |
46+
| `{{pathToken.<index>}}` | The value of the path token at the index |
47+
| `{{pathToken.relPath}}` | The relative value path staring from the page folder' path |
4648

4749
## Preview path placeholders
4850

4951
The preview path placeholders are used to generate a dynamic preview path based on the front matter
5052
fields or other values. The following placeholders can be used in the `previewPath` property:
5153

52-
| Placeholder | Description |
53-
| --- | --- |
54+
| Placeholder | Description |
55+
| ----------------------- | ---------------------------------------------------------------------------------------------- |
5456
| `{{date\|<format>}}` | Use the publishing date of your article in the preview URL. Example: `/blog/{{date\|yyyy-MM}}` |
55-
| `{{locale}}` | The locale of the page. |
56-
| `{{fm.<field name>}}` | The value of the field in the front matter |
57-
| `{{pathToken.<index>}}` | The value of the path token at the index |
58-
| `{{pathToken.relPath}}` | The relative value path staring from the page folder' path |
57+
| `{{locale}}` | The locale of the page. |
58+
| `{{fm.<field name>}}` | The value of the field in the front matter |
59+
| `{{pathToken.<index>}}` | The value of the path token at the index |
60+
| `{{pathToken.relPath}}` | The relative value path staring from the page folder' path |
5961

6062
## File prefix placeholders
6163

6264
The file prefix placeholders are used to generate a dynamic file prefix. The following placeholders
6365
can be used in the `filePrefix` property:
6466

65-
| Placeholder | Description |
66-
| --- | --- |
67-
| `{{filePrefix.index\|<zeros:nr>}}` | The index number of the file in the folder |
68-
| `{{date\|<format>}}` | Use the publishing date of your article in the preview URL. Example: `{{date\|yyyy-MM}}` |
69-
| `{{locale}}` | The locale of the page. |
67+
| Placeholder | Description |
68+
| ---------------------------------- | ---------------------------------------------------------------------------------------- |
69+
| `{{filePrefix.index\|<zeros:nr>}}` | The index number of the file in the folder |
70+
| `{{date\|<format>}}` | Use the publishing date of your article in the preview URL. Example: `{{date\|yyyy-MM}}` |
71+
| `{{locale}}` | The locale of the page. |
7072

7173
## Using placeholders
7274

@@ -189,11 +191,13 @@ The `{{filePrefix.index}}` placeholder returns the index number of the file in t
189191

190192
```json {{ "title": "Using the file prefix index placeholder" }}
191193
{
192-
"frontMatter.content.pageFolders": [{
193-
"title": "articles",
194-
"path": "[[workspace]]/content/prefixes/",
195-
"filePrefix": "{{filePrefix.index}}"
196-
}]
194+
"frontMatter.content.pageFolders": [
195+
{
196+
"title": "articles",
197+
"path": "[[workspace]]/content/prefixes/",
198+
"filePrefix": "{{filePrefix.index}}"
199+
}
200+
]
197201
}
198202
```
199203

@@ -205,11 +209,13 @@ want to add.
205209

206210
```json {{ "title": "Using the file prefix index placeholder with leading zeros" }}
207211
{
208-
"frontMatter.content.pageFolders": [{
209-
"title": "articles",
210-
"path": "[[workspace]]/content/prefixes/",
211-
"filePrefix": "{{filePrefix.index|zeros:4}}"
212-
}]
212+
"frontMatter.content.pageFolders": [
213+
{
214+
"title": "articles",
215+
"path": "[[workspace]]/content/prefixes/",
216+
"filePrefix": "{{filePrefix.index|zeros:4}}"
217+
}
218+
]
213219
}
214220
```
215221

@@ -285,7 +291,8 @@ Once installed, you can use the following example:
285291
```javascript
286292
import { PlaceholderScript } from "@frontmatter/extensibility";
287293

288-
const { workspacePath, filePath, title, answers } = PlaceholderScript.getArguments();
294+
const { workspacePath, filePath, title, answers } =
295+
PlaceholderScript.getArguments();
289296

290297
PlaceholderScript.done(Math.random().toString(36).substring(2, 15));
291298
```
@@ -308,8 +315,7 @@ For instance, if you want to pick between a category upon content creation, you
308315
import { PlaceholderScript } from "@frontmatter/extensibility";
309316

310317
(async () => {
311-
const { answers } =
312-
PlaceholderScript.getArguments();
318+
const { answers } = PlaceholderScript.getArguments();
313319

314320
if (!answers) {
315321
PlaceholderScript.askQuestions([

Diff for: content/docs/panel.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Editor panel
33
slug: panel
44
description: Learn how to use the Front Matter panel to perform most of the extension actions with just a click on the button.
55
date: 2021-08-30T16:13:00.546Z
6-
lastmod: 2024-11-28T17:17:50.602Z
6+
lastmod: 2025-02-27T11:02:41.931Z
77
weight: 400
88
---
99

@@ -185,6 +185,16 @@ In this section of the panel, you can modify a couple of the useful settings to
185185
> this by providing your own start command. You can also change the start command in the
186186
> [frontMatter.framework.startCommand][14] setting.
187187
188+
## Open the panel on supported files
189+
190+
With the setting `frontMatter.panel.openOnSupportedFile`, you can now configure if the Front Matter CMS panel view should open automatically when you open a supported file. The default value is `false`.
191+
192+
```json
193+
{
194+
"frontMatter.panel.openOnSupportedFile": true
195+
}
196+
```
197+
188198
## View modes
189199

190200
By default, Front Matter will show all its potential and functionalities to the end-user. As you do

Diff for: content/docs/settings/available-settings.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Settings overview
33
slug: settings/overview
44
description: null
55
date: 2023-02-13T16:44:09.618Z
6-
lastmod: 2024-12-31T14:06:08.094Z
6+
lastmod: 2025-02-27T11:01:03.822Z
77
weight: 1000.2
88
---
99

@@ -332,7 +332,7 @@ Specify the list of scripts to load in the Front Matter CMS.
332332
- Default: `[]`
333333

334334
> **Info**: More information on how to use it can be found in the
335-
[UI extensibility](/docs/experimental/ui-extensibility) section.
335+
> [UI extensibility](/docs/experimental/ui-extensibility) section.
336336
337337
### frontMatter.experimental
338338

@@ -530,6 +530,13 @@ Specifies if you want to allow yourself from entering unknown tags/categories in
530530
- Type: `boolean`
531531
- Default: `true`
532532

533+
### frontMatter.panel.openOnSupportedFile
534+
535+
Specifies if you want to open the panel when opening a supported file.
536+
537+
- Type: `boolean`
538+
- Default: `false`
539+
533540
### frontMatter.preview.host
534541

535542
Specify the host URL (example: `http://localhost:1313`) to be used when opening the preview.
@@ -862,6 +869,7 @@ This setting is used to define the modified date field of your articles.
862869
> **Important**: Use the new `isModifiedDate` datetime field setting for content types instead.
863870
864871
<!-- Link References -->
872+
865873
[01]: /docs/settings#extending-settings
866874
[02]: /docs/experimental
867875
[04]: /docs/content-creation#before-you-start

0 commit comments

Comments
 (0)