Skip to content

Commit

Permalink
feat(MDX): add basic MDX support (#659)
Browse files Browse the repository at this point in the history
issue #614
  • Loading branch information
sabertazimi committed Apr 25, 2022
1 parent fa1d2ca commit 4c5361e
Show file tree
Hide file tree
Showing 19 changed files with 7,559 additions and 2,113 deletions.
4 changes: 3 additions & 1 deletion __mocks__/data.ts
Expand Up @@ -47,7 +47,9 @@ const basePosts = Array.from(Array(5).keys()).map(index => ({
timeToRead: index + 1,
prevPost: null,
nextPost: null,
source: `## ${index + 1} Basic Notes`,
source: {
compiledSource: `## ${index + 1} Basic Notes`,
},
}));

const posts = basePosts.map((post, index) => ({
Expand Down
6 changes: 3 additions & 3 deletions components/Article/Article.tsx
Expand Up @@ -30,7 +30,7 @@ const Article = ({
prevPost,
nextPost,
toc,
html,
source,
} = post;

const postMeta = {
Expand All @@ -52,8 +52,8 @@ const Article = ({
<div>
<ArticleHeader post={postMeta} />
<Container className="max-w-screen-lg px-6">
<ArticleToc toc={toc as string} />
<ArticleContent content={html as string} />
<ArticleToc toc={toc} />
<ArticleContent source={source} />
<ArticleDivider>{subtitle || 'Blog'}</ArticleDivider>
<ArticleNav prevPost={prevPost} nextPost={nextPost} />
<ArticleDivider>
Expand Down

1 comment on commit 4c5361e

@vercel
Copy link

@vercel vercel bot commented on 4c5361e Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog.tazimi.dev
blog-sabertaz.vercel.app
blog-git-main-sabertaz.vercel.app

Please sign in to comment.