Initial commit: astro-micro scaffold
Amp-Thread-ID: https://ampcode.com/threads/T-019c7839-0936-729b-aa87-92b35d3d68fe Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
commit
93917727fb
108 changed files with 12180 additions and 0 deletions
64
src/content/blog/03-projects-collection/index.md
Normal file
64
src/content/blog/03-projects-collection/index.md
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
title: "Projects Collection"
|
||||
description: "How to add projects to your portfolio."
|
||||
date: "2024-03-20"
|
||||
tags:
|
||||
- tutorial
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Working with the `projects` collection
|
||||
|
||||
The `projects` collections is found in `src/content/projects`.
|
||||
|
||||
```
|
||||
📁 /src/content/projects
|
||||
└── 📁 project-1
|
||||
└── 📄 index.md
|
||||
└── 📁 project-2
|
||||
└── 📄 index.mdx
|
||||
```
|
||||
|
||||
In the above example, two project posts will be generated with the folder name representing the id.
|
||||
|
||||
- `https://example.com/projects/project-1`
|
||||
- `https://example.com/projects/project-2`
|
||||
|
||||
---
|
||||
|
||||
## Provide metadata
|
||||
|
||||
```astro
|
||||
---
|
||||
title: "Astro Micro";
|
||||
description: "Astro Micro is an accessible theme for Astro.";
|
||||
date: "2024-03-20";
|
||||
draft: false;
|
||||
---
|
||||
```
|
||||
|
||||
| Field | Req | Type | Remarks |
|
||||
| :---------- | :-- | :------ | :----------------------------------------------- |
|
||||
| title | Yes | string | Title of the content. Used in SEO and RSS. |
|
||||
| description | Yes | string | Description of the content. Used in SEO and RSS. |
|
||||
| date | Yes | string | Must be a valid date string (able to be parsed). |
|
||||
| draft | No | boolean | If draft: true, content will not be published. |
|
||||
| demoURL | No | string | Link to live project demo, if available. |
|
||||
| repoURL | No | string | Link to project repo, if available. |
|
||||
|
||||
---
|
||||
|
||||
All that's left to do is write the content under the metadata.
|
||||
|
||||
```astro
|
||||
---
|
||||
title: "Astro Micro";
|
||||
description: "Astro Micro is an accessible theme for Astro";
|
||||
date: "2024-03-20";
|
||||
draft: false;
|
||||
---
|
||||
|
||||
## Astro Micro 🔬
|
||||
<!-- content -->
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue