diff --git a/docs/pages/experiments/blog/blog.md b/docs/pages/experiments/blog/blog.md index 7d7497d9610a8d..09c041c7df713e 100644 --- a/docs/pages/experiments/blog/blog.md +++ b/docs/pages/experiments/blog/blog.md @@ -3,7 +3,7 @@ title: Blog post title description: Our internationally distributed startup gathered on a remote island to get to know each other better. Here's what happened! date: 2022-07-28T00:00:00.000Z authors: ['samuelsycamore'] -card: true +card: false tags: ['Company'] --- diff --git a/docs/src/modules/components/TopLayoutBlog.js b/docs/src/modules/components/TopLayoutBlog.js index 30101956eaaaf2..46667eea7cffdb 100644 --- a/docs/src/modules/components/TopLayoutBlog.js +++ b/docs/src/modules/components/TopLayoutBlog.js @@ -247,7 +247,7 @@ function TopLayoutBlog(props) { const { description, rendered, title, headers } = docs.en; const finalTitle = title || headers.title; const router = useRouter(); - const slug = router.pathname.replace(/\/blog\//, ''); + const slug = router.pathname.replace(/(.*)\/(.*)/, '$2'); const { canonicalAsServer } = pathnameToLanguage(router.asPath); const card = headers.card === 'true' diff --git a/packages/markdown/parseMarkdown.js b/packages/markdown/parseMarkdown.js index 738233af79ffbb..4e57a5f968c355 100644 --- a/packages/markdown/parseMarkdown.js +++ b/packages/markdown/parseMarkdown.js @@ -678,7 +678,7 @@ ${headers.hooks }); if (docs.en.headers.card === 'true') { - const slug = docs.en.location.replace(/\/docs\/pages\/blog\/(.*)\.md/, '$1'); + const slug = docs.en.location.replace(/(.*)\/(.*)\.md/, '$2'); const exists = fs.existsSync( path.resolve(__dirname, `../../docs/public/static/blog/${slug}/card.png`), );