API Reference
  • Introduction
  • 💻CLI Commands
    • Create commands
      • create
      • create-package
    • Run commands
      • dev
      • serve
    • Build commands
      • build
    • Extra commands
  • 🍱Packages
    • 💙Core package
      • frontity
    • ⚡Features packages
      • @frontity/wp-source
      • @frontity/tiny-router
      • @frontity/html2react
      • @frontity/head-tags
      • @frontity/yoast
      • @frontity/google-ad-manager
      • @frontity/smart-adserver
      • analytics packages
        • @frontity/google-analytics
        • @frontity/google-tag-manager-analytics
        • @frontity/comscore-analytics
      • @frontity/wp-comments
    • 📚Collections packages
      • @frontity/components
      • @frontity/hooks
        • Infinite Scroll Hooks
        • Intersection Observer Hooks
    • 🎨Themes Packages
      • @frontity/twentytwenty-theme
      • @frontity/mars-theme
  • 🔌WordPress Plugins
    • REST API - Head Tags
    • Frontity Embedded Mode
Powered by GitBook
On this page
  • How to use Frontity packages
  • Official Frontity Packages
  • 💙 Core package
  • 🎨 Themes packages
  • ⚡️ Features packages
  • 📚 Collections packages

Was this helpful?

Packages

API reference of Frontity and its packages.

PreviousExtra commandsNextCore package

Last updated 3 years ago

Was this helpful?

Frontity projects are built around the idea of packages that encapsulate 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 via 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 we want to use them. We can set this in the frontity.settings.js file, 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 .

Official Frontity Packages

The official Frontity packages are those created and maintained by the .

These packages encapsulate 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. You can also use Collections packages to help speed up the development of your Frontity project.

The includes others created by the community, such as and . However, only the official frontity packages that have a public API are fully documented here.

💙

This package is the core of the Frontity framework and provides the main utilities of the framework.

🎨

These packages contain the React project used to render the final output (both in client and server side).

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 packages

These packages are designed to get automatically all the data from WordPress SEO plugins and render it (along with the content) in the final HTML.

Ads packages

These packages allow you to insert ads in your Frontity projects from services such as Google Ad Manager.

Analytics packages

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

Comments packages

This package adds support for WordPress' native comments.

📚 Collections packages

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

⚡️

🍱
@frontity/mars-theme
@frontity/twentytwenty-theme
Features packages
@frontity/wp-source
@frontity/tiny-router
@frontity/html2react
@frontity/head-tags
@frontity/yoast
@frontity/google-ad-manager
@frontity/smart-adserver
@frontity/google-analytics
@frontity/google-tag-manager-analytics
@frontity/comscore-analytics
@frontity/wp-comments
@frontity/components
@frontity/hooks
npm
here
Frontity Team
full list of packages
Core package
frontity
Themes packages
these features packages
these themes