Skip to content

Commit 65f7cd9

Browse files
Solving the problem with the Blogs page
1 parent 616dd3a commit 65f7cd9

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

quartz/plugins/emitters/explorerwithtocPage.tsx

+5-14
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,17 @@ import BodyConstructor from "../../components/Body"
55
import { pageResources, renderPage } from "../../components/renderPage"
66
import { QuartzPluginData, defaultProcessedContent } from "../vfile"
77
import { FullPageLayout } from "../../cfg"
8-
import {
9-
FilePath,
10-
FullSlug,
11-
pathToRoot,
12-
} from "../../util/path"
13-
import {
14-
defaultContentPageLayout,
15-
sharedPageComponents,
16-
} from "../../../quartz.layout"
8+
import { FilePath, FullSlug, joinSegments, pathToRoot } from "../../util/path"
9+
import { defaultContentPageLayout, sharedPageComponents } from "../../../quartz.layout"
1710
import { write } from "./helpers"
1811
import DepGraph from "../../depgraph"
1912
import Blogs from "../../components/pages/Blogs"
2013

21-
export const ExplorerWithTocPage: QuartzEmitterPlugin = (
22-
userOpts,
23-
) => {
14+
export const ExplorerWithTocPage: QuartzEmitterPlugin = (userOpts) => {
2415
const opts: FullPageLayout = {
2516
...sharedPageComponents,
2617
...defaultContentPageLayout,
27-
pageBody: Blogs()
18+
pageBody: Blogs(),
2819
}
2920

3021
const {
@@ -64,7 +55,7 @@ export const ExplorerWithTocPage: QuartzEmitterPlugin = (
6455
async emit(ctx, _content, resources): Promise<FilePath[]> {
6556
const cfg = ctx.cfg.configuration
6657
const allFiles = _content.map((c) => c[1].data)
67-
const slug = "/blogs/" as FullSlug
58+
const slug = joinSegments("blogs") as FullSlug
6859
const title = "Pattern Blogs"
6960
const [tree, vfile] = defaultProcessedContent({
7061
slug,

0 commit comments

Comments
 (0)