Download the PHP package ichaber/silverstripe-swiftype without Composer

On this page you can find all versions of the php package ichaber/silverstripe-swiftype. 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 silverstripe-swiftype

SilverStripe Swiftype

Build Status Scrutinizer Code Quality codecov

Installation

Install with Composer:

Also see Configuration. Extensions and configurations are not applied automatically.

Documentation

Provides the necessary code for configuring the swiftype integration code with the access key and for adding metadata tags to the site code so the Swiftype crawler can be index them.

The code also provides an extension which triggers a re-index after a page is published/unpublished in the SilverStripe CMS admin area.

How does it work?

MetaTags

There are a bunch of standard SwiftypeMetaTag classes. Each of these classes represents one of the standard SilverStripe SiteTree fields or methods, and will be used to output a single meta tag into your markup.

Here are the standard classes, and which SiteTree field/method they represent:

Additionally, there is a robots class, which can be used to output noindex and/or nofollow (configurable) when your SiteTree record has ShowInSearch set to 0. By default, this will render with just noidex, but you can update it's config to also render with nofollow.

Templating

If you are using out of the box functionality (see Configuration), then in your template, you can simply use $SwiftypeMetaTags to output all of the meta tags that you have set up as part of your install.

Crawling

If you are using out of the box functionality (see Configuration), then when you publish a page, a request will be sent to Swiftype for it to crawl that page.

Configuration

Simple

If you just want to plug and play, then apply the following three extensions.

These will provide you with:

You will then need specify which Meta Tags you would like to use. You can do this in two ways.

In a config yaml:

Or in your model:

Either of these methods should provide you with good control if you have different page types needing different meta tags.

A quick note on the Robots class

Swiftype uses the standard <meta name="robots" content="noindex"> meta tag, so if you are already outputting this tag through some other means, then you will want to exclude it here. Also see [Customising the robots Meta Tag](#Customising the robots Meta Tag)

Piece by piece

To use the standard SiteConfig CMS fields, you can apply SwiftypeSiteConfigFieldsExtension to your SiteConfig. This will provide you with some basic options to set up a single engine for your site.

Currently there is minimal support for multiple engines on a single site - you will (most likely) need to add your own implementation if you desire this.

If you are using the Swiftype Crawler, and would like to add "re-crawl" actions after your pages un/publish, you can apply SwiftypeSiteTreeCrawlerExtension to SiteTree (or another model of your choice).

If you would like SiteTree to have access to the standard template variable, then apply the following extension.

Indexing Files

If you are using the Swiftype Crawler, and would like to add "re-crawl" actions after your Files un/publish, you can apply SwiftypeFileCrawlerExtension to File (or another model of your choice).

There is also a config to allow certain file types from being indexed/reindexed.

NB: by default this config does not set any extensions to be indexed.

Indexing custom DataObjects

If you want to index your own custom DataObjects, simply create your own crawler extension by extending

Adding your own Meta Tags

You can easily add your own classes to your objects (see Installation).

Any classes that you add are expected to implement SwiftypeMetaTagInterface, but that's about it.

You can also feel free to extend SwiftypeMetaTag, if you would like access to methods like generateMetaTagsString().

Customising the robots Meta Tag

There are two configs available for the robots Meta Tag. These allow you to control whether you add noindex and/or nofollow. By befault, noindex is added, but we allow robots to follow.

You can override these by adding your own config. EG: Adding both noidex and nofollow.

Requirements


All versions of silverstripe-swiftype with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
silverstripe/cms Version ^5
guzzlehttp/guzzle Version ^7.5
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 ichaber/silverstripe-swiftype contains the following files

Loading the files please wait ....