feat(css): ✨ add gfm css
This commit is contained in:
parent
01e007939d
commit
5e2acb0eb8
|
@ -38,6 +38,7 @@ export default function App({ Component }: PageProps) {
|
|||
type='image/x-icon'
|
||||
/>
|
||||
<link rel='stylesheet' href={asset('/main.css')} />
|
||||
<link rel="stylesheet" href={asset('/imports/markdown_css')} />
|
||||
</Head>
|
||||
<body>
|
||||
<Header />
|
||||
|
|
14
routes/imports/markdown_css.ts
Normal file
14
routes/imports/markdown_css.ts
Normal 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
|
||||
},
|
||||
})
|
||||
},
|
||||
}
|
Loading…
Reference in a new issue