Skip to content

Commit 66a056b

Browse files
committed
Add type
1 parent b71ffb8 commit 66a056b

11 files changed

+28
-23
lines changed

pages/docs/[...slug].tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ import { DocsLayout } from '../../components/Page/DocsLayout';
88
import { pageProcessing } from '../../utils/pageProcessing';
99
import markdownToHtml from '../../utils/markdownToHtml';
1010

11+
type Params = {
12+
params: {
13+
slug: string[];
14+
fileName: string;
15+
}
16+
}
17+
18+
1119
export default function Documentation({ page, pages, title }: any) {
1220
const { t: strings } = useTranslation();
1321
const router = useRouter();
@@ -34,7 +42,7 @@ export default function Documentation({ page, pages, title }: any) {
3442
)
3543
}
3644

37-
export async function getStaticProps({ params }: any) {
45+
export async function getStaticProps({ params }: Params) {
3846
const pages = getAllPosts('docs', [
3947
'title',
4048
'slug',
@@ -59,14 +67,11 @@ export async function getStaticProps({ params }: any) {
5967
'fileName'
6068
]);
6169

62-
const content = await markdownToHtml(doc.content || '');
70+
doc.content = await markdownToHtml(doc.content || '');
6371

6472
return {
6573
props: {
66-
page: {
67-
...doc,
68-
content
69-
},
74+
page: doc,
7075
pages
7176
}
7277
}

public/config/content.pagefolders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.pagefolders.schema.json",
44
"description": "Defines the settings for Front Matter page folder",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - page folder",
88
"properties": {

public/config/content.placeholders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.placeholders.schema.json",
44
"description": "Defines the settings for Front Matter placeholder",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - placeholder",
88
"properties": {

public/config/content.snippets.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/content.snippets.schema.json",
44
"description": "Defines the settings for Front Matter snippet",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - snippet",
88
"required": [

public/config/custom.scripts.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/custom.scripts.schema.json",
44
"description": "Defines the settings for Front Matter custom script",
5-
"lastModified": "2023-11-13T14:28:53.357Z",
5+
"lastModified": "2023-11-13T14:57:38.568Z",
66
"type": "object",
77
"title": "Front Matter - custom script",
88
"properties": {

public/config/data.files.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.files.schema.json",
44
"description": "Defines the settings for Front Matter data file",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - data file",
88
"properties": {

public/config/data.folders.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.folders.schema.json",
44
"description": "Defines the settings for Front Matter data folder",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - data folder",
88
"properties": {

public/config/data.types.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/data.types.schema.json",
44
"description": "Defines the settings for Front Matter data type",
5-
"lastModified": "2023-11-13T14:28:53.358Z",
5+
"lastModified": "2023-11-13T14:57:38.569Z",
66
"type": "object",
77
"title": "Front Matter - data type",
88
"properties": {

public/config/taxonomy.contenttypes.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/config/taxonomy.contenttypes.schema.json",
44
"description": "Defines the settings for Front Matter content type",
5-
"lastModified": "2023-11-13T14:28:53.357Z",
5+
"lastModified": "2023-11-13T14:57:38.568Z",
66
"type": "object",
77
"title": "Front Matter - content type",
88
"properties": {

public/frontmatter.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"$id": "https://beta.frontmatter.codes/frontmatter.schema.json",
44
"description": "Defines the settings for Front Matter",
5-
"lastModified": "2023-11-13T14:28:53.356Z",
5+
"lastModified": "2023-11-13T14:57:38.566Z",
66
"type": "object",
77
"title": "Front Matter - Team Settings",
88
"properties": {

0 commit comments

Comments
 (0)