summaryrefslogtreecommitdiff
path: root/examples/deno/README.md
blob: 9a7d7da61cd4f3b24b312f65edfd33a308156ce5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Welcome to [Astro](https://astro.build)

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/basics)

> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun!

![basics](https://user-images.githubusercontent.com/4677417/186188965-73453154-fdec-4d6b-9c34-cb35c248ae5b.png)


## πŸš€ Project Structure

Inside of your Astro project, you'll see the following folders and files:

```
/
β”œβ”€β”€ public/
β”‚   └── favicon.svg
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   └── Layout.astro
β”‚   └── pages/
β”‚       └── index.astro
β”œβ”€β”€ package.json
└── tsconfig.json
```

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.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command                | Action                                             |
| :--------------------- | :------------------------------------------------- |
| `npm install`          | Installs dependencies                              |
| `npm run dev`          | Starts local dev server at `localhost:3000`        |
| `npm run build`        | Build your production site to `./dist/`            |
| `npm run preview`      | Preview your build locally, before deploying       |
|                        | (preview uses Deno CLI)                            |
| `npm run astro ...`    | Run CLI commands like `astro add`, `astro preview` |
| `npm run astro --help` | Get help using the Astro CLI                       |

## πŸ‘€ Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
tr> * fixed search bar not working * fixed search bar not working during build * fix search bar throwing error on production site 2022-05-12Add config option customPages (#3315)Gravatar Eloi-Perez 1-0/+14 * Add config option customPages Add config option customPages to be able to add custom URL pages to the sitemap.xml * add comment to document customPages option 2022-05-12fix: vite types (#3352)Gravatar Juan MartΓ­n Seery 4-5/+16 * Re-export vite types and added them to zod schema * Removed casted typed * Changeset 2022-05-12[ci] update lockfile (#3287)Gravatar Fred K. Schott 33-1038/+1096 * [ci] update lockfile * chore: fix lockfile * fix: pin turbo Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com> Co-authored-by: Nate Moore <nate@skypack.dev> 2022-05-12[ci] formatGravatar matthewp 2-2/+2 2022-05-12add error hints (#3350)Gravatar Fred K. Schott 3-0/+19 * add error hints * chore: add changeset Co-authored-by: Nate Moore <nate@skypack.dev> 2022-05-12[ci] formatGravatar matthewp 2-10/+6 2022-05-12Fix: React - Use "createRoot" instead of "hydrateRoot" for `client:only` (#3337)Gravatar Ben Holmes 4-22/+34 * feat: pass "client" directive to clientEntrypoints * refactor: remove hydration warning suppression react 17 * feat: remove hydration warning suppression react 18 * chore: changeset * fix: change metadata to options bag 2022-05-12[ci] formatGravatar matthewp 1-2/+8 2022-05-12Resolve components by module ID during compilation (#3300)Gravatar Tony Sullivan 22-41/+407 * WIP: adding test coverage * test fixes * moving the shared lib up a directory to reproduce the bug * fix: transform with the module ID instead of parsing the filepath * adding the shared lib to the workspaces list * fix: client-only assets now get the full URL from vite * why is this needed for windows? * WIP: using /@fs to handle windows filepaths * fix: remove /@fs from hoisted script imports * nit: removing unused imports * fix: strip off the path root when mapping client:only styles * had to reverse the `/@fs` handling to work on windows and unix * chore: adding comments to explain the fix * chore: adding changeset 2022-05-12[ci] collect statsGravatar FredKSchott 1-0/+1 2022-05-11Exclude `node-fetch` from vite.optimizeDeps (#3348)Gravatar Nate Moore 2-0/+6 * fix: exclude `node-fetch` from vite.optimizeDeps * chore: format 2022-05-11fix: updated blog template with existing address (#3312)Gravatar Gautier Ben AΓ―m 1-2/+2 2022-05-11refactor(vercel): Build Output API v3 (#3216)Gravatar Juan MartΓ­n Seery 42-231/+659 * Removed ignores * Migration to v3 * More changes * Remove legacy redirects * Fail when there is no ENABLE_VC_BUILD * Fix edge * Updated readme * Changeset * Added static mode * Updated documentation * Updated shim * Made edge work! * Updated changeset * Ensure empty dir * Fixed redirects for dynamic paths * Removed extra declaration * Splited imports * Updated readme * Fixed some urls * Deprecated shim! * [test]: Vercel NFT * Beautify * Edge bundle to node 14.19 Vercel runs 14.19.1 (I've checked it manually) * Re-added shim (#3304) * Added `node:` prefix * Use the same bundling as Deno for Edge * Remove esbuild * Fixed shim * Moved nft * Updated changeset * Added note about Edge * fix typo * Added support for Node 16 (vercel/vercel#7772) 2022-05-11Fix APIRoute type (#3344)Gravatar Matthew Phillips 3-11/+8 * Fix APIRoute type * Adds a changeset * Update usage of the two API route signatures 2022-05-11[create-astro] Finalize developer experience... with gradients πŸš€ (#3313)Gravatar Ben Holmes 5-23/+123 * wip: port gradient helpers from sandbox ideas * feat: wire up rocket gradient πŸš€ * feat: wire up rocket gradient on install step * refactor: update "next steps" wording * deps: add chalk (for rendering gradient) * chore: changeset * chore: clean up sstray template string