@knowcode/doc-builder 1.4.25 ā 1.5.1
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/.claude/settings.local.json +2 -1
- package/CHANGELOG.md +52 -0
- package/README.md +57 -7
- package/assets/404.html +115 -0
- package/assets/js/main.js +23 -0
- package/cli.js +251 -2
- package/doc-builder.config.js +34 -0
- package/html/404.html +115 -0
- package/html/README.html +71 -5
- package/html/claude-workflow-guide.html +71 -5
- package/html/documentation-index.html +77 -5
- package/html/guides/authentication-guide.html +77 -5
- package/html/guides/documentation-standards.html +77 -5
- package/html/guides/seo-guide.html +557 -0
- package/html/guides/troubleshooting-guide.html +77 -5
- package/html/index.html +71 -5
- package/html/js/main.js +23 -0
- package/html/robots.txt +5 -0
- package/html/sitemap.xml +75 -0
- package/html/vercel-cli-setup-guide.html +452 -0
- package/html/vercel-first-time-setup-guide.html +419 -0
- package/lib/config.js +39 -1
- package/lib/core-builder.js +110 -5
- package/lib/deploy.js +61 -2
- package/lib/seo.js +359 -0
- package/package.json +1 -1
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<meta name="description" content="Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough.">
|
|
7
|
+
<title>Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough - Doc Builder</title>
|
|
8
|
+
|
|
9
|
+
<meta name="author" content="Lindsay Smith">
|
|
10
|
+
<meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, project, your, directory, name">
|
|
11
|
+
<meta name="robots" content="index, follow">
|
|
12
|
+
<link rel="canonical" href="https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html">
|
|
13
|
+
|
|
14
|
+
<!-- Open Graph / Facebook -->
|
|
15
|
+
<meta property="og:type" content="article">
|
|
16
|
+
<meta property="og:url" content="https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html">
|
|
17
|
+
<meta property="og:title" content="Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough - Doc Builder">
|
|
18
|
+
<meta property="og:description" content="Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough.">
|
|
19
|
+
<meta property="og:image" content="https://doc-builder-delta.vercel.app/og-default.png">
|
|
20
|
+
<meta property="og:site_name" content="Doc Builder">
|
|
21
|
+
<meta property="og:locale" content="en_US">
|
|
22
|
+
|
|
23
|
+
<!-- Twitter Card -->
|
|
24
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
25
|
+
<meta name="twitter:site" content="@planbbackups">
|
|
26
|
+
<meta name="twitter:creator" content="@planbbackups">
|
|
27
|
+
<meta name="twitter:title" content="Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough - Doc Builder">
|
|
28
|
+
<meta name="twitter:description" content="Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough.">
|
|
29
|
+
<meta name="twitter:image" content="https://doc-builder-delta.vercel.app/og-default.png">
|
|
30
|
+
|
|
31
|
+
<!-- Fonts -->
|
|
32
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
33
|
+
|
|
34
|
+
<!-- Icons -->
|
|
35
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
36
|
+
|
|
37
|
+
<!-- Mermaid -->
|
|
38
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
39
|
+
|
|
40
|
+
<!-- Styles -->
|
|
41
|
+
<link rel="stylesheet" href="/css/notion-style.css">
|
|
42
|
+
|
|
43
|
+
<!-- Favicon -->
|
|
44
|
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>š</text></svg>">
|
|
45
|
+
|
|
46
|
+
<script type="application/ld+json">
|
|
47
|
+
{
|
|
48
|
+
"@context": "https://schema.org",
|
|
49
|
+
"@type": "TechArticle",
|
|
50
|
+
"headline": "Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough",
|
|
51
|
+
"description": "Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough.",
|
|
52
|
+
"author": {
|
|
53
|
+
"@type": "Person",
|
|
54
|
+
"name": "Lindsay Smith"
|
|
55
|
+
},
|
|
56
|
+
"publisher": {
|
|
57
|
+
"@type": "Organization",
|
|
58
|
+
"name": "Knowcode Ltd",
|
|
59
|
+
"url": "https://knowcode.tech"
|
|
60
|
+
},
|
|
61
|
+
"datePublished": "2025-07-21T20:39:06.497Z",
|
|
62
|
+
"dateModified": "2025-07-21T20:39:06.497Z",
|
|
63
|
+
"mainEntityOfPage": {
|
|
64
|
+
"@type": "WebPage",
|
|
65
|
+
"@id": "https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html"
|
|
66
|
+
},
|
|
67
|
+
"breadcrumb": {
|
|
68
|
+
"@type": "BreadcrumbList",
|
|
69
|
+
"itemListElement": [
|
|
70
|
+
{
|
|
71
|
+
"@type": "ListItem",
|
|
72
|
+
"position": 1,
|
|
73
|
+
"name": "Doc Builder",
|
|
74
|
+
"item": "https://doc-builder-delta.vercel.app"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"@type": "ListItem",
|
|
78
|
+
"position": 2,
|
|
79
|
+
"name": "Vercel First Time Setup Guide",
|
|
80
|
+
"item": "https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
</head>
|
|
87
|
+
<body>
|
|
88
|
+
<!-- Header -->
|
|
89
|
+
<header class="header">
|
|
90
|
+
<div class="header-content">
|
|
91
|
+
<a href="/index.html" class="logo">Doc Builder</a>
|
|
92
|
+
|
|
93
|
+
<div class="header-actions">
|
|
94
|
+
<div class="deployment-info">
|
|
95
|
+
<span class="deployment-date" title="Built with doc-builder v1.5.0">Last updated: Jul 21, 2025, 08:39 PM UTC</span>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
|
|
101
|
+
<i class="fas fa-moon"></i>
|
|
102
|
+
</button>
|
|
103
|
+
|
|
104
|
+
<button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
|
|
105
|
+
<i class="fas fa-bars"></i>
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</header>
|
|
110
|
+
|
|
111
|
+
<!-- Preview Banner -->
|
|
112
|
+
<div id="preview-banner" class="preview-banner">
|
|
113
|
+
<div class="banner-content">
|
|
114
|
+
<i class="fas fa-exclamation-triangle banner-icon"></i>
|
|
115
|
+
<span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
|
|
116
|
+
<button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
|
|
117
|
+
<i class="fas fa-times"></i>
|
|
118
|
+
</button>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<!-- Breadcrumbs -->
|
|
123
|
+
<nav class="breadcrumbs" id="breadcrumbs">
|
|
124
|
+
<!-- Breadcrumbs will be generated by JavaScript -->
|
|
125
|
+
</nav>
|
|
126
|
+
|
|
127
|
+
<!-- Main Content -->
|
|
128
|
+
<div class="main-wrapper">
|
|
129
|
+
<!-- Sidebar -->
|
|
130
|
+
<aside class="sidebar">
|
|
131
|
+
<div class="sidebar-header">
|
|
132
|
+
<div class="filter-box">
|
|
133
|
+
<input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
|
|
134
|
+
<i class="fas fa-search filter-icon"></i>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
<nav class="navigation">
|
|
138
|
+
|
|
139
|
+
<div class="nav-section" data-level="0">
|
|
140
|
+
<a class="nav-title expanded" href="/README.html" >
|
|
141
|
+
<i class="fas fa-home"></i> Documentation
|
|
142
|
+
</a>
|
|
143
|
+
<div class="nav-content" >
|
|
144
|
+
<a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
|
|
145
|
+
<a href="/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
146
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a>
|
|
147
|
+
<a href="/vercel-cli-setup-guide.html" class="nav-item" data-tooltip="This guide provides comprehensive instructions for installing and configuring the Vercel CLI across different operating systems and environments."><i class="fas fa-file-alt"></i> Vercel Cli Setup Guide</a>
|
|
148
|
+
<a href="/vercel-first-time-setup-guide.html" class="nav-item active" data-tooltip="This guide provides a detailed explanation of every prompt you'll encounter during the first-time Vercel setup process when using."><i class="fas fa-file-alt"></i> Vercel First Time Setup Guide</a></div></div>
|
|
149
|
+
<div class="nav-section" data-level="1">
|
|
150
|
+
<a class="nav-title collapsible" href="#" data-target="nav-guides-1" >
|
|
151
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
|
|
152
|
+
</a>
|
|
153
|
+
<div class="nav-content collapsed" id="nav-guides-1">
|
|
154
|
+
<a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="This guide explains how to configure and use the built-in authentication feature in @knowcode/doc-builder to protect your documentation with basic..."><i class="fas fa-file-alt"></i> Authentication Guide</a>
|
|
155
|
+
<a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> Documentation Standards</a>
|
|
156
|
+
<a href="/guides/seo-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes comprehensive SEO (Search Engine Optimization) features to help your documentation rank better in search results and..."><i class="fas fa-file-alt"></i> Seo Guide</a>
|
|
157
|
+
<a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Troubleshooting Guide</a></div></div>
|
|
158
|
+
</nav>
|
|
159
|
+
<div class="resize-handle"></div>
|
|
160
|
+
</aside>
|
|
161
|
+
|
|
162
|
+
<!-- Content Area -->
|
|
163
|
+
<main class="content">
|
|
164
|
+
<div class="content-inner">
|
|
165
|
+
<h1>Vercel First-Time Setup Guide - Complete Prompt-by-Prompt Walkthrough</h1>
|
|
166
|
+
<p><strong>Generated</strong>: 2025-07-21 20:45 UTC<br><strong>Status</strong>: Complete<br><strong>Verified</strong>: ā
</p>
|
|
167
|
+
<h2>Overview</h2>
|
|
168
|
+
<p>This guide provides a detailed explanation of every prompt you'll encounter during the first-time Vercel setup process when using <code>@knowcode/doc-builder deploy</code>. Understanding these prompts helps avoid common configuration errors and ensures successful deployment.</p>
|
|
169
|
+
<h2>Pre-Setup Prompts (doc-builder specific)</h2>
|
|
170
|
+
<p>Before Vercel CLI starts, doc-builder asks several configuration questions:</p>
|
|
171
|
+
<h3>1. Project Name Prompt</h3>
|
|
172
|
+
<pre><code>? What is your project name? āŗ my-docs
|
|
173
|
+
</code></pre>
|
|
174
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
175
|
+
<ul>
|
|
176
|
+
<li>This becomes your Vercel project identifier</li>
|
|
177
|
+
<li>It will form part of your deployment URL: <code>project-name.vercel.app</code></li>
|
|
178
|
+
<li>Must be lowercase, alphanumeric with hyphens only</li>
|
|
179
|
+
<li>Auto-generated from your site name with special characters removed</li>
|
|
180
|
+
</ul>
|
|
181
|
+
<p><strong>Best practice</strong>: </p>
|
|
182
|
+
<ul>
|
|
183
|
+
<li>Keep it short and memorable</li>
|
|
184
|
+
<li>Use hyphens instead of spaces</li>
|
|
185
|
+
<li>Example: <code>my-docs</code>, <code>company-docs</code>, <code>api-reference</code></li>
|
|
186
|
+
</ul>
|
|
187
|
+
<h3>2. Custom Production URL</h3>
|
|
188
|
+
<pre><code>? Custom production URL (optional)? āŗ
|
|
189
|
+
</code></pre>
|
|
190
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
191
|
+
<ul>
|
|
192
|
+
<li>Leave empty for auto-detection (recommended for new projects)</li>
|
|
193
|
+
<li>Or enter your custom domain/alias if you already have one</li>
|
|
194
|
+
<li>Can be a full URL or just the domain</li>
|
|
195
|
+
</ul>
|
|
196
|
+
<p><strong>Examples</strong>:</p>
|
|
197
|
+
<ul>
|
|
198
|
+
<li>Empty (press Enter) - Vercel will auto-assign</li>
|
|
199
|
+
<li><code>docs.mycompany.com</code> - Custom domain</li>
|
|
200
|
+
<li><code>my-docs-v2.vercel.app</code> - Specific Vercel subdomain</li>
|
|
201
|
+
</ul>
|
|
202
|
+
<h3>3. Framework Preset</h3>
|
|
203
|
+
<pre><code>? Which framework preset? āŗ - Use arrow-keys. Return to submit.
|
|
204
|
+
⯠Other (Static HTML)
|
|
205
|
+
Next.js
|
|
206
|
+
Vite
|
|
207
|
+
</code></pre>
|
|
208
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
209
|
+
<ul>
|
|
210
|
+
<li>Determines build settings and optimizations</li>
|
|
211
|
+
<li><strong>ALWAYS choose "Other (Static HTML)"</strong> for doc-builder</li>
|
|
212
|
+
<li>This ensures Vercel treats your docs as pre-built static files</li>
|
|
213
|
+
</ul>
|
|
214
|
+
<p><strong>Why this matters</strong>:</p>
|
|
215
|
+
<ul>
|
|
216
|
+
<li>Wrong selection can trigger unwanted build processes</li>
|
|
217
|
+
<li>May cause deployment failures or missing files</li>
|
|
218
|
+
</ul>
|
|
219
|
+
<h3>4. Public Access</h3>
|
|
220
|
+
<pre><code>? Make the deployment publicly accessible? āŗ (Y/n)
|
|
221
|
+
</code></pre>
|
|
222
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
223
|
+
<ul>
|
|
224
|
+
<li><strong>Yes (Y)</strong>: Anyone with the URL can view your docs</li>
|
|
225
|
+
<li><strong>No (n)</strong>: Only team members can access (requires Vercel login)</li>
|
|
226
|
+
</ul>
|
|
227
|
+
<p><strong>Considerations</strong>:</p>
|
|
228
|
+
<ul>
|
|
229
|
+
<li>Choose Yes for public documentation</li>
|
|
230
|
+
<li>Choose No for internal/private docs</li>
|
|
231
|
+
<li>Can be changed later in Vercel dashboard</li>
|
|
232
|
+
</ul>
|
|
233
|
+
<h2>Vercel CLI Link Process</h2>
|
|
234
|
+
<p>After the initial configuration, Vercel CLI takes over with its own prompts:</p>
|
|
235
|
+
<h3>5. Directory Confirmation</h3>
|
|
236
|
+
<pre><code>? Set up and deploy "~/Documents/.../html"? [Y/n]
|
|
237
|
+
</code></pre>
|
|
238
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
239
|
+
<ul>
|
|
240
|
+
<li>Vercel is asking to deploy from the current directory</li>
|
|
241
|
+
<li>This should show your <code>html</code> output directory path</li>
|
|
242
|
+
<li><strong>ALWAYS answer YES</strong></li>
|
|
243
|
+
</ul>
|
|
244
|
+
<p><strong>Common mistake</strong>: </p>
|
|
245
|
+
<ul>
|
|
246
|
+
<li>If you see a different path, you may be running from wrong directory</li>
|
|
247
|
+
<li>Should be run from project root, not from inside <code>html</code> folder</li>
|
|
248
|
+
</ul>
|
|
249
|
+
<h3>6. Scope Selection</h3>
|
|
250
|
+
<pre><code>? Which scope should contain your project? āŗ
|
|
251
|
+
⯠Lindsay Smith (lindsay-smith)
|
|
252
|
+
Another Team (team-slug)
|
|
253
|
+
</code></pre>
|
|
254
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
255
|
+
<ul>
|
|
256
|
+
<li>Determines which account/team owns the project</li>
|
|
257
|
+
<li>Personal accounts show as "Your Name (username)"</li>
|
|
258
|
+
<li>Team accounts show as "Team Name (team-slug)"</li>
|
|
259
|
+
<li><strong>Select your personal account for individual projects</strong></li>
|
|
260
|
+
</ul>
|
|
261
|
+
<p><strong>When to use teams</strong>:</p>
|
|
262
|
+
<ul>
|
|
263
|
+
<li>Collaborative projects</li>
|
|
264
|
+
<li>Company/organization deployments</li>
|
|
265
|
+
<li>Shared billing and permissions</li>
|
|
266
|
+
</ul>
|
|
267
|
+
<h3>7. Existing Project Detection</h3>
|
|
268
|
+
<pre><code>? Found project "lindsay-1340s-projects/html". Link to it? [Y/n]
|
|
269
|
+
</code></pre>
|
|
270
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
271
|
+
<ul>
|
|
272
|
+
<li>Vercel found a project with similar name/path</li>
|
|
273
|
+
<li>This is often a <strong>false match</strong> - generic names like "html" are common</li>
|
|
274
|
+
<li><strong>ALWAYS answer NO unless you're 100% sure it's YOUR project</strong></li>
|
|
275
|
+
</ul>
|
|
276
|
+
<p><strong>Why this happens</strong>:</p>
|
|
277
|
+
<ul>
|
|
278
|
+
<li>Vercel searches for projects with matching directory names</li>
|
|
279
|
+
<li>Common folder names (html, docs, dist) often match other projects</li>
|
|
280
|
+
<li>The suggested project usually belongs to someone else</li>
|
|
281
|
+
</ul>
|
|
282
|
+
<h3>8. Link to Different Project</h3>
|
|
283
|
+
<pre><code>? Link to different existing project? [Y/n]
|
|
284
|
+
</code></pre>
|
|
285
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
286
|
+
<ul>
|
|
287
|
+
<li><strong>Yes (Y)</strong>: You have an existing Vercel project to connect to</li>
|
|
288
|
+
<li><strong>No (n)</strong>: Create a brand new project</li>
|
|
289
|
+
</ul>
|
|
290
|
+
<p><strong>When to answer YES</strong>:</p>
|
|
291
|
+
<ul>
|
|
292
|
+
<li>You've deployed before and want to update existing project</li>
|
|
293
|
+
<li>You created a project in Vercel dashboard first</li>
|
|
294
|
+
<li>You're reconnecting after deleting <code>.vercel</code> folder</li>
|
|
295
|
+
</ul>
|
|
296
|
+
<p><strong>When to answer NO</strong>:</p>
|
|
297
|
+
<ul>
|
|
298
|
+
<li>First time deploying this documentation</li>
|
|
299
|
+
<li>Want a fresh project with new URL</li>
|
|
300
|
+
<li>Previous project had configuration issues</li>
|
|
301
|
+
</ul>
|
|
302
|
+
<h3>9A. Existing Project Name (if answered YES to #8)</h3>
|
|
303
|
+
<pre><code>? What's the name of your existing project? āŗ
|
|
304
|
+
</code></pre>
|
|
305
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
306
|
+
<ul>
|
|
307
|
+
<li>Enter the exact name of your existing Vercel project</li>
|
|
308
|
+
<li>Must match the project name in your Vercel dashboard</li>
|
|
309
|
+
<li>Case-sensitive</li>
|
|
310
|
+
</ul>
|
|
311
|
+
<p><strong>How to find project name</strong>:</p>
|
|
312
|
+
<ol>
|
|
313
|
+
<li>Go to <a href="https://vercel.com/dashboard">https://vercel.com/dashboard</a></li>
|
|
314
|
+
<li>Look for your project in the list</li>
|
|
315
|
+
<li>Use the exact name shown</li>
|
|
316
|
+
</ol>
|
|
317
|
+
<h3>9B. New Project Name (if answered NO to #8)</h3>
|
|
318
|
+
<pre><code>? What is your project name? āŗ my-docs
|
|
319
|
+
</code></pre>
|
|
320
|
+
<p><strong>What it means</strong>: ā
</p>
|
|
321
|
+
<ul>
|
|
322
|
+
<li>Creates a new project with this name</li>
|
|
323
|
+
<li>Will become your default URL: <code>project-name.vercel.app</code></li>
|
|
324
|
+
<li>Must be unique across all Vercel projects</li>
|
|
325
|
+
</ul>
|
|
326
|
+
<p><strong>Best practices</strong>:</p>
|
|
327
|
+
<ul>
|
|
328
|
+
<li>Use same name as initial prompt for consistency</li>
|
|
329
|
+
<li>Keep it descriptive but concise</li>
|
|
330
|
+
<li>Avoid generic names like "docs" or "html"</li>
|
|
331
|
+
</ul>
|
|
332
|
+
<h2>Critical Post-Setup Configuration</h2>
|
|
333
|
+
<h3>Root Directory Warning</h3>
|
|
334
|
+
<p>After linking, you may see an error about "html/html does not exist". This means Vercel incorrectly set the Root Directory.</p>
|
|
335
|
+
<p><strong>The Problem</strong>: ā</p>
|
|
336
|
+
<ul>
|
|
337
|
+
<li>Vercel sometimes auto-sets Root Directory to "html"</li>
|
|
338
|
+
<li>But we're already deploying FROM the html directory</li>
|
|
339
|
+
<li>This creates a path like <code>html/html</code> which doesn't exist</li>
|
|
340
|
+
</ul>
|
|
341
|
+
<p><strong>The Solution</strong>: ā
</p>
|
|
342
|
+
<ol>
|
|
343
|
+
<li>Go to your project settings: <code>https://vercel.com/[your-project]/settings</code></li>
|
|
344
|
+
<li>Find "Root Directory" under "Build & Development Settings"</li>
|
|
345
|
+
<li><strong>DELETE any value</strong> - leave it completely empty</li>
|
|
346
|
+
<li>Click "Save"</li>
|
|
347
|
+
</ol>
|
|
348
|
+
<h3>Build Settings Configuration</h3>
|
|
349
|
+
<p>Vercel may also auto-detect build commands that interfere with static deployment.</p>
|
|
350
|
+
<p><strong>Check these settings</strong>:</p>
|
|
351
|
+
<ul>
|
|
352
|
+
<li><strong>Build Command</strong>: Should be empty</li>
|
|
353
|
+
<li><strong>Output Directory</strong>: Should be empty or "./"</li>
|
|
354
|
+
<li><strong>Install Command</strong>: Should be empty</li>
|
|
355
|
+
<li><strong>Development Command</strong>: Should be empty</li>
|
|
356
|
+
</ul>
|
|
357
|
+
<p><strong>If any have values</strong>:</p>
|
|
358
|
+
<ol>
|
|
359
|
+
<li>Clear them completely</li>
|
|
360
|
+
<li>Save changes</li>
|
|
361
|
+
<li>Redeploy</li>
|
|
362
|
+
</ol>
|
|
363
|
+
<h2>Deployment Protection Settings</h2>
|
|
364
|
+
<p>For public documentation:</p>
|
|
365
|
+
<ol>
|
|
366
|
+
<li>Navigate to <strong>Project Settings > General</strong></li>
|
|
367
|
+
<li>Find <strong>"Deployment Protection"</strong> under Security</li>
|
|
368
|
+
<li>Set to <strong>"Disabled"</strong> for public access</li>
|
|
369
|
+
<li>Or configure password protection if needed</li>
|
|
370
|
+
</ol>
|
|
371
|
+
<h2>Common Issues and Solutions</h2>
|
|
372
|
+
<h3>Issue 1: "Cannot read properties of null"</h3>
|
|
373
|
+
<p><strong>Cause</strong>: Build settings conflict<br><strong>Solution</strong>: Clear all build settings in Vercel dashboard</p>
|
|
374
|
+
<h3>Issue 2: "Directory html/html does not exist"</h3>
|
|
375
|
+
<p><strong>Cause</strong>: Root Directory misconfiguration<br><strong>Solution</strong>: Remove "html" from Root Directory setting</p>
|
|
376
|
+
<h3>Issue 3: "404 errors on deployment"</h3>
|
|
377
|
+
<p><strong>Cause</strong>: Files not in correct location<br><strong>Solution</strong>: Ensure you ran <code>doc-builder build</code> before deploying</p>
|
|
378
|
+
<h3>Issue 4: "Permission denied"</h3>
|
|
379
|
+
<p><strong>Cause</strong>: Not logged into Vercel<br><strong>Solution</strong>: Run <code>vercel login</code> first</p>
|
|
380
|
+
<h2>Quick Reference Checklist</h2>
|
|
381
|
+
<pre><code>ā
1. Project name? ā your-project-name
|
|
382
|
+
ā
2. Custom URL? ā [Leave empty or enter domain]
|
|
383
|
+
ā
3. Framework? ā Other (Static HTML)
|
|
384
|
+
ā
4. Public? ā Yes (for public docs)
|
|
385
|
+
ā
5. Set up ~/html? ā YES
|
|
386
|
+
ā
6. Which scope? ā Your account
|
|
387
|
+
ā
7. Found project "xyz/html"? ā NO
|
|
388
|
+
ā
8. Link to different project? ā YES/NO (your choice)
|
|
389
|
+
ā
9. Project name? ā [Based on #8 answer]
|
|
390
|
+
ā
10. Check Root Directory ā Must be EMPTY
|
|
391
|
+
</code></pre>
|
|
392
|
+
<h2>Pro Tips</h2>
|
|
393
|
+
<ol>
|
|
394
|
+
<li><strong>Save your answers</strong>: Document your choices for future reference</li>
|
|
395
|
+
<li><strong>Verify URLs</strong>: Always check the deployment URL matches expectations</li>
|
|
396
|
+
<li><strong>Use unique names</strong>: Avoid conflicts with generic project names</li>
|
|
397
|
+
<li><strong>Check settings</strong>: Always verify Vercel dashboard settings after setup</li>
|
|
398
|
+
<li><strong>Keep it simple</strong>: Don't add build commands for static sites</li>
|
|
399
|
+
</ol>
|
|
400
|
+
<h2>Next Steps</h2>
|
|
401
|
+
<p>After successful setup:</p>
|
|
402
|
+
<ol>
|
|
403
|
+
<li>Your docs are live at <code>https://[project-name].vercel.app</code></li>
|
|
404
|
+
<li>Future deploys just need: <code>npx @knowcode/doc-builder deploy</code></li>
|
|
405
|
+
<li>Add custom domain in Vercel dashboard if needed</li>
|
|
406
|
+
<li>Configure team access if required</li>
|
|
407
|
+
</ol>
|
|
408
|
+
<hr>
|
|
409
|
+
<p>This guide covers every prompt in the Vercel first-time setup process. For additional help, refer to the main <a href="./vercel-cli-setup-guide.md">Vercel CLI Setup Guide</a>.</p>
|
|
410
|
+
|
|
411
|
+
</div>
|
|
412
|
+
</main>
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
<!-- Scripts -->
|
|
416
|
+
<script src="/js/main.js"></script>
|
|
417
|
+
|
|
418
|
+
</body>
|
|
419
|
+
</html>
|
package/lib/config.js
CHANGED
|
@@ -45,6 +45,25 @@ const defaultConfig = {
|
|
|
45
45
|
deployment: {
|
|
46
46
|
platform: 'vercel',
|
|
47
47
|
outputDirectory: 'html'
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
// SEO configuration
|
|
51
|
+
seo: {
|
|
52
|
+
enabled: true,
|
|
53
|
+
siteUrl: '', // Required for proper SEO
|
|
54
|
+
author: '',
|
|
55
|
+
twitterHandle: '',
|
|
56
|
+
language: 'en-US',
|
|
57
|
+
keywords: [],
|
|
58
|
+
organization: {
|
|
59
|
+
name: '',
|
|
60
|
+
url: '',
|
|
61
|
+
logo: ''
|
|
62
|
+
},
|
|
63
|
+
ogImage: '', // Default Open Graph image
|
|
64
|
+
generateSitemap: true,
|
|
65
|
+
generateRobotsTxt: true,
|
|
66
|
+
customMetaTags: []
|
|
48
67
|
}
|
|
49
68
|
};
|
|
50
69
|
|
|
@@ -133,7 +152,26 @@ const notionInspiredPreset = {
|
|
|
133
152
|
'mcp',
|
|
134
153
|
'team',
|
|
135
154
|
'thought-leadership'
|
|
136
|
-
]
|
|
155
|
+
],
|
|
156
|
+
|
|
157
|
+
// SEO configuration for notion preset
|
|
158
|
+
seo: {
|
|
159
|
+
enabled: true,
|
|
160
|
+
siteUrl: '',
|
|
161
|
+
author: '',
|
|
162
|
+
twitterHandle: '',
|
|
163
|
+
language: 'en-US',
|
|
164
|
+
keywords: ['documentation', 'api', 'guide'],
|
|
165
|
+
organization: {
|
|
166
|
+
name: '',
|
|
167
|
+
url: '',
|
|
168
|
+
logo: ''
|
|
169
|
+
},
|
|
170
|
+
ogImage: '',
|
|
171
|
+
generateSitemap: true,
|
|
172
|
+
generateRobotsTxt: true,
|
|
173
|
+
customMetaTags: []
|
|
174
|
+
}
|
|
137
175
|
};
|
|
138
176
|
|
|
139
177
|
/**
|
package/lib/core-builder.js
CHANGED
|
@@ -2,6 +2,15 @@ const fs = require('fs-extra');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const marked = require('marked');
|
|
4
4
|
const chalk = require('chalk');
|
|
5
|
+
const {
|
|
6
|
+
generateMetaTags,
|
|
7
|
+
generateJSONLD,
|
|
8
|
+
generateDescription,
|
|
9
|
+
extractKeywords,
|
|
10
|
+
generateBreadcrumbs,
|
|
11
|
+
generateSitemap,
|
|
12
|
+
generateRobotsTxt
|
|
13
|
+
} = require('./seo');
|
|
5
14
|
|
|
6
15
|
// Configure marked options
|
|
7
16
|
marked.setOptions({
|
|
@@ -180,7 +189,7 @@ function processMarkdownContent(content) {
|
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
// Generate HTML from template
|
|
183
|
-
function generateHTML(title, content, navigation, currentPath = '', config = {}) {
|
|
192
|
+
function generateHTML(title, content, navigation, currentPath = '', config = {}, originalContent = '') {
|
|
184
193
|
const depth = currentPath.split('/').filter(p => p).length;
|
|
185
194
|
const relativePath = depth > 0 ? '../'.repeat(depth) : '';
|
|
186
195
|
|
|
@@ -191,13 +200,63 @@ function generateHTML(title, content, navigation, currentPath = '', config = {})
|
|
|
191
200
|
const packageJson = require('../package.json');
|
|
192
201
|
const docBuilderVersion = packageJson.version;
|
|
193
202
|
|
|
203
|
+
// SEO preparation
|
|
204
|
+
let seoTags = '';
|
|
205
|
+
let jsonLd = '';
|
|
206
|
+
|
|
207
|
+
if (config.seo?.enabled && config.seo?.siteUrl) {
|
|
208
|
+
// Generate page URL
|
|
209
|
+
const pageUrl = `${config.seo.siteUrl}/${currentPath}`;
|
|
210
|
+
|
|
211
|
+
// Extract or generate description
|
|
212
|
+
const pageDescription = generateDescription(originalContent || content) || siteDescription;
|
|
213
|
+
|
|
214
|
+
// Extract keywords from content
|
|
215
|
+
const contentKeywords = extractKeywords(originalContent || content, 5);
|
|
216
|
+
const keywords = [...new Set([...(config.seo.keywords || []), ...contentKeywords])];
|
|
217
|
+
|
|
218
|
+
// Generate breadcrumbs
|
|
219
|
+
const breadcrumbs = generateBreadcrumbs(currentPath, config.seo.siteUrl, siteName);
|
|
220
|
+
|
|
221
|
+
// Generate meta tags
|
|
222
|
+
seoTags = generateMetaTags({
|
|
223
|
+
title: `${title} - ${siteName}`,
|
|
224
|
+
description: pageDescription,
|
|
225
|
+
url: pageUrl,
|
|
226
|
+
author: config.seo.author,
|
|
227
|
+
keywords: keywords,
|
|
228
|
+
twitterHandle: config.seo.twitterHandle,
|
|
229
|
+
ogImage: config.seo.ogImage,
|
|
230
|
+
siteName: siteName,
|
|
231
|
+
language: config.seo.language,
|
|
232
|
+
type: 'article'
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// Generate JSON-LD
|
|
236
|
+
const now = new Date().toISOString();
|
|
237
|
+
jsonLd = generateJSONLD({
|
|
238
|
+
title: title,
|
|
239
|
+
description: pageDescription,
|
|
240
|
+
url: pageUrl,
|
|
241
|
+
author: config.seo.author,
|
|
242
|
+
siteName: siteName,
|
|
243
|
+
datePublished: now,
|
|
244
|
+
dateModified: now,
|
|
245
|
+
breadcrumbs: breadcrumbs,
|
|
246
|
+
organization: config.seo.organization,
|
|
247
|
+
type: 'TechArticle'
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
194
251
|
return `<!DOCTYPE html>
|
|
195
252
|
<html lang="en">
|
|
196
253
|
<head>
|
|
197
254
|
<meta charset="UTF-8">
|
|
198
255
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
199
|
-
<meta name="description" content="${siteDescription}">
|
|
200
|
-
<title>${title} - ${siteName}</title>
|
|
256
|
+
<meta name="description" content="${escapeHtml(generateDescription(originalContent || content) || siteDescription)}">
|
|
257
|
+
<title>${escapeHtml(title)} - ${escapeHtml(siteName)}</title>
|
|
258
|
+
|
|
259
|
+
${seoTags}
|
|
201
260
|
|
|
202
261
|
<!-- Fonts -->
|
|
203
262
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
@@ -213,6 +272,8 @@ function generateHTML(title, content, navigation, currentPath = '', config = {})
|
|
|
213
272
|
|
|
214
273
|
<!-- Favicon -->
|
|
215
274
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>š</text></svg>">
|
|
275
|
+
|
|
276
|
+
${jsonLd}
|
|
216
277
|
</head>
|
|
217
278
|
<body>
|
|
218
279
|
<!-- Header -->
|
|
@@ -534,8 +595,8 @@ async function processMarkdownFile(filePath, outputPath, allFiles, config) {
|
|
|
534
595
|
// Build navigation
|
|
535
596
|
const navigation = buildNavigationStructure(allFiles, urlPath);
|
|
536
597
|
|
|
537
|
-
// Generate full HTML
|
|
538
|
-
const html = generateHTML(title, htmlContent, navigation, urlPath, config);
|
|
598
|
+
// Generate full HTML (pass original content for SEO)
|
|
599
|
+
const html = generateHTML(title, htmlContent, navigation, urlPath, config, content);
|
|
539
600
|
|
|
540
601
|
// Write file
|
|
541
602
|
await fs.ensureDir(path.dirname(outputPath));
|
|
@@ -639,6 +700,13 @@ async function buildDocumentation(config) {
|
|
|
639
700
|
await createAuthPages(outputDir, config);
|
|
640
701
|
}
|
|
641
702
|
|
|
703
|
+
// Copy 404.html for handling .md redirects
|
|
704
|
+
const notFoundSource = path.join(assetsDir, '404.html');
|
|
705
|
+
if (fs.existsSync(notFoundSource)) {
|
|
706
|
+
await fs.copy(notFoundSource, path.join(outputDir, '404.html'), { overwrite: true });
|
|
707
|
+
console.log(chalk.green('ā
Copied 404.html for .md link handling'));
|
|
708
|
+
}
|
|
709
|
+
|
|
642
710
|
// Create index.html from index.html, README.html, or generate default
|
|
643
711
|
const indexPath = path.join(outputDir, 'index.html');
|
|
644
712
|
const indexSourcePath = path.join(outputDir, 'index.html'); // from index.md
|
|
@@ -735,6 +803,43 @@ async function buildDocumentation(config) {
|
|
|
735
803
|
console.log(chalk.red(` ā index.html is MISSING at: ${indexPath}`));
|
|
736
804
|
}
|
|
737
805
|
|
|
806
|
+
// Generate SEO files if enabled
|
|
807
|
+
if (config.seo?.enabled && config.seo?.siteUrl) {
|
|
808
|
+
console.log(chalk.blue('\nš Generating SEO files...'));
|
|
809
|
+
|
|
810
|
+
// Collect all HTML files for sitemap
|
|
811
|
+
const pages = [];
|
|
812
|
+
const walkDir = (dir, baseDir = '') => {
|
|
813
|
+
const items = fs.readdirSync(dir);
|
|
814
|
+
items.forEach(item => {
|
|
815
|
+
const fullPath = path.join(dir, item);
|
|
816
|
+
const stat = fs.statSync(fullPath);
|
|
817
|
+
if (stat.isDirectory()) {
|
|
818
|
+
walkDir(fullPath, path.join(baseDir, item));
|
|
819
|
+
} else if (item.endsWith('.html') && !item.includes('login') && !item.includes('logout')) {
|
|
820
|
+
pages.push({
|
|
821
|
+
path: baseDir ? path.join(baseDir, item) : item,
|
|
822
|
+
modified: stat.mtime
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
walkDir(outputDir);
|
|
829
|
+
|
|
830
|
+
// Generate sitemap if enabled
|
|
831
|
+
if (config.seo.generateSitemap) {
|
|
832
|
+
await generateSitemap(pages, config.seo.siteUrl, outputDir);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
// Generate robots.txt if enabled
|
|
836
|
+
if (config.seo.generateRobotsTxt) {
|
|
837
|
+
await generateRobotsTxt(config.seo.siteUrl, outputDir, {
|
|
838
|
+
hasAuthentication: config.features?.authentication
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
738
843
|
console.log(chalk.green('ā
Documentation build complete!'));
|
|
739
844
|
}
|
|
740
845
|
|