Skip to content

Commit 7237486

Browse files
committed
Fix blog post template
1 parent f0df097 commit 7237486

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

@theme/templates/blogpost.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
1-
import React from 'react';
2-
import { Markdown as MarkdownWrapper } from '@redocly/theme/components/Markdown/Markdown';
1+
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
32
import { DocumentationLayout } from '@redocly/theme/layouts/DocumentationLayout';
3+
import { TableOfContent } from '@redocly/theme/components/TableOfContent/TableOfContent';
4+
import styled from 'styled-components';
5+
6+
const LayoutWrapper = styled.div`
7+
display: flex;
8+
flex: 1;
9+
width: 100%;
10+
`;
411

512
function PostInfo(data) {
613
return (
714
<div className="blog-post-info">
8-
Publication date: {data.date}
15+
Publication date: {data.data.date}
916
</div>
1017
)
1118
}
1219

1320
export default function BlogPost({ pageProps, children }) {
1421
return (
15-
<DocumentationLayout tableOfContent={null} feedback={null}>
16-
<PostInfo data={pageProps.frontmatter} />
17-
<MarkdownWrapper>{children}</MarkdownWrapper>
18-
</DocumentationLayout>
22+
<LayoutWrapper>
23+
<DocumentationLayout {...pageProps}>
24+
<PostInfo data={pageProps.frontmatter} />
25+
<Markdown>{children}</Markdown>
26+
</DocumentationLayout>
27+
<TableOfContent {...pageProps} />
28+
</LayoutWrapper>
1929
);
2030
}

0 commit comments

Comments
 (0)