Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Sep 6, 2023
1 parent d2d15c4 commit 24a06c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pages/experiments/blog/blog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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']
---

Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/components/TopLayoutBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/parseMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`),
);
Expand Down

0 comments on commit 24a06c8

Please sign in to comment.