Skip to content

Commit 637a5c0

Browse files
committed
Prepare release notes
1 parent 923807f commit 637a5c0

File tree

6 files changed

+99
-5
lines changed

6 files changed

+99
-5
lines changed

.frontmatter/database/mediaDb.json

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

content/changelog/v10.2.0.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Version 10.2.0 release notes
3+
description: Get the latest version of Front Matter CMS with improved logging, snippet card actions, and multilingual support.
4+
date: 2024-06-10T12:51:00.297Z
5+
lastmod: 2024-06-10T13:25:34.684Z
6+
slug: v10.2.0
7+
type: changelog
8+
---
9+
10+
## Logging improvements
11+
12+
In this release, we have added a new setting `frontMatter.logging` which allows you to define the logging output. The options are `info`, `warn`, `error`, and `verbose`. The default is `info`.
13+
14+
We also added some colors to highlight the different logging levels in the Front Matter CMS output.
15+
16+
![Front Matter CMS logging](/releases/v10.2.0/logging-levels.webp)
17+
18+
## Snippet card actions
19+
20+
Similar to the previous release, we have added common actions at the bottom of the snippet cards. This allows you to perform actions on the snippets without having to open the snippet menu.
21+
22+
![Snippet card actions](/releases/v10.2.0/snippet-actions.webp)
23+
24+
## Snippets dialog is now a slide-over
25+
26+
The snippets dialog has been updated to be a slide-over dialog. This makes it easier to work with longer snippet forms.
27+
28+
## Hiding the data sidebar when editing data files
29+
30+
When you are editing a data file, the data sidebar will now be hidden. This allows you to focus on the data file you are editing. Additionally, a dropdown of data files is shown, allowing you to switch between data files.
31+
32+
![Data sidebar](/releases/v10.2.0/data-sidebar.webp)
33+
34+
## Enhance multilingual support by adding the locale placeholder
35+
36+
We have added a new placeholder `{{locale}}` which can be used in the `previewPath` property. This allows you to generate different preview URLs based on the locale of the content.
37+
38+
```json {{ "title": "Example: Use the locale in your preview path" }}
39+
"frontMatter.content.pageFolders": [
40+
{
41+
"title": "docs",
42+
"path": "[[workspace]]/src/content/docs",
43+
"previewPath": "/{{locale|ignore:en}}",
44+
"trailingSlash": true,
45+
"contentTypes": ["blog"]
46+
}
47+
]
48+
```
49+
50+
The preview path will generate the following path for English content: `/<slug>/`. For other locales, the preview path will generate the following path: `/<locale>/<slug>/` (e.g. `/nl/<slug>/`).
51+
52+
> **Info**: You can read more about the `{{locale}}` placeholder in the [special placeholders](/docs/content-creation/placeholders#example-5-using-the-locale-placeholder) section.
53+
54+
## Added support for trailing slashes in the preview path
55+
56+
You can now define whether you want to have trailing slashes in the preview path. This can be done by setting the `trailingSlash` property to `true` or `false`. The setting can be defined on global, content folder, and content type levels.
57+
58+
```json {{ "title": "Example: Use trailing slashes in the preview path" }}
59+
{
60+
"frontMatter.preview.trailingSlash": true
61+
}
62+
```
63+
64+
## Related issues/enhancements
65+
66+
### ✨ New features
67+
68+
- [#797](https://github.com/estruyf/vscode-front-matter/issues/797): Adding common actions at the bottom of the snippet cards
69+
70+
### 🎨 Enhancements
71+
72+
- [#441](https://github.com/estruyf/vscode-front-matter/issues/441): Show input descriptions for snippet and data forms
73+
- [#442](https://github.com/estruyf/vscode-front-matter/issues/442): Hide sidebar on data view when data file is selected + show dropdown of data files
74+
- [#788](https://github.com/estruyf/vscode-front-matter/issues/788): Show a warning on setting update when it exists in an extended configuration
75+
- [#798](https://github.com/estruyf/vscode-front-matter/issues/798): Changed dialog to slide-over for the snippet forms
76+
- [#799](https://github.com/estruyf/vscode-front-matter/issues/799): Added `frontMatter.logging` setting to define the logging output. Options are `info`, `warn`, `error`, and `verbose`. The default is `info`.
77+
- [#800](https://github.com/estruyf/vscode-front-matter/issues/800): Add colors for the Front Matter CMS output
78+
- [#808](https://github.com/estruyf/vscode-front-matter/issues/808): Add support to generate field groups and `block` fields in content type generation
79+
- [#810](https://github.com/estruyf/vscode-front-matter/issues/810): Update the tab title based on the view
80+
- [#811](https://github.com/estruyf/vscode-front-matter/issues/811): Added `panel.gitActions` view mode option to hide the Git actions in the panel
81+
- [#812](https://github.com/estruyf/vscode-front-matter/issues/812): Added the `{{locale}}` placeholder, which can be used in the `previewPath` property
82+
83+
### ⚡️ Optimizations
84+
85+
- [#802](https://github.com/estruyf/vscode-front-matter/issues/802): Update `glob` to the latest version and remove the sync method
86+
87+
### 🐞 Fixes
88+
89+
- [#796](https://github.com/estruyf/vscode-front-matter/issues/796): Fix issue in retrieving folders/files on dashboard load
90+
- [#801](https://github.com/estruyf/vscode-front-matter/issues/801): Faster folder processing on updates
91+
- [#804](https://github.com/estruyf/vscode-front-matter/issues/804): Fix blinking of the front matter content area
92+
- [#806](https://github.com/estruyf/vscode-front-matter/issues/804): Fix preview URL for `index.md` files in root of the page folder path
93+
- [#809](https://github.com/estruyf/vscode-front-matter/issues/809): Fix retrieving the `filePrefix` when updating the file name on slug change

content/docs/content-creation/placeholders.md

Lines changed: 3 additions & 3 deletions
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-06-10T09:46:20.253Z
6+
lastmod: 2024-06-10T13:21:59.465Z
77
weight: 200.51
88
---
99

@@ -92,7 +92,7 @@ The above configuration results in the following path: `/blog/25/02/23/`.
9292

9393
![Placeholder field formatting](/releases/v9.0.0/placeholder-formatting.png)
9494

95-
### Example 4: using the `{{date|<format>}}` placeholder
95+
### Example 4: using the {{date\|\<format\>}} placeholder
9696

9797
The `{{date|<format>}}` placeholder can be used in the `previewPath` property and uses the field
9898
with the name `date` or a date field where the `isPublishDate` property is set to `true`.
@@ -110,7 +110,7 @@ with the name `date` or a date field where the `isPublishDate` property is set t
110110

111111
The above configuration results in the following path: `/blog/2024/`.
112112

113-
### Example 5: using the `{{locale}}` placeholder
113+
### Example 5: using the {{locale}} placeholder
114114

115115
The `{{locale}}` placeholder will return the locale of the page when you have
116116
a [multi-language setup](/docs/content-creation/multilingual).
49.5 KB
Binary file not shown.
3.48 KB
Binary file not shown.

utils/markdownToHtml.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ const remarkFm = ({
110110
let lastChild = node.children[node.children.length - 1];
111111
if (lastChild && lastChild.type === "text") {
112112
let string = lastChild.value.replace(/ +$/, "");
113-
const hId = string.toLowerCase().replace(/\s/g, "-");
113+
let hId = string.toLowerCase().replace(/\s/g, "-");
114+
hId = hId.replace(/[^a-z0-9-]/g, "");
114115

115116
if (!node.data) {
116117
node.data = {};

0 commit comments

Comments
 (0)