feat(css): add gfm css

This commit is contained in:
Julien Oculi 2024-07-01 13:17:06 +02:00
parent 01e007939d
commit 5e2acb0eb8
2 changed files with 15 additions and 0 deletions

View file

@ -38,6 +38,7 @@ export default function App({ Component }: PageProps) {
type='image/x-icon' type='image/x-icon'
/> />
<link rel='stylesheet' href={asset('/main.css')} /> <link rel='stylesheet' href={asset('/main.css')} />
<link rel="stylesheet" href={asset('/imports/markdown_css')} />
</Head> </Head>
<body> <body>
<Header /> <Header />

View file

@ -0,0 +1,14 @@
import { Handlers } from '$fresh/server.ts'
import { CSS, KATEX_CSS } from 'gfm'
export const handler: Handlers = {
GET() {
const styles = CSS + KATEX_CSS
return new Response(styles, {
headers: {
'Content-Type': 'text/css; charset=utf-8',
// TODO add cache headers and eTag
},
})
},
}