Download the PHP package iag/metadata without Composer
On this page you can find all versions of the php package iag/metadata. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package metadata
Short Description Seo metadata for Laravel websites
License
Homepage https://github.com/IAndreaGiuseppe/metadata
Informations about the package metadata
Metadata
Use this package if you don't need complex implementation over SEO metadata.
This package provides a way to include metadata tags and other SEO related values inside a view.
This is the most flexible way of inject metadata inside webpages without the need of a database.
Setup
-
Require this package inside your
composer.json
file. - Opt-in publishing metadata config file.
You can now modify the new metadata.php
configuration file inside config
folder with your preferred default values.
Usage
This package is a metadata management suite to include metadata tags and related SEO values inside a view.
-
Before start using this package update the configuration file
config/metadata.php
with your default SEO informations. - Include a new stack inside your base layout view. This stack will collect all your SEO metadata.
Now you're ready to include your metadata.
- Choose a public view of your website content (ex. views/articles/page.blade.php) and include the
metadata::metadata
view entry point when you need it.
Advanced
You can include or exclude metadata by simply activating flags values inside your config file or at runtime.
Setting true
to these directives enable a default facebook or twitter injection of metadata.
You can opt-in deactivate these section at runtime for a singular content in your website:
Flags
-
facebook.is_active
asfacebook
Activate the facebook metadata section twitter.is_active
astwitter
Activate the twitter metadata section
Properties
Metadata package manage the following list of properties:
-
robots
Defines the behaviour that cooperative crawlers, or "robots", should use with the page.
Possible values: index, noindex, follow, nofollow, none, noodp, noarchive, nosnippet, noimageindex, nocache -
referrer
Controls the Referer HTTP header attached to requests sent from the document.
Possible values: no-referrer, origin, no-referrer-when-downgrade, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-URL -
canonical
Define the canonical url of your content. -
description
Contains a short and accurate summary of the content of the page. -
og:title
astitle
This metadata is used inside head section to assign a title for search engine and does not modify the main page title. og:url
og:description
asdescription
-
og:type
astype
Describe the type of the content.
Possible values: website, article, music, video, book, profile -
og:locale
-
fb:app_id
Facebook App Id. -
twitter:card
ascard_type
Twitter card type.
Possible values: summary, summary_large_image, app, player -
twitter:site
assite
Twitter referred @site. -
twitter:creator
asauthor
Twitter referred @username. -
og:image
asimage_url
An image URL which should represent your object within the graph. -
og:image:type
asimage_type
A MIME type for the image. -
og:image:width
asimage_width
The number of pixels wide. -
og:image:height
asimage_height
The number of pixels high. og:image:alt
asimage_alt
A description of what is in the image (not a caption). If the page specifies an og:image it should specify this property.