🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@answerable-kit/templates

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@answerable-kit/templates

Page templates (About, Privacy, Terms, FAQ, Contact) for the Answerable SEO toolkit. Installed into user projects by the CLI.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

@answerable-kit/templates

Page templates installed into user projects by the Answerable CLI. Each template is a Next.js App Router page (.tsx) wired up with defineSeo() from @answerable-kit/metadata and the matching JSON-LD generator from @answerable-kit/schemas — drop one in and you have a working, audit-ready page.

v0.1.0. Five templates ship today — About, Privacy, Terms, FAQ, Contact — each wired up with defineSeo() and the matching JSON-LD generator.

Public API

import { listTemplates, getTemplate, renderTemplate } from '@answerable-kit/templates';

// Enumerate every available template:
for (const t of listTemplates()) {
  console.log(t.name, t.filename, t.requiredTokens);
}

// Render a template with substituted token values:
const source = renderTemplate('about', {
  PROJECT_NAME: 'Acme',
  DOMAIN: 'acme.com',
  URL: 'https://acme.com',
  DESCRIPTION: 'The friendliest widget shop on the internet.',
});

// `source` is now a string of TSX, ready to write to app/about/page.tsx.

Templates & audit checks

TemplateFilenameDrives audit checks
aboutapp/about/page.tsxD1 (About page), D5 (chrome link), C2 (Organization schema)
privacyapp/privacy/page.tsxD2 (Privacy policy), D6 (footer link)
termsapp/terms/page.tsxD3 (Terms of use), D6 (footer link)
faqapp/faq/page.tsxB5 (FAQ section), C4 (FAQPage schema)
contactapp/contact/page.tsxD4 (Contact info), D6 (footer link)

Validation

renderTemplate() rejects:

  • Missing tokens — every {{TOKEN}} referenced in the template must have a value
  • Unknown tokens — every key in your values object must correspond to a {{TOKEN}} referenced in the template (catches typos at install time)

Both errors include the full list of offending tokens so the CLI can surface them all in one prompt.

License

MIT © 2026 Anuj Ojha

FAQs

Package last updated on 17 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts