2 min read

Projects Collection

Table of Contents

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

---
title: "Astro Micro";
description: "Astro Micro is an accessible theme for Astro.";
date: "2024-03-20";
draft: false;
---
FieldReqTypeRemarks
titleYesstringTitle of the content. Used in SEO and RSS.
descriptionYesstringDescription of the content. Used in SEO and RSS.
dateYesstringMust be a valid date string (able to be parsed).
draftNobooleanIf draft: true, content will not be published.
demoURLNostringLink to live project demo, if available.
repoURLNostringLink to project repo, if available.

All that’s left to do is write the content under the metadata.

---
title: "Astro Micro";
description: "Astro Micro is an accessible theme for Astro";
date: "2024-03-20";
draft: false;
---

## Astro Micro πŸ”¬
<!-- content -->