@misar/blog (1.0.1)

Published 2026-10-16 17:07:45 +00:00 by misaradmin

Installation

@misar:registry=
npm install @misar/blog@1.0.1
"@misar/blog": "1.0.1"

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
import { blog } from "@/lib/blog";
export const revalidate = 3600;
export const generateStaticParams = () => [];
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.25
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
Details
npm
2026-10-16 17:07:45 +00:00
6
40 KiB
Assets (1)
Versions (7) View all
1.4.0 2026-10-30
1.3.1 2026-10-22
1.2.0 2026-10-21
1.1.0 2026-10-21
1.0.2 2026-10-17