Skip to content

Commit

Permalink
Add feature directories to project structure guide (#3237)
Browse files Browse the repository at this point in the history
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
  • Loading branch information
3 people committed May 15, 2023
1 parent 01e441d commit 8104a41
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/content/docs/en/core-concepts/project-structure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,20 @@ Astro processes, optimizes, and bundles your `src/` files to create the final we

Some files (like Astro components) are not even sent to the browser as written but are instead rendered to static HTML. Other files (like CSS) are sent to the browser but may be optimized or bundled with other CSS files for performance.

### `src/assets`

The [`src/assets`](/en/guides/assets/) directory is the recommended folder to use for storing assets (e.g. images) that are processed by Astro. This is not required, and this is not a special reserved folder.

### `src/components`

**Components** are reusable units of code for your HTML pages. These could be [Astro components](/en/core-concepts/astro-components/), or [UI framework components](/en/core-concepts/framework-components/) like React or Vue. It is common to group and organize all of your project components together in this folder.

This is a common convention in Astro projects, but it is not required. Feel free to organize your components however you like!

### `src/content`

The `src/content/` directory is reserved to store [content collections](/en/guides/content-collections/) and an optional collections configuration file. No other files are allowed inside this folder.

### `src/layouts`

[Layouts](/en/core-concepts/layouts/) are a special kind of component that wrap some content in a larger page layout. These are most often used by [Astro pages](/en/core-concepts/astro-pages/) and [Markdown or MDX pages](/en/guides/markdown-content/) to define the layout of the page.
Expand Down

0 comments on commit 8104a41

Please sign in to comment.