I find confusing to name our packages as “packages” and then divide them between “themes” and “extensions” when “theme” is just a namespace. It gets more confusing when dealing with npm packages.
The name “plugin” is also confusing because WP has plugins and there will be a Frontity plugin, but “extension” is not used anywhere else.
So my suggestion is to change our “packages” for “extensions”, even for the themes.
In frontity.settings.js
:
module.exports = [
{
name: "my-site", // The name of your site.
extensions: [
"@frontity/mars-theme",
"@frontity/tiny-router",
"@frontity/wp-source"
]
}
]
In the command line:
npx frontity create-extension
In TypeScript:
import { Extension } from "frontity/types"
interface MyExtension extends Extension {
...
}
In the project structure:
package.json
/extensions
frontity.settings.js
Then in the docs we make sure that people know they need at least 3 extensions:
You need at least three extensions: one
theme
, onerouter
and onesource
.
And finally we can talk about local extensions which are the ones in your /extensions
folder.
I’m not 100% sure. Any thoughts?