npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qentrah/templates

v3.0.0-beta.31

Published

Template compatibility package for Qentrah CMS

Readme

@qentrah/templates

Documentation · Install guide

Template compatibility package for Qentrah CMS

These guides describe the published 3.0.0-beta.29 package. The examples use the APIs and files in that release; beta packages should be kept on matching versions.

Documentation

Install and verify

Before you start

The package does not declare an engine requirement. Use a maintained Node.js release appropriate to your host application.

Use a project with a package.json. Check the runtime and package manager:

node --version
npm --version

Install the documented version

npm install @qentrah/[email protected]

Confirm the installation

npm ls @qentrah/templates

The output should show @qentrah/[email protected]. Commit the lockfile so another developer installs the same dependency tree.

Peer dependencies

Install compatible peers in the consuming application. These ranges come from the published manifest.

| Package | Required range | | --- | --- | | hono | ^4.10.4 | | @qentrah/cms | ^3.0.0-beta.29 |

Check a real export

import { renderDocsLayout } from "@qentrah/templates";

const html = renderDocsLayout({
  title: "Project guide",
  content: "<p>Welcome to your guide.</p>",
  currentPath: "/guide",
  navigation: [{ title: "Guide", path: "/guide" }],
});

The function returns an HTML string. Your server chooses how to send that string as an HTML response.

Render pages and forms

Compose a documentation layout

import { renderDocsLayout, renderForm } from "@qentrah/templates";

const form = renderForm({
  action: "/articles",
  method: "POST",
  fields: [{ name: "title", label: "Title", type: "text", required: true }],
  submitButtons: [{ label: "Save", type: "submit" }],
});

const html = renderDocsLayout({
  title: "New article",
  content: form,
  currentPath: "/articles/new",
  navigation: [{ title: "Articles", path: "/articles" }],
});

Both functions return strings. The form action must point to a route implemented by your server. Rendering a form does not save a record.

Form data contract

fields and submitButtons are required. Optional form settings include id, action, method, hxPost, hxPut, hxTarget, title, description, and className. Field types include text, email, textarea, select, checkbox, rich_text, number, date, multi_select and file.

Input handling

The templates interpolate HTML. Validate and sanitize untrusted values in your application. Server handlers must perform their own authentication, authorization and input validation. Never treat a rendered interface as a security boundary.

Existing template families

The root also exposes cache, database-table, content-edit, content-new, checkbox, FAQ, API-reference, field-types and content-list renderers. Inspect each declaration’s data type before calling it; the renderers do not share one universal parameter object.

API and exports

Package identity

| Field | Value | | --- | --- | | Package | @qentrah/templates | | Version inspected | 3.0.0-beta.29 | | License | Not declared in the published manifest | | Module type | module |

Public import paths

| Import path | Published target | | --- | --- | | @qentrah/templates | ./dist/index.d.ts | | @qentrah/templates/pages/* | ./dist/pages/*.d.ts | | @qentrah/templates/layouts/* | ./dist/layouts/*.d.ts | | @qentrah/templates/components/* | ./dist/components/*.d.ts |

Root functions

renderDocsLayout, renderForm, renderFormField, renderFilterBar, renderCacheDashboard, renderDatabaseTablePage, renderContentEditPage, renderContentNewPage, renderCheckboxPage, renderFAQList, renderFAQForm, renderAPIReferencePage, getFieldTypeDefinitions, renderFieldTypesPage, renderContentListTemplate, and renderGlassAdminTemplate are exported from the root.

Use root imports for portability. The old README’s layouts/admin-layout-v2 and pages/admin-cache examples do not match the shipped files. The actual page files include the .template suffix.

Inspect the original release

Open the versioned npm page or download its published archive. The archive includes the actual executable files and declarations used to write these guides.

Troubleshooting

Check the installed version

npm ls @qentrah/templates

Compare the installed version with the version noted in this guide. Inspect your lockfile before changing dependencies; prerelease behavior may differ between versions.

Import or module errors

Use only public import paths listed in API and exports. Avoid importing guessed paths inside dist. ESM-only packages require an ESM-aware application. Install declared peer dependencies in the consuming application.

Rendered HTML versus components

The renderers return strings, not React elements. Supply all required data properties and send the output as HTML from a server route. Some legacy templates reference external CSS or scripts and retain older branding; inspect the rendered output before adopting a template.

Content handling

The renderer interpolates HTML strings. Treat content and other template inputs as trusted server-owned content or sanitize untrusted values in your application before rendering. Rendering a string does not authenticate a user or authorize an action.

Release documentation

Documentation checked against the previously published package artifact. This documentation-only release preserves executable files and dependencies.