Download the PHP package area17/laravel-auto-head-tags without Composer
On this page you can find all versions of the php package area17/laravel-auto-head-tags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download area17/laravel-auto-head-tags
More information about area17/laravel-auto-head-tags
Files in area17/laravel-auto-head-tags
Package laravel-auto-head-tags
Short Description Laravel Auto Head Tags helps you build the list of head elements for your app
License MIT
Homepage https://github.com/area17/laravel-auto-head-tags
Informations about the package laravel-auto-head-tags
Laravel Auto Head Tags
Description
This package aims to ease the creating of all HTML head tags: meta, links, SEO, Open Graph, Twitter and whatever else you need.
The package will grab all the info it needs from the data sent to Blade:
To generate, out of the box, this set of tags for you:
The list of tags is larger, but if you don't provide enough information to create those tags, they won't be created.
Install
Via Composer
Publish the config file
Using
Add to your blade template
Add the tag @head
to your main template:
This directive is also configurable, just publish the configuration and change the blade.directive
.
Configuring
All available tags are on the config file: config/laravel-auto-head-tags.yaml
, and everything is configurable. This is an extract of the tags section:
You can define macros to access Blade data, using {}
, and the package can resolve them using the "dot" notation for arrays:
You can define as many fallbacks you need for those macros:
And you can also access data from the Laravel config:
If it's required to generate more than one URL for a single tag definition, there's loop
concept:
If seo.urls.hreflang
is an array made of locales (key
) and URLs (value
), this configuration will generate these tags:
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- AREA 17
- Antonio Ribeiro
- All Contributors
License
The MIT License (MIT). Please see License File for more information.