Skip to content

v1.0.0 Use correct locale when analysing content

Latest
Compare
Choose a tag to compare
@peeke peeke released this 25 Sep 10:08
· 19 commits to main since this release

This change makes sure the seo plugin uses the correct locale when analysing content.

Breaking change
You now need to provide the seo view with some options:

import multiLanguageConfig from 'config:@kaliber/sanity-plugin-multi-language'
import { SeoAnalysis, typeHasSeo } from '@kaliber/sanity-plugin-seo'

export function getDefaultDocumentNode({ schemaType }) {
  return S.document().views([
    S.view.form(),
    ...(typeHasSeo(schemaType) ? [S.view.component(SeoAnalysis).options({ multiLanguage: multiLanguageConfig }).title('SEO')] : []),
  ])
}

(refer to @kaliber/sanity-plugin-multi-language@2's config.dist.json if you're wondering what shape the multiLanguageConfig should have)