rss + sitemap

This commit is contained in:
Jacky Zhao 2023-07-01 13:35:27 -07:00
parent ba9f243728
commit 4c904d88ab
11 changed files with 131 additions and 491 deletions
quartz/components

View file

@ -1,22 +1,17 @@
import { resolveToRoot } from "../path"
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
interface Options {
title: string
function PageTitle({ fileData, cfg }: QuartzComponentProps) {
const title = cfg?.pageTitle ?? "Untitled Quartz"
const slug = fileData.slug!
const baseDir = resolveToRoot(slug)
return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
}
export default ((opts?: Options) => {
const title = opts?.title ?? "Untitled Quartz"
function PageTitle({ fileData }: QuartzComponentProps) {
const slug = fileData.slug!
const baseDir = resolveToRoot(slug)
return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
}
PageTitle.css = `
.page-title {
margin: 0;
}
`
PageTitle.css = `
.page-title {
margin: 0;
}
`
return PageTitle
}) satisfies QuartzComponentConstructor
export default (() => PageTitle) satisfies QuartzComponentConstructor