mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-06 17:02:54 +02:00
feat: Add support for DefaultFields.Keywords in ContentTypeValidator #467
This commit is contained in:
@@ -5,5 +5,6 @@ export const DefaultFields = {
|
||||
Title: `title`,
|
||||
Slug: `slug`,
|
||||
Type: `type`,
|
||||
ContentType: `fmContentType`
|
||||
ContentType: `fmContentType`,
|
||||
Keywords: `keywords`
|
||||
};
|
||||
|
||||
@@ -8,13 +8,14 @@ import { IMetadata } from '../Metadata';
|
||||
import * as l10n from '@vscode/l10n';
|
||||
import { LocalizationKey } from '../../../localization';
|
||||
import { VSCodeLabel } from '../VSCode';
|
||||
import { DefaultFields } from '../../../constants';
|
||||
|
||||
export interface IContentTypeValidatorProps {
|
||||
fields: Field[];
|
||||
metadata: IMetadata;
|
||||
}
|
||||
|
||||
const fieldsToIgnore = [`filePath`, `articleDetails`, `slug`, `keywords`, `type`];
|
||||
const fieldsToIgnore = [`filePath`, `articleDetails`, DefaultFields.Slug, DefaultFields.Keywords, DefaultFields.Type, DefaultFields.ContentType];
|
||||
|
||||
export const ContentTypeValidator: React.FunctionComponent<IContentTypeValidatorProps> = ({
|
||||
fields,
|
||||
|
||||
Reference in New Issue
Block a user