diff --git a/src/content/posts/cover.md b/src/content/posts/cover.md deleted file mode 100644 index f26cdc1..0000000 --- a/src/content/posts/cover.md +++ /dev/null @@ -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. diff --git a/src/content/posts/draftexample/index.md b/src/content/posts/draft.md similarity index 87% rename from src/content/posts/draftexample/index.md rename to src/content/posts/draft.md index 12deb26..77aba5a 100644 --- a/src/content/posts/draftexample/index.md +++ b/src/content/posts/draft.md @@ -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 --- diff --git a/src/content/posts/guide/cover.jpeg b/src/content/posts/guide/cover.jpeg new file mode 100644 index 0000000..66104c3 Binary files /dev/null and b/src/content/posts/guide/cover.jpeg differ diff --git a/src/content/posts/guide/index.md b/src/content/posts/guide/index.md new file mode 100644 index 0000000..40cc71d --- /dev/null +++ b/src/content/posts/guide/index.md @@ -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.
1. Start with `http://` or `https://`: Use web image
2. Start with `/`: For image in `public` dir
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 +``` diff --git a/src/content/posts/markdown.md b/src/content/posts/markdown.md index fda6f9d..43285c7 100644 --- a/src/content/posts/markdown.md +++ b/src/content/posts/markdown.md @@ -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](./demo-banner.png "An exemplary image")) 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: diff --git a/src/content/posts/video.md b/src/content/posts/video.md index 64a0bf4..4cc156e 100644 --- a/src/content/posts/video.md +++ b/src/content/posts/video.md @@ -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 ---