docs: update example posts

This commit is contained in:
saicaca 2024-01-21 20:22:14 +08:00
parent e0b93eb63c
commit 6ba4db0ef8
6 changed files with 57 additions and 33 deletions

View File

@ -1,25 +0,0 @@
---
title: "Cover Image Example"
published: 2023-09-01
description: "How to set a cover image using the cover attribute."
image: "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg"
tags: ["Fuwari", "Blogging", "Customization"]
category: test
draft: false
---
## Set the cover image using the `image` attribute
Select an Image: Before you start, make sure you have an image you want to use as a cover. Let's assume its filename is my-cover-image.jpg and it's located in an images directory at the root of your site.
Edit your article: At the top of your Markdown file, include the frontmatter section. Set the `image` attribute to the path of your image file.
```markdown
---
title: "Your Article Title"
published: 2023-10-05
image: "/images/my-cover-image.jpg"
---
```
Web URLs are also supported.

View File

@ -1,13 +1,11 @@
---
title: Draft Example
published: 2024-01-11T04:40:26.381Z
published: 2022-07-01
tags: [Markdown, Blogging, Demo]
category: Example
category: Examples
draft: true
---
---
# This Article is a Draft
This article is currently in a draft state and is not published. Therefore, it will not be visible to the general audience. The content is still a work in progress and may require further editing and review.
@ -19,6 +17,6 @@ When the article is ready for publication, you can update the "draft" field to "
title: Draft Example
published: 2024-01-11T04:40:26.381Z
tags: [Markdown, Blogging, Demo]
category: Example
category: Examples
draft: false
---

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

View File

@ -0,0 +1,51 @@
---
title: Simple Guides for Fuwari
published: 2023-09-01
description: "How to use this blog template."
image: "./cover.jpeg"
tags: ["Fuwari", "Blogging", "Customization"]
category: Guides
draft: false
---
> Cover image source: [Source]("https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg")
This blog template is built with [Astro](https://astro.build/). For the things that are not mentioned in this guide, you may find the answers in the [Astro Docs](https://docs.astro.build/).
## Front-matter of Posts
```yaml
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
```
| Attribute | Description |
|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `title` | The title of the post. |
| `published` | The date the post was published. |
| `description` | A short description of the post. Displayed on index page. |
| `image` | The cover image path of the post.<br/>1. Start with `http://` or `https://`: Use web image<br/>2. Start with `/`: For image in `public` dir<br/>3. With none of the prefixes: Relative to the markdown file |
| `tags` | The tags of the post. |
| `category` | The category of the post. |
| `draft` | If this post is still a draft, which won't be displayed. |
## Where to Place the Post Files
Your post files should be placed in `src/content/posts/` directory. You can also create sub-directories to better organize your posts and assets.
```
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md
```

View File

@ -3,7 +3,7 @@ title: Markdown Example
published: 2023-10-01
description: A simple example of a Markdown blog post.
tags: [Markdown, Blogging, Demo]
category: Example
category: Examples
draft: false
---
@ -155,7 +155,7 @@ Here's a "line block":
and images can be specified like so:
![example image](../../assets/images/demo-banner.png "An exemplary image")
[//]: # (![example image]&#40;./demo-banner.png "An exemplary image"&#41;)
Inline math equations go in like so: $\omega = d\phi / dt$. Display
math should get its own line and be put in in double-dollarsigns:

View File

@ -3,7 +3,7 @@ title: Include Video in the Posts
published: 2022-08-01
description: This post demonstrates how to include embedded video in a blog post.
tags: [Example, Video]
category: Example
category: Examples
draft: false
---