Download the PHP package pedroborges/kirby-meta-tags without Composer

On this page you can find all versions of the php package pedroborges/kirby-meta-tags. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kirby-meta-tags

Kirby Meta Tags Release Issues

HTML meta tags generator for Kirby. Supports Open Graph, Twitter Cards, and JSON Linked Data out of the box.

Requirements

Installation

Download

Download and copy this repository to site/plugins/meta-tags.

Git submodule

Composer

For Kirby 2, you can download v1.1.1 and copy the files to site/plugins/meta-tags.

Basic Usage

After installing the Meta Tags plugin, you need to add one line to the head element on your template, or header.php snippet:

By default the metaTags page method will render all tag groups at once. But you can also render only one tag at a time:

Or specify which tags to render:

Default

The plugin ships with some default meta tags enabled for your convenience:

The pedroborges.meta-tags.default option is applied to all pages on your Kirby site. Of course you can change the defaults. In order to do that, just copy this example to your site/config/config.php file and tweak it to fit your website needs.

Templates

Following the flexible spirit of Kirby, you also have the option to add template specific meta tags:

In the example above, those settings will only be applied to pages which template is song.

For more information on all the meta, link, Open Graph and Twitter Card tags available, check out these resources:

Options

Both the pedroborges.meta-tags.default and pedroborges.meta-tags.templates accept similar values:

pedroborges.meta-tags.default

It accepts an array containing any or all of the following keys: title, meta, link, og, and twitter. With the exception of title, all other groups must return an array of key-value pairs. Check out the tag groups section to learn which value types are accepted by each key.

pedroborges.meta-tags.templates

This option allows you to define a template specific set of meta tags. It must return an array where each key corresponds to the template name you are targeting.

When a key matches the current page template name, it is merged and overrides any repeating properties defined on the pedroborges.meta-tags.default option so you don't have to repeat yourself.

Tag Groups

These groups accept string, closure, or array as their values. Being so flexible, the sky is the limit to what you can do with Meta Tags!

title

Corresponds to the HTML <title> element and accepts a string as value.

You can also pass it a closure that returns a string if the logic to generate the title is more complex.

meta

The right place to put any generic HTML <meta> elements. It takes an array of key-value pairs. The returned value must be a string or closure.

Show HTML 👁

link

This tag group is used to render HTML <link> elements. It takes an array of key-value pairs. The returned value can be a string, array, or closure.

Show HTML 👁

og

Where you can define Open Graph <meta> elements.

Show HTML 👁

Of course you can use Open Graph structured objects. Let's see a blog post example:

Show HTML 👁

Use the namespace: prefix for structured properties:

When using Open Graph tags, you will want to add the prefix attribute to the html element as suggested on their docs: <html prefix="og: http://ogp.me/ns#">

twitter

This tag group works just like the previous one, but it generates <meta> tags for Twitter Cards instead.

Show HTML 👁

json-ld

Use this tag group to add JSON Linked Data schemas to your website.

If you leave them out, http://schema.org will be added as @context and the array key will be added as @type.

Show HTML 👁

Change Log

All notable changes to this project will be documented at: https://github.com/pedroborges/kirby-meta-tags/blob/master/CHANGELOG.md

License

The Meta Tags plugin is open-sourced software licensed under the MIT license.

Copyright © 2019 Pedro Borges [email protected]


All versions of kirby-meta-tags with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
getkirby/composer-installer Version ^1.1
pedroborges/meta-tags Version ^0.0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pedroborges/kirby-meta-tags contains the following files

Loading the files please wait ....