@@ -62,20 +62,20 @@ exports.createSchemaCustomization = ({ actions, schema }, themeOptions) => {
6262 description: String
6363 canonicalUrl: String
6464 }
65-
65+
6666 type PostTag {
6767 name: String
6868 slug: String
6969 }
70-
70+
7171 interface Page @nodeInterface {
7272 id: ID!
7373 slug: String!
7474 title: String!
7575 excerpt(pruneLength: Int = 160): String!
7676 body: String!
7777 }
78-
78+
7979 type MdxPost implements Node & Post {
8080 slug: String! @slugify
8181 title: String!
@@ -89,14 +89,14 @@ exports.createSchemaCustomization = ({ actions, schema }, themeOptions) => {
8989 description: String
9090 canonicalUrl: String
9191 }
92-
92+
9393 type MdxPage implements Node & Page {
9494 slug: String!
9595 title: String!
9696 excerpt(pruneLength: Int = 140): String! @mdxpassthrough(fieldName: "excerpt")
9797 body: String! @mdxpassthrough(fieldName: "body")
9898 }
99-
99+
100100 type MinimalBlogConfig implements Node {
101101 basePath: String
102102 blogPath: String
@@ -108,12 +108,12 @@ exports.createSchemaCustomization = ({ actions, schema }, themeOptions) => {
108108 showLineNumbers: Boolean
109109 showCopyButton: Boolean
110110 }
111-
111+
112112 type ExternalLink {
113113 name: String!
114114 url: String!
115115 }
116-
116+
117117 type NavigationEntry {
118118 title: String!
119119 slug: String!
@@ -257,7 +257,7 @@ const tagsTemplate = require.resolve(`./src/templates/tags-query.tsx`)
257257exports . createPages = async ( { actions, graphql, reporter } , themeOptions ) => {
258258 const { createPage } = actions
259259
260- const { basePath, blogPath, tagsPath, formatString } = withDefaults ( themeOptions )
260+ const { basePath, blogPath, tagsPath, formatString, postsPrefix } = withDefaults ( themeOptions )
261261
262262 createPage ( {
263263 path : basePath ,
@@ -323,7 +323,7 @@ exports.createPages = async ({ actions, graphql, reporter }, themeOptions) => {
323323 if ( pages . length > 0 ) {
324324 pages . forEach ( ( page ) => {
325325 createPage ( {
326- path : `/${ basePath } / ${ page . slug } ` . replace ( / \/ \/ + / g, `/` ) ,
326+ path : `/${ basePath } ${ postsPrefix } ${ page . slug } ` . replace ( / \/ \/ + / g, `/` ) ,
327327 component : pageTemplate ,
328328 context : {
329329 slug : page . slug ,
0 commit comments