mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
docs: update "adding new post" tutorial with...
...info about canonical URLs
This commit is contained in:
committed by
Sat Naing
parent
606203d034
commit
08383093d1
@@ -24,7 +24,7 @@ Frontmatter is the main place to store some important information about the post
|
|||||||
Here is the list of frontmatter property for each post.
|
Here is the list of frontmatter property for each post.
|
||||||
|
|
||||||
| Property | Description | Remark |
|
| Property | Description | Remark |
|
||||||
| ----------------- | ------------------------------------------------------------------------------- | --------------------------------------------- |
|
| ------------------ | ------------------------------------------------------------------------------- | --------------------------------------------- |
|
||||||
| **_title_** | Title of the post. (h1) | required<sup>\*</sup> |
|
| **_title_** | Title of the post. (h1) | required<sup>\*</sup> |
|
||||||
| **_description_** | Description of the post. Used in post excerpt and site description of the post. | required<sup>\*</sup> |
|
| **_description_** | Description of the post. Used in post excerpt and site description of the post. | required<sup>\*</sup> |
|
||||||
| **_pubDatetime_** | Published datetime in ISO 8601 format. | required<sup>\*</sup> |
|
| **_pubDatetime_** | Published datetime in ISO 8601 format. | required<sup>\*</sup> |
|
||||||
@@ -34,6 +34,7 @@ Here is the list of frontmatter property for each post.
|
|||||||
| **_draft_** | Mark this post 'unpublished'. | default = false |
|
| **_draft_** | Mark this post 'unpublished'. | default = false |
|
||||||
| **_tags_** | Related keywords for this post. Written in array yaml format. | default = others |
|
| **_tags_** | Related keywords for this post. Written in array yaml format. | default = others |
|
||||||
| **_ogImage_** | OG image of the post. Useful for social media sharing and SEO. | default = SITE.ogImage or generated SVG image |
|
| **_ogImage_** | OG image of the post. Useful for social media sharing and SEO. | default = SITE.ogImage or generated SVG image |
|
||||||
|
| **_canonicalUrl_** | Canonical URL (absolute), in case the article already exists on other source. | default = `Astro.site` + `Astro.url.pathname` |
|
||||||
|
|
||||||
Only `title`, `description` and `pubDatetime` fields in frontmatter must be specified.
|
Only `title`, `description` and `pubDatetime` fields in frontmatter must be specified.
|
||||||
|
|
||||||
@@ -73,6 +74,7 @@ tags:
|
|||||||
- tags
|
- tags
|
||||||
ogImage: ""
|
ogImage: ""
|
||||||
description: This is the example description of the example post.
|
description: This is the example description of the example post.
|
||||||
|
canonicalUrl: https://example.org/my-article-was-already-posted-here
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user