@misar/blog (1.0.2)
Installation
@misar:registry=npm install @misar/blog@1.0.2"@misar/blog": "1.0.2"About this package
@misar/blog
The Misar company blog — the /blogs list and article pages — for any product
site, rendered on that site's own domain from api.misar.io/io/blog/*.
misar.io's blog_posts (a mirror of MisarBlog @misar) stays the only store.
Each product sees the posts relevant to it plus company-wide news
(matchesPlatform in apps/web/src/lib/products.ts, the same filter as the
header "From the Blog" panel). An out-of-scope slug is a 404 on that product.
Next.js
// src/lib/blog.ts
import { createNextBlog } from "@misar/blog/next";
export const blog = createNextBlog({
platform: "mail",
siteUrl: "https://www.misarmail.com",
productName: "MisarMail",
});
// src/app/blogs/page.tsx
import { blog } from "@/lib/blog";
export const revalidate = 3600;
export const generateMetadata = blog.generateIndexMetadata;
export default blog.IndexPage;
// src/app/blogs/[slug]/page.tsx
// No generateStaticParams/dynamicParams: if the root layout reads cookies()
// or headers() (most product layouts do), a prerendered route aborts at
// runtime ("changed from static to dynamic") and every article is a 500.
import { blog } from "@/lib/blog";
export const revalidate = 3600;
export const generateMetadata = blog.generatePostMetadata;
export default blog.PostPage;
// src/app/sitemap.ts — spread `await blog.sitemapEntries()` into the result.
/* globals.css, after @misar/ui/theme.css and base.css */
@import "@misar/blog/styles.css";
Other frameworks (TanStack Start)
Use createBlogApi, BlogIndexView / BlogPostView with your router's link
as Link, and buildIndexMeta / buildPostMeta + toHeadTags for <head>.
Nothing in the root entry imports next/*.
Canonical
canonical: "self" (default) makes each product the canonical home of its
copy. canonical: "misar-io" points posts at misar.io and drops them from the
product's sitemap.
Dependencies
Dependencies
| ID | Version |
|---|---|
| highlight.js | ^11.11.1 |
| html-react-parser | ^6.0.1 |
| lucide-react | ^0.469.0 |
Development dependencies
| ID | Version |
|---|---|
| @misar/ui | 1.7.0 |
| @types/react | ^19.2.18 |
| next | 15.5.27 |
| react | ^19.3.0 |
| react-dom | ^19.3.0 |
| tsup | ^8.5.1 |
| typescript | ^5.9.3 |
Peer dependencies
| ID | Version |
|---|---|
| @misar/ui | >=1.4.0 |
| next | >=15.5.21 |
| react | ^18.0.0 || ^19.0.0 |