feat: Add support for DefaultFields.Keywords in ContentTypeValidator #467

This commit is contained in:
Elio Struyf
2024-07-09 21:26:52 +02:00
parent b81e92ef9e
commit ced7e41fe6
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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,