Initial Quartz setup for Castle Docs
This commit is contained in:
commit
222b641084
288 changed files with 36834 additions and 0 deletions
12
quartz/components/pages/Content.tsx
Normal file
12
quartz/components/pages/Content.tsx
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { ComponentChildren } from "preact"
|
||||
import { htmlToJsx } from "../../util/jsx"
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
|
||||
|
||||
const Content: QuartzComponent = ({ fileData, tree }: QuartzComponentProps) => {
|
||||
const content = htmlToJsx(fileData.filePath!, tree) as ComponentChildren
|
||||
const classes: string[] = fileData.frontmatter?.cssclasses ?? []
|
||||
const classString = ["popover-hint", ...classes].join(" ")
|
||||
return <article class={classString}>{content}</article>
|
||||
}
|
||||
|
||||
export default (() => Content) satisfies QuartzComponentConstructor
|
||||
Loading…
Add table
Add a link
Reference in a new issue