feat: update pages

This commit is contained in:
kaivanwong 2024-05-13 11:59:21 +08:00
parent a20d4b4835
commit 18411aca04
3 changed files with 30 additions and 52 deletions

View file

@ -25,7 +25,7 @@ const blog = defineCollection({
date: z
.string()
.or(z.date())
.transform((val: string | number | Date) => new Date(val).toLocaleDateString('en-us', {
.transform((val: string | number | Date) => new Date(val).toLocaleDateString('en-US', {
year: 'numeric',
month: 'short',
day: 'numeric',

View file

@ -1,48 +1,26 @@
---
title: Page Title
title: Getting Started
---
The main content of your article
## h2
The main content of your article
### h3
The main content of your article
#### h4
The main content of your article
##### h5
The main content of your article
###### h6
The main content of your article
Table Style:
Blog Props:
| Field | Req | Description |
| :---- | :-- | :-----------|
| NAME | Yes | Displayed in header and footer. Used in SEO and RSS. |
| EMAIL | Yes | Displayed in contact section. |
| NUM_POSTS | Yes | Limit num of posts on home page. |
| NUM_WORKS | Yes | Limit num of works on home page. |
| NUM_PROJECTS | Yes | Limit num of projects on home page. |
| :---------- | :--- | :----------------------------------------- |
| title | Yes | Title of the article. |
| description | Yes | Description of the article. |
| image | No | Hero image of the article. |
| date | No | The publication date of the article. |
| duration | No | The estimated viewing time of the article. |
| lang | No | Article language, default en-US. |
| redirect | No | The redirected address of the article. |
| draft | No | The current article is in draft status. |
| tag | No | Custom tag text for the article. |
| video | No | The article contains a video. |
Code Snippet:
Page Props:
```ts
export const data = {
name: 'Name',
value: 'Value'
}
export function getName() {
return data.name
}
```
| Field | Req | Description |
| :---------- | :--- | :--------------------------------------------------- |
| title | Yes | Title of the article. |
| description | Yes | Description of the article. |
| image | No | Hero image of the article. |

View file

@ -1,8 +1,8 @@
---
title: Page Title
title: Markdown Style
---
The main content of your article
The page style in your `*.md` file.
## h2
@ -26,13 +26,13 @@ The main content of your article
Table Style:
| Field | Req | Description |
| :---- | :-- | :-----------|
| NAME | Yes | Displayed in header and footer. Used in SEO and RSS. |
| EMAIL | Yes | Displayed in contact section. |
| NUM_POSTS | Yes | Limit num of posts on home page. |
| NUM_WORKS | Yes | Limit num of works on home page. |
| NUM_PROJECTS | Yes | Limit num of projects on home page. |
| Field | Description |
| :----------- | :--------------------------------------------------- |
| NAME | Displayed in header and footer. Used in SEO and RSS. |
| EMAIL | Displayed in contact section. |
| NUM_POSTS | Limit num of posts on home page. |
| NUM_WORKS | Limit num of works on home page. |
| NUM_PROJECTS | Limit num of projects on home page. |
Code Snippet: