feat(page): render changelog markdown
This commit is contained in:
parent
d867dc4b8a
commit
ede09bcf04
@ -21,6 +21,7 @@
|
|||||||
"@types/react-dom": "^18.3.1",
|
"@types/react-dom": "^18.3.1",
|
||||||
"astro": "^4.16.7",
|
"astro": "^4.16.7",
|
||||||
"date-fns": "^4.1.0",
|
"date-fns": "^4.1.0",
|
||||||
|
"marked": "^14.1.3",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"tailwindcss": "^3.4.14",
|
"tailwindcss": "^3.4.14",
|
||||||
|
@ -3,6 +3,7 @@ import type { PageByIdOutput } from '@boring.tools/schema'
|
|||||||
import { Separator } from '@boring.tools/ui'
|
import { Separator } from '@boring.tools/ui'
|
||||||
import type { z } from 'astro/zod'
|
import type { z } from 'astro/zod'
|
||||||
import { format } from 'date-fns'
|
import { format } from 'date-fns'
|
||||||
|
import { marked } from 'marked'
|
||||||
|
|
||||||
type PageById = z.infer<typeof PageByIdOutput>
|
type PageById = z.infer<typeof PageByIdOutput>
|
||||||
const url = import.meta.env.DEV
|
const url = import.meta.env.DEV
|
||||||
@ -55,9 +56,7 @@ const data: PageById = await response.json()
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<div set:html={marked.parse(version.markdown ?? "")} />
|
||||||
{version.markdown}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
@ -89,10 +88,7 @@ const data: PageById = await response.json()
|
|||||||
</p>
|
</p>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page" set:html={marked.parse(version.markdown ?? "")} />
|
||||||
<p>
|
|
||||||
{version.markdown}
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
|
@ -85,4 +85,12 @@
|
|||||||
"rlig" 1,
|
"rlig" 1,
|
||||||
"calt" 1;
|
"calt" 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page h3 {
|
||||||
|
@apply text-2xl my-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page ul {
|
||||||
|
@apply list-disc ml-6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user