mirror of
https://github.com/alrayyes/wiki.git
synced 2025-05-11 11:14:22 +00:00
rss + sitemap
This commit is contained in:
parent
ba9f243728
commit
4c904d88ab
11 changed files with 131 additions and 491 deletions
quartz/components
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue