spqr/seo - a few examples

Seo pagename

Potentially outdated

This post is older than 365 days and may be outdated. Please use the site-search to search for updated information.

Hello Pagekiteers,

yesterday I released spqr/seo. This extension allows you to add an old-fashioned meta description to your site. You are also able to affect the way how the <title> is generated.

Let's have a look at the settings.

Pagekit SEO extension

The extension offers to add a meta description. If you do so, the og:description content of the current page is used.

Example: Pagekit Seo Meta Tag

In this case the content of og:description is Information about my Pagekit extensions.

If we look at the HTML-source, this Open Graph meta description is inserted just like this:

 <meta property="og:description" content="Information about my Pagekit-extensions">

Alright. This is fine, but Open Graph is used by social networks and most search engines are able to read it, but sometimes it's necessary to have an old-fashioned meta description. So enabling the Add Meta Description feature with the option Use Open Graph Description inserts this meta description:

<meta name="description" content="Information about my Pagekit-extensions">

Alright. Now we are going to have a look at the title-rewriting.

If you enable title-rewriting by activating Overwrite Title, you can choose which information should be used to generate your title.

There are 3 possible sources:

  1. Open Graph Title: og:title
  2. Sitename: The name of your website
  3. Pagename: The name of the current node

Each source can have a position that defines the ordering in the title. You may also choose a separator, which divides the parts of the title.

Pagename, Sitename, ... what?!

Let's have a closer look.

This picture shows how to define the Open Graph Title for a page. In this case it's "Creator of Pagekit extensions". Pagekit SEO meta

This picture is quite self explanatory. The sitename is "spqr.wtf". Pagekit SEO sitename

Now let's see what's meant by "Pagename". This is the name of the node itself (not the title). In this case it's "Home". Pagekit SEO pagename

Examples

Now let's bring things together.

Example 1

  • Use Open Graph: Yes
    • Position: 1
  • Use Sitename: Yes
    • Position: 2
  • Use Pagename: Yes
    • Position: 3
  • Separator: " | "

Result: Creator of Pagekit CMS extensions | spqr.wtf | Home

Example 2

  • Use Open Graph: Yes
    • Position: 3
  • Use Sitename: Yes
    • Position: 1
  • Use Pagename: Yes
    • Position: 2
  • Separator: " | "

Result: spqr.wtf | Home | Creator of Pagekit CMS extensions

Example 3

  • Use Open Graph: No
    • Position: -
  • Use Sitename: Yes
    • Position: 1
  • Use Pagename: Yes
    • Position: 2
  • Separator: " > "

Result: spqr.wtf > Home

Example 4

  • Use Open Graph: Yes
    • Position: 2
  • Use Sitename: Yes
    • Position: 1
  • Use Pagename: No
    • Position: -
  • Separator: " - "

Result: spqr.wtf - Creator of Pagekit CMS extensions

That's it

That's it. It looks quite complicated, but as you see it's a good way to overwrite the predefined title. I will add some more features to spqr/seo the next weeks.

I really love to see that some of you are already using this extension. If you would like to see some special features, please use the comment box to propose.

{{ message }}

{{ 'Comments are closed.' | trans }}

Wait a second!

Did you know that there's are great support channels for Pagekit? Visit us today and sign up for free using email or your GitHub-, Twitter-, Google- or Facebook-Account.

Latest blog posts

Latest comments

  • How to fork a theme

  • spqr/toc updated

  • spqr/toc updated

Like my work?

If you would like to support my work, you are invited to do so.