fix: 404 page styling for nested pages (closes #458)
This commit is contained in:
		@@ -4,7 +4,7 @@ import HeaderConstructor from "../../components/Header"
 | 
			
		||||
import BodyConstructor from "../../components/Body"
 | 
			
		||||
import { pageResources, renderPage } from "../../components/renderPage"
 | 
			
		||||
import { FullPageLayout } from "../../cfg"
 | 
			
		||||
import { FilePath } from "../../util/path"
 | 
			
		||||
import { FilePath, pathToRoot } from "../../util/path"
 | 
			
		||||
import { defaultContentPageLayout, sharedPageComponents } from "../../../quartz.layout"
 | 
			
		||||
import { Content } from "../../components"
 | 
			
		||||
 | 
			
		||||
@@ -31,7 +31,7 @@ export const ContentPage: QuartzEmitterPlugin<Partial<FullPageLayout>> = (userOp
 | 
			
		||||
      const allFiles = content.map((c) => c[1].data)
 | 
			
		||||
      for (const [tree, file] of content) {
 | 
			
		||||
        const slug = file.data.slug!
 | 
			
		||||
        const externalResources = pageResources(slug, resources)
 | 
			
		||||
        const externalResources = pageResources(pathToRoot(slug), resources)
 | 
			
		||||
        const componentData: QuartzComponentProps = {
 | 
			
		||||
          fileData: file.data,
 | 
			
		||||
          externalResources,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user