Skip to content

Commit d30afd8

Browse files
Solved the Problem of the github notfound for the url /blogs
1 parent b3fe891 commit d30afd8

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

quartz.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const config: QuartzConfig = {
8080
Plugin.ComponentResources(),
8181
Plugin.ContentPage(),
8282
Plugin.FolderPage(),
83+
Plugin.ExplorerWithTocPage(),
8384
Plugin.TagPage(),
8485
Plugin.ContentIndex({
8586
enableSiteMap: true,
@@ -88,7 +89,6 @@ const config: QuartzConfig = {
8889
Plugin.Assets(),
8990
Plugin.Static(),
9091
Plugin.NotFoundPage(),
91-
Plugin.ExplorerWithTocPage(),
9292
],
9393
},
9494
}

quartz/plugins/emitters/404.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const NotFoundPage: QuartzEmitterPlugin = () => {
3333
},
3434
async emit(ctx, _content, resources): Promise<FilePath[]> {
3535
const cfg = ctx.cfg.configuration
36-
const slug = "404" as FullSlug
36+
const slug = "/404/" as FullSlug
3737

3838
const url = new URL(`https://${cfg.baseUrl ?? "example.com"}`)
3939
const path = url.pathname as FullSlug

quartz/plugins/emitters/explorerwithtocPage.tsx

+3-8
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,13 @@ import { write } from "./helpers"
1818
import DepGraph from "../../depgraph"
1919
import Blogs from "../../components/pages/Blogs"
2020

21-
interface ExplorerWithTocPageOptions extends FullPageLayout {
22-
sort?: (f1: QuartzPluginData, f2: QuartzPluginData) => number
23-
}
24-
25-
export const ExplorerWithTocPage: QuartzEmitterPlugin<Partial<ExplorerWithTocPageOptions>> = (
21+
export const ExplorerWithTocPage: QuartzEmitterPlugin = (
2622
userOpts,
2723
) => {
2824
const opts: FullPageLayout = {
2925
...sharedPageComponents,
3026
...defaultContentPageLayout,
31-
pageBody: Blogs(),
32-
...userOpts,
27+
pageBody: Blogs()
3328
}
3429

3530
const {
@@ -69,7 +64,7 @@ export const ExplorerWithTocPage: QuartzEmitterPlugin<Partial<ExplorerWithTocPag
6964
async emit(ctx, _content, resources): Promise<FilePath[]> {
7065
const cfg = ctx.cfg.configuration
7166
const allFiles = _content.map((c) => c[1].data)
72-
const slug = "blogs" as FullSlug
67+
const slug = "/blogs/" as FullSlug
7368
const title = "Pattern Blogs"
7469
const [tree, vfile] = defaultProcessedContent({
7570
slug,

0 commit comments

Comments
 (0)