diff --git a/gatsby-wordpress-theme-libre/gatsby-node.js b/gatsby-wordpress-theme-libre/gatsby-node.js index c1cd991..1cc0690 100644 --- a/gatsby-wordpress-theme-libre/gatsby-node.js +++ b/gatsby-wordpress-theme-libre/gatsby-node.js @@ -19,6 +19,7 @@ exports.createSchemaCustomization = ({ actions, schema }) => { extend() { return { resolve(source, args, context, info) { + console.log(source.featured_media___NODE, "feature media node"); if (source.featured_media___NODE) { return context.nodeModel.getNodeById({ id: source.featured_media___NODE, @@ -278,7 +279,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => { posts.forEach((post, i, arr) => { createPage({ - path: `${post.node.slug}`, + path: `${decodeURIComponent(post.node.slug)}`, component: postTemplate, context: { slug: post.node.slug, @@ -288,7 +289,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => { }); createPage({ - path: `${post.node.slug}amp`, + path: `${decodeURIComponent(post.node.slug)}amp`, component: postAmpTemplate, context: { slug: post.node.slug, @@ -322,7 +323,7 @@ exports.createPages = async ({ graphql, actions, reporter }) => { .filter((page) => !page.node.slug.startsWith("contact")) .forEach((page) => { createPage({ - path: `/${page.node.slug}`, + path: `${decodeURIComponent(page.node.slug)}`, component: pageTemplate, context: { slug: page.node.slug, diff --git a/gatsby-wordpress-theme-libre/package.json b/gatsby-wordpress-theme-libre/package.json index 5876560..8027d57 100644 --- a/gatsby-wordpress-theme-libre/package.json +++ b/gatsby-wordpress-theme-libre/package.json @@ -1,6 +1,6 @@ { "name": "@draftbox-co/gatsby-wordpress-theme-libre", - "version": "1.0.29", + "version": "1.0.30", "license": "MIT", "resolutions": { "sharp": "0.23.4"