PHPackages                             fabianmichael/kirby-meta - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fabianmichael/kirby-meta

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

fabianmichael/kirby-meta
========================

Your all-in-one powerhouse for any SEO and metadata needs imaginable.

3.0.0(1mo ago)7011.8k—10%8[6 issues](https://github.com/fabianmichael/kirby-meta/issues)[2 PRs](https://github.com/fabianmichael/kirby-meta/pulls)1MITPHPPHP &gt;=8.4.0

Since Dec 13Pushed 3mo ago6 watchersCompare

[ Source](https://github.com/fabianmichael/kirby-meta)[ Packagist](https://packagist.org/packages/fabianmichael/kirby-meta)[ Docs](https://github.com/fabianmichael/kirby-meta)[ GitHub Sponsors](https://github.com/fabianmichael)[ RSS](/packages/fabianmichael-kirby-meta/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (7)Versions (28)Used By (1)

Meta(data) for Kirby CMS
========================

[](#metadata-for-kirby-cms)

[Kirby](https://getkirby.com) plugin that handles the generation of meta tags for search engines, social networks, browsers, and beyond. It offers editor-friendly panel controls for your editors while prociding powerful APIs for customizing your developer experience.

[![Screenshot of the panel](./docs/screenshot.png)](./docs/screenshot.png)

**Key features:**

- 🔎 All-in-one solution for SEO and social media optimization
- 📱 Support for OpenGraph and Schema.org (JSON-LD) markup
- 🚀 Customizable metadata for auto-generated metadata from page contents
- 💻 Extensive panel UI including social media previews
- 🦊 Easy-to-understand language in the panel, providing a good middle ground between simplicity and extensive control options.
- 🧙‍♂️ Most features can be enabled/disabled in config, panel UI only shows enabled features (thanks to dynamic blueprints)
- 🤖 Automatic `robots.txt` generation
- 🏎️ Supports non-editable overrides of values for special pages
- 🕵️‍♀️ Stealth mode for staging servers
- 🌍 All blueprints are fully translatable (*English, German, French, Swedish and Dutch translations are included*)

Note

This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, please consider to **[❤️ sponsor me](https://github.com/sponsors/fabianmichael)** for securing the continued development of the plugin.

Requirements
------------

[](#requirements)

- PHP 8.4+
- Kirby 5.3.0+

How it works
------------

[](#how-it-works)

The plugin tries to fetch metadata from overrides, page content and default values and for some values from global and even config defaults. This ensures that proper metadata is almost always available. This gives editors much freedom for setting up metadata while giving you full control as a developer.

Installation &amp; Setup
------------------------

[](#installation--setup)

**Install using composer (recommended):**

```
composer require fabianmichael/kirby-meta

```

**Alternative download methods:**

You can also download this repository as ZIP or add the whole repo as a submodule. To run from source, you need to install the dependencies : `composer install`.

### Available configuration options

[](#available-configuration-options)

The options below have to be set in your `config.php`. Please note that every option has to be prefixed with the plugin namespace, e.g. `sitemap` =&gt; `fabianmichael.meta.sitemap`.

KeyTypeDefaultDescription`sitemap``bool``true`When `true`, will generate an XML sitemap for search engines. The sitemap includes all listed pages by default. ⚠️ If you disable the `robots` setting, no robots.txt will be served to tell search engines where your sitemap is located.`sitemap.detailSettings``bool``false`When `true`, the `` and `` tags are included in the sitemap and their corresponding fields are displayed in the panel.`schema``bool``true`Generates [Schema.org](https://schema.org/) markup as [JSON-LD](https://json-ld.org/).`social``bool``true`Generates [OpenGraph](https://ogp.me/) markup.`robots``bool``true`Generates the `robots` metatag and serve [robots.txt](https://developers.google.com/search/docs/advanced/robots/intro) at `http(s)://yourdomain.com/robots.txt`.`robots.canonical``bool``true`Generates canonical url meta tag. Requires `robots` option to be `true`.`robots.index``bool``true`Allows crawlers to index pages. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect. If a page is excluded from the sitemap or unlisted, the robots meta tag will always contain `noindex` or `none.`robots.follow``bool``true`Allows crawlers to follow links on pages. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect.`robots.archive``bool``true`Allows crawlers to serve a cached version of pages. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect.`robots.imageindex``bool``true`Allows crawlers to include images to appear in search results. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect.`robots.snippet``bool``true`Allows crawlers to generate snippets from page content. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect.`robots.translate``bool``true`Allows crawlers offer automated translation of your content. Can be overriden in global or page-specific settings from the panel. Requires `robots` option to be `true` for having an effect.`title.separator``string``'|'`Separator options for the `` tag. `theme.color``string|null``null`If not empty, will generate a corresponding meta tag used by some browsers for coloring the UI.`panel.view.filter`Provides a filter function for hiding certain pages from the metadata debug view in the panel. See the Kirby docs on [`$pages->filter()`](https://getkirby.com/docs/reference/objects/cms/pages/filter) for details.`stealthMode``bool``false`This will force-override all robots settings. You will still get a proper preview in the panel and everything will look like normal, but the robots meta tag will always have a content of none. This is useful for staging servers, where users want to edit content like normal, but you want to ensure that pages will not appear in search engines. The plugin will still generate a sitemap for debugging purposes.### Blueprint setup

[](#blueprint-setup)

Your site and page blueprints need to use [tabs](https://getkirby.com/docs/guide/blueprints/layout#tabs), as the plugin's input fields all come in a tab. Meta comes with tab blueprints that need to be added to your site and page blueprints accordingly:

```
# site/blueprints/site.yml
[…]
tabs:
  structure:
    label: Structure
    columns:
      […]
  meta: tabs/meta/site

# site/blueprints/pages/default.yml
[…]
tabs:
  content:
    label: Content
    columns:
      […]
  meta: tabs/meta/page
```

### Template setup

[](#template-setup)

Include the `meta` snippet within your `` element, preferably before loading any scripts or stylesheets:

```
