From 00197938d0558f1d2a27941acace46d4126fac51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 24 May 2021 19:16:02 +0200 Subject: [PATCH] move sections --- README.md | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 8af4f80..46eb8a3 100644 --- a/README.md +++ b/README.md @@ -166,46 +166,6 @@ The `flipp()` method also returns a signed URL to the image, which lets you use @seo('title') ``` -## Customization - -This package is completely flexible, and can be customized either by having its views modified (to change the existing templates), or by you developing an extension (to add more templates). - -### Views - -You can publish the Blade views by running `php artisan vendor:publish --tag=seo-views`. - -### Extensions - -To use a custom extension, create a Blade *component* with the desired meta tags. The component should read data using `{{ seo()->get('foo') }}` or `@seo('foo')`. - -For example: - -```php - -``` - -Once your view is created, register the extension: - -```php -seo()->extension('facebook', view: 'my-component') -// The extension will use -``` - -To set data for an extension (in our case `facebook`), simply prefix calls with the extension name in camelCase, or use the `->set()` method: - -```php -seo()->facebookFoo('bar') -seo()->facebookTitle('About us') -seo()->set('facebook.description', 'We are a web development agency that ...') -seo(['facebook.description' => 'We are a web development agency that ...']) -``` - -To disable an extension, set the second argument in the `extension()` call to false: - -```php -seo()->extension('facebook', false); -``` - ## Examples ### Service Provider @@ -258,6 +218,46 @@ This example uses a Blade view that sets global SEO config using the values that

``` +## Customization + +This package is completely flexible, and can be customized either by having its views modified (to change the existing templates), or by you developing an extension (to add more templates). + +### Views + +You can publish the Blade views by running `php artisan vendor:publish --tag=seo-views`. + +### Extensions + +To use a custom extension, create a Blade *component* with the desired meta tags. The component should read data using `{{ seo()->get('foo') }}` or `@seo('foo')`. + +For example: + +```php + +``` + +Once your view is created, register the extension: + +```php +seo()->extension('facebook', view: 'my-component') +// The extension will use +``` + +To set data for an extension (in our case `facebook`), simply prefix calls with the extension name in camelCase, or use the `->set()` method: + +```php +seo()->facebookFoo('bar') +seo()->facebookTitle('About us') +seo()->set('facebook.description', 'We are a web development agency that ...') +seo(['facebook.description' => 'We are a web development agency that ...']) +``` + +To disable an extension, set the second argument in the `extension()` call to false: + +```php +seo()->extension('facebook', false); +``` + ## Development Run all checks locally: