2
2
3
3
SEOTools is a package for ** Laravel 5** that provides helpers for some common SEO techniques.
4
4
5
- > Current Build Status
5
+ > Current Build Status
6
6
7
7
[ ![ Build Status] ( https://travis-ci.org/artesaos/seotools.svg )] ( https://travis-ci.org/artesaos/seotools )
8
8
[ ![ Code Climate] ( https://codeclimate.com/github/artesaos/seotools/badges/gpa.svg )] ( https://codeclimate.com/github/artesaos/seotools )
@@ -53,10 +53,10 @@ In order to use the `SEOMeta` facade, you need to register it on the `config/app
53
53
```
54
54
## 4 - Usage
55
55
### Meta tags Generator
56
- With ** SEOMeta** you can create meta tags to the ` head `
56
+ With ** SEOMeta** you can create meta tags to the ` head `
57
57
58
58
### Opengraph tags Generator
59
- With ** OpenGraph** you can create opengraph tags to the ` head `
59
+ With ** OpenGraph** you can create opengraph tags to the ` head `
60
60
61
61
#### In your controller
62
62
``` php
@@ -72,7 +72,7 @@ class CommomController extends Controller
72
72
{
73
73
SEOMeta::setTitle('Home');
74
74
SEOMeta::setDescription('This is my page description');
75
-
75
+
76
76
OpenGraph::setDescription('This is my page description');
77
77
OpenGraph::setTitle('Home');
78
78
OpenGraph::setUrl('http://current.url.com');
@@ -95,14 +95,14 @@ class CommomController extends Controller
95
95
SEOMeta::addMeta('article:published_time', $post->published_date->toW3CString(), 'property');
96
96
SEOMeta::addMeta('article:section', $post->category, 'property');
97
97
SEOMeta::addKeyword(['key1', 'key2', 'key3']);
98
-
98
+
99
99
OpenGraph::setDescription($post->title);
100
100
OpenGraph::setTitle($post->resume);
101
101
OpenGraph::setUrl('http://current.url.com');
102
102
OpenGraph::addProperty('type', 'article');
103
103
OpenGraph::addProperty('locale', 'pt-br');
104
104
OpenGraph::addProperty('locale:alternate', ['pt-pt', 'en-us']);
105
-
105
+
106
106
OpenGraph::addImage($post->cover->url);
107
107
OpenGraph::addImage($post->images->list('url'));
108
108
OpenGraph::addImage(['url' => 'http://image.url.com/cover.jpg', 'size' => 300]);
@@ -134,7 +134,7 @@ class CommomController extends Controller
134
134
<meta name =' keywords' content =' key1, key2, key3' />
135
135
<meta property =' article:published_time' content =' 2015-01-31T20:30:11-02:00' />
136
136
<meta property =' article:section' content =' news' />
137
-
137
+
138
138
<meta property =" og:description" content =" description..." />
139
139
<meta property =" og:title" content =" Title" />
140
140
<meta property =" og:url" content =" http://current.url.com" />
@@ -156,7 +156,7 @@ class CommomController extends Controller
156
156
</html >
157
157
```
158
158
159
- #### Configuration
159
+ #### Configuration
160
160
In ` seotools.php ` configuration file you can determine the properties of the default values and some behaviors.
161
161
- meta
162
162
- ** defaults** - What values are displayed if not specified any value for the page display. If the value is ` false ` , nothing is displayed.
@@ -166,6 +166,7 @@ In `seotools.php` configuration file you can determine the properties of the def
166
166
167
167
#### API (SEOMeta)
168
168
``` php
169
+ SEOMeta::setTitleSeperator($seperator);
169
170
SEOMeta::setTitle($title);
170
171
SEOMeta::setDescription($description);
171
172
SEOMeta::setKeywords($keywords);
@@ -182,6 +183,7 @@ SEOMeta::setTitle($title)
182
183
// Retrieving data
183
184
SEOMeta::getTitle();
184
185
SEOMeta::getTitleSession();
186
+ SEOMeta::getTitleSeperator();
185
187
SEOMeta::getKeywords();
186
188
SEOMeta::getDescription();
187
189
SEOMeta::reset();
@@ -196,7 +198,7 @@ OpenGraph::addImage($url); // add image url
196
198
OpenGraph::addImages($url); // add an array of url images
197
199
OpenGraph::setTitle($title); // define title
198
200
OpenGraph::setDescription($description); // define description
199
- OpenGraph::setUrl($url); // define url
201
+ OpenGraph::setUrl($url); // define url
200
202
OpenGraph::setSiteName($name); //define site_name
201
203
202
204
// You can concatenate methods
0 commit comments