transform markdown through asset transformer
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import clsx from "clsx"
|
||||
import React from "react"
|
||||
import { LocalFileAsset } from "../asset-builder/asset.js"
|
||||
import { AppLink } from "../navigation/app-link"
|
||||
import { guideLinks } from "../navigation/guide-links"
|
||||
import { MainNavigation } from "../navigation/main-navigation"
|
||||
import { docsProseClass, linkClass, maxWidthContainer } from "../ui/components"
|
||||
|
||||
export default function GuidePage({ html }: { html: string }) {
|
||||
export function GuidePage({ url }: { url: string }) {
|
||||
return (
|
||||
<>
|
||||
<header className="bg-slate-700/30 shadow sticky top-0 backdrop-blur-sm transition z-10 flex">
|
||||
@@ -24,10 +25,14 @@ export default function GuidePage({ html }: { html: string }) {
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
<section
|
||||
className={clsx(docsProseClass, "pb-8 flex-1 min-w-0")}
|
||||
dangerouslySetInnerHTML={{ __html: html }}
|
||||
/>
|
||||
<LocalFileAsset from={new URL(`${url}.md`, import.meta.url)}>
|
||||
{(asset) => (
|
||||
<section
|
||||
className={clsx(docsProseClass, "pb-8 flex-1 min-w-0")}
|
||||
dangerouslySetInnerHTML={{ __html: asset.content }}
|
||||
/>
|
||||
)}
|
||||
</LocalFileAsset>
|
||||
</main>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user