1
0
Fork 0
mirror of https://github.com/archtechx/laravel-seo.git synced 2025-12-12 09:54:03 +00:00

Update README.md

This commit is contained in:
Samuel Štancl 2021-05-24 10:58:54 +02:00 committed by GitHub
parent b12c9ecb55
commit 951a974f67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,8 @@
# laravel-seo # 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 `<title>` and OpenGraph tags. It also ships with a Twitter extension. You're, of course, free to write your own extensions as needed.
**Features**: **Features**:
- Setting SEO tags from PHP - 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 - Integration with [Flipp](https://useflipp.com), to automatically generate cover images
- Custom extension support - Custom extension support
- Expressive & simple API - Expressive & simple API
- Customizable views
Example usage: Example usage:
```php ```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')`. 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 ### Defaults
To configure default values, call the methods with the `default` argument: To configure default values, call the methods with the `default` argument: