吾路🐬研究所: Adding a new post or project.

最后更新: 2024年3月14日

请我喝咖啡

Basics

Create a folder in the respective collection you wish to create content. The name of the folder will be the slug in which your content will be found.

creating the following

/content/blog/my-new-post/index.md

will be published to

https://yourdomain.com/blog/my-new-post

Frontmatter

Front matter is in yaml if you are familiar with the format. All posts and projects require frontmatter at the top of the document to be imported. All frontmatter must be inside triple dashes, similar to Astro format. See example below.

知识 Collection

FieldTypeReq?Description
titlestringyesTitle of the post. Used in SEO.
summarystringyesShort description of the post. Used in SEO.
datestringyesAny string date that javascript can convert. Used in sorting
tagsarrayyesPost topic. Array of strings. Used in filtering.
draftbooleannoHides the post from collections. Unpublished entry.

Example blog post frontmatter

---
title: "吾路🐬研究所: Adding a new post or project."
summary: "Adding a new article (blog post or project) is pretty easy."
date: "Mar 18 2024"
draft: true
tags:
- Tutorial
- Astro
- 吾路🐬研究所
---

用例 Collection (extends 知识 Collection)

FieldTypeReq?Description
titlestringyesTitle of the post. Used in SEO.
summarystringyesShort description of the post. Used in SEO.
datestringyesAny string date that javascript can convert. Used in sorting
tagsarrayyesPost topic. Array of strings. Used in filtering.
draftbooleannoHides the post from collections. Unpublished entry.
demoUrlstringnoA link to the deployed project, if applicable.
repoUrlstringnoA link to the repository, if applicable.

Example project frontmatter

---
title: "吾路🐬研究所"
summary: "吾路🐬研究所, a portfolio and blog for designers and developers."
date: "Mar 18 2024"
draft: true
tags:
- Astro
- Typescript
- Javascript
- Tailwind
- SolidJS
demoUrl: https://astro-sphere.vercel.app
repoUrl: https://github.com/markhorn-dev/astro-sphere
---

Write your content

You’ve made it this far, all that is left to do is write your content beneath the frontmatter. Writing markdown will be covered in the next article.