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 +32 -0
- package/dist/components/MarkdownRenderer.d.ts +0 -2
- package/dist/takumi-markdown.cjs +28 -27
- package/dist/takumi-markdown.css +360 -1
- package/dist/takumi-markdown.mjs +6446 -4311
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/takumi-markdown)
|
|
5
5
|
[](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:
|