refactor: 改用 TypeScript。close #1.

This commit is contained in:
2022-10-07 13:55:39 +08:00
parent 11b9017a07
commit 1dfd5e5271
84 changed files with 3459 additions and 3836 deletions

View File

@@ -0,0 +1,11 @@
export type AuthorFrontMatter = {
layout?: string
name: string
avatar: string
occupation: string
company: string
email: string
twitter: string
linkedin: string
github: string
}

14
types/PostFrontMatter.ts Normal file
View File

@@ -0,0 +1,14 @@
export type PostFrontMatter = {
title: string
date: string
tags: string[]
lastmod?: string
draft?: boolean
summary?: string
images?: string[]
authors?: string[]
layout?: string
canonicalUrl?: string
slug: string
fileName: string
}

5
types/Toc.ts Normal file
View File

@@ -0,0 +1,5 @@
export type Toc = {
value: string
depth: number
url: string
}[]