Wallogit.com
2017 © Pedro Peláez
A composer package for SEO for all quintype projects, (*1)
$ composer update
Note : We are making use of a package called Meta (https://github.com/quintype/meta) forked from https://github.com/RyanNielson/meta for dynamically adding the meta tags into the pages., (*2)
Instructions to include the package into a project., (*3)
"require": {
...
...
"quintype/seo":"1.0.0",
"quintype/meta":"2.0.0"
},
$ composer install or $ composer update
'aliases' => [
...
...
'Meta' => Quintype\Meta\Meta::class,
'Seo' => Quintype\Seo\Seo::class
],
return [
...
...
"title" => "Pina Colada"
];
use Meta; use Seo;
public function __construct(){
$this->client = new Api(config("quintype.api-host"));
$this->config = array_merge($this->client->config(), config('quintype'));
$this->meta = new Meta();
$this->seo = new Seo($this->config);
}
$setSeo = $this->seo->FUNCTION_NAME($args); $this->meta->set($setSeo->prepareTags());
return view('home', $this->toView([
...
...
"meta" => $this->meta
])
);
{{ meta.display([], true)|raw }}
home($pageType), (*4)
search($searchKeyword), (*5)
section($pageType, $sectionName, $sectionId), (*6)
staticPage($title), (*7)
story($pageType, $storyArray), (*8)
tag($tagName), (*9)