-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: make blog and docs work the same
- Loading branch information
Showing
22 changed files
with
260 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,14 @@ export default class MyDocument extends Document { | |
render() { | ||
return ( | ||
<Html> | ||
<Head /> | ||
<Head> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" | ||
integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" | ||
crossOrigin="anonymous" | ||
/> | ||
</Head> | ||
<body> | ||
{getInitColorSchemeScript()} | ||
<Main /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export type BlogPost = { | ||
title: string; | ||
filename: string; | ||
description: string; | ||
author: string; | ||
date: string; | ||
imageUrl: string | null; | ||
content: string; | ||
tag: "Technical" | "Feature" | "Content"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
export { blog } from "./blog"; | ||
export { blogMetaSchema } from "./meta-schema"; | ||
export { blogPostSchema } from "./meta-schema"; | ||
|
||
export type { Blog } from "./blog"; | ||
export type { BlogMeta } from "./meta-schema"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { z } from "zod"; | ||
import type { BlogPost } from "@chair-flight/base/types"; | ||
|
||
export const blogMetaSchema = z.object({ | ||
export const blogPostSchema: z.ZodSchema<BlogPost> = z.object({ | ||
title: z.string(), | ||
filename: z.string(), | ||
description: z.string(), | ||
author: z.string(), | ||
date: z.string(), | ||
imageUrl: z.string().optional(), | ||
imageUrl: z.string().nullable(), | ||
content: z.string(), | ||
tag: z.enum(["Technical", "Feature", "Content"]), | ||
}); | ||
|
||
export type BlogMeta = z.infer<typeof blogMetaSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { Markdown } from "./markdown"; | ||
export type { MarkdownProps } from "./markdown"; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.