Skip to content

Commit f0df097

Browse files
committed
[WIP] make a blog template with original publication date
1 parent d322370 commit f0df097

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

@theme/templates/blogpost.tsx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import { Markdown as MarkdownWrapper } from '@redocly/theme/components/Markdown/Markdown';
3+
import { DocumentationLayout } from '@redocly/theme/layouts/DocumentationLayout';
4+
5+
function PostInfo(data) {
6+
return (
7+
<div className="blog-post-info">
8+
Publication date: {data.date}
9+
</div>
10+
)
11+
}
12+
13+
export default function BlogPost({ pageProps, children }) {
14+
return (
15+
<DocumentationLayout tableOfContent={null} feedback={null}>
16+
<PostInfo data={pageProps.frontmatter} />
17+
<MarkdownWrapper>{children}</MarkdownWrapper>
18+
</DocumentationLayout>
19+
);
20+
}

blog/2024/rippled-2.0.0.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ labels:
77
markdown:
88
editPage:
99
hide: true
10+
template: '../../@theme/templates/blogpost'
1011
---
1112
# Introducing XRP Ledger version 2.0.0
1213

0 commit comments

Comments
 (0)