Skip to content

Commit

Permalink
Added release notes and documentation updated for v9.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Aug 20, 2023
1 parent 826bb02 commit dbca269
Show file tree
Hide file tree
Showing 17 changed files with 550 additions and 132 deletions.
2 changes: 1 addition & 1 deletion .frontmatter/database/mediaDb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .frontmatter/database/taxonomyDb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{"taxonomy":{"tags":["content-creation","dashboard","editor-panel","getting-started"],"categories":["changelog","community","docs","showcase","sponsor"]}}
1 change: 0 additions & 1 deletion .frontmatter/mediaDb.json

This file was deleted.

24 changes: 13 additions & 11 deletions components/Docs/CodeHighlighting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const CodeBlock: React.FunctionComponent<ICodeBlockProps> = ({ className,

const CodePanel = ({ annotation, children, ...props }: React.PropsWithChildren<ICodeBlockProps>) => {
const child = Children.only(children) as any;

const { title, description } = useMemo(() => {
let data = { title: '', description: '' };

Expand All @@ -49,7 +49,7 @@ const CodePanel = ({ annotation, children, ...props }: React.PropsWithChildren<I
return child.props.children.toString();
}
}, [child])

return (
<div className='code__wrapper group'>
{
Expand All @@ -65,7 +65,7 @@ const CodePanel = ({ annotation, children, ...props }: React.PropsWithChildren<I
<pre>
{children}
</pre>

{
code && <CopyButton code={code} />
}
Expand All @@ -75,20 +75,21 @@ const CodePanel = ({ annotation, children, ...props }: React.PropsWithChildren<I
}

export const CodeHighlighting: React.FunctionComponent<ICodeHighlightingProps> = ({ className, children, ...props }: React.PropsWithChildren<ICodeHighlightingProps>) => {
const [ code, setCode ] = React.useState('');
const [code, setCode] = React.useState('');

React.useEffect(() => {
if (className && children) {
const language = className.split('-')[1];

shiki.setCDN(`../../`);

console.log(language);

shiki.getHighlighter({
langs: [language as any],
theme: `the-unnamed`
}).then((highlighter: shiki.Highlighter) => {
let code = children.toString();

if (code.endsWith(`\n`)) {
code = code.slice(0, -1);
}
Expand All @@ -98,11 +99,12 @@ export const CodeHighlighting: React.FunctionComponent<ICodeHighlightingProps> =
lang: getLanguage(className)
})
);
}).then(() => {
if (___location.hash) {
___location.href = ___location.href;
}
});
})
.then(() => {
if (___location.hash) {
___location.href = ___location.href;
}
});
}
}, [className, children]);

Expand Down Expand Up @@ -132,6 +134,6 @@ export const CodeHighlighting: React.FunctionComponent<ICodeHighlightingProps> =
}

return (
<div dangerouslySetInnerHTML={{__html: code}} />
<div dangerouslySetInnerHTML={{ __html: code }} />
);
};
24 changes: 23 additions & 1 deletion content/changelog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
# Change Log

## [8.5.0] - 2023-xx-xx
## [9.0.0] - 2023-xx-xx

### 🌎 Multilingual support

- German (translated via OpenAI)
- Japanese (thanks to [mayumihara](https://github.com/mayumih387))

### 🧪 Experimental features

- External UI script support for dashboards
- Front matter AI 🤖

### ✨ New features

- Added description AI suggestion for GitHub sponsors
- The Visual Studio Code theme support is now released in the stable version
- [#424](https://github.com/estruyf/vscode-front-matter/issues/424): Snippet wrapping to allow easier updates or changes to previously set snippets in the content
- [#585](https://github.com/estruyf/vscode-front-matter/issues/585): New content relationship field type (`contentRelationship`)
- [#598](https://github.com/estruyf/vscode-front-matter/issues/598): Multilingual support
- [#615](https://github.com/estruyf/vscode-front-matter/issues/615): Added support for `astro:assets` - [Astro Assets](https://docs.astro.build/en/guides/assets/)

### 🎨 Enhancements

Expand All @@ -18,6 +32,9 @@
- [#591](https://github.com/estruyf/vscode-front-matter/issues/591): Support for date format in the `datetime` field
- [#593](https://github.com/estruyf/vscode-front-matter/issues/593): Add support for date formatting in the preview path
- [#599](https://github.com/estruyf/vscode-front-matter/issues/599): Add a placeholder when the base panel view is empty
- [#602](https://github.com/estruyf/vscode-front-matter/issues/602): Find content outside the Front Matter workspace folder
- [#611](https://github.com/estruyf/vscode-front-matter/issues/611): Fix typo in the `frontMatter.global.disabledNotifications` setting
- [#619](https://github.com/estruyf/vscode-front-matter/issues/619): Added the `fmWebviewUrl` property to be used in the `registerCardImage` extensibility library

### ⚡️ Optimizations

Expand All @@ -32,6 +49,11 @@
- [#590](https://github.com/estruyf/vscode-front-matter/issues/590): Fix for image fields inside a sub-block
- [#595](https://github.com/estruyf/vscode-front-matter/issues/595): Fix for media metadata now showing up
- [#596](https://github.com/estruyf/vscode-front-matter/issues/596): Fix for number field in block data
- [#603](https://github.com/estruyf/vscode-front-matter/issues/603): Fix problem with page bundles and path placeholders
- [#616](https://github.com/estruyf/vscode-front-matter/issues/616): Fix content filtering
- [#617](https://github.com/estruyf/vscode-front-matter/issues/617): Fix insert media snippet dialog by using a slideover instead of a dialog
- [#620](https://github.com/estruyf/vscode-front-matter/issues/620): Fix in array field of data files
- [#621](https://github.com/estruyf/vscode-front-matter/issues/621): Create data file if it does not exist yet

## [8.4.0] - 2023-04-03 - [Release notes](https://beta.frontmatter.codes/updates/v8.4.0)

Expand Down
164 changes: 164 additions & 0 deletions content/changelog/v9.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
title: Version 9.0.0 release notes
description: Discover the new features and enhancements of version 9.0.0 of Front Matter CMS, including multilingual support, Astro assets, and more.
date: 2023-08-20T09:28:11.087Z
lastmod: 2023-08-20T12:11:26.028Z
slug: ""
type: changelog
---

<!-- markdownlint-disable MD013 MD041 -->

## Multilingual UI

In this version, with the help of [mayumihara](https://github.com/mayumih387), we added multilingual UI support for Japanese and German. When you are using Japanese or German as the display language in Visual Studio Code, the extension will automatically switch to the translated UI.

> **Info**: In case you are interested in adding your own language, you can do so by following the steps in the [contributing documentation](/docs/contributing) section.
## Visual Studio Code theme support

The Visual Studio Code theme support is now released in the stable version. This means that you can now use the Front Matter CMS extension with your favorite theme. You do not have to enable the experimental setting anymore.

## New content relationship field type

In this version we added a new field type called `contentRelationship`. This field type allows you to create relationships between content. It can for instance be used to reference an author, or a related blog post.

Example of a content relationship field:

```json
"frontMatter.taxonomy.contentTypes": [{
"name": "project",
"pageBundle": false,
"fields": [
{
"title": "Title",
"name": "title",
"type": "string",
"required": true
},
{
"title": "Session",
"name": "session",
"type": "contentRelationship", // This is the new field type
"contentTypeName": "session", // Name of the content-type to link
"contentTypeValue": "slug", // The type of link/value you want to add. This can be "slug", or "path".
"required": true
},
{
"title": "Session path",
"name": "sessionPath",
"type": "contentRelationship",
"contentTypeName": "session",
"contentTypeValue": "path",
"required": true
}
]
}]
```

## Support for Astro assets

We have added support for the new [Astro assets](https://docs.astro.build/en/guides/assets/) feature. This allows you to add images and other assets to your content.

![Astro assets support](/releases/v9.0.0/astro-assets.png)

You can also manually configure it, by adding the following configuration in the `frontMatter.content.publicFolder` setting:

```json
{
"frontMatter.content.publicFolder": {
"path": "src/assets",
"relative": true
}
}
```

> **Important**: This feature can also be used with other frameworks where you need to relatively link your assets to the content ___location.
## More control over the content card

New settings have been added to allow you to control which kind of data gets rendered in the content card. You can define the title, description, state, and date.

```json
"frontMatter.dashboard.content.card.fields.title": "altTitle", // string or null (null to hide the title)
"frontMatter.dashboard.content.card.fields.description": "altDescription", // string or null (null to hide the description)
"frontMatter.dashboard.content.card.fields.state": true, // Show/hide the state/draft status. Set to false to hide it.
"frontMatter.dashboard.content.card.fields.date": false, // Set to false to hide the date.
```

## Tags and categories moved to its own database file

The tags and categories are now moved to a separate database file (`.frontmatter/database/taxonomyDb.json`). This database file allows cleaner configuration files.

## Better website previews

There have been various improvements to the preview functionality. First of all, we now keep the panel context when you are previewing the website. It means that you can keep on modifying the metadata, while you are previewing the content/page.

In case you update the slug of the content, the preview URL will be updated as well.

Last but not least, you are now able to define formatting for your date fields in the preview URL.

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

## Snippet wrapper

The snippet wrapper functionality automatically wraps the inserted snippet in your content with the inserted data. This allows Front Matter to update the snippet when you want to change the data.

Example of the wrapper:

```html
<!-- FM:Snippet:Start data:{"id":"Highlight (single)","fields":[{"name":"type","value":"typescript"},{"name":"selection","value":"Selected text from content"}]} -->
{{< highlight typescript "linenos=table,noclasses=false" >}}
Selected text from content
{{< / highlight >}}
<!-- FM:Snippet:End -->
```

When you select the wrapper, or the actual code, and open the snippet panel, it shows you the options to update the current snippet.

The wrapper can be disabled with the `frontMatter.snippets.wrapper.enabled` setting. By default, it is enabled.

## Related issues/enhancements

### ✨ New features

- Added description AI suggestion for GitHub sponsors
- The Visual Studio Code theme support is now released in the stable version
- [#424](https://github.com/estruyf/vscode-front-matter/issues/424): Snippet wrapping to allow easier updates or changes to previously set snippets in the content
- [#585](https://github.com/estruyf/vscode-front-matter/issues/585): New content relationship field type (`contentRelationship`)
- [#598](https://github.com/estruyf/vscode-front-matter/issues/598): Multilingual support
- [#615](https://github.com/estruyf/vscode-front-matter/issues/615): Added support for `astro:assets` - [Astro Assets](https://docs.astro.build/en/guides/assets/)

### 🎨 Enhancements

- [#558](https://github.com/estruyf/vscode-front-matter/issues/558): Moved the tags and categories to a `.frontmatter/database/taxonomyDb.json` file
- [#566](https://github.com/estruyf/vscode-front-matter/issues/566): Keep the panel context on the live preview
- [#568](https://github.com/estruyf/vscode-front-matter/issues/568): Update the preview URL if the slug changes
- [#569](https://github.com/estruyf/vscode-front-matter/issues/569): Remove the page bundle folder on content removal
- [#586](https://github.com/estruyf/vscode-front-matter/issues/586): Allow to specify the content card fields
- [#588](https://github.com/estruyf/vscode-front-matter/issues/588): Added extensibility support to override card fields
- [#591](https://github.com/estruyf/vscode-front-matter/issues/591): Support for date format in the `datetime` field
- [#593](https://github.com/estruyf/vscode-front-matter/issues/593): Add support for date formatting in the preview path
- [#599](https://github.com/estruyf/vscode-front-matter/issues/599): Add a placeholder when the base panel view is empty
- [#602](https://github.com/estruyf/vscode-front-matter/issues/602): Find content outside the Front Matter workspace folder
- [#611](https://github.com/estruyf/vscode-front-matter/issues/611): Fix typo in the `frontMatter.global.disabledNotifications` setting
- [#619](https://github.com/estruyf/vscode-front-matter/issues/619): Added the `fmWebviewUrl` property to be used in the `registerCardImage` extensibility library

### ⚡️ Optimizations

- [#584](https://github.com/estruyf/vscode-front-matter/issues/584): Ignore type field in content-type validation

### 🐞 Fixes

- [#564](https://github.com/estruyf/vscode-front-matter/issues/564): Fix to only pass strings to the taxonomy dashboard
- [#567](https://github.com/estruyf/vscode-front-matter/issues/567): Fix taxonomy filters that are incorrectly positioned
- [#572](https://github.com/estruyf/vscode-front-matter/issues/572): Fix the media snippet placeholder link
- [#577](https://github.com/estruyf/vscode-front-matter/issues/577): Fix in the `dataFile` field where data entries get overwritten
- [#590](https://github.com/estruyf/vscode-front-matter/issues/590): Fix for image fields inside a sub-block
- [#595](https://github.com/estruyf/vscode-front-matter/issues/595): Fix for media metadata now showing up
- [#596](https://github.com/estruyf/vscode-front-matter/issues/596): Fix for number field in block data
- [#603](https://github.com/estruyf/vscode-front-matter/issues/603): Fix problem with page bundles and path placeholders
- [#616](https://github.com/estruyf/vscode-front-matter/issues/616): Fix content filtering
- [#617](https://github.com/estruyf/vscode-front-matter/issues/617): Fix insert media snippet dialog by using a slideover instead of a dialog
- [#620](https://github.com/estruyf/vscode-front-matter/issues/620): Fix in array field of data files
- [#621](https://github.com/estruyf/vscode-front-matter/issues/621): Create data file if it does not exist yet
35 changes: 31 additions & 4 deletions content/docs/content-creation/fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Fields
slug: content-creation/fields
description: null
date: 2022-03-14T08:42:21.626Z
lastmod: 2023-04-01T13:38:44.449Z
lastmod: 2023-08-20T10:29:11.225Z
weight: 200.2
---

Expand All @@ -29,6 +29,7 @@ Front Matter supports the following fields to be used in the content-types:
- [block](#block)
- [dataFile](#data-file)
- [slug](#slug)
- [contentRelationship](#contentrelationship)

There are also the following section fields:

Expand Down Expand Up @@ -414,7 +415,7 @@ attachments:

## Tags

The `tags` field allows you to create or use tags from your `frontMatter.taxonomy.tags` setting (by
The `tags` field allows you to create or use tags from your `.frontmatter/database/taxonomyDb.json` file (by
default, none existing). When adding a tag which does not yet exist, you will have the option to
create it.

Expand Down Expand Up @@ -454,8 +455,8 @@ tags:

## Categories

The `categories` field is similar to the [tags][09] field. The difference is that it uses the
`frontMatter.taxonomy.categories` setting (by default, none existing).
The `categories` field is similar to the [tags][09] field. Categories are also stored in the
`.frontmatter/database/taxonomyDb.json` file.

### Properties

Expand Down Expand Up @@ -757,6 +758,32 @@ slug: version-8-0-0-release-notes
> **Info**: The slug is generated based on the title of the page. More information about it can be
> found in the [generate slug][15] command section.
## contentRelationship

The `contentRelationship` field type allows you to create relationships between content. It can for
instance be used to reference an author, or a related blog post.

### Properties

- `contentTypeName`: The name of the content-type to link.
- `contentTypeValue`: The type of link/value you want to add. This can be `slug`, or `path`.

```json {{ "title": "Usage" }}
{
"title": "Session",
"name": "session",
"type": "contentRelationship",
"contentTypeName": "session",
"contentTypeValue": "slug"
}
```

```yaml {{ "title": "Outcome" }}
---
session: /session-slug/
---
```

## Divider

The `divider` field type allows you to add a divider to your content type. This is useful when you
Expand Down
Loading

0 comments on commit dbca269

Please sign in to comment.