0.1.3 • Published 2 years ago

strapi-plugin-seo v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Develocraft

Strapi-SEO-plugin

A plugin for Strapi Headless CMS that provides SEO fields to Single and Collection types.

Seo plugin home view

Versions

  • v0.1.3

🖐 Requirements

  • Compatible with Strapi v3.6.x but not Strapi v4.

  • Title fields on Collection type and Single type resources.

  • No components named SEO on Collection type or Single type resources.

  • OgUrl field on seo form require this format:

    • https://www.yourdomain.com

⏳ Installation

(Use yarn to install this plugin within your Strapi project Install yarn with these docs.)

npm i strapi-plugin-seo

To use yarn instead of npm use.

yarn add strapi-plugin-seo

After successful installation you've to build a fresh package that includes the plugin UI.

npm build
npm develop

The Seo plugin should appear in the Plugins section of Strapi sidebar after you run the app again.

How it works

The plugin adds an seo object to the api response of single and collection types.

Example response

...
seo: {
    id?: Number,
    title: String,
    metaDescription: String,
    jsonLd: JSON,
    ogTitle: String,
    ogType: String,
    ogUrl: String,
    ogImage: String,
    locale?: String,
    collectionTypeName?: String,
    seoUid?: String,
    created_at?: String,
    updated_at?: String
}
...

How to use

Seo Creation

  1. Choose the Collection type or Single type resource you would like to add an seo to.

    In this case we will create an seo for Careers page.

Seo creation step one

  1. Click on the edit button of the resource.

  2. Click on Create Relation button ( only visible if relation hasn't been created ) to create a one-way relationship between the seo and the resource.

Seo creation step two

  1. Enter the seo data in the respective fields:
    • Title;
    • MetaDescription;
    • JsonLd;
    • OgTitle;
    • OgType;
    • OgUrl;
    • OgImage;

Seo creation step three

  1. Click save.

  2. If successfully saved, you should see a green checkmark in place of a red cross.

Seo creation step four

Seo Edition

  1. Click on the edit icon of the collection or single type resource.

    In this case Careers page.

    On this view you can edit the seo data you previously saved.

Seo edition view

Supported Strapi versions:

  • Strapi v3.6.6

  • Strapi v3.6.7

  • Strapi v3.7.7

Features

  • i18n: Built-in i18n support, seo fields can be created for any language enabled in the Strapi project.

  • Zero Configuration: Simply install the the plugin.

  • Google Preview: Preview how your page will look like in Google’s search results.

Local Development

How To Test

yarn test

Issues

Please open GitHub issue.

License

MIT License Copyright (c) Develocraft Sp.z.o.o