Vendure plugin that registers locale-aware SEO custom fields on Product, ProductVariant, and Collection: metaTags, metaTitle, and metaDescription. Use them in the Admin UI and expose them to the Storefront API for head tags and search snippets.
Requirements
- Node.js ≥ 20
@vendure/core ^3.5.5 (peer dependency)
Installation
yarn add @hyperse-hub/hps-plugin-metas
Usage
Register the plugin in your Vendure config:
import { HpsPluginMetas } from '@hyperse-hub/hps-plugin-metas';
export const config: VendureConfig = {
plugins: [
HpsPluginMetas,
],
};
After startup, run migrations if your process creates schema updates for new custom fields.
Custom fields
The same field set is attached to Collection, Product, and ProductVariant.
| Name | Type | List | Purpose |
|---|
metaTags | localeString | yes | Keywords or tag lines (per channel language) |
metaTitle | localeString | no | Page <title> / Open Graph title |
metaDescription | localeText | no | Meta description / snippet text |
All fields are nullable. Admin labels are provided in English (LanguageCode.en); add more languages in Vendure’s custom field config if you need localized labels.
Storefront and GraphQL
Custom fields appear on the relevant types in Admin and Shop GraphQL APIs (subject to your Vendure custom field permissions). Query them like other custom fields, for example on product.customFields.metaTitle for the active translation context.
Public API
The package exports HpsPluginMetas from the root entry. Internal field definitions are not part of the stable public API unless documented here.