Skip to content

Commit ea78731

Browse files
committed
Merge branch 'dev'
2 parents d11bc82 + 2cfab54 commit ea78731

25 files changed

+411
-27
lines changed

.frontmatter/database/mediaDb.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

content/changelog/CHANGELOG.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
# Change Log
22

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

55
### ✨ New features
66

7+
- [#80](https://github.com/estruyf/vscode-front-matter/issues/80): Minimal settings view for the Front Matter CMS
8+
- [#553](https://github.com/estruyf/vscode-front-matter/issues/553): New `frontMatter.config.dynamicFilePath` setting which allows you to dynamically update the settings from a custom JS file
9+
- [#563](https://github.com/estruyf/vscode-front-matter/issues/563): New `fieldCollection` to inherit/reuse fields in multiple content-types
10+
- [#653](https://github.com/estruyf/vscode-front-matter/issues/653): Retrieve the Astro Content Collections to allow content type generation
11+
- [#675](https://github.com/estruyf/vscode-front-matter/issues/675): Pinning content to the top of the content dashboard
12+
713
### 🎨 Enhancements
814

15+
- [#517](https://github.com/estruyf/vscode-front-matter/issues/517): Add `contentTypes` property to custom scripts to show/hide custom actions
16+
- [#517](https://github.com/estruyf/vscode-front-matter/issues/517): Added `frontMatter.panel.actions.disabled` setting to define which actions should be hidden
917
- [#638](https://github.com/estruyf/vscode-front-matter/issues/638): Add Hexo support for the `_drafts` folder
1018
- [#659](https://github.com/estruyf/vscode-front-matter/issues/659): Implement a filter for the taxonomy dashboard
1119
- [#662](https://github.com/estruyf/vscode-front-matter/issues/662): Always show the `all articles` tab with the page counter
1220
- [#663](https://github.com/estruyf/vscode-front-matter/issues/663): Make card tags clickable to filter the view
13-
14-
### ⚡️ Optimizations
21+
- [#669](https://github.com/estruyf/vscode-front-matter/issues/669): Add the video preview to the details panel + caption field
22+
- [#674](https://github.com/estruyf/vscode-front-matter/issues/674): Specify to disable content creation for a specific page folder
23+
- [#676](https://github.com/estruyf/vscode-front-matter/issues/676): Allow the `frontmatter.json` file to be placed in a sub-directory
24+
- [#677](https://github.com/estruyf/vscode-front-matter/issues/677): Added support for [Browse Lite](https://marketplace.visualstudio.com/items?itemName=antfu.browse-lite) extension to open preview when installed
1525

1626
### 🐞 Fixes
1727

28+
- [#623](https://github.com/estruyf/vscode-front-matter/issues/623): Fix issue where metadata is not maintained on file move
29+
- [#629](https://github.com/estruyf/vscode-front-matter/issues/629): Fix array indent to the new property
1830
- [#660](https://github.com/estruyf/vscode-front-matter/issues/660): Allow only to select unique content relationship values
1931
- [#661](https://github.com/estruyf/vscode-front-matter/issues/661): Fixing the dropdowns when used at the bottom of a collapsible group
2032
- [#664](https://github.com/estruyf/vscode-front-matter/issues/664): Fix for parsing draft status in Hexo and Jekyll
33+
- [#665](https://github.com/estruyf/vscode-front-matter/issues/665): Added `dev` parameter to Nuxt script
34+
- [#668](https://github.com/estruyf/vscode-front-matter/issues/668): Reset pagination on media search
35+
- [#678](https://github.com/estruyf/vscode-front-matter/issues/678): Check field type of `tags` fields for tags rendering on item cards
36+
- [#681](https://github.com/estruyf/vscode-front-matter/issues/681): Fix SVG icons which are used in the VSCode UI
2137

2238
## [9.2.0] - 2023-09-11
2339

@@ -35,6 +51,7 @@
3551
- [#645](https://github.com/estruyf/vscode-front-matter/issues/645): French localization added (thanks to [Clément Barbaza](https://github.com/cba85))
3652
- [#649](https://github.com/estruyf/vscode-front-matter/issues/649): Parse optional variables from snippets
3753
- [#652](https://github.com/estruyf/vscode-front-matter/issues/652): Show the start/stop server buttons depending on the local terminal session
54+
- [#654](https://github.com/estruyf/vscode-front-matter/issues/654): Added a new action to open the content in the browser
3855

3956
### 🐞 Fixes
4057

content/changelog/v9.3.0.md

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
---
2+
title: Version 9.3.0 release notes
3+
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
4+
date: 2023-10-06T11:20:22.074Z
5+
lastmod: 2023-10-06T14:30:35.774Z
6+
slug: ""
7+
type: changelog
8+
---
9+
10+
<!-- markdownlint-disable MD013 MD041 -->
11+
12+
## Content pinning
13+
14+
When working with lots of content, it can be useful to pin content to the top of the content dashboard. This allow you quick access for content you change frequently.
15+
16+
![Pinning content to your dashboard](/releases/v9.3.0/content-pinning.png)
17+
18+
## Settings view
19+
20+
We are introducing a new settings view for Front Matter CMS. This view allows you to configure the common settings of Front Matter CMS.
21+
22+
![Settings view](/releases/v9.3.0/settings-view.png)
23+
24+
## Support for Astro Content Collection 🚀
25+
26+
As Astro gained a lot of popularity, we wanted to add support for the Astro Content Collection. During the initialization of Front Matter CMS, you will now be able to select the Astro Content Collection.
27+
28+
![Astro Content Collection](/releases/v9.3.0/astro-content-collections.png)
29+
30+
On the new settings view, you will also be able to add content types for the Astro Content Collection you would create later on.
31+
32+
![Add additional content types from Astro Content Collections](/releases/v9.3.0/astro-content-collections-settings.png)
33+
34+
## Introducing the fieldCollection field type
35+
36+
In this release, we are introducing a new field type called `fieldCollection`. This field type allows you to reuse fields in multiple content types. This is especially useful when you have a lot of content types and want to reuse the same fields.
37+
38+
```json {{ "title": "Example configuration" }}
39+
{
40+
"frontMatter.taxonomy.fieldGroups": [
41+
{
42+
"id": "GeneralFields",
43+
"fields": [
44+
{
45+
"title": "Title",
46+
"name": "title",
47+
"type": "string",
48+
"single": true
49+
},
50+
{
51+
"title": "Description",
52+
"name": "description",
53+
"type": "string"
54+
}
55+
]
56+
}
57+
],
58+
"frontMatter.taxonomy.contentTypes": [
59+
{
60+
"name": "default",
61+
"pageBundle": false,
62+
"previewPath": "'blog'",
63+
"filePrefix": null,
64+
"fields": [
65+
{
66+
"name": "fieldCollection",
67+
"type": "fieldCollection",
68+
"fieldGroup": "GeneralFields"
69+
}
70+
]
71+
}
72+
]
73+
}
74+
```
75+
76+
## Extending settings via code
77+
78+
You can now extend the settings from your own JavaScript code file. This allows you to dynamically update the settings based on your needs. For instance when you want to load settings from a `.env` file.
79+
80+
> **Info**: You can find more information about this feature in the [extending with code](/docs/settings#extending-with-code) documentation section.
81+
82+
## Card tags are now clickable
83+
84+
In the content dashboard, you can now click on the tags of a card to filter the view. This allows you to quickly find content with the same tags.
85+
86+
![Card tags are clickable](/releases/v9.3.0/clickable-tags.png)
87+
88+
## Support for the Browse Lite extension
89+
90+
In this release, we added support for the [Browse Lite](https://marketplace.visualstudio.com/items?itemName=antfu.browse-lite) extension to open preview when installed. The advantage of this extension is that it used a real browser in the background to render the preview. For frameworks like Nuxt, this allows you to see the updates immediately.
91+
92+
![Browse Lite extension support](/releases/v9.3.0/browse-lite-support.png)
93+
94+
> **Info**: If you do not have the extension installed, the default preview view from Front Matter CMS will be used.
95+
96+
## Filtering on the taxonomy dashboard
97+
98+
We have added a new filter to the taxonomy dashboard. This allows you to filter on the taxonomy values of your content. This is especially useful when you have a lot of content and want to find specific content.
99+
100+
![Filter taxonomy](/releases/v9.3.0/taxonomy-filtering.png)
101+
102+
## New setting to disable Front Matter CMS actions
103+
104+
We received feedback that now all panel actions like to optimize the article slug, open a preview, etc. are required. To allow you to disable these actions, we have added a new setting called `frontMatter.panel.actions.disabled`. This setting allows you to specify which actions should be hidden.
105+
106+
```json {{ "title": "Example configuration to disable all actions" }}
107+
{
108+
"frontMatter.panel.actions.disabled": [
109+
"openDashboard",
110+
"createContent",
111+
"optimizeSlug",
112+
"preview",
113+
"openOnWebsite",
114+
"startStopServer",
115+
"customActions"
116+
]
117+
}
118+
```
119+
120+
## Define custom actions/scripts per content type
121+
122+
You can now define the content type(s) per custom script. When you do this, the actions will only become available in the panel when an article of that content type is opened.
123+
124+
```json {{ "title": "Example configuration" }}
125+
{
126+
"frontMatter.custom.scripts": [{
127+
"title": "Generate social image",
128+
"script": "./scripts/social-img.js",
129+
"command": "~/.nvm/versions/node/v16.19.0/bin/node",
130+
"contentTypes": ["post"]
131+
}]
132+
}
133+
```
134+
135+
## Related issues/enhancements
136+
137+
### ✨ New features
138+
139+
- [#80](https://github.com/estruyf/vscode-front-matter/issues/80): Minimal settings view for the Front Matter CMS
140+
- [#553](https://github.com/estruyf/vscode-front-matter/issues/553): New `frontMatter.config.dynamicFilePath` setting which allows you to dynamically update the settings from a custom JS file
141+
- [#563](https://github.com/estruyf/vscode-front-matter/issues/563): New `fieldCollection` to inherit/reuse fields in multiple content-types
142+
- [#653](https://github.com/estruyf/vscode-front-matter/issues/653): Retrieve the Astro Content Collections to allow content type generation
143+
- [#675](https://github.com/estruyf/vscode-front-matter/issues/675): Pinning content to the top of the content dashboard
144+
145+
### 🎨 Enhancements
146+
147+
- [#517](https://github.com/estruyf/vscode-front-matter/issues/517): Add `contentTypes` property to custom scripts to show/hide custom actions
148+
- [#517](https://github.com/estruyf/vscode-front-matter/issues/517): Added `frontMatter.panel.actions.disabled` setting to define which actions should be hidden
149+
- [#638](https://github.com/estruyf/vscode-front-matter/issues/638): Add Hexo support for the `_drafts` folder
150+
- [#659](https://github.com/estruyf/vscode-front-matter/issues/659): Implement a filter for the taxonomy dashboard
151+
- [#662](https://github.com/estruyf/vscode-front-matter/issues/662): Always show the `all articles` tab with the page counter
152+
- [#663](https://github.com/estruyf/vscode-front-matter/issues/663): Make card tags clickable to filter the view
153+
- [#669](https://github.com/estruyf/vscode-front-matter/issues/669): Add the video preview to the details panel + caption field
154+
- [#674](https://github.com/estruyf/vscode-front-matter/issues/674): Specify to disable content creation for a specific page folder
155+
- [#676](https://github.com/estruyf/vscode-front-matter/issues/676): Allow the `frontmatter.json` file to be placed in a sub-directory
156+
- [#677](https://github.com/estruyf/vscode-front-matter/issues/677): Added support for [Browse Lite](https://marketplace.visualstudio.com/items?itemName=antfu.browse-lite) extension to open preview when installed
157+
158+
### 🐞 Fixes
159+
160+
- [#623](https://github.com/estruyf/vscode-front-matter/issues/623): Fix issue where metadata is not maintained on file move
161+
- [#629](https://github.com/estruyf/vscode-front-matter/issues/629): Fix array indent to the new property
162+
- [#660](https://github.com/estruyf/vscode-front-matter/issues/660): Allow only to select unique content relationship values
163+
- [#661](https://github.com/estruyf/vscode-front-matter/issues/661): Fixing the dropdowns when used at the bottom of a collapsible group
164+
- [#664](https://github.com/estruyf/vscode-front-matter/issues/664): Fix for parsing draft status in Hexo and Jekyll
165+
- [#665](https://github.com/estruyf/vscode-front-matter/issues/665): Added `dev` parameter to Nuxt script
166+
- [#668](https://github.com/estruyf/vscode-front-matter/issues/668): Reset pagination on media search
167+
- [#678](https://github.com/estruyf/vscode-front-matter/issues/678): Check field type of `tags` fields for tags rendering on item cards
168+
- [#681](https://github.com/estruyf/vscode-front-matter/issues/681): Fix SVG icons which are used in the VSCode UI

content/docs/content-creation/fields.md

Lines changed: 45 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-09-12T18:17:25.997Z
6+
lastmod: 2023-10-06T12:02:44.400Z
77
weight: 200.2
88
---
99

@@ -26,6 +26,7 @@ Front Matter supports the following fields to be used in the content-types:
2626
- [categories](#categories)
2727
- [taxonomy](#taxonomy)
2828
- [fields](#fields)
29+
- [fieldCollection](#fieldcollection)
2930
- [block](#block)
3031
- [dataFile](#data-file)
3132
- [slug](#slug)
@@ -591,6 +592,49 @@ photo:
591592
---
592593
```
593594

595+
## fieldCollection
596+
597+
The `fieldCollection` field type allows you to reuse fields in multiple content types. This is
598+
especially useful when you have a lot of content types and want to reuse the same fields.
599+
600+
### Prerequisites
601+
602+
To work with the `fieldCollection` field type, you need to define a field group (a set of fields for
603+
your data) in the `frontMatter.taxonomy.fieldGroups` setting.
604+
605+
```json {{ "title": "Field group definition to be used in the fieldCollection" }}
606+
"frontMatter.taxonomy.fieldGroups": [
607+
{
608+
"id": "GeneralFields",
609+
"fields": [
610+
{
611+
"title": "Title",
612+
"name": "title",
613+
"type": "string",
614+
"single": true
615+
},
616+
{
617+
"title": "Description",
618+
"name": "description",
619+
"type": "string"
620+
}
621+
]
622+
}
623+
]
624+
```
625+
626+
### Properties
627+
628+
- `fieldGroup`: Define the field group that will be used to create a list of data.
629+
630+
```json {{ "title": "Usage" }}
631+
{
632+
"name": "fieldCollection",
633+
"type": "fieldCollection",
634+
"fieldGroup": "GeneralFields"
635+
}
636+
```
637+
594638
## Block
595639

596640
The `block` field type allows you to define a group of fields which can be used to create a list of data.

content/docs/content-creation/other.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Additional configuration
33
slug: content-creation/additional-config
44
description: null
55
date: 2022-03-14T08:42:21.626Z
6-
lastmod: 2023-02-12T14:40:40.022Z
6+
lastmod: 2023-10-06T13:30:33.717Z
77
weight: 200.5
88
---
99

@@ -136,3 +136,21 @@ If you want to preserve the casing of the file name, you can set the
136136
"frontMatter.file.preserveCasing": true
137137
}
138138
```
139+
140+
## Disable creation in specific folders
141+
142+
If you want to disable the creation of new files in specific folders, you can do this by adding the
143+
`disableCreation` property to the page folder. Once this is added, the CMS will only use the folder
144+
to show the files.
145+
146+
```json
147+
{
148+
"frontMatter.content.pageFolders": [
149+
{
150+
"title": "Blog",
151+
"path": "[[workspace]]/content/blog",
152+
"disableCreation": true
153+
}
154+
]
155+
}
156+
```

content/docs/custom-actions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Custom actions
33
slug: custom-actions
44
description: null
55
date: 2021-08-30T16:13:00.546Z
6-
lastmod: 2023-04-28T09:19:34.217Z
6+
lastmod: 2023-10-06T13:49:58.889Z
77
weight: 500
88
---
99

@@ -47,6 +47,7 @@ Custom actions can be configured with the following properties:
4747
| `outputType` | `<text \| html>` | Specifies the output type (optional). <br /><br /> Available values the editor values from VS Code like: <br /><br /> `text`: The output will be passed as a text file. <br /> `html`: The output will be passed as an HTML file. <br /> `markdown`: The output will be passed as a Markdown file. | `text` |
4848
| `hidden` | `boolean` | Hide the action from the UI. This is mostly used when creating a content script that will be used to post process new content (optional). | `false` |
4949
| `environments` | `environment` | The environments option allows you to specify in which environments the script should be executed (optional). <br /><br /> Available values are: `macos`, `linux`, or `windows`. | `undefined` |
50+
| `contentTypes` | `string[]` | The content types for which the script will be used (optional). <br /><br /> Example: `["post"]` | `undefined` |
5051

5152
> **Important**: Previously, you could define the `nodeBin` property to define the path to your node
5253
> executable. This path was needed when you are working with for instance `nvm` and have multiple

content/docs/dashboard/content-view.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Content view
33
slug: content-view
44
description: null
55
date: 2022-11-28T14:55:04.221Z
6-
lastmod: 2023-08-20T10:48:05.769Z
6+
lastmod: 2023-10-06T13:36:12.765Z
77
weight: 300.1
88
---
99

@@ -82,7 +82,15 @@ project, not for all of them.
8282
## Content pagination
8383

8484
By default, the content is paginated by 16 items. If you want, you can disable the pagination by
85-
setting the `frontMatter.dashboard.content.pagination` setting to `false`. In case you want to change the number of items per page, you can specify a number in the same setting.
85+
setting the `frontMatter.dashboard.content.pagination` setting to `false`.
86+
In case you want to change the number of items per page, you can specify a number in the same setting.
87+
88+
## Content pinning
89+
90+
In case you have content which you want to highlight, or use frequently. You can pin it to the top
91+
of the content view. This will allow you to quickly access.
92+
93+
![Pin content to your dashboard](/releases/v9.3.0/content-pinning-light.png)
8694

8795
<!-- Link References -->
8896

0 commit comments

Comments
 (0)