diff --git a/src/constants/DefaultFields.ts b/src/constants/DefaultFields.ts index eb4f3c45..a0168682 100644 --- a/src/constants/DefaultFields.ts +++ b/src/constants/DefaultFields.ts @@ -5,5 +5,6 @@ export const DefaultFields = { Title: `title`, Slug: `slug`, Type: `type`, - ContentType: `fmContentType` + ContentType: `fmContentType`, + Keywords: `keywords` }; diff --git a/src/panelWebView/components/ContentType/ContentTypeValidator.tsx b/src/panelWebView/components/ContentType/ContentTypeValidator.tsx index 96649bf8..36dbbb96 100644 --- a/src/panelWebView/components/ContentType/ContentTypeValidator.tsx +++ b/src/panelWebView/components/ContentType/ContentTypeValidator.tsx @@ -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 = ({ fields,