🍱 Packages

API reference of Frontity and its packages.

Frontity projects are built around the idea of packages that encapsulates logic that can be reused across projects. Frontity packages may be considered as the equivalent of WordPress plugins. They're the ingredients of the final Frontity project.

How to use Frontity packages

Frontity packages are available available via npm and they can be installed as dependencies of your Frontity project (as with any other Node project).

Frontity needs to know the packages we're going to use in the project and how do we want to use them. We can set this in the file frontity.settings.js, where we can define and configure the packages (by using Namespaces) for the Frontity project

We're going to focus on the use of Frontity packages at a Frontity project level, but the same applies if you're creating a custom Frontity package. You can see more info about how to create your custom package here

Official Frontity Packages

Official Frontity packages are those created and maintained by the Frontity Team.

These packages encapsulates the logic to apply the main features needed in a WordPress + React stack project managed by Frontity

A Frontity project is basically the sum of the Core package plus a selection of Features packages. We can also use Collections packages to help us speed up the development of our Frontity project

The full list of available packages include others created by the community. In this site we're going to document only the official frontity packages that has a public API

Package that is the core of the Frontity framework and that provides main utilities of the framework

Source package

This package is in charge of getting data from Wordpress and make it accesible from React components

Router package

This package is in charge of managing (React) routes in a Frontity project.

Render package

This package is in charge of converting HTML to React

SEO package

This package is designed to get automatically all the data that the REST API Head Tags plugin exposes in the REST API

Analytics packages

A set of official Analytics Frontity packages that you can use to easily add analytics tracking in your project

Collections packages

These packages are collections or useful components or hooks that you can use in your Frontity project