Astro
sh
npm create astro@latestDirectory Structure
.
|-- Makefile
|-- README.md
`-- astro
|-- README.md
|-- astro.config.mjs
|-- package-lock.json
|-- package.json
|-- public
| `-- favicon.svg
|-- src
| |-- components
| | `-- Card.astro
| |-- env.d.ts
| |-- layouts
| | `-- Layout.astro
| `-- pages
| `-- index.astro
`-- tsconfig.jsonsh
cd astro && npm run devAccesse Browser
http://localhost:4321/File based routing
Astroは、/src/pages/ディレクトリ内の対応するファイルをページとして扱う。ファイルのパス名を使って自動的にページルートを構築。
|-- src
`-- pages
|-- index.astro
`-- posts
`-- sample.*http://localhost:4321/posts/sample