Files
xrpl-dev-portal/@theme/templates/blogpost.tsx
2025-04-25 14:56:16 -07:00

31 lines
832 B
TypeScript

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.data.date}
</div>
)
}
export default function BlogPost({ pageProps, children }) {
return (
<LayoutWrapper>
<DocumentationLayout {...pageProps}>
<PostInfo data={pageProps.frontmatter} />
<Markdown>{children}</Markdown>
</DocumentationLayout>
<TableOfContent {...pageProps} />
</LayoutWrapper>
);
}