takumi-markdown 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dm/takumi-markdown.svg)](https://www.npmjs.com/package/takumi-markdown)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
+ **[🚀 Live Demo](https://ischca.github.io/takumi-markdown/)** | **[📦 npm](https://www.npmjs.com/package/takumi-markdown)**
8
+
7
9
  Beautiful Markdown renderer for React, meticulously crafted for CJK (Chinese, Japanese, Korean) typography and readability.
8
10
 
9
11
  <img src="./assets/preview.png" alt="Takumi Markdown Preview" width="600" />
@@ -52,6 +54,36 @@ Words should be beautiful.
52
54
  }
53
55
  ```
54
56
 
57
+ ## SSR (Next.js)
58
+
59
+ Takumi is SSR-safe as long as you load the CSS globally (Next.js requires global CSS to be imported in its root files).
60
+
61
+ **App Router**
62
+
63
+ ```tsx
64
+ // app/layout.tsx
65
+ import 'takumi-markdown/styles.css';
66
+
67
+ export default function RootLayout({ children }) {
68
+ return (
69
+ <html lang="ja">
70
+ <body>{children}</body>
71
+ </html>
72
+ );
73
+ }
74
+ ```
75
+
76
+ **Pages Router**
77
+
78
+ ```tsx
79
+ // pages/_app.tsx
80
+ import 'takumi-markdown/styles.css';
81
+
82
+ export default function App({ Component, pageProps }) {
83
+ return <Component {...pageProps} />;
84
+ }
85
+ ```
86
+
55
87
  ## Ruby Notation
56
88
 
57
89
  Supports the standard Japanese web novel format:
@@ -1,6 +1,4 @@
1
1
  import React from 'react';
2
- import '../styles/typography.css';
3
- import 'highlight.js/styles/github.css';
4
2
  export interface MarkdownRendererProps {
5
3
  content: string;
6
4
  }