create-velocity-astro 1.5.4 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +417 -387
- package/dist/index.js +664 -230
- package/dist/index.js.map +1 -1
- package/package.json +66 -69
- package/templates/i18n/src/components/landing/FeatureTabs.tsx +527 -527
package/README.md
CHANGED
|
@@ -1,387 +1,417 @@
|
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
###
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
###
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
##
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/southwellmedia/velocity/main/src/assets/branding/logo-full.svg" alt="Velocity" width="320" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">create-velocity-astro</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">Scaffold and upgrade production-ready <a href="https://github.com/southwellmedia/velocity">Velocity</a> projects in seconds.</p>
|
|
8
|
+
|
|
9
|
+
Velocity is an opinionated Astro 6 + Tailwind CSS v4 starter kit with 40+ components, i18n support, SEO optimization, and deployment-ready configuration.
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# npm
|
|
15
|
+
npm create velocity-astro@latest my-site
|
|
16
|
+
|
|
17
|
+
# pnpm (recommended)
|
|
18
|
+
pnpm create velocity-astro my-site
|
|
19
|
+
|
|
20
|
+
# yarn
|
|
21
|
+
yarn create velocity-astro my-site
|
|
22
|
+
|
|
23
|
+
# bun
|
|
24
|
+
bun create velocity-astro my-site
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Upgrade an Existing Project
|
|
28
|
+
|
|
29
|
+
Already have a Velocity project? Upgrade to the latest version:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Preview what will change (no files modified)
|
|
33
|
+
pnpm create velocity-astro upgrade --dry-run
|
|
34
|
+
|
|
35
|
+
# Run the upgrade
|
|
36
|
+
pnpm create velocity-astro upgrade
|
|
37
|
+
|
|
38
|
+
# Skip confirmation prompts
|
|
39
|
+
pnpm create velocity-astro upgrade --yes
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The upgrade command will:
|
|
43
|
+
|
|
44
|
+
1. **Replace framework files** — UI components, layouts, utilities, and config files are updated to the latest version
|
|
45
|
+
2. **Update dependencies** — `package.json` is merged with new dependency versions (your custom fields are preserved)
|
|
46
|
+
3. **Protect your files** — Pages, content, site config, and customized components are never touched
|
|
47
|
+
4. **Show manual migration steps** — Breaking changes are listed with affected files so you know exactly what to update
|
|
48
|
+
|
|
49
|
+
> Requires a project created with `create-velocity-astro` v1.6.0+ (which writes a `.velocity.json` tracking file).
|
|
50
|
+
|
|
51
|
+
## CLI Options
|
|
52
|
+
|
|
53
|
+
| Flag | Type | Default | Description |
|
|
54
|
+
|------|------|---------|-------------|
|
|
55
|
+
| `upgrade` | command | - | Upgrade an existing Velocity project |
|
|
56
|
+
| `--demo` | boolean | prompt | Include demo landing page and sample content |
|
|
57
|
+
| `--components` | string | prompt | Component selection (see below) |
|
|
58
|
+
| `--i18n` | boolean | prompt | Add internationalization support |
|
|
59
|
+
| `--pages` | boolean | false | Generate starter pages interactively |
|
|
60
|
+
| `--dry-run` | boolean | false | Preview upgrade changes without applying |
|
|
61
|
+
| `-y, --yes` | boolean | false | Skip prompts, use defaults |
|
|
62
|
+
| `-h, --help` | - | - | Show help message |
|
|
63
|
+
| `-v, --version` | - | - | Show version number |
|
|
64
|
+
|
|
65
|
+
### Component Selection
|
|
66
|
+
|
|
67
|
+
The `--components` flag controls which UI components are included:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Include all components (default with -y)
|
|
71
|
+
--components
|
|
72
|
+
--components=all
|
|
73
|
+
|
|
74
|
+
# Exclude all optional components
|
|
75
|
+
--components=none
|
|
76
|
+
|
|
77
|
+
# Include specific categories
|
|
78
|
+
--components=ui
|
|
79
|
+
--components=ui,patterns
|
|
80
|
+
--components=ui,patterns,hero
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Component Categories:**
|
|
84
|
+
|
|
85
|
+
| Category | Components | Count |
|
|
86
|
+
|----------|------------|-------|
|
|
87
|
+
| `ui` | Button, Input, Textarea, Select, Checkbox, Radio, Switch, Card, Badge, Avatar, AvatarGroup, Table, Pagination, Progress, Skeleton, Alert, Toast, Tooltip, Dialog, Dropdown, Tabs, VerticalTabs, Accordion, Separator, Icon, CodeBlock, Logo, CTA, NpmCopyButton, SocialProof, TerminalDemo | 31 |
|
|
88
|
+
| `patterns` | ContactForm, NewsletterForm, FormField, SearchInput, PasswordInput, StatCard, EmptyState | 7 |
|
|
89
|
+
| `hero` | Hero (flexible hero section) | 1 |
|
|
90
|
+
|
|
91
|
+
## Component Features
|
|
92
|
+
|
|
93
|
+
### Header
|
|
94
|
+
|
|
95
|
+
Flexible navigation header with variant-based configuration:
|
|
96
|
+
|
|
97
|
+
```astro
|
|
98
|
+
<Header
|
|
99
|
+
layout="default" <!-- default | centered | minimal -->
|
|
100
|
+
position="sticky" <!-- fixed | sticky | static -->
|
|
101
|
+
size="md" <!-- sm | md | lg -->
|
|
102
|
+
variant="default" <!-- default | solid | transparent -->
|
|
103
|
+
colorScheme="default" <!-- default | invert -->
|
|
104
|
+
showCta={true}
|
|
105
|
+
showThemeToggle={true}
|
|
106
|
+
showLanguageSwitcher={true} <!-- i18n only -->
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Footer
|
|
111
|
+
|
|
112
|
+
Four layout variants for different site needs:
|
|
113
|
+
|
|
114
|
+
```astro
|
|
115
|
+
<Footer
|
|
116
|
+
layout="simple" <!-- simple | columns | minimal | stacked -->
|
|
117
|
+
background="default" <!-- default | secondary | invert -->
|
|
118
|
+
columns={3} <!-- 2 | 3 | 4 (columns layout only) -->
|
|
119
|
+
showSocial={true}
|
|
120
|
+
showCopyright={true}
|
|
121
|
+
socialLinks={[{ platform: 'github', href: '...' }]}
|
|
122
|
+
legalLinks={[{ label: 'Privacy', href: '/privacy' }]}
|
|
123
|
+
/>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Hero
|
|
127
|
+
|
|
128
|
+
Flexible hero section with multiple layout options:
|
|
129
|
+
|
|
130
|
+
```astro
|
|
131
|
+
<Hero
|
|
132
|
+
layout="single" <!-- single | split -->
|
|
133
|
+
splitRatio="1:1" <!-- 1:1 | 1:2 | 2:1 -->
|
|
134
|
+
align="left" <!-- left | center | right -->
|
|
135
|
+
background="default" <!-- default | secondary | invert | gradient | image -->
|
|
136
|
+
size="lg" <!-- sm | md | lg | xl -->
|
|
137
|
+
showGrid={true}
|
|
138
|
+
showBlob={true}
|
|
139
|
+
title="Your Title"
|
|
140
|
+
titleHighlight="Title" <!-- text to highlight in brand color -->
|
|
141
|
+
description="..."
|
|
142
|
+
/>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### CTA
|
|
146
|
+
|
|
147
|
+
Reusable call-to-action section:
|
|
148
|
+
|
|
149
|
+
```astro
|
|
150
|
+
<CTA
|
|
151
|
+
variant="default" <!-- default | invert -->
|
|
152
|
+
size="lg" <!-- sm | md | lg | xl -->
|
|
153
|
+
align="center" <!-- center | left -->
|
|
154
|
+
showLogo={true}
|
|
155
|
+
heading="Ready to start?"
|
|
156
|
+
headingHighlight="start"
|
|
157
|
+
description="Get started in seconds."
|
|
158
|
+
showCopyCommand={true}
|
|
159
|
+
/>
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Button
|
|
163
|
+
|
|
164
|
+
Production-ready button with variants:
|
|
165
|
+
|
|
166
|
+
```astro
|
|
167
|
+
<Button
|
|
168
|
+
variant="primary" <!-- primary | secondary | outline | ghost | destructive -->
|
|
169
|
+
size="md" <!-- sm | md | lg -->
|
|
170
|
+
colorScheme="default" <!-- default | invert -->
|
|
171
|
+
fullWidth={false}
|
|
172
|
+
icon={false}
|
|
173
|
+
href="/path" <!-- renders as <a> when provided -->
|
|
174
|
+
/>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Examples
|
|
178
|
+
|
|
179
|
+
### Minimal Project (fastest)
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npm create velocity-astro@latest my-site -y --demo=false --components=none
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Creates a clean starter with just layouts, SEO components, and basic pages.
|
|
186
|
+
|
|
187
|
+
### Full-Featured Project
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
npm create velocity-astro@latest my-site --demo --components --i18n
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Includes everything: demo landing page, all components, and i18n support.
|
|
194
|
+
|
|
195
|
+
### Production Site Setup
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
npm create velocity-astro@latest client-site --demo --components=ui,patterns
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Demo content to customize, plus UI and form components for building pages.
|
|
202
|
+
|
|
203
|
+
### i18n Multi-Language Site
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npm create velocity-astro@latest global-site --i18n --demo
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Full i18n support with:
|
|
210
|
+
- Locale-prefixed routes (`/en/`, `/es/`, `/fr/`)
|
|
211
|
+
- Language switcher component
|
|
212
|
+
- Translated navigation and content
|
|
213
|
+
- SEO hreflang tags
|
|
214
|
+
|
|
215
|
+
### Custom Pages Generation
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
npm create velocity-astro@latest my-site --pages
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Interactive prompt to generate starter pages (services, pricing, team, etc.).
|
|
222
|
+
|
|
223
|
+
## How It Works
|
|
224
|
+
|
|
225
|
+
### Architecture
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
User runs CLI
|
|
229
|
+
│
|
|
230
|
+
▼
|
|
231
|
+
Downloads FULL Velocity repo from GitHub (via giget)
|
|
232
|
+
│
|
|
233
|
+
▼
|
|
234
|
+
Applies local template overlays (i18n, base)
|
|
235
|
+
│
|
|
236
|
+
▼
|
|
237
|
+
Configures based on CLI options
|
|
238
|
+
│
|
|
239
|
+
▼
|
|
240
|
+
Installs dependencies
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
The CLI downloads the complete [Velocity repository](https://github.com/southwellmedia/velocity) at runtime, then applies configuration overlays based on your selections. This means you always get the latest Velocity features.
|
|
244
|
+
|
|
245
|
+
### 8-Step Scaffolding Process
|
|
246
|
+
|
|
247
|
+
1. **Download template** - Fetches Velocity from GitHub via `giget`
|
|
248
|
+
2. **Configure components** - Filters to selected component categories
|
|
249
|
+
3. **Apply i18n overlay** - Adds internationalization if enabled
|
|
250
|
+
4. **Remove demo content** - Strips demo pages if `--demo=false`
|
|
251
|
+
5. **Generate pages** - Creates starter pages if requested
|
|
252
|
+
6. **Update package.json** - Sets project name and cleans metadata
|
|
253
|
+
7. **Initialize git** - Creates git repository with initial commit
|
|
254
|
+
8. **Install dependencies** - Runs package manager install
|
|
255
|
+
|
|
256
|
+
### Template Overlay System
|
|
257
|
+
|
|
258
|
+
The CLI uses a template overlay approach:
|
|
259
|
+
|
|
260
|
+
- **Base Velocity**: Downloaded from GitHub (always fresh)
|
|
261
|
+
- **i18n overlay**: Adds locale routing, translations, language switcher
|
|
262
|
+
- **Base template**: Minimal pages for non-demo projects
|
|
263
|
+
|
|
264
|
+
Overlays are applied in order, with later files overwriting earlier ones.
|
|
265
|
+
|
|
266
|
+
### Component Registry
|
|
267
|
+
|
|
268
|
+
Components are managed via `component-registry.json` in Velocity. The registry defines:
|
|
269
|
+
|
|
270
|
+
- Component files and locations
|
|
271
|
+
- Dependencies between components
|
|
272
|
+
- Required utilities (like `cn` for class merging)
|
|
273
|
+
- Category groupings
|
|
274
|
+
|
|
275
|
+
When you select categories, the CLI resolves all dependencies automatically.
|
|
276
|
+
|
|
277
|
+
## What's Included
|
|
278
|
+
|
|
279
|
+
Every Velocity project includes:
|
|
280
|
+
|
|
281
|
+
| Feature | Description |
|
|
282
|
+
|---------|-------------|
|
|
283
|
+
| **Astro 6** | Latest Astro with View Transitions |
|
|
284
|
+
| **Tailwind CSS v4** | Modern utility-first CSS with native cascade layers |
|
|
285
|
+
| **TypeScript** | Full type safety throughout |
|
|
286
|
+
| **React** | For interactive islands and components |
|
|
287
|
+
| **MDX** | Write content with JSX components |
|
|
288
|
+
| **SEO** | Meta tags, Open Graph, JSON-LD schemas |
|
|
289
|
+
| **Sitemap** | Auto-generated sitemap.xml |
|
|
290
|
+
| **RSS Feed** | Built-in RSS support |
|
|
291
|
+
| **Dark Mode** | System-aware theme switching |
|
|
292
|
+
| **ESLint + Prettier** | Code quality and formatting |
|
|
293
|
+
| **Analytics Ready** | GA4 and GTM support via env vars |
|
|
294
|
+
|
|
295
|
+
### Optional Features
|
|
296
|
+
|
|
297
|
+
| Feature | Flag | Description |
|
|
298
|
+
|---------|------|-------------|
|
|
299
|
+
| Demo content | `--demo` | Landing page, sample blog posts, about/contact pages |
|
|
300
|
+
| UI Components | `--components` | 40+ production-ready components |
|
|
301
|
+
| i18n Support | `--i18n` | Multi-language routing and translations |
|
|
302
|
+
| Starter Pages | `--pages` | Generate custom pages interactively |
|
|
303
|
+
|
|
304
|
+
## Configuration
|
|
305
|
+
|
|
306
|
+
### Environment Variables
|
|
307
|
+
|
|
308
|
+
Create a `.env` file to configure analytics and verification:
|
|
309
|
+
|
|
310
|
+
```env
|
|
311
|
+
# Analytics (optional)
|
|
312
|
+
PUBLIC_GA_MEASUREMENT_ID=G-XXXXXXXXXX
|
|
313
|
+
PUBLIC_GTM_ID=GTM-XXXXXXX
|
|
314
|
+
|
|
315
|
+
# Site Verification (optional)
|
|
316
|
+
GOOGLE_SITE_VERIFICATION=your-verification-code
|
|
317
|
+
BING_SITE_VERIFICATION=your-verification-code
|
|
318
|
+
|
|
319
|
+
# Site URL (required for production)
|
|
320
|
+
SITE_URL=https://your-domain.com
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Site Configuration
|
|
324
|
+
|
|
325
|
+
Edit `src/config/site.config.ts` to customize:
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
const siteConfig: SiteConfig = {
|
|
329
|
+
name: 'Your Site Name',
|
|
330
|
+
description: 'Your site description',
|
|
331
|
+
url: 'https://your-domain.com',
|
|
332
|
+
author: 'Your Name',
|
|
333
|
+
email: 'hello@example.com',
|
|
334
|
+
|
|
335
|
+
// Branding
|
|
336
|
+
branding: {
|
|
337
|
+
logo: { alt: 'Your Logo' },
|
|
338
|
+
favicon: { svg: '/favicon.svg' },
|
|
339
|
+
colors: {
|
|
340
|
+
themeColor: '#F94C10',
|
|
341
|
+
backgroundColor: '#ffffff',
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Branding Files
|
|
348
|
+
|
|
349
|
+
Replace these files with your own branding:
|
|
350
|
+
|
|
351
|
+
- `public/favicon.svg` - Site favicon
|
|
352
|
+
- `src/assets/branding/` - Logo SVG files
|
|
353
|
+
|
|
354
|
+
## Development
|
|
355
|
+
|
|
356
|
+
After scaffolding, run:
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
cd my-site
|
|
360
|
+
npm run dev # Start dev server at localhost:4321
|
|
361
|
+
npm run build # Build for production
|
|
362
|
+
npm run preview # Preview production build
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
## Deployment
|
|
366
|
+
|
|
367
|
+
Velocity includes ready-to-use configurations for:
|
|
368
|
+
|
|
369
|
+
- **Vercel** - Zero-config deployment
|
|
370
|
+
- **Netlify** - Includes `netlify.toml`
|
|
371
|
+
- **Cloudflare Pages** - SSR-ready
|
|
372
|
+
|
|
373
|
+
## Troubleshooting
|
|
374
|
+
|
|
375
|
+
### Network Errors
|
|
376
|
+
|
|
377
|
+
If template download fails:
|
|
378
|
+
- Check your internet connection
|
|
379
|
+
- Verify GitHub is accessible
|
|
380
|
+
- Try again in a few minutes
|
|
381
|
+
|
|
382
|
+
### Directory Already Exists
|
|
383
|
+
|
|
384
|
+
The CLI will prompt to overwrite existing directories. Use a new directory name or clear the existing one.
|
|
385
|
+
|
|
386
|
+
### Permission Errors
|
|
387
|
+
|
|
388
|
+
On Unix systems, you may need to set execute permissions:
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
chmod +x node_modules/.bin/create-velocity-astro
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Dependency Installation Fails
|
|
395
|
+
|
|
396
|
+
If automatic installation fails:
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
cd my-site
|
|
400
|
+
npm install # or pnpm install / yarn
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
## Requirements
|
|
404
|
+
|
|
405
|
+
- **Node.js** 18.0.0 or higher
|
|
406
|
+
- **Package Manager**: npm, pnpm, yarn, or bun
|
|
407
|
+
- **Git** (optional, for repository initialization)
|
|
408
|
+
|
|
409
|
+
## Related
|
|
410
|
+
|
|
411
|
+
- [Velocity](https://github.com/southwellmedia/velocity) - The Astro starter kit
|
|
412
|
+
- [Astro](https://astro.build) - The web framework
|
|
413
|
+
- [Tailwind CSS](https://tailwindcss.com) - The CSS framework
|
|
414
|
+
|
|
415
|
+
## License
|
|
416
|
+
|
|
417
|
+
MIT - [Southwell Media](https://southwellmedia.com)
|