A Vendure plugin for managing storefront banners.
Extends the Admin API and Shop API with banner CRUD operations and provides a full Vendure Dashboard UI with a rich text editor (Tiptap v3).
- Admin API:
banners,banner,createBanner,updateBanner,deleteBanner - Shop API:
activeBanners— returns all banners withactive: true - Dashboard UI: list page, detail/edit page, rich text editor, colour pickers, date pickers, toggle switches
- Banner fields: title, active flag, start/end dates, HTML description, background colour, action button, countdown block, newsletter block, close button
# Latest (main branch):
npm install github:campudus/vendure-plugin-storefront-banner
# Pin to a specific release:
npm install github:campudus/vendure-plugin-storefront-banner#v0.1.1Register the plugin in your Vendure config:
import { BannerPlugin } from "@campudus/vendure-plugin-storefront-banner";
export const config: VendureConfig = {
plugins: [
BannerPlugin,
],
};Run a database migration after adding the plugin to create the banner table:
npm run migration:generate && npm run migration:runThe plugin registers a nav item under an "Extensions" section of the Vendure Dashboard (both titles are localized via the catalog). If your project already defines an "extensions" nav section with a different title, the banner plugin will add a duplicate — you can remove the navSections declaration from dashboard/index.tsx in that case.
Dashboard strings are localized with Lingui. Source strings are English (en), with a German (de) catalog shipped in dashboard/i18n/. The Vendure Dashboard loads the compiled catalogs automatically.
To update or add translations after changing dashboard strings:
npx lingui extract # regenerate the .po catalogsThen fill in the msgstr entries for each locale in dashboard/i18n/{locale}.po. Add further locales via locales in lingui.config.js.
All peer dependencies listed in package.json must be installed in the consumer project. Most are already present in a standard Vendure + Dashboard setup. Additional dependencies specific to this plugin:
@tiptap/core,@tiptap/react,@tiptap/starter-kit,@tiptap/extension-color,@tiptap/extension-text-style,@tiptap/extension-underlinereact-colorfulreact-datepickerreact-hook-form
MIT — © Campudus GmbH