Skip to content

Configuration

All page content lives in a single site-config.ts file. The theme renders your site from this configuration object. The shape of the config depends on which template you are using.

Used by the default template. Defines metadata, header/footer content, the hero section, and an array of content sections.

import type { SiteConfig } from '@mcptoolshop/site-theme';
export const config: SiteConfig = {
title: '@mcptoolshop/my-tool',
description: 'What my tool does.',
logoBadge: 'MT',
brandName: 'my-tool',
repoUrl: 'https://github.com/mcp-tool-shop-org/my-tool',
npmUrl: 'https://www.npmjs.com/package/@mcptoolshop/my-tool',
footerText: 'MIT Licensed',
hero: { /* ... */ },
sections: [ /* ... */ ],
};
FieldTypeRequiredDescription
templatestringnoOmit or set to 'default'
titlestringyesPage title (used in <title>)
descriptionstringyesMeta description
logoBadgestringyes1-2 character header badge
brandNamestringyesName in header
repoUrlstringyesGitHub repo URL
npmUrlstringnonpm package URL
footerTextstringyesFooter text (HTML allowed)
FieldTypeRequiredDescription
badgestringyesStatus badge text
headlinestringyesMain headline
headlineAccentstringyesMuted suffix
descriptionstringyesDescription (HTML allowed)
primaryCta{ href, label }yesPrimary button
secondaryCta{ href, label }yesSecondary button
previews{ label, code }[]noCode preview cards

The sections array accepts objects with a kind field that determines which component renders.

KindComponentAdditional props
featuresFeatureGridfeatures: { title, desc }[]
data-tableDataTablecolumns: string[], rows: string[][]
code-cardsCodeCardGridcards: { title, code }[]
apiApiListapis: { signature, description }[]

Every section object shares these fields:

FieldTypeRequiredDescription
kindstringyesSection type (see above)
idstringyesAnchor ID for navigation
titlestringyesSection heading
subtitlestringnoText below the heading

Sections render in the order they appear in the array.

{
kind: 'features',
id: 'features',
title: 'What you get',
subtitle: 'Everything a project landing page needs.',
features: [
{ title: 'Dark by default', desc: 'Semantic design tokens for full reskinning.' },
{ title: 'GitHub Pages ready', desc: 'CI workflow included in the scaffold.' },
{ title: 'Fully customizable', desc: 'Every value is a CSS custom property.' },
],
}
{
kind: 'code-cards',
id: 'quick-start',
title: 'Quick start',
cards: [
{ title: 'Install', code: 'npx @mcptoolshop/site-theme init' },
{ title: 'Run', code: 'cd site && npm run dev' },
],
}

The header nav is generated automatically from the sections array. Each section’s id and title become a nav link pointing to #id.


Used by the docs template. Adds a sidebar navigation structure and uses DocsSection content blocks instead of the default section kinds.

import type { DocsSiteConfig } from '@mcptoolshop/site-theme/types/docs-config';
export const config: DocsSiteConfig = {
template: 'docs',
title: 'My Docs',
description: 'Documentation for my tool.',
logoBadge: 'MD',
brandName: 'my-docs',
repoUrl: 'https://github.com/mcp-tool-shop-org/my-tool',
footerText: 'MIT Licensed',
sidebar: [
{ title: 'Guide', items: [{ label: 'Getting Started', href: '#getting-started' }] },
],
sections: [
{ id: 'getting-started', title: 'Getting Started', content: '<p>Welcome...</p>' },
],
};
FieldTypeRequiredDescription
template'docs'yesTemplate discriminant
sidebarSidebarGroup[]yesNavigation groups for the sidebar
sectionsDocsSection[]yesContent sections rendered in the main area

SidebarGroup shape: { title: string, items: { label: string, href: string }[] }

DocsSection shape:

FieldTypeRequiredDescription
idstringyesAnchor ID
titlestringyesSection heading
contentstringyesHTML content (rendered via set:html)
headings{ text, id, depth }[]noSub-headings for TOC generation

Used by the product template. Adds marketing-focused blocks: social proof, pricing, testimonials, and a CTA banner.

import type { ProductSiteConfig } from '@mcptoolshop/site-theme/types/product-config';
export const config: ProductSiteConfig = {
template: 'product',
title: 'My Product',
description: 'The best product.',
logoBadge: 'MP',
brandName: 'my-product',
repoUrl: 'https://github.com/mcp-tool-shop-org/my-product',
footerText: 'MIT Licensed',
hero: { /* ... */ },
socialProof: { stats: [{ value: '10K+', label: 'Downloads' }] },
features: [{ title: 'Fast', desc: 'Blazing fast builds.' }],
pricing: { headline: 'Pricing', tiers: [ /* ... */ ] },
testimonials: [{ quote: 'Great tool!', author: 'Jane', role: 'Engineer' }],
ctaBanner: { headline: 'Get started', cta: { href: '#', label: 'Try it' } },
};
FieldTypeRequiredDescription
template'product'yesTemplate discriminant
heroHeroDefyesHero section
socialProofSocialProofDefnoTrust signals / stats bar
features{ title, desc }[]noFeature highlight cards
pricingPricingDefnoPricing tiers
testimonialsTestimonialDef[]noTestimonial quotes
ctaBannerCtaBannerDefnoBottom call-to-action banner

Used by the portfolio template. Configures a filterable, searchable grid of items with optional category grouping.

import type { PortfolioSiteConfig } from '@mcptoolshop/site-theme/types/portfolio-config';
export const config: PortfolioSiteConfig = {
template: 'portfolio',
title: 'My Catalog',
description: 'All our tools.',
logoBadge: 'MC',
brandName: 'catalog',
repoUrl: 'https://github.com/mcp-tool-shop-org/catalog',
footerText: 'MIT Licensed',
filterable: true,
searchable: true,
groupByCategory: false,
columns: 3,
items: [
{ title: 'Tool A', description: 'Does things.', href: '/tool-a', tags: ['cli'] },
],
};
FieldTypeRequiredDescription
template'portfolio'yesTemplate discriminant
heroHeroDefnoOptional hero section at the top
portfolioHeadingstringnoHeading above the grid
portfolioSubtitlestringnoSubtitle below the heading
filterablebooleannoEnable tag filtering (default: true)
searchablebooleannoEnable text search (default: true)
groupByCategorybooleannoGroup items by category (default: false)
columns2 | 3 | 4noGrid columns on large screens (default: 3)
itemsPortfolioItem[]yesItems to display
ctaBannerCtaBannerDefnoOptional bottom CTA banner

See the Components page for the full PortfolioItem shape.


The exported SiteConfig type is a discriminated union of all four config types:

type SiteConfig = DefaultSiteConfig | DocsSiteConfig | ProductSiteConfig | PortfolioSiteConfig;

The template field acts as the discriminant. For the default template, template can be omitted entirely for backward compatibility.