Front Matter CMS brings the CMS to your editor, it runs within Visual Studio Code, GitPod, and many more.
In this section, we’ll walk through how to add Front Matter CMS to your Astro project.
You can get the extension from the Visual Studio Code Marketplace - Front Matter or by clicking on the following link: open Front Matter CMS extension in VS Code
Once Front Matter CMS is installed, you will get a new icon in the Activity Bar. It will open the Front Matter CMS panel in the primary sidebar when you click on it. Follow the next steps to initialize your project:
src/content/blog folder.Once the project is initialized, you will get a frontmatter.json configuration file and a .frontmatter folder in the root of your project.
Content-types are the way Front Matter CMS manages your content. Each content-type contains a set of fields, which can be defined per type of content you want to use for your website.
The fields correspond to the front matter of your page content.
You can configure the content-types in the frontmatter.json file.
frontmatter.json filefrontMatter.taxonomy.contentTypes array with the following content-types configuration:From the Front Matter CMS panel, click on the Start server button. This action starts the Astro local dev server. Once running, you can open the content dashboard, select one of the articles and click on the Open preview button to open the article in the editor.
Open the Front Matter CMS Dashboard; you can do this as follows:
To use Markdoc with Front Matter CMS, you must configure this in the frontMatter.content.supportedFileTypes. This setting lets the CMS know which types of files it can progress.
You can configure the setting as follows:
To allow your content to be created as Markdoc, specify the fileType property on the content-type.
© 2021 Fred K. Schott
Licensed under the MIT License.
https://docs.astro.build/en/guides/cms/frontmatter-cms/