Fix blog post template

This commit is contained in:
mDuo13
2025-04-25 14:56:16 -07:00
parent f0df097519
commit 7237486001

View File

@@ -1,20 +1,30 @@
import React from 'react';
import { Markdown as MarkdownWrapper } from '@redocly/theme/components/Markdown/Markdown';
import { Markdown } from '@redocly/theme/components/Markdown/Markdown';
import { DocumentationLayout } from '@redocly/theme/layouts/DocumentationLayout';
import { TableOfContent } from '@redocly/theme/components/TableOfContent/TableOfContent';
import styled from 'styled-components';
const LayoutWrapper = styled.div`
display: flex;
flex: 1;
width: 100%;
`;
function PostInfo(data) {
return (
<div className="blog-post-info">
Publication date: {data.date}
Publication date: {data.data.date}
</div>
)
}
export default function BlogPost({ pageProps, children }) {
return (
<DocumentationLayout tableOfContent={null} feedback={null}>
<PostInfo data={pageProps.frontmatter} />
<MarkdownWrapper>{children}</MarkdownWrapper>
</DocumentationLayout>
<LayoutWrapper>
<DocumentationLayout {...pageProps}>
<PostInfo data={pageProps.frontmatter} />
<Markdown>{children}</Markdown>
</DocumentationLayout>
<TableOfContent {...pageProps} />
</LayoutWrapper>
);
}