File tree 6 files changed +576
-46
lines changed
6 files changed +576
-46
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ import Link from "next/link" ;
2
+ import type { Page } from "nextra" ;
3
+ // eslint-disable-next-line import/no-unresolved
4
+ import { getPagesUnderRoute } from "nextra/context" ;
5
+
6
+ export function BlogIndex ( ) {
7
+ return getPagesUnderRoute ( "/blog" ) . map (
8
+ (
9
+ page : Page & {
10
+ frontMatter ?: {
11
+ date ?: string ;
12
+ description ?: string ;
13
+ title ?: string ;
14
+ } ;
15
+ }
16
+ ) => {
17
+ return (
18
+ < div key = { page . route } className = "mb-10" >
19
+ < Link
20
+ href = { page . route }
21
+ style = { { color : "inherit" , textDecoration : "none" } }
22
+ className = "block font-semibold mt-8 text-2xl"
23
+ >
24
+ { page . meta ?. title || page . frontMatter ?. title || page . name }
25
+ </ Link >
26
+ < p className = "opacity-80" style = { { marginTop : ".5rem" } } >
27
+ { page . frontMatter ?. description } { " " }
28
+ < span className = "inline-block" >
29
+ < Link href = { page . route } > { "Read more →" } </ Link >
30
+ </ span >
31
+ </ p >
32
+ { page . frontMatter ?. date ? (
33
+ < p className = "opacity-50 text-sm" > { page . frontMatter . date } </ p >
34
+ ) : null }
35
+ </ div >
36
+ ) ;
37
+ }
38
+ ) ;
39
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
},
11
11
"dependencies" : {
12
12
"next" : " ^13.4.3" ,
13
+ "nextra" : " ^2.10.0" ,
13
14
"nextra-theme-docs" : " ^2.6.0" ,
14
15
"react" : " ^18.2.0" ,
15
16
"react-dom" : " ^18.2.0"
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ description: The latest updates and releases from the team at Allo.
3
3
type : posts
4
4
---
5
5
6
- import { BlogHeader } from " ../components/blog/ BlogHeader" ;
7
- import { BlogIndex } from " ../components/blog/ BlogIndex" ;
6
+ import { BlogHeader } from " ../components/BlogHeader" ;
7
+ import { BlogIndex } from " ../components/BlogIndex" ;
8
8
9
9
<BlogHeader />
10
10
<BlogIndex />
You can’t perform that action at this time.
0 commit comments