Skip to content

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.

Notifications You must be signed in to change notification settings

nikolabintev/seo-recipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SEO Recipe for Drupal

Table of Contents


Overview

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.


Prerequisites

Configure Drupal to apply recipes by following the instructions:


Installation

Ignore the contributed recipes directory

Add the following line to the project's .gitignore file

# Ignore contributed recipes
web/recipes/contrib

Configure composer.json

  • 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

Require the package using composer.

composer require nikolabintev/seo-recipe

Applying the recipe

Apply the recipe using the following command:

php web/core/scripts/drupal recipe web/recipes/contrib/seo-recipe

Features

The features below are general configurations. Content type-specific (or entity type-specific) configurations must be captured in separate recipes.

Metatags

The metatags setup includes both basic and advanced tags as well as Opem Graph and Twitter Cards configurations.

Schema.org

Based on the schemaorg module, it enhances the global metatag configuration with website and web page data.

URL aliases

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]

Redirects

The redirect module is installed and configured so when a URL is changed, a redirect is created to the new URL.

Robots.txt

The robots.txt module allows you to maintain different robots.txt files if the same codebase is used for many sites.

XML Sitemap

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

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published