You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ browsers and beyond.
11
11
12
12
- 🔎 All-in-one solution for SEO and social media optimization
13
13
- 📱 Support for OpenGraph and Schema.org (JSON-LD) markup
14
-
- 🚀 Customizable Metadata for auto-generated metadata from page contents
14
+
- 🚀 Customizable metadata for auto-generated metadata from page contents
15
15
- 💻 Extensive panel UI including social media previews
16
16
- 🦊 Easy-to-understand language in the panel, providing a good middle ground between simplicity and extensive control options.
17
17
- 🧙♂️ Most features can be enabled/disabled in config, panel UI only shows enabled features (thanks to dynamic blueprints)
18
-
- 🪝 Hooks for altering the plugin’s behavior
18
+
- 🪝 Hooks for altering the plugin's behavior
19
19
- 🌍 All blueprints are fully translatable (*English, German and French translations are included*)
20
20
21
21
**Future plans:**
@@ -31,9 +31,9 @@ browsers and beyond.
31
31
32
32
## How it works
33
33
34
-
The plugin tries looks for metadata from a pages content file (e.g. article.txt) by
35
-
the corresponding key. If the page does not contain the specific field, it looks for a metadata.
36
-
Method on the current page model, which can return an array metadata for the current page
34
+
The plugin looks for metadata from a page's content file (e.g. `article.txt`) by
35
+
the corresponding key. If the page does not contain the specific field, it looks for a metadata
36
+
method on the current page model, which can return an array of metadata for the current page.
37
37
If that also fails, it will fall back to default metadata, as stored in the
38
38
`site.txt` file at the top-level of the content directory.
39
39
@@ -60,30 +60,30 @@ The options below have to be set in your `config.php`. Please note that every op
60
60
61
61
| Key | Type | Default | Description |
62
62
|:----|:-----|:--------|:------------|
63
-
|`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 sell search engines where your sitemap is located. |
64
-
|`sitemap.detailSettings`|`bool`|`false`| When true, the `<changefreq>` and `<priority>` tags are included in the sitemap corresponding fields are displayed in the panel. |
63
+
|`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. |
64
+
|`sitemap.detailSettings`|`bool`|`false`| When ´true`, the `<changefreq>` and `<priority>` tags are included in the sitemap and their corresponding fields are displayed in the panel. |
65
65
|`sitemap.pages.exclude`|`array`|`[]`| An array of page IDs to exlude from the sitemap. Values are treated as regular expressions, so they can include wildcards like e.g. `about/.*`. The error page is always excluded. |
66
66
|`sitemap.pages.includeUnlisted`|`array`|`[]`| An array of page IDs to include in the sitemap, even if their status is `unlisted`. Values are treated as regular expressions, so they can include wildcards like e.g. `about/.*`. |
67
67
|`sitemap.templates.exclude`|`array`|`[]`| An array of template names to exlude from the sitemap. Values are treated as regular expressions, so they can include wildcards like e.g. `article-(internal|secret)` |
68
68
|`sitemap.templates.includeUnlisted`|`array`|`[]`| An array of templates to include in the sitemap, even if their status is `unlisted`. Values are treated as regular expressions. |
| `twitter` | `bool` | `true` | Generate and[Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards) markup. Only has an effect, if `social` is also enabled. Since `0.2.0-beta` (⚠️ deprecated).
72
-
| `robots` | `bool` | `true` | Generate the `robots` metatag and serve [robots.txt](https://developers.google.com/search/docs/advanced/robots/intro) at `http(s)://yourdomain.com/robots.txt`.
73
-
|`robots.canonical`|`bool`|`true`|Generate canonical url meta tag. Requires `robots` option to be `true`. |
74
-
|`robots.index`|`bool`|`true`| Allows crawlers to index pages. Can be overriden in global or page-specidic 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`. |
75
-
|`robots.follow`|`bool`|`true`| Allows crawlers to follow links on pages. Can be overriden in global or page-specidic settings from the panel. Requires `robots` option to be `true` for having an effect. |
76
-
|`robots.archive`|`bool`|`true`| Allows crawlers to serve a cached version of pages. Can be overriden in global or page-specidic settings from the panel. Requires `robots` option to be `true` for having an effect. |
77
-
|`robots.imageindex`|`bool`|`true`| Allows crawlers to include images to appear in search results. Can be overriden in global or page-specidic settings from the panel. Requires `robots` option to be `true` for having an effect. |
78
-
|`robots.snippet`|`bool`|`true`| Allows crawlers to generate snippets from page content. Can be overriden in global or page-specidic settings from the panel. Requires `robots` option to be `true` for having an effect. |
79
-
|`robots.translate`|`bool`|`true`| Allows crawlers offer automated translation of your content. Can be overriden in global or page-specidic settings from the panel. Requires `robots` option to be `true` for having an effect. |
| `twitter` | `bool` | `true` | Generates[Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards) markup. Only has an effect, if `social` is also enabled. Since `0.2.0-beta` (⚠️ deprecated).
72
+
| `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`.
73
+
|`robots.canonical`|`bool`|`true`|Generates canonical url meta tag. Requires `robots` option to be `true`. |
74
+
|`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`. |
75
+
|`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. |
76
+
|`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. |
77
+
|`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. |
78
+
|`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. |
79
+
|`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. |
80
80
|`title.separators`|`array`|`["~" , "-" , "–" , "—" , ":" , "/", …]`| List of available separator options for the `<title>` tag. The separator can be selected in the panel and is placed between page title and site title. |
81
81
|`theme.color`|`string\|null`|`null`| If not empty, will generate a corresponding meta tag used by some browsers for coloring the UI. |
82
-
|`panel.view.filter`|Provide 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. |
82
+
|`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. |
83
83
84
84
### Blueprint setup
85
85
86
-
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:
86
+
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:
87
87
88
88
```yaml
89
89
# site/blueprints/site.yml
@@ -130,17 +130,17 @@ Sometimes, you want special behavior for certain templates. The easiest way to a
130
130
131
131
| Key | Type | Description |
132
132
|:----|:-----|:------------|
133
-
| `meta_description` | `string` | Provide a default description that is used, when the user had not entered a dedicated description for this page. This could e.g. be a truncated version of the page’s text content. |
134
-
| `og_title_prefix` | `string` | Will be put in front of the page’s OpenGraph title, e.g. `'ℹ️ '` or `'[Recipe ]` |
133
+
| `meta_description` | `string` | Provide a default description that is used, when the user had not entered a dedicated description for this page. This could e.g. be a truncated version of the page's text content. |
134
+
| `og_title_prefix` | `string` | Will be put in front of the page's OpenGraph title, e.g. `'ℹ️ '` or `'[Recipe ]` |
135
135
| `og_image File` | `Kirby\Cms\File` | A `File` object, that sets the default OpenGraph image for this page. You can even generate custom images programatically and Wrap them in a `File` object, e.g. for the docs of your product (getkirby.com does this for the reference pages).
136
-
| `@graph` | `array` | Things to add to the JSON-LD metadata in the page’s head. If you need to reference the organization or person behind the website, use `url('/#owner')`. If you need to reference the website itself, use `url('/#website')`. |
136
+
| `@graph` | `array` | Things to add to the JSON-LD metadata in the page's head. If you need to reference the organization or person behind the website, use `url('/#owner')`. If you need to reference the website itself, use `url('/#website')`. |
137
137
| `@social` | `array` | Extend the social meta tags generated by the plugin. |
138
138
139
139
### Using hooks
140
140
141
141
the meta plugin provides a set of handy hooks, allowing you to further add/remove/modify metadata without overriding the built-in snippets or having to set up a page model for every template.
142
142
143
-
⚠️ Hooks are a powerful tool that can break the plugin’s expected behavior for editors working on the panel. Use with care!
143
+
⚠️ Hooks are a powerful tool that can break the plugin's expected behavior for editors working on the panel. Use with care!
144
144
145
145
#### `meta.load:after`
146
146
@@ -288,7 +288,7 @@ return [
288
288
```
289
289
290
290
### Manipulating indexed pages
291
-
A few helpers are available for manipulating pages:
291
+
A few helpers are available for manipulating pages:
292
292
293
293
### Page Method
294
294
If you'd like to know if a page is indexed in the sitemap, you can use `$page->isIndexible()` (returns a `bool`).
'fabianmichael.meta.title.help' => 'Der Seitentitel, so wie er in Suchmaschinen erscheinen soll. Wenn das Feld leer ist, wird stattdessen der Seitentitel ausgegeben.',
'fabianmichael.meta.global_robots.help' => 'Standard-Einstellungen für Anweisungen an Suchmaschinen, in welcher Weise sie Seiten dieser Website indizieren dürfen. Seiten können individuelle Einstellungen verwenden, um dieses Verhaltern zu überschreiben.',
'fabianmichael.meta.description.help' => 'Eine kurze Beschreibung, die Suchmachinen in den Ergebnissen unterhalb des Seitentitels darstellen.',
@@ -53,9 +53,9 @@
53
53
'fabianmichael.meta.og_site_name.label' => 'Titel der Website für Teilen',
54
54
'fabianmichael.meta.og_site_name.help' => 'Der Website-Titel, welcher beim Teilen verwendet werden soll. Standardmäßig wird der Titel der Website verwendet.',
55
55
'fabianmichael.meta.global_og_image.label' => 'Standard Bild für Teilen',
56
-
'fabianmichael.meta.global_og_image.help' => 'Ein Bild, welches diese Website beim Teilen in sozialen Netzwerken und Messegern repräsentiert. Wird automatisch zugeschnitten. Dieses Bild wird als Standard für Seiten verwendet, die kein eigenes Bild haben.<br><br>**Empfohlene Größe:** 1200 × 630 px<br>**Formats:** JPEG, PNG, GIF, WebP, AVIF',
56
+
'fabianmichael.meta.global_og_image.help' => 'Ein Bild, welches diese Website beim Teilen in sozialen Netzwerken und Messegern repräsentiert. Wird automatisch zugeschnitten. Dieses Bild wird als Standard für Seiten verwendet, die kein eigenes Bild haben.<br><br>**Empfohlene Größe:** 1200 × 630 px<br>**Erlaubte Formate:** JPEG, PNG, GIF, WebP, AVIF',
57
57
'fabianmichael.meta.og_image.label' => 'Bild für Teilen',
58
-
'fabianmichael.meta.og_image.help' => 'Ein Bild, welches diese Seite beim Teilen in sozialen Netzwerken und Messegern repräsentiert. Wird automatisch zugeschnitten. Wenn kein Bild ausgewählt ist, wird das globale Standard-Bild verwendet.<br><br>**Empfohlene Größe:** 1200 × 630 px<br>**Formats:** JPEG, PNG, GIF, WebP, AVIF {< site.metaPanelWarning("no_og_image_fallback") >}',
58
+
'fabianmichael.meta.og_image.help' => 'Ein Bild, welches diese Seite beim Teilen in sozialen Netzwerken und Messegern repräsentiert. Wird automatisch zugeschnitten. Wenn kein Bild ausgewählt ist, wird das globale Standard-Bild verwendet.<br><br>**Empfohlene Größe:** 1200 × 630 px<br>**Erlaubte Formate:** JPEG, PNG, GIF, WebP, AVIF {< site.metaPanelWarning("no_og_image_fallback") >}',
59
59
60
60
'fabianmichael.meta.og_title.label' => 'Gesonderter Titel für Teilen',
61
61
'fabianmichael.meta.og_title.help' => 'Der Titel dieser Seite beim Teilen in sozialen Netzwerken. Verwendet **Title (überschreiben)** oder den Seitentitel als Alternativen.',
0 commit comments