Remove graph component from Quartz to fix browser crash
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 10s
All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 10s
Add custom quartz.layout.ts overriding the default layout to remove Component.Graph(), the D3 force-directed graph known to crash browsers on large note sets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ RUN git clone --depth 1 --branch ${QUARTZ_VERSION} \
|
|||||||
&& npm ci
|
&& npm ci
|
||||||
|
|
||||||
COPY quartz.config.ts.template /quartz/quartz.config.ts.template
|
COPY quartz.config.ts.template /quartz/quartz.config.ts.template
|
||||||
|
COPY quartz.layout.ts /quartz/quartz.layout.ts
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
46
quartz/quartz.layout.ts
Normal file
46
quartz/quartz.layout.ts
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
import { PageLayout, SharedLayout } from "./quartz/cfg"
|
||||||
|
import * as Component from "./quartz/components"
|
||||||
|
|
||||||
|
// components shared across all pages
|
||||||
|
export const sharedLayout: SharedLayout = {
|
||||||
|
head: Component.Head(),
|
||||||
|
header: [],
|
||||||
|
afterBody: [],
|
||||||
|
footer: Component.Footer({
|
||||||
|
links: {},
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
|
// components for pages that display a single page (e.g. a single note)
|
||||||
|
export const defaultContentPageLayout: PageLayout = {
|
||||||
|
beforeBody: [
|
||||||
|
Component.Breadcrumbs(),
|
||||||
|
Component.ArticleTitle(),
|
||||||
|
Component.ContentMeta(),
|
||||||
|
Component.TagList(),
|
||||||
|
],
|
||||||
|
left: [
|
||||||
|
Component.PageTitle(),
|
||||||
|
Component.MobileOnly(Component.Spacer()),
|
||||||
|
Component.Search(),
|
||||||
|
Component.Darkmode(),
|
||||||
|
Component.DesktopOnly(Component.Explorer()),
|
||||||
|
],
|
||||||
|
right: [
|
||||||
|
Component.DesktopOnly(Component.TableOfContents()),
|
||||||
|
Component.Backlinks(),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
// components for pages that display lists of pages (e.g. tags or folders)
|
||||||
|
export const defaultListPageLayout: PageLayout = {
|
||||||
|
beforeBody: [Component.Breadcrumbs(), Component.ArticleTitle(), Component.ContentMeta()],
|
||||||
|
left: [
|
||||||
|
Component.PageTitle(),
|
||||||
|
Component.MobileOnly(Component.Spacer()),
|
||||||
|
Component.Search(),
|
||||||
|
Component.Darkmode(),
|
||||||
|
Component.DesktopOnly(Component.Explorer()),
|
||||||
|
],
|
||||||
|
right: [],
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user