Skip to content

Commit 339b20c

Browse files
patak-devbluwy
andauthored
docs: improve community templates section (#15133)
Co-authored-by: Bjorn Lu <[email protected]>
1 parent ef403c0 commit 339b20c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/guide/index.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,20 @@ See [create-vite](https://github.com/vitejs/vite/tree/main/packages/create-vite)
8989

9090
## Community Templates
9191

92-
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.
92+
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.
93+
94+
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).
95+
96+
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:
9397

9498
```bash
95-
npx degit user/project my-project
99+
npx degit user/project#main my-project
96100
cd my-project
97101

98102
npm install
99103
npm run dev
100104
```
101105

102-
If the project uses `main` as the default branch, suffix the project repo with `#main`
103-
104-
```bash
105-
npx degit user/project#main my-project
106-
```
107-
108106
## `index.html` and Project Root
109107

110108
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.

0 commit comments

Comments
 (0)