From 3d784f85c47175c9596189638d6a91c9d6c9329e Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Mon, 24 Oct 2022 11:45:03 -0400 Subject: [PATCH] edit: update README --- examples/with-content/README.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/examples/with-content/README.md b/examples/with-content/README.md index da4f712f6..b9bcb8797 100644 --- a/examples/with-content/README.md +++ b/examples/with-content/README.md @@ -1,26 +1,30 @@ -# Astro Starter Kit: Minimal - -``` -npm create astro@latest -- --template minimal -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) +# Astro Starter Kit: Content > 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun! +This project is based on **[the Content Schema RFC](https://www.notion.so/astroinc/Content-Schemas-35f1952fb0a24b30b681b0509ac4d7c2)**. We suggest reading the intro and "detailed usage" sections to understand how content works. + ## 🚀 Project Structure Inside of your Astro project, you'll see the following folders and files: -``` +```sh / +├── .astro/ # Generated on build ├── public/ ├── src/ +│ └── content/ +│ └── blog/ +│ ├── ~schema.ts +│ ├── first.md +│ └── second.md │ └── pages/ │ └── index.astro └── package.json ``` +`src/content/` contains "collections" of Markdown or MDX documents you'll use in your website. Astro will generate a `fetchContent` function to grab posts from `src/content/` (see the generated `.astro` directory), with type-checked frontmatter based on a schema. + Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.