hps-plugin-topic
By Hyperse
hps-plugin-topic is a Topic plugin in the Hub Content group.hps-plugin-topic provides Topic plugin capabilities for Hub Content. Content, SEO, widgets, and merchandising presentation tools. It is especially useful for content workflows.
CoreVendure Plugins
Specifications
Technical details and package information for this product.
Package
@hyperse-hub/hps-plugin-topic
Support languages
TypeScript, JavaScript, CSS, Prolog, Shell
Last published
July 02, 2026
@hyperse-hub/hps-plugin-topic
Vendure plugin for topics (translatable articles or help-style pages) and topic links, with Admin API, Shop API, and an optional Hyperse admin UI extension.
Features
- Topic entity with translations (
name, slug, title, body, SEO fields), optional viewCustomTemplate, published, and helpful-vote counters.
- TopicLink entity for links associated with topics (Admin + Shop list queries).
- Admin API: full CRUD on topics and topic links; scoped to the active channel where applicable.
- Shop API: read published topics by
id or slug, list topics and links for the storefront, and updateTopicHelpful for feedback.
- Permissions: Admin operations use Vendure core Catalog permissions (
ReadCatalog, CreateCatalog, UpdateCatalog, DeleteCatalog) — no custom permission enum.
Installation
yarn add @hyperse-hub/hps-plugin-topic
Add HpsPluginTopic to your Vendure plugins array:
Requires @hyperse-hub/hps-plugin-core and @hyperse-hub/hps-plugin-admin (as declared in the plugin). Follow your Vendure version’s documentation for VendureConfig and database migrations.
Optional: seed topics and links on startup
Pass defaultTopics and/or defaultTopicLinks to init(). On each application bootstrap, the plugin upserts rows into the default Vendure channel (or the channel given by defaultTopicSeedChannelId).
- Topics are matched by translation slug (the translation for the channel’s default language, otherwise the first translation).
- Topic links are matched by channel + position + displayOrder + parentId (root links use
parentId null).
Example:
The package config/dev-server.ts in this repository uses the same data shape for local development (with enums from the plugin’s generated admin types).
Admin permissions
Grant the appropriate Catalog permissions to administrator roles so they can manage topics and topic links in line with products and collections.
Package layout (high level)
| Area | Role |
|---|
src/api | GraphQL SDL for Admin and Shop APIs |
src/entities | TypeORM entities and translations |
src/resolvers | *-admin.resolver.ts, *-shop.resolver.ts |
src/services | Business logic |
ui/ | Dashboard UI (Hyperse admin extension) |
Scripts
See package.json for build, serve, test, codegen, and UI build targets.
License
MIT — see LICENSE in the monorepo root.
import { HpsPluginTopic } from '@hyperse-hub/hps-plugin-topic';
import type { VendureConfig } from '@vendure/core';
export const config: VendureConfig = {
plugins: [HpsPluginTopic.init()],
};
import {
HpsPluginTopic,
type HpsPluginTopicOptions,
} from '@hyperse-hub/hps-plugin-topic';
import { LanguageCode } from '@vendure/core';
const topicPluginOptions = {
defaultTopics: [
{
published: true,
translations: [
{
languageCode: LanguageCode.en,
name: 'Getting started',
title: 'Getting started',
body: '<p>Welcome to topics.</p>',
slug: 'getting-started',
metaTitle: 'Getting started',
metaDescription: 'Example topic.',
},
],
},
],
defaultTopicLinks: [
{
position: 'SiteFooter',
displayOrder: 0,
published: true,
translations: [
{
languageCode: LanguageCode.en,
name: 'Help center',
redirectTo: '/help',
},
],
},
],
} satisfies HpsPluginTopicOptions;