-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy path_meta.tsx
More file actions
55 lines (51 loc) · 1.76 KB
/
_meta.tsx
File metadata and controls
55 lines (51 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { useConfig } from "nextra-theme-docs"
import { BlogCardPicture } from "../../components/blog-page/blog-card-picture"
import { BlogMdxContent } from "../../components/blog-page/mdx-types"
import { BlogTags } from "../../components/blog-page/blog-tags"
export default {
// only for blog posts inside folders we need to specify breadcrumb title
"2024-06-11-announcing-new-graphql-website": "Announcing New GraphQL Website",
"2025-07-17-graphiql-5": "GraphiQL 5 Release; Press F1!",
"*": {
display: "hidden",
theme: {
sidebar: false,
timestamp: true,
layout: "default",
topContent: function TopContent() {
const frontMatter = useConfig()
.frontMatter as BlogMdxContent["frontMatter"]
const { title, byline, tags } = frontMatter
const date = new Date(frontMatter.date)
return (
<>
<div className="mt-8 flex gap-4">
<BlogCardPicture
frontMatter={frontMatter}
className="aspect-[4.75] w-full"
>
<BlogTags tags={tags} opaque links />
</BlogCardPicture>
</div>
<h1 className="typography-d1 text-balance !text-left xl:!mb-5">
{title}
</h1>
<div className="typography-menu flex flex-col justify-center gap-2">
<span>{byline}</span>
<time
dateTime={date.toISOString()}
className="text-neu-700 dark:text-neu-400"
>
{date.toLocaleDateString("en", {
month: "long",
day: "numeric",
year: "numeric",
})}
</time>
</div>
</>
)
},
},
},
}