@@ -5,26 +5,17 @@ import BodyConstructor from "../../components/Body"
5
5
import { pageResources , renderPage } from "../../components/renderPage"
6
6
import { QuartzPluginData , defaultProcessedContent } from "../vfile"
7
7
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"
17
10
import { write } from "./helpers"
18
11
import DepGraph from "../../depgraph"
19
12
import Blogs from "../../components/pages/Blogs"
20
13
21
- export const ExplorerWithTocPage : QuartzEmitterPlugin = (
22
- userOpts ,
23
- ) => {
14
+ export const ExplorerWithTocPage : QuartzEmitterPlugin = ( userOpts ) => {
24
15
const opts : FullPageLayout = {
25
16
...sharedPageComponents ,
26
17
...defaultContentPageLayout ,
27
- pageBody : Blogs ( )
18
+ pageBody : Blogs ( ) ,
28
19
}
29
20
30
21
const {
@@ -64,7 +55,7 @@ export const ExplorerWithTocPage: QuartzEmitterPlugin = (
64
55
async emit ( ctx , _content , resources ) : Promise < FilePath [ ] > {
65
56
const cfg = ctx . cfg . configuration
66
57
const allFiles = _content . map ( ( c ) => c [ 1 ] . data )
67
- const slug = "/ blogs/" as FullSlug
58
+ const slug = joinSegments ( " blogs" ) as FullSlug
68
59
const title = "Pattern Blogs"
69
60
const [ tree , vfile ] = defaultProcessedContent ( {
70
61
slug,
0 commit comments