Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
25 lines
711 B
Plaintext
25 lines
711 B
Plaintext
import { getTranslation } from '@payloadcms/translations';
|
|
import { generateMetadata } from '../../utilities/meta.js';
|
|
export const generateCollectionFolderMetadata = async args => {
|
|
const {
|
|
collectionConfig,
|
|
config,
|
|
i18n
|
|
} = args;
|
|
let title = '';
|
|
const description = '';
|
|
const keywords = '';
|
|
if (collectionConfig) {
|
|
title = getTranslation(collectionConfig.labels.singular, i18n);
|
|
}
|
|
title = `${title ? `${title} ` : title}${i18n.t('folder:folders')}`;
|
|
return generateMetadata({
|
|
...(config.admin.meta || {}),
|
|
description,
|
|
keywords,
|
|
serverURL: config.serverURL,
|
|
title,
|
|
...(collectionConfig?.admin?.meta || {})
|
|
});
|
|
};
|
|
//# sourceMappingURL=metadata.js.map |