@knowcode/doc-builder 1.9.20 → 1.9.21

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.
Files changed (86) hide show
  1. package/cli.js +15 -1
  2. package/doc-builder.config.js +4 -2
  3. package/doc-builder.config.js.backup.1754567425847 +124 -0
  4. package/html/README.html +3 -3
  5. package/html/about-doc-builder.html +3 -3
  6. package/html/documentation-index.html +3 -3
  7. package/html/guides/authentication-default-change.html +3 -3
  8. package/html/guides/authentication-guide.html +3 -3
  9. package/html/guides/claude-workflow-guide.html +3 -3
  10. package/html/guides/configuration-guide.html +3 -3
  11. package/html/guides/documentation-standards.html +3 -3
  12. package/html/guides/html-embedding-guide.html +3 -3
  13. package/html/guides/image-modal-guide.html +3 -3
  14. package/html/guides/phosphor-icons-guide.html +3 -3
  15. package/html/guides/private-directory-authentication-troubleshooting.html +3 -3
  16. package/html/guides/private-directory-authentication.html +3 -3
  17. package/html/guides/public-site-deployment.html +3 -3
  18. package/html/guides/search-engine-verification-guide.html +3 -3
  19. package/html/guides/seo-guide.html +3 -3
  20. package/html/guides/seo-optimization-guide.html +3 -3
  21. package/html/guides/supabase-authentication-complete-guide.html +3 -3
  22. package/html/guides/troubleshooting-guide.html +3 -3
  23. package/html/guides/windows-setup-guide.html +3 -3
  24. package/html/image-modal-test.html +3 -3
  25. package/html/index.html +3 -3
  26. package/html/private/cache-control-anti-pattern.html +3 -3
  27. package/html/private/launch/README.html +3 -3
  28. package/html/private/launch/auth-cleanup-summary.html +3 -3
  29. package/html/private/launch/bubble-plugin-specification.html +3 -3
  30. package/html/private/launch/go-to-market-strategy.html +3 -3
  31. package/html/private/launch/launch-announcements.html +3 -3
  32. package/html/private/launch/vercel-deployment-auth-setup.html +3 -3
  33. package/html/private/next-steps-walkthrough.html +3 -3
  34. package/html/private/supabase-auth-implementation-completed.html +3 -3
  35. package/html/private/supabase-auth-implementation-plan.html +3 -3
  36. package/html/private/supabase-auth-integration-plan.html +3 -3
  37. package/html/private/supabase-auth-setup-guide.html +3 -3
  38. package/html/private/test-private-doc.html +3 -3
  39. package/html/private/user-management-tooling.html +3 -3
  40. package/html/prompts/beautiful-documentation-design.html +3 -3
  41. package/html/prompts/markdown-document-standards.html +3 -3
  42. package/html/prompts/project-rename-strategy-sasha-publish.html +3 -3
  43. package/html/sitemap.xml +59 -59
  44. package/html/test-questions/how-does-it-work%3F.html +3 -3
  45. package/html/test-questions/step-1%3A%20getting-started.html +3 -3
  46. package/html/test-questions/what-is-the-purpose.html +3 -3
  47. package/html/vercel-cli-setup-guide.html +3 -3
  48. package/html/vercel-first-time-setup-guide.html +3 -3
  49. package/html-static/404.html +115 -0
  50. package/html-static/README.html +456 -0
  51. package/html-static/about-doc-builder.html +425 -0
  52. package/html-static/css/notion-style.css +2426 -0
  53. package/html-static/documentation-index.html +405 -0
  54. package/html-static/guides/authentication-default-change.html +304 -0
  55. package/html-static/guides/authentication-guide.html +443 -0
  56. package/html-static/guides/claude-workflow-guide.html +1008 -0
  57. package/html-static/guides/configuration-guide.html +406 -0
  58. package/html-static/guides/documentation-standards.html +628 -0
  59. package/html-static/guides/html-embedding-guide.html +395 -0
  60. package/html-static/guides/image-modal-guide.html +449 -0
  61. package/html-static/guides/phosphor-icons-guide.html +518 -0
  62. package/html-static/guides/private-directory-authentication-troubleshooting.html +489 -0
  63. package/html-static/guides/private-directory-authentication.html +475 -0
  64. package/html-static/guides/public-site-deployment.html +365 -0
  65. package/html-static/guides/search-engine-verification-guide.html +476 -0
  66. package/html-static/guides/seo-guide.html +595 -0
  67. package/html-static/guides/seo-optimization-guide.html +821 -0
  68. package/html-static/guides/supabase-authentication-complete-guide.html +800 -0
  69. package/html-static/guides/troubleshooting-guide.html +567 -0
  70. package/html-static/guides/windows-setup-guide.html +793 -0
  71. package/html-static/image-modal-test.html +252 -0
  72. package/html-static/index.html +456 -0
  73. package/html-static/js/main.js +1692 -0
  74. package/html-static/prompts/beautiful-documentation-design.html +718 -0
  75. package/html-static/prompts/markdown-document-standards.html +356 -0
  76. package/html-static/prompts/project-rename-strategy-sasha-publish.html +464 -0
  77. package/html-static/robots.txt +5 -0
  78. package/html-static/sitemap.xml +189 -0
  79. package/html-static/test-questions/how-does-it-work%3F.html +228 -0
  80. package/html-static/test-questions/step-1%3A%20getting-started.html +223 -0
  81. package/html-static/test-questions/what-is-the-purpose.html +227 -0
  82. package/html-static/vercel-cli-setup-guide.html +429 -0
  83. package/html-static/vercel-first-time-setup-guide.html +388 -0
  84. package/lib/config.js +9 -2
  85. package/lib/core-builder.js +148 -4
  86. package/package.json +1 -1
@@ -0,0 +1,388 @@
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="This guide walks you through the Vercel deployment process when using `@knowcode/doc-builder deploy`.">
7
+ <title>Vercel First-Time Setup Guide | @knowcode/doc-builder</title>
8
+
9
+ <meta name="generator" content="@knowcode/doc-builder by Knowcode Ltd">
10
+ <meta name="author" content="Lindsay Smith">
11
+ <meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, your, deployment">
12
+ <meta name="robots" content="index, follow">
13
+ <link rel="canonical" href="https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html">
14
+
15
+ <!-- Open Graph / Facebook -->
16
+ <meta property="og:type" content="article">
17
+ <meta property="og:url" content="https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html">
18
+ <meta property="og:title" content="Vercel First-Time Setup Guide | @knowcode/doc-builder">
19
+ <meta property="og:description" content="This guide walks you through the Vercel deployment process when using `@knowcode/doc-builder deploy`.">
20
+ <meta property="og:image" content="https://doc-builder-delta.vercel.app/og-default.png">
21
+ <meta property="og:site_name" content="@knowcode/doc-builder">
22
+ <meta property="og:locale" content="en_US">
23
+
24
+ <!-- Twitter Card -->
25
+ <meta name="twitter:card" content="summary_large_image">
26
+ <meta name="twitter:site" content="@planbbackups">
27
+ <meta name="twitter:creator" content="@planbbackups">
28
+ <meta name="twitter:title" content="Vercel First-Time Setup Guide | @knowcode/doc-builder">
29
+ <meta name="twitter:description" content="This guide walks you through the Vercel deployment process when using `@knowcode/doc-builder deploy`.">
30
+ <meta name="twitter:image" content="https://doc-builder-delta.vercel.app/og-default.png">
31
+
32
+ <!-- Custom Meta Tags -->
33
+ <meta name="google-site-verification" content="FtzcDTf5BQ9K5EfnGazQkgU2U4FiN3ITzM7gHwqUAqQ">
34
+ <meta name="msvalidate.01" content="B2D8C4C12C530D47AA962B24CAA09630">
35
+
36
+ <!-- Fonts -->
37
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
38
+
39
+ <!-- Icons -->
40
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
41
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css">
42
+
43
+ <!-- Mermaid -->
44
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
45
+
46
+ <!-- Styles -->
47
+ <link rel="stylesheet" href="/css/notion-style.css">
48
+
49
+
50
+
51
+ <!-- Favicon -->
52
+ <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>">
53
+
54
+ <script type="application/ld+json">
55
+ {
56
+ "@context": "https://schema.org",
57
+ "@type": "TechArticle",
58
+ "headline": "Vercel First-Time Setup Guide",
59
+ "description": "This guide walks you through the Vercel deployment process when using `@knowcode/doc-builder deploy`.",
60
+ "author": {
61
+ "@type": "Person",
62
+ "name": "Lindsay Smith"
63
+ },
64
+ "publisher": {
65
+ "@type": "Organization",
66
+ "name": "Knowcode Ltd",
67
+ "url": "https://knowcode.tech"
68
+ },
69
+ "datePublished": "2025-08-07T11:50:26.113Z",
70
+ "dateModified": "2025-08-07T11:50:26.113Z",
71
+ "mainEntityOfPage": {
72
+ "@type": "WebPage",
73
+ "@id": "https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html"
74
+ },
75
+ "breadcrumb": {
76
+ "@type": "BreadcrumbList",
77
+ "itemListElement": [
78
+ {
79
+ "@type": "ListItem",
80
+ "position": 1,
81
+ "name": "@knowcode/doc-builder",
82
+ "item": "https://doc-builder-delta.vercel.app"
83
+ },
84
+ {
85
+ "@type": "ListItem",
86
+ "position": 2,
87
+ "name": "Vercel First Time Setup Guide",
88
+ "item": "https://doc-builder-delta.vercel.app/vercel-first-time-setup-guide.html"
89
+ }
90
+ ]
91
+ }
92
+ }
93
+ </script>
94
+ </head>
95
+ <body>
96
+ <!-- Header -->
97
+ <header class="header">
98
+ <div class="header-content">
99
+ <a href="/index.html" class="logo">@knowcode/doc-builder</a>
100
+
101
+ <div class="header-actions">
102
+ <div class="deployment-info">
103
+ <span class="deployment-date" title="Built with doc-builder v1.9.20">Last updated: Aug 7, 2025, 11:50 AM UTC</span>
104
+ </div>
105
+
106
+
107
+
108
+ <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
109
+ <i class="fas fa-moon"></i>
110
+ </button>
111
+
112
+ <button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
113
+ <i class="fas fa-bars"></i>
114
+ </button>
115
+ </div>
116
+ </div>
117
+ </header>
118
+
119
+
120
+
121
+ <!-- Breadcrumbs -->
122
+ <nav class="breadcrumbs" id="breadcrumbs">
123
+ <!-- Breadcrumbs will be generated by JavaScript -->
124
+ </nav>
125
+
126
+ <!-- Main Content -->
127
+ <div class="main-wrapper">
128
+ <!-- Sidebar -->
129
+ <aside class="sidebar">
130
+ <div class="sidebar-header">
131
+ <div class="filter-box">
132
+ <input type="text" placeholder="Search menu..." class="filter-input" id="nav-filter">
133
+ <i class="fas fa-search filter-icon"></i>
134
+ </div>
135
+ </div>
136
+ <nav class="navigation">
137
+
138
+ <div class="nav-section" data-level="0">
139
+ <a class="nav-title toggle-all-nav expanded" href="#" id="nav-toggle-all" title="Collapse/Expand All">
140
+ <i class="ph ph-caret-down" id="toggle-all-icon"></i> Documentation
141
+ </a>
142
+ <div class="nav-content">
143
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="ph ph-file-text"></i> Overview</a>
144
+ <a href="/about-doc-builder.html" class="nav-item" data-tooltip="About @knowcode/doc-builder."><i class="ph ph-check-circle" style="color: #059669;"></i> About Doc Builder</a>
145
+ <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="ph ph-pencil-simple" style="color: #d97706;"></i> Documentation Index</a>
146
+ <a href="/image-modal-test.html" class="nav-item" data-tooltip="This document tests the new image modal functionality in doc-builder."><i class="ph ph-file-text"></i> Image Modal Test</a>
147
+ <a href="/vercel-cli-setup-guide.html" class="nav-item" data-tooltip="This guide provides comprehensive instructions for installing the Vercel CLI across different operating systems."><i class="ph ph-check-circle" style="color: #059669;"></i> Vercel Cli Setup Guide</a>
148
+ <a href="/vercel-first-time-setup-guide.html" class="nav-item active" data-tooltip="This guide walks you through the Vercel deployment process when using ."><i class="ph ph-check-circle" style="color: #059669;"></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="ph ph-caret-right collapse-icon"></i><i class="ph ph-book"></i> Guides
152
+ </a>
153
+ <div class="nav-content collapsed" id="nav-guides-1">
154
+ <a href="/guides/authentication-default-change.html" class="nav-item" data-tooltip="Starting from version 1.7.4, @knowcode/doc-builder now defaults to no authentication for all documentation sites."><i class="ph ph-file-text"></i> Authentication Default Change</a>
155
+ <a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase - a secure, scalable authentication platform."><i class="ph ph-check-circle" style="color: #059669;"></i> Authentication Guide</a>
156
+ <a href="/guides/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="ph ph-pencil-simple" style="color: #d97706;"></i> Claude Workflow Guide</a>
157
+ <a href="/guides/configuration-guide.html" class="nav-item" data-tooltip="This guide explains how @knowcode/doc-builder handles configuration files and settings."><i class="ph ph-check-circle" style="color: #059669;"></i> Configuration Guide</a>
158
+ <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="ph ph-pencil-simple" style="color: #d97706;"></i> Documentation Standards</a>
159
+ <a href="/guides/html-embedding-guide.html" class="nav-item" data-tooltip="Starting from version 1.9.2, doc-builder treats HTML files ( and ) as attachments that are automatically copied to your output directory during the..."><i class="ph ph-check-circle" style="color: #059669;"></i> Html Embedding Guide</a>
160
+ <a href="/guides/image-modal-guide.html" class="nav-item" data-tooltip="When users click on any image in your generated documentation, it opens in a professional modal overlay with: Full-screen viewing experience Smooth..."><i class="ph ph-check-circle" style="color: #059669;"></i> Image Modal Guide</a>
161
+ <a href="/guides/phosphor-icons-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder automatically converts Unicode emojis in your markdown files to beautiful Phosphor icons in the generated HTML."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Phosphor Icons Guide</a>
162
+ <a href="/guides/private-directory-authentication.html" class="nav-item" data-tooltip="The @knowcode/doc-builder provides flexible authentication options to protect your documentation."><i class="ph ph-check-circle" style="color: #059669;"></i> Private Directory Authentication</a>
163
+ <a href="/guides/private-directory-authentication-troubleshooting.html" class="nav-item" data-tooltip="Private Directory Authentication Troubleshooting."><i class="ph ph-check-circle" style="color: #059669;"></i> Private Directory Authentication Troubleshooting</a>
164
+ <a href="/guides/public-site-deployment.html" class="nav-item" data-tooltip="The @knowcode/doc-builder now supports deploying public documentation sites without authentication."><i class="ph ph-check-circle" style="color: #059669;"></i> Public Site Deployment</a>
165
+ <a href="/guides/search-engine-verification-guide.html" class="nav-item" data-tooltip="Search engine verification provides access to powerful webmaster tools:."><i class="ph ph-check-circle" style="color: #059669;"></i> Search Engine Verification Guide</a>
166
+ <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="ph ph-check-circle" style="color: #059669;"></i> Seo Guide</a>
167
+ <a href="/guides/seo-optimization-guide.html" class="nav-item" data-tooltip="Comprehensive guide to optimizing documentation for search engines. Learn SEO best practices, use built-in features, and improve your rankings."><i class="ph ph-check-circle" style="color: #059669;"></i> SEO Optimization Guide for @knowcode/doc-builder</a>
168
+ <a href="/guides/supabase-authentication-complete-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes built-in Supabase authentication that provides enterprise-grade security with zero configuration."><i class="ph ph-check-circle" style="color: #059669;"></i> Supabase Authentication Complete Guide</a>
169
+ <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="ph ph-check-circle" style="color: #059669;"></i> Troubleshooting Guide</a>
170
+ <a href="/guides/windows-setup-guide.html" class="nav-item" data-tooltip="This guide helps Windows users set up the complete AI-powered documentation workflow using Claude Code, @knowcode/doc-builder, and Vercel."><i class="ph ph-check-circle" style="color: #059669;"></i> Windows Setup Guide</a></div></div>
171
+ <div class="nav-section" data-level="1">
172
+ <a class="nav-title collapsible" href="#" data-target="nav-prompts-1" >
173
+ <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-chat-circle-dots"></i> Prompts
174
+ </a>
175
+ <div class="nav-content collapsed" id="nav-prompts-1">
176
+ <a href="/prompts/beautiful-documentation-design.html" class="nav-item" data-tooltip="šŸŽØ Beautiful Documentation Design Guide."><i class="ph ph-check-circle" style="color: #059669;"></i> Beautiful Documentation Design</a>
177
+ <a href="/prompts/markdown-document-standards.html" class="nav-item" data-tooltip="Detailed introduction to the topic..."><i class="ph ph-pencil-simple" style="color: #d97706;"></i> Markdown Document Standards</a>
178
+ <a href="/prompts/project-rename-strategy-sasha-publish.html" class="nav-item" data-tooltip="This document outlines the comprehensive strategy for renaming the @knowcode/doc-builder project to &quot;sasha-publish&quot;, including all package references,..."><i class="ph ph-x-circle" style="color: #dc2626;"></i> Project Rename Strategy Sasha Publish</a></div></div>
179
+ <div class="nav-section" data-level="1">
180
+ <a class="nav-title collapsible" href="#" data-target="nav-test-questions-1" >
181
+ <i class="ph ph-caret-right collapse-icon"></i><i class="ph ph-folder"></i> Test Questions
182
+ </a>
183
+ <div class="nav-content collapsed" id="nav-test-questions-1">
184
+ <a href="/test-questions/how-does-it-work%3F.html" class="nav-item" data-tooltip="This is a test file to verify that question marks work properly in filenames."><i class="ph ph-file-text"></i> How Does It Work?</a>
185
+ <a href="/test-questions/step-1%3A%20getting-started.html" class="nav-item" data-tooltip="Step 1: Getting Started."><i class="ph ph-file-text"></i> Step 1: Getting Started</a>
186
+ <a href="/test-questions/what-is-the-purpose.html" class="nav-item" data-tooltip="Understanding the purpose of our documentation system"><i class="ph ph-file-text"></i> What Is The Purpose?</a></div></div>
187
+ </nav>
188
+ <div class="resize-handle"></div>
189
+ </aside>
190
+
191
+ <!-- Content Area -->
192
+ <main class="content">
193
+ <div class="content-inner">
194
+ <h1>Vercel First-Time Setup Guide</h1>
195
+ <h2>Overview</h2>
196
+ <p>This guide walks you through the Vercel deployment process when using <code>@knowcode/doc-builder deploy</code>.</p>
197
+ <h2>The Deployment Process</h2>
198
+ <h3>Step 1: Run the Deploy Command</h3>
199
+ <pre><code class="language-bash">npx @knowcode/doc-builder@latest deploy
200
+ </code></pre>
201
+ <h3>Step 2: doc-builder Configuration</h3>
202
+ <p>The tool will ask a few simple questions:</p>
203
+ <h4>Project Name</h4>
204
+ <pre><code>? What is your project name? › my-docs
205
+ </code></pre>
206
+ <ul>
207
+ <li>This becomes your Vercel project identifier</li>
208
+ <li>Will be part of your URL: <code>project-name.vercel.app</code></li>
209
+ <li>Use lowercase letters, numbers, and hyphens only</li>
210
+ </ul>
211
+ <h4>Custom Production URL (Optional)</h4>
212
+ <pre><code>? Custom production URL (optional)? ›
213
+ </code></pre>
214
+ <ul>
215
+ <li>Press Enter to skip (recommended for first-time setup)</li>
216
+ <li>Or enter your custom domain if you have one</li>
217
+ </ul>
218
+ <h3>Step 3: Vercel CLI Takes Over</h3>
219
+ <p>The Vercel CLI will guide you through the following prompts:</p>
220
+ <h4>Deploy Confirmation</h4>
221
+ <pre><code>Vercel CLI 28.0.0
222
+ ? Set up and deploy &quot;~/path/to/your/project/html&quot;? [Y/n]
223
+ </code></pre>
224
+ <ul>
225
+ <li>Answer <strong>Yes</strong> to proceed</li>
226
+ <li>This confirms you want to deploy the current directory</li>
227
+ </ul>
228
+ <h4>Account Selection</h4>
229
+ <pre><code>? Which scope do you want to deploy to? ›
230
+ ā—‹ Your Name
231
+ ā—‹ Your Team (if applicable)
232
+ </code></pre>
233
+ <ul>
234
+ <li>Select your personal account or team</li>
235
+ <li>Use arrow keys to navigate, Enter to select</li>
236
+ </ul>
237
+ <h4>Project Name Confirmation</h4>
238
+ <pre><code>? What&#39;s your project&#39;s name? (my-docs)
239
+ </code></pre>
240
+ <ul>
241
+ <li>Vercel suggests the name you provided earlier</li>
242
+ <li>Press Enter to accept or type a new name</li>
243
+ </ul>
244
+ <h4>Framework Detection</h4>
245
+ <pre><code>? In which directory is your code located? ./
246
+ </code></pre>
247
+ <ul>
248
+ <li>Vercel automatically detects this is a static site</li>
249
+ <li>Usually defaults to <code>./</code> which is correct</li>
250
+ <li>Press Enter to accept</li>
251
+ </ul>
252
+ <h3>Step 4: Deployment Begins</h3>
253
+ <p>That&#39;s it! Vercel will now:</p>
254
+ <ol>
255
+ <li>Upload your files</li>
256
+ <li>Deploy to their global CDN</li>
257
+ <li>Provide your live URL</li>
258
+ </ol>
259
+ <pre><code>āœ“ Production: https://my-docs.vercel.app [copied to clipboard]
260
+ </code></pre>
261
+ <h2>Post-Deployment Configuration</h2>
262
+ <h3>Making Your Docs Public</h3>
263
+ <p>By default, Vercel may protect your deployment. To make docs publicly accessible:</p>
264
+ <ol>
265
+ <li>Go to your <a href="https://vercel.com/dashboard">Vercel Dashboard</a></li>
266
+ <li>Click on your project</li>
267
+ <li>Navigate to <strong>Settings → Deployment Protection</strong></li>
268
+ <li>Set <strong>Vercel Authentication</strong> to <strong>Disabled</strong></li>
269
+ <li>Click <strong>Save</strong></li>
270
+ </ol>
271
+ <h3>SEO Optimization</h3>
272
+ <p>Once deployed, optimize your documentation for search engines:</p>
273
+ <ol>
274
+ <li><p><strong>Check SEO Status</strong>:</p>
275
+ <pre><code class="language-bash">npx @knowcode/doc-builder@latest seo-check
276
+ </code></pre>
277
+ </li>
278
+ <li><p><strong>Configure SEO Settings</strong>:</p>
279
+ <pre><code class="language-bash">npx @knowcode/doc-builder@latest setup-seo
280
+ </code></pre>
281
+ </li>
282
+ <li><p><strong>Review the SEO Guide</strong>: See our comprehensive <a href="./guides/seo-optimization-guide.md">SEO Optimization Guide</a> for best practices</p>
283
+ </li>
284
+ </ol>
285
+ <h3>Google Search Console Setup</h3>
286
+ <p>Make your documentation discoverable on Google:</p>
287
+ <ol>
288
+ <li><p><strong>Add Verification</strong>:</p>
289
+ <pre><code class="language-bash">npx @knowcode/doc-builder@latest google-verify YOUR_VERIFICATION_CODE
290
+ </code></pre>
291
+ </li>
292
+ <li><p><strong>Submit Sitemap</strong>: </p>
293
+ <ul>
294
+ <li>Your sitemap is automatically generated at <code>/sitemap.xml</code></li>
295
+ <li>Submit it in Google Search Console</li>
296
+ </ul>
297
+ </li>
298
+ <li><p><strong>Full Instructions</strong>: See the <a href="./guides/search-engine-verification-guide.md">Search Engine Verification Guide</a></p>
299
+ </li>
300
+ </ol>
301
+ <h3>Custom Domain (Optional)</h3>
302
+ <p>To add a custom domain:</p>
303
+ <ol>
304
+ <li>Go to <strong>Settings → Domains</strong></li>
305
+ <li>Add your domain</li>
306
+ <li>Follow DNS configuration instructions</li>
307
+ <li>Update your sitemap URL in Google Search Console</li>
308
+ </ol>
309
+ <h3>Environment Variables (If Using Authentication)</h3>
310
+ <p>If you enabled authentication in doc-builder:</p>
311
+ <ol>
312
+ <li>Go to <strong>Settings → Environment Variables</strong></li>
313
+ <li>Add your auth credentials</li>
314
+ <li>Redeploy to apply changes</li>
315
+ </ol>
316
+ <h2>Troubleshooting</h2>
317
+ <h3>&quot;Vercel CLI not found&quot;</h3>
318
+ <p>If you see this error, install Vercel CLI:</p>
319
+ <pre><code class="language-bash">npm install -g vercel
320
+ </code></pre>
321
+ <h3>&quot;404 Not Found&quot; After Deployment</h3>
322
+ <p>Make sure you:</p>
323
+ <ol>
324
+ <li>Ran the deploy command from your project root</li>
325
+ <li>Have markdown files in your <code>docs/</code> folder</li>
326
+ <li>Didn&#39;t modify the build output</li>
327
+ </ol>
328
+ <h3>&quot;Authentication Required&quot; Error</h3>
329
+ <p>Your deployment is protected. Follow the &quot;Making Your Docs Public&quot; steps above.</p>
330
+ <h3>Deployment Fails</h3>
331
+ <p>Check that:</p>
332
+ <ol>
333
+ <li>You&#39;re using the latest version: <code>npx @knowcode/doc-builder@latest deploy</code></li>
334
+ <li>Your <code>docs/</code> folder contains <code>.md</code> files</li>
335
+ <li>You have internet connection</li>
336
+ </ol>
337
+ <h2>Quick Checklist</h2>
338
+ <pre><code>āœ… 1. Run: npx @knowcode/doc-builder@latest deploy
339
+ āœ… 2. Enter project name (e.g., my-docs)
340
+ āœ… 3. Skip custom URL (press Enter)
341
+ āœ… 4. Confirm deployment when Vercel asks
342
+ āœ… 5. Select your account/scope
343
+ āœ… 6. Accept suggested project name
344
+ āœ… 7. Get your live URL!
345
+ </code></pre>
346
+ <h2>Best Practices</h2>
347
+ <ol>
348
+ <li><strong>First Time</strong>: Just accept all defaults</li>
349
+ <li><strong>Project Names</strong>: Use descriptive names like <code>company-api-docs</code></li>
350
+ <li><strong>Custom Domains</strong>: Add them after successful deployment</li>
351
+ <li><strong>Updates</strong>: Future deploys are even simpler - just run the same command</li>
352
+ </ol>
353
+ <h2>Next Steps</h2>
354
+ <p>After successful deployment:</p>
355
+ <ol>
356
+ <li>Visit your live docs at the provided URL</li>
357
+ <li>Make your docs public in Vercel settings if needed</li>
358
+ <li>Add a custom domain if desired</li>
359
+ <li>Share your documentation with the world!</li>
360
+ </ol>
361
+ <h2>Getting Help</h2>
362
+ <ul>
363
+ <li><strong>Vercel Dashboard</strong>: <a href="https://vercel.com/dashboard">https://vercel.com/dashboard</a></li>
364
+ <li><strong>Vercel Support</strong>: <a href="https://vercel.com/support">https://vercel.com/support</a></li>
365
+ <li><strong>doc-builder Issues</strong>: File on GitHub or npm</li>
366
+ </ul>
367
+ <hr>
368
+ <p>For additional Vercel CLI configuration options, see the <a href="./vercel-cli-setup-guide.md">Vercel CLI Setup Guide</a>.</p>
369
+
370
+ </div>
371
+ </main>
372
+ </div>
373
+
374
+ <!-- Scripts -->
375
+ <script>
376
+ // Pass configuration to frontend
377
+ window.docBuilderConfig = {
378
+ features: {
379
+ showPdfDownload: true,
380
+ menuDefaultOpen: false,
381
+ mermaidEnhanced: true
382
+ }
383
+ };
384
+ </script>
385
+ <script src="/js/main.js"></script>
386
+
387
+ </body>
388
+ </html>
package/lib/config.js CHANGED
@@ -41,9 +41,13 @@ const defaultConfig = {
41
41
  dynamicNavIcons: true, // Use status-based icons in navigation
42
42
  subtleColors: true, // Apply subtle colors to status icons
43
43
  privateDirectoryAuth: false, // Enable auth for private directories only (auto-detected)
44
- banner: false // Show preview banner at top of pages
44
+ banner: false, // Show preview banner at top of pages
45
+ staticOutput: true // Generate static version without auth (default: true)
45
46
  },
46
47
 
48
+ // Static output configuration
49
+ staticOutputDir: 'html-static', // Directory for static HTML output (no auth, no private content)
50
+
47
51
  // Authentication - Supabase only (basic auth removed for security)
48
52
  auth: {
49
53
  supabaseUrl: sharedAuth.supabaseUrl,
@@ -140,9 +144,12 @@ const notionInspiredPreset = {
140
144
  showPdfDownload: true,
141
145
  menuDefaultOpen: true,
142
146
  attachments: true,
143
- banner: false // Show preview banner at top of pages
147
+ banner: false, // Show preview banner at top of pages
148
+ staticOutput: true // Generate static version without auth (default: true)
144
149
  },
145
150
 
151
+ staticOutputDir: 'html-static', // Directory for static HTML output
152
+
146
153
  auth: {
147
154
  supabaseUrl: process.env.SUPABASE_URL || sharedAuth.supabaseUrl,
148
155
  supabaseAnonKey: process.env.SUPABASE_ANON_KEY || sharedAuth.supabaseAnonKey
@@ -361,6 +361,21 @@ function generateFaviconTag(favicon) {
361
361
  return `<link rel="icon" href="${favicon}">`;
362
362
  }
363
363
 
364
+ // Generate static HTML (without authentication)
365
+ function generateStaticHTML(title, content, navigation, currentPath = '', config = {}, originalContent = '', frontMatter = {}) {
366
+ // Use regular generateHTML but force disable auth features
367
+ const staticConfig = {
368
+ ...config,
369
+ features: {
370
+ ...config.features,
371
+ authentication: false,
372
+ privateDirectoryAuth: false
373
+ }
374
+ };
375
+
376
+ return generateHTML(title, content, navigation, currentPath, staticConfig, originalContent, frontMatter);
377
+ }
378
+
364
379
  // Generate HTML from template
365
380
  function generateHTML(title, content, navigation, currentPath = '', config = {}, originalContent = '', frontMatter = {}) {
366
381
  const depth = currentPath.split('/').filter(p => p).length;
@@ -873,7 +888,7 @@ function buildNavigationStructure(files, currentFile, config = {}) {
873
888
  }
874
889
 
875
890
  // Process single markdown file
876
- async function processMarkdownFile(filePath, outputPath, allFiles, config) {
891
+ async function processMarkdownFile(filePath, outputPath, allFiles, config, useStaticHTML = false) {
877
892
  const rawContent = await fs.readFile(filePath, 'utf-8');
878
893
  const fileName = path.basename(filePath, '.md');
879
894
  const relativePath = path.relative(config.docsDir, filePath);
@@ -906,7 +921,9 @@ async function processMarkdownFile(filePath, outputPath, allFiles, config) {
906
921
  const navigation = buildNavigationStructure(allFiles, urlPath, config);
907
922
 
908
923
  // Generate full HTML (pass original content and front matter for SEO)
909
- const html = generateHTML(title, htmlContent, navigation, urlPath, config, content, frontMatter);
924
+ const html = useStaticHTML
925
+ ? generateStaticHTML(title, htmlContent, navigation, urlPath, config, content, frontMatter)
926
+ : generateHTML(title, htmlContent, navigation, urlPath, config, content, frontMatter);
910
927
 
911
928
  // Write file
912
929
  await fs.ensureDir(path.dirname(outputPath));
@@ -916,7 +933,7 @@ async function processMarkdownFile(filePath, outputPath, allFiles, config) {
916
933
  }
917
934
 
918
935
  // Get all markdown files
919
- async function getAllMarkdownFiles(dir, baseDir = dir) {
936
+ async function getAllMarkdownFiles(dir, baseDir = dir, options = {}) {
920
937
  const files = [];
921
938
  const items = await fs.readdir(dir);
922
939
 
@@ -924,8 +941,13 @@ async function getAllMarkdownFiles(dir, baseDir = dir) {
924
941
  const fullPath = path.join(dir, item);
925
942
  const stat = await fs.stat(fullPath);
926
943
 
944
+ // Skip private directories if excludePrivate is true
945
+ if (stat.isDirectory() && options.excludePrivate && item === 'private') {
946
+ continue;
947
+ }
948
+
927
949
  if (stat.isDirectory() && !item.startsWith('.') && !item.startsWith('_')) {
928
- const subFiles = await getAllMarkdownFiles(fullPath, baseDir);
950
+ const subFiles = await getAllMarkdownFiles(fullPath, baseDir, options);
929
951
  files.push(...subFiles);
930
952
  } else if (item.endsWith('.md') && !item.startsWith('_')) {
931
953
  const relativePath = path.relative(baseDir, fullPath);
@@ -950,6 +972,11 @@ async function getAllMarkdownFiles(dir, baseDir = dir) {
950
972
  relativePath.startsWith('private/') ||
951
973
  relativePath.startsWith('private\\');
952
974
 
975
+ // Skip private files if excludePrivate is true
976
+ if (options.excludePrivate && isPrivate) {
977
+ continue;
978
+ }
979
+
953
980
  files.push({
954
981
  path: fullPath,
955
982
  relativePath,
@@ -1251,6 +1278,122 @@ async function buildDocumentation(config) {
1251
1278
  }
1252
1279
  }
1253
1280
 
1281
+ // Generate static version if enabled
1282
+ if (config.features?.staticOutput !== false) {
1283
+ console.log(chalk.blue('\n🌐 Generating static version (no auth, no private content)...'));
1284
+
1285
+ const staticOutputDir = path.join(process.cwd(), config.staticOutputDir || 'html-static');
1286
+
1287
+ // Ensure static output directory exists
1288
+ await fs.ensureDir(staticOutputDir);
1289
+
1290
+ // Get files excluding private directories
1291
+ const staticFiles = await getAllMarkdownFiles(docsDir, docsDir, { excludePrivate: true });
1292
+ console.log(chalk.gray(` Found ${staticFiles.length} public files (private files excluded)`));
1293
+
1294
+ // Process files for static output
1295
+ for (const file of staticFiles) {
1296
+ const outputPath = path.join(staticOutputDir, file.urlPath);
1297
+ await processMarkdownFile(file.path, outputPath, staticFiles, config, true);
1298
+ }
1299
+
1300
+ // Copy assets to static directory
1301
+ const assetsDir = path.join(__dirname, '../assets');
1302
+ const cssSource = path.join(assetsDir, 'css');
1303
+ const jsSource = path.join(assetsDir, 'js');
1304
+
1305
+ if (fs.existsSync(cssSource)) {
1306
+ await fs.copy(cssSource, path.join(staticOutputDir, 'css'), { overwrite: true });
1307
+ }
1308
+
1309
+ if (fs.existsSync(jsSource)) {
1310
+ await fs.copy(jsSource, path.join(staticOutputDir, 'js'), { overwrite: true });
1311
+ // Don't generate auth.js for static version
1312
+ }
1313
+
1314
+ // Copy 404.html for handling .md redirects
1315
+ const notFoundSource = path.join(assetsDir, '404.html');
1316
+ if (fs.existsSync(notFoundSource)) {
1317
+ await fs.copy(notFoundSource, path.join(staticOutputDir, '404.html'), { overwrite: true });
1318
+ }
1319
+
1320
+ // Create index.html from README.html or generate default
1321
+ const staticIndexPath = path.join(staticOutputDir, 'index.html');
1322
+ const staticReadmePath = path.join(staticOutputDir, 'README.html');
1323
+
1324
+ if (fs.existsSync(staticReadmePath)) {
1325
+ await fs.copy(staticReadmePath, staticIndexPath);
1326
+ } else if (staticFiles.length > 0) {
1327
+ // Generate a default index that lists available pages
1328
+ const defaultIndex = await createDefaultIndexPage(staticOutputDir, config, packageJson.version);
1329
+ await fs.writeFile(staticIndexPath, defaultIndex);
1330
+ }
1331
+
1332
+ // Copy attachments to static directory if enabled
1333
+ if (config.features?.attachments !== false) {
1334
+ const attachmentTypes = config.attachmentTypes || [
1335
+ '.pdf', '.doc', '.docx', '.xls', '.xlsx', '.csv', '.ppt', '.pptx', '.txt', '.rtf',
1336
+ '.html', '.htm',
1337
+ '.zip', '.tar', '.gz', '.7z', '.rar',
1338
+ '.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp',
1339
+ '.json', '.xml', '.yaml', '.yml', '.toml',
1340
+ '.mp4', '.mp3', '.wav', '.avi', '.mov'
1341
+ ];
1342
+
1343
+ try {
1344
+ // Get attachment files excluding private directories
1345
+ const allAttachmentFiles = await getAllAttachmentFiles(docsDir, docsDir, attachmentTypes);
1346
+ const staticAttachmentFiles = [];
1347
+ for (const file of allAttachmentFiles) {
1348
+ if (!file.relativePath.startsWith('private/') && !file.relativePath.startsWith('private\\')) {
1349
+ staticAttachmentFiles.push(file);
1350
+ }
1351
+ }
1352
+
1353
+ if (staticAttachmentFiles.length > 0) {
1354
+ await copyAttachmentFiles(staticAttachmentFiles, docsDir, staticOutputDir);
1355
+ }
1356
+ } catch (error) {
1357
+ console.warn(chalk.yellow(`Warning: Error copying attachments to static output: ${error.message}`));
1358
+ }
1359
+ }
1360
+
1361
+ // Generate SEO files for static version if enabled
1362
+ if (config.seo?.enabled && config.seo?.siteUrl) {
1363
+ // Collect all HTML files for sitemap
1364
+ const staticPages = [];
1365
+ const walkDir = (dir, baseDir = '') => {
1366
+ const items = fs.readdirSync(dir);
1367
+ items.forEach(item => {
1368
+ const fullPath = path.join(dir, item);
1369
+ const stat = fs.statSync(fullPath);
1370
+ if (stat.isDirectory()) {
1371
+ walkDir(fullPath, path.join(baseDir, item));
1372
+ } else if (item.endsWith('.html')) {
1373
+ staticPages.push({
1374
+ path: baseDir ? path.join(baseDir, item) : item,
1375
+ modified: stat.mtime
1376
+ });
1377
+ }
1378
+ });
1379
+ };
1380
+
1381
+ walkDir(staticOutputDir);
1382
+
1383
+ if (config.seo.generateSitemap) {
1384
+ await generateSitemap(staticPages, config.seo.siteUrl, staticOutputDir);
1385
+ }
1386
+
1387
+ if (config.seo.generateRobotsTxt) {
1388
+ await generateRobotsTxt(config.seo.siteUrl, staticOutputDir, {
1389
+ hasAuthentication: false
1390
+ });
1391
+ }
1392
+ }
1393
+
1394
+ console.log(chalk.green(`āœ… Static version generated in ${config.staticOutputDir || 'html-static'}/`));
1395
+ }
1396
+
1254
1397
  console.log(chalk.green('\nāœ… Documentation build complete!'));
1255
1398
  }
1256
1399
 
@@ -1571,6 +1714,7 @@ module.exports = {
1571
1714
  buildDocumentation,
1572
1715
  processMarkdownContent,
1573
1716
  generateHTML,
1717
+ generateStaticHTML,
1574
1718
  createPlaceholderReadme,
1575
1719
  createDefaultIndexPage
1576
1720
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.9.20",
3
+ "version": "1.9.21",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {