@mintlify/msft-sdk
v1.1.67
Published
Lightweight SDK for Microsoft documentation with MDX rendering
Readme
@mintlify/msft-sdk
Lightweight SDK for rendering Microsoft-style documentation with MDX support.
Installation
npm install @mintlify/msft-sdkQuick Start
1. Import Styles
import "@mintlify/msft-sdk/styles.css";Optional: Add dark mode support with Tailwind CSS:
@variant dark (&:where(.dark, .dark *));2. Convert HTML to MDX
import { convertHtmlToMdx, serializeMdx } from "@mintlify/msft-sdk";
const { mdx, mdxExtracts } = await convertHtmlToMdx(htmlContent, {
metadata: { title: "My Doc" },
});
const Content = await serializeMdx(mdx);3. Render Documentation
import { DocsPage } from "@mintlify/msft-sdk";
<DocsPage
payload={{
serializedContent: Content,
title: "Documentation",
mdxExtracts,
}}
toc={tocItems}
navTree={navTree}
/>;Core Exports
DocsPage- Main documentation page componentMDXRenderer- Standalone MDX rendererconvertHtmlToMdx- Convert HTML to MDXserializeMdx- Compile MDX to React componentsNavTree,TableOfContents- Navigation componentsallComponents- All available MDX components
License
MIT © Mintlify, Inc.
