ikuzo/kirbypluginseo

Kirby 3 SEO plugin

Installs: 180

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 4

Forks: 0

Type:kirby-plugin

1.0.8 2019-11-15 11:48 UTC

This package is auto-updated.

Last update: 2024-09-15 23:04:32 UTC


README

Kirby CMS plugin to edit SEO data on the panel, and display it in the head tag.

Edit meta title and description, social network og metas, noindex and canonical URL.

Blueprint

To show SEO edition tab in the panel, add tabs/seo to your blueprints

Example with page preset :

title: Simple Page

tabs:

  # content tab
  content:
    label: Content
    icon: text
    preset: page
    fields:
      text:
        label: Text
        type: textarea
        size: huge

  # seo tab
  seo: tabs/seo

Snippet

To display SEO metas in head tag of your website, include the snippet seo-head.

Example in header.php snippet :

<!doctype html>
<html lang="en">
<head>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
    
  <?php snippet('seo-head'); ?>

  <?= css(['assets/css/index.css', '@auto']) ?>

</head>
<body>

You can also pass parameters to the snippet, to override page data :

snippet('seo-head', [
  'title' => 'title',
  'description' => 'description',
  'ogTitle' => 'og title',
  'ogDesc' => 'og description',
  'ogImage' => 'og image',
  'noindex' => true,
  'canonical' => 'canonical-url'
]);

Options

  • ikuzo.seo.meta.title.prefix : Prefix prepened to meta title, default ""
  • ikuzo.seo.meta.title.suffix : Suffix appened to meta title, default " | Site title"
  • ikuzo.seo.og.title.prefix : Prefix prepened to og title, default ""
  • ikuzo.seo.og.title.suffix : Suffix appened to og title, default " | Site title"