finish path refactoring, add sourcemap + better trace support
This commit is contained in:
		@@ -1,9 +1,9 @@
 | 
			
		||||
import { pathToRoot } from "../path"
 | 
			
		||||
import { canonicalizeServer, pathToRoot } from "../path"
 | 
			
		||||
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
 | 
			
		||||
 | 
			
		||||
function PageTitle({ fileData, cfg }: QuartzComponentProps) {
 | 
			
		||||
  const title = cfg?.pageTitle ?? "Untitled Quartz"
 | 
			
		||||
  const slug = fileData.slug!
 | 
			
		||||
  const slug = canonicalizeServer(fileData.slug!)
 | 
			
		||||
  const baseDir = pathToRoot(slug)
 | 
			
		||||
  return <h1 class="page-title"><a href={baseDir}>{title}</a></h1>
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user