Skip to content

Commit

Permalink
feat: add rehype-raw to parse html
Browse files Browse the repository at this point in the history
  • Loading branch information
TinsFox committed Sep 10, 2024
1 parent 5c39bb1 commit b6d0c8d
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">

<a href="https://github.com/TinsFox/shadcnui-boilerplate">
<img src="docs/public/index.png" alt="Cover image" width="700px">
<img src="https://shadcnui-boilerplate.pages.dev/index.png" alt="Cover image" width="700px">
<h3 align="center">shadcn/ui boilerplate</h3>
</a>

Expand Down Expand Up @@ -66,12 +66,12 @@

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/TinsFox)

<img src="docs/public//wechat-appreciation-code.jpeg" alt="微信赞赏码" width="200px">
<img src="https://shadcnui-boilerplate.pages.dev/wechat-appreciation-code.jpeg" alt="微信赞赏码" width="200px">

## 加入我们的微信群

<p>
<img src="docs/public//wechat-group.png" alt="微信群二维码" width="200px">
<img src="https://shadcnui-boilerplate.pages.dev/wechat-group.png" alt="微信群二维码" width="200px">
</p>

扫描上方二维码加入我们的微信群,与其他开发者交流讨论!
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">

<a href="https://github.com/TinsFox/shadcnui-boilerplate">
<img src="docs/public/index.png" alt="Cover image" width="700px">
<img src="https://shadcnui-boilerplate.pages.dev/index.png" alt="Cover image" width="700px">
<h3 align="center">shadcn/ui boilerplate</h3>
</a>

Expand Down Expand Up @@ -66,12 +66,12 @@ or 👇

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/TinsFox)

<img src="docs/public//wechat-appreciation-code.jpeg" alt="微信赞赏码" width="200px">
<img src="https://shadcnui-boilerplate.pages.dev/wechat-appreciation-code.jpeg" alt="微信赞赏码" width="200px">

## Join our WeChat group

<p>
<img src="docs/public/wechat-group.png" alt="微信群二维码" width="200px">
<img src="https://shadcnui-boilerplate.pages.dev/wechat-group.png" alt="微信群二维码" width="200px">
</p>

Scan the above QR code to join our WeChat group, and discuss with other developers!
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"react-resizable-panels": "^2.1.2",
"react-router-dom": "^6.26.1",
"recharts": "2.13.0-alpha.4",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.0",
"sonner": "^1.5.0",
"tailwind-merge": "^2.5.2",
Expand Down
101 changes: 101 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions src/pages/(admin)/(with-layout)/system/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "@tanstack/react-table"
import * as React from "react"
import Markdown from "react-markdown"
import rehypeRaw from "rehype-raw"
import remarkGfm from "remark-gfm"

import { Button } from "@/components/ui/button"
Expand Down Expand Up @@ -52,17 +53,19 @@ const getDependenciesData = (dependencies: Record<string, string>) => Object.ent

export function Component() {
return (
<div className="prose max-w-none dark:prose-invert">
<Markdown remarkPlugins={[remarkGfm]}>{README}</Markdown>
<div className="mb-8 rounded-lg">
<p className="mb-2 text-lg"><strong>Version:</strong> {pkg.version}</p>
</div>
<h2>Build with</h2>
<div className="not-prose flex w-full justify-between gap-x-3">
<DependencyTable data={getDependenciesData(dependencies)} />
<DependencyTable data={getDependenciesData(devDependencies)} />
<>
<div className="prose max-w-none dark:prose-invert">
<Markdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw]}>{README}</Markdown>
<div className="mb-8 rounded-lg">
<p className="mb-2 text-lg"><strong>Version:</strong> {pkg.version}</p>
</div>
<h2>Build with</h2>
<div className="not-prose flex w-full justify-between gap-x-3">
<DependencyTable data={getDependenciesData(dependencies)} />
<DependencyTable data={getDependenciesData(devDependencies)} />
</div>
</div>
</div>
</>

)
}
Expand Down

0 comments on commit b6d0c8d

Please sign in to comment.