feat: update pages
This commit is contained in:
parent
a20d4b4835
commit
18411aca04
3 changed files with 30 additions and 52 deletions
|
@ -25,7 +25,7 @@ const blog = defineCollection({
|
||||||
date: z
|
date: z
|
||||||
.string()
|
.string()
|
||||||
.or(z.date())
|
.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',
|
year: 'numeric',
|
||||||
month: 'short',
|
month: 'short',
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
|
|
|
@ -1,48 +1,26 @@
|
||||||
---
|
---
|
||||||
title: Page Title
|
title: Getting Started
|
||||||
---
|
---
|
||||||
|
|
||||||
The main content of your article
|
Blog Props:
|
||||||
|
|
||||||
## 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:
|
|
||||||
|
|
||||||
| Field | Req | Description |
|
| Field | Req | Description |
|
||||||
| :---- | :-- | :-----------|
|
| :---------- | :--- | :----------------------------------------- |
|
||||||
| NAME | Yes | Displayed in header and footer. Used in SEO and RSS. |
|
| title | Yes | Title of the article. |
|
||||||
| EMAIL | Yes | Displayed in contact section. |
|
| description | Yes | Description of the article. |
|
||||||
| NUM_POSTS | Yes | Limit num of posts on home page. |
|
| image | No | Hero image of the article. |
|
||||||
| NUM_WORKS | Yes | Limit num of works on home page. |
|
| date | No | The publication date of the article. |
|
||||||
| NUM_PROJECTS | Yes | Limit num of projects on home page. |
|
| 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
|
| Field | Req | Description |
|
||||||
export const data = {
|
| :---------- | :--- | :--------------------------------------------------- |
|
||||||
name: 'Name',
|
| title | Yes | Title of the article. |
|
||||||
value: 'Value'
|
| description | Yes | Description of the article. |
|
||||||
}
|
| image | No | Hero image of the article. |
|
||||||
|
|
||||||
export function getName() {
|
|
||||||
return data.name
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: Page Title
|
title: Markdown Style
|
||||||
---
|
---
|
||||||
|
|
||||||
The main content of your article
|
The page style in your `*.md` file.
|
||||||
|
|
||||||
## h2
|
## h2
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@ The main content of your article
|
||||||
|
|
||||||
Table Style:
|
Table Style:
|
||||||
|
|
||||||
| Field | Req | Description |
|
| Field | Description |
|
||||||
| :---- | :-- | :-----------|
|
| :----------- | :--------------------------------------------------- |
|
||||||
| NAME | Yes | Displayed in header and footer. Used in SEO and RSS. |
|
| NAME | Displayed in header and footer. Used in SEO and RSS. |
|
||||||
| EMAIL | Yes | Displayed in contact section. |
|
| EMAIL | Displayed in contact section. |
|
||||||
| NUM_POSTS | Yes | Limit num of posts on home page. |
|
| NUM_POSTS | Limit num of posts on home page. |
|
||||||
| NUM_WORKS | Yes | Limit num of works on home page. |
|
| NUM_WORKS | Limit num of works on home page. |
|
||||||
| NUM_PROJECTS | Yes | Limit num of projects on home page. |
|
| NUM_PROJECTS | Limit num of projects on home page. |
|
||||||
|
|
||||||
Code Snippet:
|
Code Snippet:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue