1
1
import { MDXRemoteProps } from "next-mdx-remote"
2
2
3
3
import {
4
- CommitHistory ,
5
4
FileContributor ,
6
5
Frontmatter ,
7
6
Lang ,
8
7
Layout ,
9
8
ToCItem ,
10
9
} from "@/lib/types"
11
10
12
- import { getFileContributorInfo } from "@/lib/utils/contributors"
13
11
import { getLocaleTimestamp } from "@/lib/utils/time"
14
12
15
13
import { compile } from "./compile"
16
14
import { importMd } from "./import"
17
15
18
- const commitHistoryCache : CommitHistory = { }
16
+ // const commitHistoryCache: CommitHistory = {}
19
17
20
18
interface GetPageDataParams {
21
19
locale : string
@@ -38,7 +36,7 @@ export async function getPageData({
38
36
locale,
39
37
slug,
40
38
components,
41
- layout : layoutFromProps ,
39
+ // layout: layoutFromProps,
42
40
scope,
43
41
} : GetPageDataParams ) : Promise < PageData > {
44
42
const slugArray = slug . split ( "/" )
@@ -53,7 +51,7 @@ export async function getPageData({
53
51
scope,
54
52
} )
55
53
56
- const layout = layoutFromProps || frontmatter . template || "static"
54
+ // const layout = layoutFromProps || frontmatter.template || "static"
57
55
58
56
// Process TOC items
59
57
const tocItems =
@@ -62,13 +60,15 @@ export async function getPageData({
62
60
: tocNodeItems
63
61
64
62
// Get contributor information
65
- const { contributors, lastUpdatedDate } = await getFileContributorInfo (
66
- slug ,
67
- locale ,
68
- frontmatter . lang as string ,
69
- layout ,
70
- commitHistoryCache
71
- )
63
+ const contributors = [ ]
64
+ const lastUpdatedDate = new Date ( ) . toISOString ( )
65
+ // const { contributors, lastUpdatedDate } = await getFileContributorInfo(
66
+ // slug,
67
+ // locale,
68
+ // frontmatter.lang as string,
69
+ // layout,
70
+ // commitHistoryCache
71
+ // )
72
72
73
73
// Format timestamp
74
74
const lastEditLocaleTimestamp = getLocaleTimestamp (
0 commit comments