e-conomix / magento-module-yoastseo
Yoast SEO integration by MaxServ
Installs: 13 254
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 29
Type:magento2-module
Requires
- magento/framework: ^101.0|^102.0|^103.0
- magento/module-catalog: *
- magento/module-cms: *
- magento/module-config: *
- dev-master
- dev-main
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 2.0.0-rc.2
- 2.0.0-rc.1
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- v1.0
- v1.0-rc3
- v1.0-rc2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
- dev-feature/RUF-1394
- dev-feature/wen-21-fixed-canonical
- dev-feature/wen-21
- dev-bugfix/YOAST-18-meta-description-special-characters
This package is auto-updated.
Last update: 2024-11-27 07:48:32 UTC
README
Introduction
We have developed this advanced SEO module in close cooperation with YOAST inc. It incorporates the YOAST library into Magento2.
Requirements
Magento 2.2.* OpenSource. This version of the module has not (yet) been tested on Magento 2 Commerce or Magento 2 Cloud editions.
Features
Proper meta tags
- ld+json schema data which identifies the page
- canonical url tag
- OpenGraph data
- Facebook configuration data (app id, admin ids)
- Twitter card data
Live SEO analysis from within the edit forms
When you open an edit form, you'll notice that the default 'Search Engine Optimisation' section has been changed to 'YoastSEO'. Inside this section we have added a live analysis tool. This tool runs a whole battery of tests on your content and shows you the results. Results marked with a green status light are OK, orange means you might want to have a look, while red indicates a problem that you should try to fix immediately.
You'll find the analyis tool in the edit forms of these entities:
- Categories
- Products
- CMS Pages
Customize analysis templates
If you have custom attributes which contain content, we've got you covered. You can edit the analysis templates to include you own custom attributes. Read more on how to configure analysis templates here.
Create redirects for deleted products
Normally a product URL will generate a 404 page after you delete the product. Now you can configure what should happen yourself. Choose between redirecting to the product's category page, a fixed category page or a CMS page of your choice. Or, if you want, you can choose not to create redirects.
Installation
This module can be installed using composer.
Packagist
If you have access to packagist (and by default you do), all you need to do is run this require statement.
composer require maxserv/magento-module-yoastseo
GitHub
If you do not have access to packagist, you need to add our GitHub repository to your composer configuration before you can require this module:
composer config repositories.yoastseo git https://github.com/Yoast/Yoast-SEO-for-Magento2 composer require maxserv/magento-module-yoastseo
Download
If for some reason you can't use composer then please follow these steps:
- Browse to the releases section on our GitHub page
- Download the latest release in zip or tar format
- Create a directory in your project:
app/code/MaxServ/YoastSeo
- Unpack the package into that directory
Configuration
You can find the configuration by navigating to Stores -> Configuration in the main menu. In the configuration sections select 'YoastSEO' and then click on 'SEO Settings'.
Analysis templates
You can find the analysis templates by navigating to Marketing -> YoastSEO -> Analysis Templates using the main menu.
Template format
The template consists of plain HTML and placeholders for attributes. Placeholders are defined with double handlebars:
{{<attribute_code>[ reader='<reader>'][ provider='<provider>'][ default='<default>']}}
At least one of <reader>
, <provider>
or <default>
must be configured.
Readers
Text
The text reader returns the literal value of the input field component. The value will not be processed.
Wysiwyg
The value of the input field component will be rendered using frontend rendering. This ensures that any placeholders (e.g. widget placeholders) in the content will be expanded before analysis.
CMS Block
The value of the the input field component should be the numerical identifier of a CMS block. If it is, the CMS block will be rendered using frontend rendering.
Category Landing Page
Can only be used in category forms, and will only render anything if the category display mode has been set to either 'Static block only' or 'Static block and products'. If this is the case, this reader will pull content from the 'Add CMS Block' field in the 'Content' section of the category form.
Providers
Use a provider in conjunction with a nonexistent attribute code to provide data to the template processor which can not be read from other form fields. A provider should return plain HTML which requires no more processing.
Product Images
The product images provider reads the product media gallery and renders the images as <img />
tags.
Template processing
For each placeholder, the template processor will try to retrieve content based on the placeholder configuration.
The following steps are treated in an if, else if, else if, else
manner
- If a form input component can be found based on the attribute code, and a reader has been defined, the template processor will instruct the reader to process the input component's value.
- If a form input component can be found based on the attribute code, the input component's value is returned.
- If a form input component could exist but doesn't exist yet (JIT fieldset rendering), and the entity already had a value for that attribute code, then that value is returned.
- If a provider has been configured, the provider is instructed to return a value. The attribute code does not have to exist.
- If the placeholder has a default value configured, the default value is returned. The attribute code does not have to exist.
- A blank value is returned.