From 951a974f67d43cd71943f03a805b252a72fdbc37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 24 May 2021 10:58:54 +0200 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 77bf8c6..cc4ec48 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # laravel-seo -This is a simple package for improving SEO via OpenGraph and Twitter meta tags. +This is a simple and extensible package for improving SEO via meta tags, such as OpenGraph tags. -It's semi-opinionated, as it's what we use for all of our websites. At the same time, it's not overengineered like many other SEO packages. +By default, it uses `` and OpenGraph tags. It also ships with a Twitter extension. You're, of course, free to write your own extensions as needed. **Features**: - Setting SEO tags from PHP @@ -10,6 +10,7 @@ It's semi-opinionated, as it's what we use for all of our websites. At the same - Integration with [Flipp](https://useflipp.com), to automatically generate cover images - Custom extension support - Expressive & simple API +- Customizable views Example usage: ```php @@ -78,6 +79,24 @@ That is, if you'll use the helpers in Blade at all. Some apps will only use the For Twitter, use the `twitter.author` format, e.g. `@seo('twitter.author')`. +### Twitter + +By default, no Twitter tags will be included. If you manually enable the extension by calling: + +```php +seo()->twitter(); +``` + +in a service provider for example, the extension will be enabled. + +Once it's enabled, it will copy all default (OpenGraph) values and use them for the Twitter card schema. + +When a value is set specifically for Twitter, it will be prioritized over the general fallback values. + +```php +seo()->twitterTitle('About us') +``` + ### Defaults To configure default values, call the methods with the `default` argument: