chore(plugin-seo): prettier, lint, adjust package.json
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@payloadcms/eslint-config": "workspace:*",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/react": "18.2.15",
|
||||
"payload": "workspace:*",
|
||||
"@payloadcms/translations": "workspace:*",
|
||||
|
||||
@@ -35,7 +35,7 @@ export const MetaDescription: React.FC<MetaDescriptionProps> = (props) => {
|
||||
path,
|
||||
} as Options)
|
||||
|
||||
const { setValue, showError, value, errorMessage } = field
|
||||
const { errorMessage, setValue, showError, value } = field
|
||||
|
||||
const regenerateDescription = useCallback(async () => {
|
||||
const { generateDescription } = pluginConfig
|
||||
@@ -70,8 +70,8 @@ export const MetaDescription: React.FC<MetaDescriptionProps> = (props) => {
|
||||
{required && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: '5px',
|
||||
color: 'var(--theme-error-500)',
|
||||
marginLeft: '5px',
|
||||
}}
|
||||
>
|
||||
*
|
||||
@@ -121,15 +121,15 @@ export const MetaDescription: React.FC<MetaDescriptionProps> = (props) => {
|
||||
}}
|
||||
>
|
||||
<Textarea
|
||||
errorMessage={errorMessage}
|
||||
name={name}
|
||||
onChange={setValue}
|
||||
path={name}
|
||||
required={required}
|
||||
showError={showError}
|
||||
style={{
|
||||
marginBottom: 0,
|
||||
}}
|
||||
required={required}
|
||||
errorMessage={errorMessage}
|
||||
value={value}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@ export const MetaImage: React.FC<MetaImageProps> = (props) => {
|
||||
const [fields] = useAllFormFields()
|
||||
const docInfo = useDocumentInfo()
|
||||
|
||||
const { setValue, showError, value, errorMessage } = field
|
||||
const { errorMessage, setValue, showError, value } = field
|
||||
|
||||
const regenerateImage = useCallback(async () => {
|
||||
const { generateImage } = pluginConfig
|
||||
@@ -72,8 +72,8 @@ export const MetaImage: React.FC<MetaImageProps> = (props) => {
|
||||
{required && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: '5px',
|
||||
color: 'var(--theme-error-500)',
|
||||
marginLeft: '5px',
|
||||
}}
|
||||
>
|
||||
*
|
||||
@@ -120,10 +120,9 @@ export const MetaImage: React.FC<MetaImageProps> = (props) => {
|
||||
<UploadInput
|
||||
api={api}
|
||||
collection={collection}
|
||||
errorMessage={errorMessage}
|
||||
fieldTypes={fieldTypes}
|
||||
filterOptions={{}}
|
||||
errorMessage={errorMessage}
|
||||
required={required}
|
||||
label={undefined}
|
||||
name={name}
|
||||
onChange={(incomingImage) => {
|
||||
@@ -136,6 +135,7 @@ export const MetaImage: React.FC<MetaImageProps> = (props) => {
|
||||
}}
|
||||
path={name}
|
||||
relationTo={relationTo}
|
||||
required={required}
|
||||
serverURL={serverURL}
|
||||
showError={showError}
|
||||
style={{
|
||||
|
||||
@@ -39,7 +39,7 @@ export const MetaTitle: React.FC<MetaTitleProps> = (props) => {
|
||||
const [fields] = useAllFormFields()
|
||||
const docInfo = useDocumentInfo()
|
||||
|
||||
const { setValue, showError, value, errorMessage } = field
|
||||
const { errorMessage, setValue, showError, value } = field
|
||||
|
||||
const regenerateTitle = useCallback(async () => {
|
||||
const { generateTitle } = pluginConfig
|
||||
@@ -74,8 +74,8 @@ export const MetaTitle: React.FC<MetaTitleProps> = (props) => {
|
||||
{required && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: '5px',
|
||||
color: 'var(--theme-error-500)',
|
||||
marginLeft: '5px',
|
||||
}}
|
||||
>
|
||||
*
|
||||
@@ -126,15 +126,15 @@ export const MetaTitle: React.FC<MetaTitleProps> = (props) => {
|
||||
}}
|
||||
>
|
||||
<TextInput
|
||||
errorMessage={errorMessage}
|
||||
name={name}
|
||||
onChange={setValue}
|
||||
path={name}
|
||||
required={required}
|
||||
showError={showError}
|
||||
style={{
|
||||
marginBottom: 0,
|
||||
}}
|
||||
errorMessage={errorMessage}
|
||||
required={required}
|
||||
value={value}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"$schema": "./translation-schema.json",
|
||||
"plugin-seo": {
|
||||
"autoGenerate": "Auto-generate",
|
||||
"imageAutoGenerationTip": "Auto-generation will retrieve the selected hero image.",
|
||||
"bestPractices": "best practices",
|
||||
"lengthTipTitle": "This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ",
|
||||
"lengthTipDescription": "This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ",
|
||||
"good": "Good",
|
||||
"tooLong": "Too long",
|
||||
"tooShort": "Too short",
|
||||
"almostThere": "Almost there",
|
||||
"autoGenerate": "Auto-generate",
|
||||
"bestPractices": "best practices",
|
||||
"characterCount": "{{current}}/{{minLength}}-{{maxLength}} chars, ",
|
||||
"charactersToGo": "{{characters}} to go",
|
||||
"charactersLeftOver": "{{characters}} left over",
|
||||
"charactersToGo": "{{characters}} to go",
|
||||
"charactersTooMany": "{{characters}} too many",
|
||||
"noImage": "No image",
|
||||
"checksPassing": "{{current}}/{{max}} checks are passing",
|
||||
"good": "Good",
|
||||
"imageAutoGenerationTip": "Auto-generation will retrieve the selected hero image.",
|
||||
"lengthTipDescription": "This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta descriptions, see ",
|
||||
"lengthTipTitle": "This should be between {{minLength}} and {{maxLength}} characters. For help in writing quality meta titles, see ",
|
||||
"noImage": "No image",
|
||||
"preview": "Preview",
|
||||
"previewDescription": "Exact result listings may vary based on content and search relevancy."
|
||||
"previewDescription": "Exact result listings may vary based on content and search relevancy.",
|
||||
"tooLong": "Too long",
|
||||
"tooShort": "Too short"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"$schema": "./translation-schema.json",
|
||||
"plugin-seo": {
|
||||
"autoGenerate": "Autogénerar",
|
||||
"imageAutoGenerationTip": "La autogeneración recuperará la imagen de héroe seleccionada.",
|
||||
"bestPractices": "mejores prácticas",
|
||||
"lengthTipTitle": "Debe tener entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir metatítulos de calidad, consulte ",
|
||||
"lengthTipDescription": "Esto debe estar entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir meta descripciones de calidad, consulte ",
|
||||
"good": "Bien",
|
||||
"tooLong": "Demasiado largo",
|
||||
"tooShort": "Demasiado corto",
|
||||
"almostThere": "Ya casi está",
|
||||
"autoGenerate": "Autogénerar",
|
||||
"bestPractices": "mejores prácticas",
|
||||
"characterCount": "{{current}}/{{minLength}}-{{maxLength}} letras, ",
|
||||
"charactersToGo": "{{characters}} letras sobrantes",
|
||||
"charactersLeftOver": "{{characters}} letras sobrantes",
|
||||
"charactersToGo": "{{characters}} letras sobrantes",
|
||||
"charactersTooMany": "{{characters}} letras demasiados",
|
||||
"noImage": "Sin imagen",
|
||||
"checksPassing": "{{current}}/{{max}} las comprobaciones están pasando",
|
||||
"good": "Bien",
|
||||
"imageAutoGenerationTip": "La autogeneración recuperará la imagen de héroe seleccionada.",
|
||||
"lengthTipDescription": "Esto debe estar entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir meta descripciones de calidad, consulte ",
|
||||
"lengthTipTitle": "Debe tener entre {{minLength}} y {{maxLength}} caracteres. Para obtener ayuda sobre cómo escribir metatítulos de calidad, consulte ",
|
||||
"noImage": "Sin imagen",
|
||||
"preview": "Vista previa",
|
||||
"previewDescription": "Las listas de resultados pueden variar segun la relevancia de buesqueda y el contenido."
|
||||
"previewDescription": "Las listas de resultados pueden variar segun la relevancia de buesqueda y el contenido.",
|
||||
"tooLong": "Demasiado largo",
|
||||
"tooShort": "Demasiado corto"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"$schema": "./translation-schema.json",
|
||||
"plugin-seo": {
|
||||
"autoGenerate": "تولید خودکار",
|
||||
"imageAutoGenerationTip": "این قابلیت، تصویر فعلی بارگذاری شده در مجموعه محتوای شما را بازیابی میکند",
|
||||
"bestPractices": "آموزش بیشتر",
|
||||
"lengthTipTitle": "این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن عناوین متا با کیفیت، مراجعه کنید به ",
|
||||
"lengthTipDescription": "این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن توضیحات متا با کیفیت، مراجعه کنید به ",
|
||||
"good": "خوب",
|
||||
"tooLong": "خیلی طولانی",
|
||||
"tooShort": "خیلی کوتاه",
|
||||
"almostThere": "چیزیی باقی نمونده",
|
||||
"autoGenerate": "تولید خودکار",
|
||||
"bestPractices": "آموزش بیشتر",
|
||||
"characterCount": "{{current}}/{{minLength}}-{{maxLength}} کلمه، ",
|
||||
"charactersToGo": "{{characters}} باقی مانده",
|
||||
"charactersLeftOver": "{{characters}} باقی مانده",
|
||||
"charactersToGo": "{{characters}} باقی مانده",
|
||||
"charactersTooMany": "{{characters}} بیش از حد",
|
||||
"noImage": "بدون تصویر",
|
||||
"checksPassing": "{{current}}/{{max}} بررسیها با موفقیت انجام شده است",
|
||||
"good": "خوب",
|
||||
"imageAutoGenerationTip": "این قابلیت، تصویر فعلی بارگذاری شده در مجموعه محتوای شما را بازیابی میکند",
|
||||
"lengthTipDescription": "این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن توضیحات متا با کیفیت، مراجعه کنید به ",
|
||||
"lengthTipTitle": "این باید بین {{minLength}} و {{maxLength}} کلمه باشد. برای کمک در نوشتن عناوین متا با کیفیت، مراجعه کنید به ",
|
||||
"noImage": "بدون تصویر",
|
||||
"preview": "پیشنمایش",
|
||||
"previewDescription": "فهرست نتایج ممکن است بر اساس محتوا و متناسب با کلمه کلیدی جستجو شده باشند"
|
||||
"previewDescription": "فهرست نتایج ممکن است بر اساس محتوا و متناسب با کلمه کلیدی جستجو شده باشند",
|
||||
"tooLong": "خیلی طولانی",
|
||||
"tooShort": "خیلی کوتاه"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"$schema": "./translation-schema.json",
|
||||
"plugin-seo": {
|
||||
"autoGenerate": "Auto-générer",
|
||||
"imageAutoGenerationTip": "L'auto-génération récupérera l'image principale sélectionnée.",
|
||||
"bestPractices": "bonnes pratiques",
|
||||
"lengthTipTitle": "Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des titres meta de qualité, consultez les ",
|
||||
"lengthTipDescription": "Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des descriptions meta de qualité, consultez les ",
|
||||
"good": "Bien",
|
||||
"tooLong": "Trop long",
|
||||
"tooShort": "Trop court",
|
||||
"almostThere": "On y est presque",
|
||||
"autoGenerate": "Auto-générer",
|
||||
"bestPractices": "bonnes pratiques",
|
||||
"characterCount": "{{current}}/{{minLength}}-{{maxLength}} caractères, ",
|
||||
"charactersToGo": "{{characters}} à ajouter",
|
||||
"charactersLeftOver": "{{characters}} restants",
|
||||
"charactersToGo": "{{characters}} à ajouter",
|
||||
"charactersTooMany": "{{characters}} en trop",
|
||||
"noImage": "Pas d'image",
|
||||
"checksPassing": "{{current}}/{{max}} vérifications réussies",
|
||||
"good": "Bien",
|
||||
"imageAutoGenerationTip": "L'auto-génération récupérera l'image principale sélectionnée.",
|
||||
"lengthTipDescription": "Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des descriptions meta de qualité, consultez les ",
|
||||
"lengthTipTitle": "Ceci devrait contenir entre {{minLength}} et {{maxLength}} caractères. Pour obtenir de l'aide pour rédiger des titres meta de qualité, consultez les ",
|
||||
"noImage": "Pas d'image",
|
||||
"preview": "Aperçu",
|
||||
"previewDescription": "Les résultats exacts peuvent varier en fonction du contenu et de la pertinence de la recherche."
|
||||
"previewDescription": "Les résultats exacts peuvent varier en fonction du contenu et de la pertinence de la recherche.",
|
||||
"tooLong": "Trop long",
|
||||
"tooShort": "Trop court"
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"$schema": "./translation-schema.json",
|
||||
"plugin-seo": {
|
||||
"autoGenerate": "Wygeneruj automatycznie",
|
||||
"imageAutoGenerationTip": "Automatyczne generowanie pobierze wybrany główny obraz.",
|
||||
"bestPractices": "najlepsze praktyki",
|
||||
"lengthTipTitle": "Długość powinna wynosić od {{minLength}} do {{maxLength}} znaków. Po porady dotyczące pisania wysokiej jakości meta tytułów zobacz ",
|
||||
"lengthTipDescription": "Długość powinna wynosić od {{minLength}} do {{maxLength}} znaków. Po porady dotyczące pisania wysokiej jakości meta opisów zobacz ",
|
||||
"good": "Dobrze",
|
||||
"tooLong": "Zbyt długie",
|
||||
"tooShort": "Zbyt krótkie",
|
||||
"almostThere": "Prawie gotowe",
|
||||
"autoGenerate": "Wygeneruj automatycznie",
|
||||
"bestPractices": "najlepsze praktyki",
|
||||
"characterCount": "{{current}}/{{minLength}}-{{maxLength}} znaków, ",
|
||||
"charactersToGo": "pozostało {{characters}} znaków",
|
||||
"charactersLeftOver": "zostało {{characters}} znaków",
|
||||
"charactersToGo": "pozostało {{characters}} znaków",
|
||||
"charactersTooMany": "{{characters}} znaków za dużo",
|
||||
"noImage": "Brak obrazu",
|
||||
"checksPassing": "{{current}}/{{max}} testów zakończonych pomyślnie",
|
||||
"good": "Dobrze",
|
||||
"imageAutoGenerationTip": "Automatyczne generowanie pobierze wybrany główny obraz.",
|
||||
"lengthTipDescription": "Długość powinna wynosić od {{minLength}} do {{maxLength}} znaków. Po porady dotyczące pisania wysokiej jakości meta opisów zobacz ",
|
||||
"lengthTipTitle": "Długość powinna wynosić od {{minLength}} do {{maxLength}} znaków. Po porady dotyczące pisania wysokiej jakości meta tytułów zobacz ",
|
||||
"noImage": "Brak obrazu",
|
||||
"preview": "Podgląd",
|
||||
"previewDescription": "Dokładne wyniki listowania mogą się różnić w zależności od treści i zgodności z kryteriami wyszukiwania."
|
||||
"previewDescription": "Dokładne wyniki listowania mogą się różnić w zależności od treści i zgodności z kryteriami wyszukiwania.",
|
||||
"tooLong": "Zbyt długie",
|
||||
"tooShort": "Zbyt krótkie"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"type": "object",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -6,51 +7,46 @@
|
||||
"type": "string"
|
||||
},
|
||||
"plugin-seo": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"autoGenerate": {
|
||||
"almostThere": {
|
||||
"type": "string"
|
||||
},
|
||||
"imageAutoGenerationTip": {
|
||||
"autoGenerate": {
|
||||
"type": "string"
|
||||
},
|
||||
"bestPractices": {
|
||||
"type": "string"
|
||||
},
|
||||
"lengthTipTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"lengthTipDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"good": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooLong": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooShort": {
|
||||
"type": "string"
|
||||
},
|
||||
"almostThere": {
|
||||
"type": "string"
|
||||
},
|
||||
"characterCount": {
|
||||
"type": "string"
|
||||
},
|
||||
"charactersToGo": {
|
||||
"type": "string"
|
||||
},
|
||||
"charactersLeftOver": {
|
||||
"type": "string"
|
||||
},
|
||||
"charactersToGo": {
|
||||
"type": "string"
|
||||
},
|
||||
"charactersTooMany": {
|
||||
"type": "string"
|
||||
},
|
||||
"noImage": {
|
||||
"checksPassing": {
|
||||
"type": "string"
|
||||
},
|
||||
"checksPassing": {
|
||||
"good": {
|
||||
"type": "string"
|
||||
},
|
||||
"imageAutoGenerationTip": {
|
||||
"type": "string"
|
||||
},
|
||||
"lengthTipDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"lengthTipTitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"noImage": {
|
||||
"type": "string"
|
||||
},
|
||||
"preview": {
|
||||
@@ -58,6 +54,12 @@
|
||||
},
|
||||
"previewDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooLong": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooShort": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
@@ -78,10 +80,8 @@
|
||||
"checksPassing",
|
||||
"preview",
|
||||
"previewDescription"
|
||||
],
|
||||
"type": "object"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["plugin-seo"],
|
||||
"type": "object"
|
||||
"required": ["plugin-seo"]
|
||||
}
|
||||
|
||||
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@@ -1073,9 +1073,6 @@ importers:
|
||||
'@payloadcms/ui':
|
||||
specifier: workspace:*
|
||||
version: link:../ui
|
||||
'@types/express':
|
||||
specifier: 4.17.17
|
||||
version: 4.17.17
|
||||
'@types/react':
|
||||
specifier: 18.2.15
|
||||
version: 18.2.15
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import path from 'path'
|
||||
|
||||
import seoPlugin from '../../packages/plugin-seo/src'
|
||||
import { buildConfigWithDefaults } from '../buildConfigWithDefaults'
|
||||
import { devUser } from '../credentials'
|
||||
@@ -8,8 +6,6 @@ import { Pages } from './collections/Pages'
|
||||
import { Users } from './collections/Users'
|
||||
import { seed } from './seed'
|
||||
|
||||
const mockModulePath = path.resolve(__dirname, './mocks/mockFSModule.js')
|
||||
|
||||
export default buildConfigWithDefaults({
|
||||
collections: [Users, Pages, Media],
|
||||
localization: {
|
||||
@@ -17,18 +13,6 @@ export default buildConfigWithDefaults({
|
||||
fallback: true,
|
||||
locales: ['en', 'es', 'de'],
|
||||
},
|
||||
admin: {
|
||||
webpack: (config) => ({
|
||||
...config,
|
||||
resolve: {
|
||||
...config.resolve,
|
||||
alias: {
|
||||
...config?.resolve?.alias,
|
||||
fs: mockModulePath,
|
||||
},
|
||||
},
|
||||
}),
|
||||
},
|
||||
i18n: {
|
||||
resources: {
|
||||
es: {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
export default {
|
||||
readdirSync: () => {},
|
||||
rmSync: () => {},
|
||||
}
|
||||
Reference in New Issue
Block a user