Skip to content

Commit 269bb0b

Browse files
committed
Release v10.1.0
1 parent 02b34cd commit 269bb0b

File tree

8 files changed

+128
-4
lines changed

8 files changed

+128
-4
lines changed

.frontmatter/database/mediaDb.json

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

content/changelog/v10.0.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Version 10.0.0 release notes
33
description: Version 10.0.0 of our CMS introduces the much-awaited feature of multilingual support, enabling you to handle content in various languages, new taxonomy view, media content types, and more.
44
date: 2024-02-28T10:48:53.569Z
5-
lastmod: 2024-02-28T14:05:58.491Z
5+
lastmod: 2024-04-11T14:28:29.944Z
66
slug: v10.0.0
77
type: changelog
88
---

content/changelog/v10.1.0.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Version 10.1.0 release notes
3+
description: Get the latest updates on the release of Version 10.1.0 and its new features, including a command bar for contents and media.
4+
date: 2024-04-11T14:27:57.852Z
5+
lastmod: 2024-04-11T15:14:56.862Z
6+
slug: v10.1.0
7+
type: changelog
8+
---
9+
10+
## Command bar for contents and media dashboard
11+
12+
We have added a new command bar to the contents and media dashboard. This command bar allows you to perform common actions for single and multiple items.
13+
14+
![New command bar](/releases/v10.1.0/command-bar.png)
15+
16+
### Common actions on cards
17+
18+
Besides the new command bar, the common actions on content and media cards have been updated. You can now find these actions at the bottom of the card.
19+
20+
![Card actions](/releases/v10.1.0/card-actions.png)
21+
22+
## Support for glob patterns in the page folder paths
23+
24+
You can now use glob patterns in the page folder paths. This allows you to define a folder path that matches multiple folders.
25+
26+
```json {{ "title": "Example of the content folders configuration" }}
27+
{
28+
"frontMatter.content.pageFolders": [
29+
{
30+
"title": "Docs",
31+
"path": "[[workspace]]/content/**/docs"
32+
}
33+
]
34+
}
35+
```
36+
37+
## Extensibility enhancements
38+
39+
### Open a file or webpage from a custom script
40+
41+
With version `0.0.15` of the [@frontmatter/extensibility](https://www.npmjs.com/package/@frontmatter/extensibility) it is now possible to open a file or webpage when a custom script is completed.
42+
43+
```typescript
44+
import { ContentScript } from "@frontmatter/extensibility";
45+
46+
ContentScript.open(`<path to a file>`);
47+
ContentScript.open(`<URL of a webpage>`);
48+
```
49+
50+
### Always show the custom panel view
51+
52+
The custom panel view will now always be shown, not only when content is opened. This can be useful for showing some general information about your website.
53+
54+
![Custom panel view](/releases/v10.1.0/custom-panel.png)
55+
56+
## Related issues/enhancements
57+
58+
### ✨ New features
59+
60+
- [#671](https://github.com/estruyf/vscode-front-matter/issues/671): Command bar for contents and media dashboard
61+
62+
### 🎨 Enhancements
63+
64+
- [#773](https://github.com/estruyf/vscode-front-matter/issues/773): Added the ability to rename content files
65+
- [#777](https://github.com/estruyf/vscode-front-matter/issues/777): Show an error in the metadata panel if something went wrong while parsing the front matter
66+
- [#778](https://github.com/estruyf/vscode-front-matter/issues/778): Added the ability to open a file or webpage when custom scripts is completed
67+
- [#783](https://github.com/estruyf/vscode-front-matter/issues/783): Always show the custom panel view
68+
- [#785](https://github.com/estruyf/vscode-front-matter/issues/785): Adding common actions at the bottom of the content and media cards
69+
- [#787](https://github.com/estruyf/vscode-front-matter/issues/787): Support for glob patterns in the page folder paths
70+
71+
### 🐞 Fixes
72+
73+
- [#716](https://github.com/estruyf/vscode-front-matter/issues/716): Fix `dataFile` dropdown class
74+
- [#768](https://github.com/estruyf/vscode-front-matter/issues/768): Update broken link to the documentation
75+
- [#771](https://github.com/estruyf/vscode-front-matter/issues/771): Fix lowercase `data` tab label
76+
- [#782](https://github.com/estruyf/vscode-front-matter/issues/782): Fix for setting the correct view when inserting media or snippets
77+
- [#786](https://github.com/estruyf/vscode-front-matter/issues/786): Remove on startup as VSCode now triggers on known commands

content/docs/content-creation/content-folders.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Content folders
33
slug: content-creation/content-folders
44
description: Learn how to let Front Matter CMS know where to find and create your content
55
date: 2024-02-21T09:10:16.640Z
6-
lastmod: 2024-02-22T17:36:42.825Z
6+
lastmod: 2024-04-11T15:12:19.769Z
77
weight: 200.11
88
---
99

@@ -37,6 +37,10 @@ Content folders are stored in the [frontMatter.content.pageFolders][02] setting.
3737
"title": "Blog posts",
3838
"path": "[[workspace]]/content/posts"
3939
},
40+
{
41+
"title": "Glob pattern support",
42+
"path": "[[workspace]]/content/**/docs"
43+
},
4044
{
4145
"title": "docs",
4246
"path": "[[workspace]]/docs",

content/docs/custom-actions.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Custom actions/scripts
33
slug: custom-actions
44
description: null
55
date: 2021-08-30T16:13:00.546Z
6-
lastmod: 2024-02-21T09:06:16.403Z
6+
lastmod: 2024-04-11T15:09:14.745Z
77
weight: 500
88
---
99

@@ -356,6 +356,49 @@ we create a new question for the user and return the script without any output.
356356
`answers` property will be available in the arguments.
357357
1. We will fetch the width from the answers and resize the image accordingly.
358358

359+
## Open a file or webpage from a custom script
360+
361+
If you want to open a file or webpage from a custom script, you can use the `ContentScript.open`
362+
function from the `@frontmatter/extensibility` package.
363+
364+
Here is a sample on how you can open a file or webpage from a custom script:
365+
366+
```javascript {{ "title": "Sample script where at the end a webpage is opened" }}
367+
import { ContentScript } from '@frontmatter/extensibility';
368+
369+
(() => {
370+
const contentScriptArgs = ContentScript.getArguments();
371+
if (contentScriptArgs) {
372+
const { frontMatter: { title, slug }, answers } = contentScriptArgs;
373+
374+
if (!answers) {
375+
ContentScript.askQuestions([{
376+
name: "platform",
377+
message: "Where do you want to share the article?",
378+
options: ["Twitter", "LinkedIn"]
379+
}]);
380+
return;
381+
}
382+
383+
const platform = answers.platform;
384+
if (!platform) {
385+
ContentScript.done(`No platform provided`);
386+
return;
387+
}
388+
389+
const url = `https://www.eliostruyf.com${slug.startsWith("/") ? slug : `/${slug}`}`;
390+
let shareUrl = "";
391+
if (platform === "Twitter") {
392+
shareUrl = `http://twitter.com/share?text=${encodeURIComponent(title)}&url=${encodeURIComponent(url)}`;
393+
} else if (platform === "LinkedIn") {
394+
shareUrl = `https://www.linkedin.com/shareArticle?mini=true&url=${encodeURIComponent(url)}`;
395+
}
396+
397+
ContentScript.open(shareUrl);
398+
}
399+
})();
400+
```
401+
359402
## Sample scripts
360403

361404
### Bash starter
343 KB
Loading
595 KB
Loading
81 KB
Loading

0 commit comments

Comments
 (0)