Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add remark-breaks #26

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/routes/posts/md_test.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ publishedAt: "2024-09-XX"

# # Section1

これはMarkdownの試し打ちです。適宜チューニングしていきたい。以下、怪文書が続きます。
これはMarkdownの試し打ちです。適宜チューニングしていきたい。
以下、怪文書が続きます。

## ## Section 2

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@
"@hono/vite-dev-server": "^0.14.0",
"@hono/vite-ssg": "^0.1.0",
"@mdx-js/rollup": "^3.0.1",
"lint-staged": "^15.2.7",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"@types/unist": "^3.0.3",
"hast": "^1.0.0",
"hast-util-to-html": "^9.0.2",
"husky": "^9.1.1",
"lint-staged": "^15.2.7",
"mdast": "^3.0.0",
"rehype-parse": "^9.0.0",
"remark-breaks": "^4.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-mdx-frontmatter": "^5.0.0",
"rehype-parse": "^9.0.0",
"shiki": "^1.16.2",
"unified": "^11.0.5",
"unist": "^0.0.1",
Expand Down
20 changes: 20 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import honox from 'honox/vite'
import { defineConfig } from 'vite'
import ssg from '@hono/vite-ssg'
import mdx from '@mdx-js/rollup';
import remarkBreaks from 'remark-breaks';
import remarkFrontmatter from 'remark-frontmatter';
import remarkMdxFrontmatter from 'remark-mdx-frontmatter';
import remarkGfm from 'remark-gfm'
Expand All @@ -21,7 +22,7 @@ export default defineConfig(() => {
ssg({ entry: "./app/server.ts" }),
mdx({
jsxImportSource: 'hono/jsx',
remarkPlugins: [remarkGfm, remarkFrontmatter, remarkMdxFrontmatter, remarkMomijiCodeFilename],
remarkPlugins: [remarkGfm, remarkBreaks, remarkFrontmatter, remarkMdxFrontmatter, remarkMomijiCodeFilename],
rehypePlugins: [rehypeMomiji]
})
],
Expand Down