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
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copy file name to clipboardExpand all lines: changelog.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,11 @@
1
-
# Change Log
1
+
# Changelog
2
2
All notable changes to this project will be documented in this file.
3
3
4
+
## [2.0.0] - 2019-02-21
5
+
This version adds support to Kirby 3. All options remain and work in the same way as they did in Kirby 2.
6
+
7
+
For Kirby 2, you can download the [plugin v1.1.1](https://github.com/pedroborges/kirby-meta-tags/archive/v1.1.1.zip) and install it manually in the `site/plugins/meta-tags`.
8
+
4
9
## [1.1.1] - 2018-07-08
5
10
### Fixed
6
11
- When capitalizing the `@type` first letter, other capital letters in the word were being converted to lowercase. This has been fixed.
Copy file name to clipboardExpand all lines: readme.md
+25-13Lines changed: 25 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,19 @@ HTML meta tags generator for Kirby. Supports [Open Graph](http://ogp.me), [Twitt
9
9
## Installation
10
10
11
11
### Download
12
-
[Download the files](https://github.com/pedroborges/kirby-meta-tags/releases/download/v2.0.0-alpha-1/meta-tags.zip) and place them inside `site/plugins/meta-tags`.
12
+
Download and copy this repository to `site/plugins/meta-tags`.
> For Kirby 2, you can download [v1.1.1](https://github.com/pedroborges/kirby-meta-tags/archive/v1.1.1.zip) and copy the files to `site/plugins/meta-tags`.
13
25
14
26
## Basic Usage
15
27
After installing the Meta Tags plugin, you need to add one line to the `head` element on your template, or `header.php` snippet:
@@ -40,7 +52,7 @@ The plugin ships with some default meta tags enabled for your convenience:
40
52
```php
41
53
return [
42
54
// other options...
43
-
'pedroborges.metatags.default' => function ($page, $site) {
55
+
'pedroborges.meta-tags.default' => function ($page, $site) {
44
56
return [
45
57
'title' => $site->title(),
46
58
'meta' => [
@@ -62,15 +74,15 @@ return [
62
74
]
63
75
```
64
76
65
-
**The `pedroborges.metatags.default` option is applied to all pages on your Kirby site.** Of course you can change the defaults. In order to do that, just copy this example to your `site/config/config.php` file and tweak it to fit your website needs.
77
+
**The `pedroborges.meta-tags.default` option is applied to all pages on your Kirby site.** Of course you can change the defaults. In order to do that, just copy this example to your `site/config/config.php` file and tweak it to fit your website needs.
66
78
67
79
### Templates
68
80
Following the flexible spirit of Kirby, you also have the option to add template specific meta tags:
69
81
70
82
```php
71
83
return [
72
84
// other options...
73
-
'pedroborges.metatags.templates' => function ($page, $site) {
85
+
'pedroborges.meta-tags.templates' => function ($page, $site) {
74
86
return [
75
87
'song' => [
76
88
'og' => [
@@ -96,13 +108,13 @@ For more information on all the `meta`, `link`, Open Graph and Twitter Card tags
Both the `pedroborges.metatags.default` and `pedroborges.metatags.templates` accept similar values:
111
+
Both the `pedroborges.meta-tags.default` and `pedroborges.meta-tags.templates` accept similar values:
100
112
101
-
### `pedroborges.metatags.default`
113
+
### `pedroborges.meta-tags.default`
102
114
It accepts an array containing any or all of the following keys: `title`, `meta`, `link`, `og`, and `twitter`. With the exception of `title`, all other groups must return an array of key-value pairs. Check out the [tag groups](#tag-groups) section to learn which value types are accepted by each key.
103
115
104
116
```php
105
-
'pedroborges.metatags.default' => function ($page, $site) {
117
+
'pedroborges.meta-tags.default' => function ($page, $site) {
106
118
return [
107
119
'title' => 'Site Name',
108
120
'meta' => [ /* meta tags */ ],
@@ -114,11 +126,11 @@ It accepts an array containing any or all of the following keys: `title`, `meta`
114
126
}
115
127
```
116
128
117
-
### `pedroborges.metatags.templates`
129
+
### `pedroborges.meta-tags.templates`
118
130
This option allows you to define a template specific set of meta tags. It must return an array where each key corresponds to the template name you are targeting.
119
131
120
132
```php
121
-
'pedroborges.metatags.default' => function ($page, $site) {
133
+
'pedroborges.meta-tags.default' => function ($page, $site) {
122
134
return [
123
135
'article' => [ /* tags groups */ ],
124
136
'about' => [ /* tags groups */ ],
@@ -127,7 +139,7 @@ This option allows you to define a template specific set of meta tags. It must r
127
139
}
128
140
```
129
141
130
-
When a key matches the current page template name, it is merged and overrides any repeating properties defined on the `pedroborges.metatags.default` option so you don't have to repeat yourself.
142
+
When a key matches the current page template name, it is merged and overrides any repeating properties defined on the `pedroborges.meta-tags.default` option so you don't have to repeat yourself.
131
143
132
144
## Tag Groups
133
145
These groups accept string, closure, or array as their values. Being so flexible, the sky is the limit to what you can do with Meta Tags!
@@ -232,7 +244,7 @@ Where you can define [Open Graph](http://ogp.me) `<meta>` elements.
232
244
Of course you can use Open Graph [structured objects](http://ogp.me/#structured). Let's see a blog post example:
233
245
234
246
```php
235
-
'pedroborges.metatags.templates' => function ($page, $site) {
247
+
'pedroborges.meta-tags.templates' => function ($page, $site) {
236
248
return [
237
249
'article' => [ // template name
238
250
'og' => [ // tags group name
@@ -368,6 +380,6 @@ Use this tag group to add [JSON Linked Data](https://json-ld.org) schemas to you
368
380
All notable changes to this project will be documented at: <https://github.com/pedroborges/kirby-meta-tags/blob/master/changelog.md>
369
381
370
382
## License
371
-
Meta Tags plugin is open-sourced software licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
383
+
The Meta Tags plugin is open-sourced software licensed under the [MIT license](http://www.opensource.org/licenses/mit-license.php).
0 commit comments