mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-05-04 04:22:33 +02:00
Issue: slug placeholder not working if there is no title field #830
This commit is contained in:
5
src/utils/getDescriptionField.ts
Normal file
5
src/utils/getDescriptionField.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { DefaultFields, SETTING_SEO_DESCRIPTION_FIELD } from '../constants';
|
||||
import { Settings } from '../helpers';
|
||||
|
||||
export const getDescriptionField = () =>
|
||||
Settings.get<string>(SETTING_SEO_DESCRIPTION_FIELD) || DefaultFields.Description;
|
||||
5
src/utils/getTitleField.ts
Normal file
5
src/utils/getTitleField.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { DefaultFields, SETTING_SEO_TITLE_FIELD } from '../constants';
|
||||
import { Settings } from '../helpers';
|
||||
|
||||
export const getTitleField = () =>
|
||||
Settings.get<string>(SETTING_SEO_TITLE_FIELD) || DefaultFields.Title;
|
||||
@@ -5,8 +5,10 @@ export * from './existsAsync';
|
||||
export * from './fetchWithTimeout';
|
||||
export * from './fieldWhenClause';
|
||||
export * from './flattenObjectKeys';
|
||||
export * from './getDescriptionField';
|
||||
export * from './getExtensibilityScripts';
|
||||
export * from './getLocalizationFile';
|
||||
export * from './getTitleField';
|
||||
export * from './ignoreMsgCommand';
|
||||
export * from './isWindows';
|
||||
export * from './joinUrl';
|
||||
|
||||
Reference in New Issue
Block a user