Yoast SEO integration for Neos CMS
What does it do
This view will show you a preview snippet how the selected page will look in the Google search results and will give you insights and helpers to further improve the page for search engines.
We try to keep this package up-to-date with releases by Yoast but depending on the compatibility and available time this might take up to a few weeks after Yoast releases a new version of their library.
Attention! This package is still a pre-release version but you should be able to use it without problems as it just provides a additionals views in Neos.
composer require shel/neos-yoast-seo
This package currently only requires Neos >= 3.0 but it's suggested to also have the
neos/seo package installed.
This package expects some document node properties to be present like
are provided via the
neos/seo package. But you can of course provide them yourself if you don't want to use
Settings.yaml you can override the following options:
Shel: Neos: YoastSeo: defaultContentLocale: en-US languageToLocaleMapping: [...]
The analyzer will use the
lang attribute rendered by the
Neos.Seo package of your website to detect the
language of your content. This option sets the default if
Neos.Seo cannot detect it.
Note that the html standard requires a
- in the locale while Neos and Yoast internally use
_ and convert if needed.
Check https://github.com/Yoast/YoastSEO.js#supported-languages for supported languages and the capabilities. If you use a locale that Yoast doesn't understand don't expect perfect results.
This array defines which translation should be used in the Yoast SEO analyzer depending on the selected interface language of a Neos user.
Settings.yaml of this package and if you for example want a different version localized translation,
check out the folder
Resources/Private/Languages and see which ones are supported and then update the mapping
For example the default mapping for
de_DE but can be changed to Swiss German with the following configuration:
Shel: Neos: YoastSeo: languageToLocaleMapping: de: 'de_CH'
After installation the new preview mode is available in the Neos backend which you can select form the
Edit / Preview panel.
This is useful to check several pages after another and optimize SEO properties. The preview also shows a preview how a page could look as Google search result.
In the inspector a new group "Yoast" is added in the SEO-Tab with the following fields:
- focusKeyword: The main keyword this document is optimzed for. This is needed by yoast for calculating metrics.
- isCornerstone: Mark the document as exceptionally important for yoast. This will enforce more strict content-rules.
The group also contains a live analyzer which will check your content and SEO data and show you the results. Depending on your nodetype configuration the analyzer will update after you change something and show you up-to-date information without needing a reload of the whole page.
This view is helpful when optimizing a single page while working on it's content.
Notes about the packages capabilities
- The language of your content is used in the analyzer but the summaries are currently english only.
- We try to render your site as good as possible for the YoastSEO analyzer to parse it. This might not work for every usecase!
Contributing && issues
- Contributions are very welcome.
- Pull requests are even better!
- Please open issues for this project if you have problems with the backend module or other Neos specific features.
- Please open issues for Yoast SEO if you have problems with the analyzer itself or translations of any hints and warnings generated by the analyzer.
Building the assets
You can generate the
css files by running the following commands in the package folder:
yarn install yarn run build-all
Building and watchting the app for the edit mode
yarn run build-app yarn run watch-app
Building and watching the inspector view
yarn run build-inspector yarn run watch-inspector
- Test plugin with various projects to check behavior
- Nicer backend view