File tree Expand file tree Collapse file tree
examples/mdx-bundler/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export async function getStaticProps() {
88export default function Page ( { postNames } ) {
99 return (
1010 < div style = { { width : 800 , margin : "0 auto" , fontFamily : "sans-serif" } } >
11- < h1 > Blog</ h1 >
11+ < h1 > My Blog</ h1 >
1212 < ul >
1313 { postNames . map ( ( postName ) => (
1414 < li key = { postName } >
Original file line number Diff line number Diff line change 11import { getMDXComponent } from "mdx-bundler/client"
22import { getPostNames , getPostSource } from "../../src/posts"
3+ import Link from "next/link"
34
45export function getStaticPaths ( ) {
56 const paths = getPostNames ( ) . map ( ( postName ) => ( { params : { postName } } ) )
@@ -17,7 +18,12 @@ export default function Page({ source }) {
1718 const Content = getMDXComponent ( source )
1819 return (
1920 < div style = { { width : 800 , margin : "0 auto" , fontFamily : "sans-serif" } } >
20- < Content />
21+ < nav >
22+ < Link href = "/" > 👈 Go back home</ Link >
23+ </ nav >
24+ < main >
25+ < Content />
26+ </ main >
2127 </ div >
2228 )
2329}
You can’t perform that action at this time.
0 commit comments