Packages in Frontity

In Frontity Docs there are a lot of references about packages ( but I cannot find specific explanations about:

  • What does “packages” mean for Frontity?
  • What is the idea behind “packages”? Is the idea having a Framework extensible?
  • What type of packages are created and which ones could be easily created?
  • Whatdo I need to take into account if I want to create my own package?

Can you please add a few explanations about the whole idea of packages in Frontity?

In Frontity, there’s no “app”. Everything is a package. It works like WordPress in that sense, where you don’t code your WordPress, you code your theme or a plugin.

Yes, Frontity is highly extensible.

Right now most people is creating themes and adding all their code there, just as if they were coding their “app” in frameworks like NextJS or Gatsby. That is fine for now, but we need to change that over time and teach people how to create packages in Frontity so they can share them and reuse the packages of others.

In the future, once we release more packages, a typical Frontity site may include:

  • A theme package.
  • A router package, like @frontity/tiny-router.
  • A source package, like @frontity/wp-source or @frontity/wpgraphql-source.
  • One or more analytics packages, like @frontity/google-analytics.
  • A comments package, like @frontity/wp-comments or @frontity/discuss.
  • A newsletter package, like frontity-mailchimp (maybe created by the community).
  • An SEO package, like @frontity/head-tags or @frontity/yoast.
  • A forms package, like frontity-contact-form-7.
  • Server config packages, like @frontity/headers.
  • A “rendering mode” package, like @frontity/amp.
  • Packages that integrate with other things, like @frontity/gutenberg.

The idea is that the community also create packages, like frontity-contact-form-7, not only us. Official packages will always start with @frontity/xxx.

1 Like