A powerful SEO toolkit for Drupal applications, designed to optimize content for search engines. This package provides configurable metadata management, schema markup, and URL handling, ensuring SEO best practices are maintained. Ideal for improving visibility and search rankings across your Drupal site.
Configure Drupal to apply recipes by following the instructions:
Add the following line to the project's .gitignore file
# Ignore contributed recipes
web/recipes/contrib
- Update the
repositories
section of the project's composer.json, so it includes a reference to this repository.
"repositories": [
{
"type": "vcs",
"url": "https://github.com/nikolabintev/seo-recipe"
}
]
- Configure the installer paths in the
extra
section of the project's composer.json.
{
"extra": {
"installer-paths": {
"web/recipes/contrib/{$name}": [
"type:drupal-recipe"
]
}
}
}
Require the package using composer.
composer require nikolabintev/seo-recipe
Apply the recipe using the following command:
php web/core/scripts/drupal recipe web/recipes/contrib/seo-recipe
The features below are general configurations. Content type-specific (or entity type-specific) configurations must be captured in separate recipes.
The metatags setup includes both basic and advanced tags as well as Opem Graph and Twitter Cards configurations.
Based on the schemaorg module, it enhances the global metatag configuration with website and web page data.
The pathauto module is set up so it generate URL aliases for the following entity types:
- Nodes:
[node:title]
- Taxonomy terms:
[term:name]
- Users:
u/[user:account-name]
The redirect module is installed and configured so when a URL is changed, a redirect is created to the new URL.
The robots.txt module allows you to maintain different robots.txt files if the same codebase is used for many sites.
The XML sitemaps are based on the Simple Sitemap module. It comes with two sitemap types: index and content. The index sitemap includes links to all other sitemaps, whereas the content sitemap includes links to all content entities. It is worth mentioning that the content sitemap isn't configured to include any content types as this is a content type-agnostic setup and should be configured per site.
None of the sitemaps will be generated until the content sitemap is configured to include specific content types. This is a per site configuration