diff --git a/docs/guide/index.md b/docs/guide/index.md index 29cb9bad9..ece67cfbf 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -89,22 +89,20 @@ See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite) ## Community Templates -create-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. You can use a tool like [degit](https://github.com/Rich-Harris/degit) to scaffold your project with one of the templates. +create-vite is a tool to quickly start a project from a basic template for popular frameworks. Check out Awesome Vite for [community maintained templates](https://github.com/vitejs/awesome-vite#templates) that include other tools or target different frameworks. + +For a template at `https://github.com/user/project`, you can try it out online using `https://github.stackblitz.com/user/project` (adding `.stackblitz` after `github` to the URL of the project). + +You can also use a tool like [degit](https://github.com/Rich-Harris/degit) to scaffold your project with one of the templates. Assuming the project is on GitHub and uses `main` as the default branch, you can create a local copy using: ```bash -npx degit user/project my-project +npx degit user/project#main my-project cd my-project npm install npm run dev ``` -If the project uses `main` as the default branch, suffix the project repo with `#main` - -```bash -npx degit user/project#main my-project -``` - ## `index.html` and Project Root One thing you may have noticed is that in a Vite project, `index.html` is front-and-central instead of being tucked away inside `public`. This is intentional: during development Vite is a server, and `index.html` is the entry point to your application.