@knowcode/doc-builder 1.4.21 → 1.4.23

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.
@@ -0,0 +1,519 @@
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="Documentation site built with @knowcode/doc-builder">
7
+ <title>Document Standards for @knowcode/doc-builder - Documentation</title>
8
+
9
+ <!-- Fonts -->
10
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
11
+
12
+ <!-- Icons -->
13
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
14
+
15
+ <!-- Mermaid -->
16
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
17
+
18
+ <!-- Styles -->
19
+ <link rel="stylesheet" href="/css/notion-style.css">
20
+
21
+ <!-- Favicon -->
22
+ <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>">
23
+ </head>
24
+ <body>
25
+ <!-- Header -->
26
+ <header class="header">
27
+ <div class="header-content">
28
+ <a href="/index.html" class="logo">Documentation</a>
29
+
30
+ <div class="header-actions">
31
+ <div class="deployment-info">
32
+ <span class="deployment-date" title="Built with doc-builder v1.4.21">Last updated: Jul 21, 2025, 07:39 PM UTC</span>
33
+ </div>
34
+
35
+
36
+
37
+ <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
38
+ <i class="fas fa-moon"></i>
39
+ </button>
40
+
41
+ <button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
42
+ <i class="fas fa-bars"></i>
43
+ </button>
44
+ </div>
45
+ </div>
46
+ </header>
47
+
48
+ <!-- Preview Banner -->
49
+ <div id="preview-banner" class="preview-banner">
50
+ <div class="banner-content">
51
+ <i class="fas fa-exclamation-triangle banner-icon"></i>
52
+ <span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
53
+ <button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
54
+ <i class="fas fa-times"></i>
55
+ </button>
56
+ </div>
57
+ </div>
58
+
59
+ <!-- Breadcrumbs -->
60
+ <nav class="breadcrumbs" id="breadcrumbs">
61
+ <!-- Breadcrumbs will be generated by JavaScript -->
62
+ </nav>
63
+
64
+ <!-- Main Content -->
65
+ <div class="main-wrapper">
66
+ <!-- Sidebar -->
67
+ <aside class="sidebar">
68
+ <div class="sidebar-header">
69
+ <div class="filter-box">
70
+ <input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
71
+ <i class="fas fa-search filter-icon"></i>
72
+ </div>
73
+ </div>
74
+ <nav class="navigation">
75
+
76
+ <div class="nav-section" data-level="0">
77
+ <a class="nav-title" href="/README.html" >
78
+ <i class="fas fa-home"></i> Documentation
79
+ </a>
80
+ <div class="nav-content" >
81
+ <a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
82
+ <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>
83
+ <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></div></div>
84
+ <div class="nav-section" data-level="1">
85
+ <a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
86
+ <i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
87
+ </a>
88
+ <div class="nav-content" id="nav-guides-1">
89
+ <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>
90
+ <a href="/guides/documentation-standards.html" class="nav-item active" 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>
91
+ <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>
92
+ </nav>
93
+ <div class="resize-handle"></div>
94
+ </aside>
95
+
96
+ <!-- Content Area -->
97
+ <main class="content">
98
+ <div class="content-inner">
99
+ <h1>Document Standards for @knowcode/doc-builder</h1>
100
+ <p><strong>Generated</strong>: 2025-07-21 18:00 UTC<br><strong>Status</strong>: Complete<br><strong>Verified</strong>: ✅</p>
101
+ <h2>Overview</h2>
102
+ <p>This document defines the documentation standards and conventions for the @knowcode/doc-builder project. All documentation created for or by this project should follow these guidelines to ensure consistency, clarity, and maintainability.</p>
103
+ <h2>Document Structure Standards</h2>
104
+ <h3>Document Header Format</h3>
105
+ <p>Every document MUST include the following metadata at the top:</p>
106
+ <pre><code class="language-markdown"># Document Title
107
+
108
+ **Generated**: YYYY-MM-DD HH:MM UTC
109
+ **Status**: Draft/In Progress/Complete
110
+ **Verified**: ✅ (for verified information) / ❓ (for speculated information)
111
+
112
+ ## Overview
113
+
114
+ Brief description of the document&#39;s contents and purpose.
115
+ </code></pre>
116
+ <h3>Section Organization</h3>
117
+ <ol>
118
+ <li><strong>Title</strong> (H1) - Single, descriptive title</li>
119
+ <li><strong>Metadata</strong> - Generation date, status, verification</li>
120
+ <li><strong>Overview</strong> - Brief summary of document purpose</li>
121
+ <li><strong>Main Content</strong> - Organized with clear headings</li>
122
+ <li><strong>Document History</strong> - Track significant changes</li>
123
+ </ol>
124
+ <h2>Naming Conventions</h2>
125
+ <h3>Document File Names</h3>
126
+ <p>Use lowercase with hyphens, following these patterns:</p>
127
+ <ul>
128
+ <li><strong>Feature Documentation</strong>: <code>feature-{name}-guide.md</code></li>
129
+ <li><strong>API Documentation</strong>: <code>api-{endpoint}-reference.md</code></li>
130
+ <li><strong>Technical Guides</strong>: <code>{component}-{topic}-guide.md</code></li>
131
+ <li><strong>Architecture Documents</strong>: <code>architecture-{system}-overview.md</code></li>
132
+ <li><strong>Implementation Plans</strong>: <code>plan-{feature}-implementation.md</code></li>
133
+ <li><strong>Analysis Documents</strong>: <code>analysis-{topic}-{specifics}.md</code></li>
134
+ <li><strong>Troubleshooting Guides</strong>: <code>troubleshoot-{issue}-guide.md</code></li>
135
+ <li><strong>Change Logs</strong>: <code>CHANGELOG.md</code> (always uppercase)</li>
136
+ </ul>
137
+ <h3>Special Files</h3>
138
+ <ul>
139
+ <li><code>README.md</code> - Project overview and getting started</li>
140
+ <li><code>CHANGELOG.md</code> - Version history following Keep a Changelog format</li>
141
+ <li><code>CLAUDE.md</code> - AI assistant guidance (project-specific)</li>
142
+ <li><code>DOCUMENT-STANDARDS.md</code> - This file</li>
143
+ </ul>
144
+ <h2>Content Standards</h2>
145
+ <h3>1. Mermaid Diagrams</h3>
146
+ <p>Include diagrams wherever they help explain complex concepts:</p>
147
+ <pre><code class="language-markdown"><div class="mermaid-wrapper">
148
+ <div class="mermaid-title">Diagram</div>
149
+ <div class="mermaid">graph TD
150
+ A[User Input] --> B{Valid?}
151
+ B -->|Yes| C[Process]
152
+ B -->|No| D[Error]
153
+ C --> E[Output]
154
+
155
+ style A fill:#f9f,stroke:#333,stroke-width:2px
156
+ style E fill:#9f9,stroke:#333,stroke-width:2px</div>
157
+ </div>
158
+ </code></pre>
159
+ <p>Guidelines:</p>
160
+ <ul>
161
+ <li>Use consistent node naming</li>
162
+ <li>Add clear labels and descriptions</li>
163
+ <li>Apply styling for better visual hierarchy</li>
164
+ <li>Include diagram titles where appropriate</li>
165
+ </ul>
166
+ <h3>2. Information Verification</h3>
167
+ <p>Mark all information with verification status:</p>
168
+ <ul>
169
+ <li>✅ <strong>Verified</strong>: Information confirmed through testing or official sources</li>
170
+ <li>❓ <strong>Speculated</strong>: Assumptions or unconfirmed information</li>
171
+ <li>⚠️ <strong>Warning</strong>: Important caveats or potential issues</li>
172
+ <li>🚧 <strong>In Progress</strong>: Features or documentation under development</li>
173
+ </ul>
174
+ <p>Example:</p>
175
+ <pre><code class="language-markdown">### Feature Status
176
+ - ✅ **Markdown parsing**: Fully implemented and tested
177
+ - ❓ **Performance impact**: Estimated 100ms for 50 files
178
+ - ⚠️ **Large files**: May timeout on files &gt; 10MB
179
+ - 🚧 **Search feature**: Currently in development
180
+ </code></pre>
181
+ <h3>3. Code Examples</h3>
182
+ <p>Always include practical, tested examples:</p>
183
+ <pre><code class="language-javascript">// Good example - with context and error handling
184
+ const { build } = require(&#39;@knowcode/doc-builder&#39;);
185
+
186
+ const config = {
187
+ siteName: &#39;My Documentation&#39;,
188
+ docsDir: &#39;./docs&#39;,
189
+ outputDir: &#39;./dist&#39;
190
+ };
191
+
192
+ try {
193
+ await build(config);
194
+ console.log(&#39;✅ Build successful&#39;);
195
+ } catch (error) {
196
+ console.error(&#39;❌ Build failed:&#39;, error.message);
197
+ }
198
+ </code></pre>
199
+ <p>Guidelines:</p>
200
+ <ul>
201
+ <li>Use syntax highlighting</li>
202
+ <li>Include error handling</li>
203
+ <li>Add helpful comments</li>
204
+ <li>Show both correct and incorrect usage</li>
205
+ <li>Test all examples before documenting</li>
206
+ </ul>
207
+ <h3>4. Command Examples</h3>
208
+ <p>Format commands clearly with descriptions:</p>
209
+ <pre><code class="language-bash"># Install the package
210
+ npm install -D @knowcode/doc-builder
211
+
212
+ # Build documentation
213
+ npx doc-builder build
214
+
215
+ # Start development server
216
+ npx doc-builder dev --port 3000
217
+
218
+ # Deploy to Vercel
219
+ npx doc-builder deploy --prod
220
+ </code></pre>
221
+ <h2>Version Control Standards</h2>
222
+ <h3>Changelog Management</h3>
223
+ <p>ALWAYS maintain <code>CHANGELOG.md</code> for all significant or material changes:</p>
224
+ <pre><code class="language-markdown">## [1.4.12] - 2025-07-21
225
+
226
+ ### Fixed
227
+ - Fixed h1 title alignment to extend full width
228
+ - Added negative margins to counteract padding
229
+
230
+ ### Background
231
+ - The h1 was appearing offset due to content padding
232
+ - Now extends full width for better hierarchy
233
+ </code></pre>
234
+ <p>Categories:</p>
235
+ <ul>
236
+ <li><strong>Added</strong> - New features</li>
237
+ <li><strong>Changed</strong> - Changes to existing functionality</li>
238
+ <li><strong>Deprecated</strong> - Soon-to-be removed features</li>
239
+ <li><strong>Removed</strong> - Removed features</li>
240
+ <li><strong>Fixed</strong> - Bug fixes</li>
241
+ <li><strong>Security</strong> - Security fixes</li>
242
+ <li><strong>Background</strong> - Context for the changes</li>
243
+ </ul>
244
+ <h3>Commit Messages</h3>
245
+ <p>Follow conventional commits:</p>
246
+ <ul>
247
+ <li><code>feat:</code> New features</li>
248
+ <li><code>fix:</code> Bug fixes</li>
249
+ <li><code>docs:</code> Documentation changes</li>
250
+ <li><code>chore:</code> Maintenance tasks</li>
251
+ <li><code>refactor:</code> Code refactoring</li>
252
+ <li><code>test:</code> Test additions/changes</li>
253
+ </ul>
254
+ <h2>Markdown Best Practices</h2>
255
+ <h3>Headers</h3>
256
+ <pre><code class="language-markdown"># Main Title (H1 - one per document)
257
+
258
+ ## Major Section (H2)
259
+
260
+ ### Subsection (H3)
261
+
262
+ #### Detail Level (H4)
263
+ </code></pre>
264
+ <ul>
265
+ <li>Use hierarchical structure</li>
266
+ <li>Don&#39;t skip levels</li>
267
+ <li>Keep headers concise but descriptive</li>
268
+ </ul>
269
+ <h3>Lists</h3>
270
+ <p>Unordered lists for non-sequential items:</p>
271
+ <pre><code class="language-markdown">- First item
272
+ - Second item
273
+ - Nested item
274
+ - Another nested item
275
+ - Third item
276
+ </code></pre>
277
+ <p>Numbered lists for sequential steps:</p>
278
+ <pre><code class="language-markdown">1. First step
279
+ 2. Second step
280
+ 3. Third step
281
+ </code></pre>
282
+ <h3>Tables</h3>
283
+ <p>Keep tables readable and well-formatted:</p>
284
+ <pre><code class="language-markdown">| Feature | Status | Version | Notes |
285
+ |---------|--------|---------|-------|
286
+ | Mermaid | ✅ Ready | 1.0.0 | Full support |
287
+ | Search | 🚧 WIP | 1.5.0 | In development |
288
+ | Auth | ✅ Ready | 1.3.0 | Optional feature |
289
+ </code></pre>
290
+ <h3>Links</h3>
291
+ <ul>
292
+ <li>Use descriptive link text: <code>[View deployment guide](./deploy.md)</code></li>
293
+ <li>Avoid: <code>[click here](./deploy.md)</code></li>
294
+ <li>Prefer relative links for internal docs</li>
295
+ <li>Use absolute URLs for external resources</li>
296
+ </ul>
297
+ <h2>Quality Standards</h2>
298
+ <h3>Clarity</h3>
299
+ <ul>
300
+ <li>Write for your target audience</li>
301
+ <li>Define technical terms on first use</li>
302
+ <li>Use simple language where possible</li>
303
+ <li>Include examples for complex concepts</li>
304
+ </ul>
305
+ <h3>Completeness</h3>
306
+ <ul>
307
+ <li>Cover all aspects of the topic</li>
308
+ <li>Include edge cases and limitations</li>
309
+ <li>Document prerequisites</li>
310
+ <li>Provide troubleshooting guidance</li>
311
+ </ul>
312
+ <h3>Accuracy</h3>
313
+ <ul>
314
+ <li>Verify all technical details</li>
315
+ <li>Test code examples</li>
316
+ <li>Update when implementation changes</li>
317
+ <li>Mark speculation clearly</li>
318
+ </ul>
319
+ <h3>Consistency</h3>
320
+ <ul>
321
+ <li>Use same terminology throughout</li>
322
+ <li>Follow naming conventions</li>
323
+ <li>Maintain style consistency</li>
324
+ <li>Cross-reference related documents</li>
325
+ </ul>
326
+ <h2>Document Types</h2>
327
+ <h3>1. Feature Documentation</h3>
328
+ <p>Structure:</p>
329
+ <pre><code class="language-markdown"># Feature Name
330
+
331
+ **Generated**: [date]
332
+ **Status**: Complete
333
+ **Verified**: ✅
334
+
335
+ ## Overview
336
+ What the feature does and why it exists
337
+
338
+ ## Usage
339
+ How to use the feature with examples
340
+
341
+ ## Configuration
342
+ Available options and settings
343
+
344
+ ## Examples
345
+ Practical use cases
346
+
347
+ ## Troubleshooting
348
+ Common issues and solutions
349
+ </code></pre>
350
+ <h3>2. Technical Guides</h3>
351
+ <p>Structure:</p>
352
+ <pre><code class="language-markdown"># Technical Guide: [Topic]
353
+
354
+ **Generated**: [date]
355
+ **Status**: Complete
356
+ **Verified**: ✅
357
+
358
+ ## Overview
359
+ Technical context and goals
360
+
361
+ ## Architecture
362
+ System design and components
363
+
364
+ ## Implementation
365
+ Step-by-step technical details
366
+
367
+ ## Testing
368
+ How to verify functionality
369
+
370
+ ## Performance
371
+ Benchmarks and optimization
372
+ </code></pre>
373
+ <h3>3. API Documentation</h3>
374
+ <p>Structure:</p>
375
+ <pre><code class="language-markdown"># API: [Endpoint/Function Name]
376
+
377
+ **Generated**: [date]
378
+ **Status**: Complete
379
+ **Verified**: ✅
380
+
381
+ ## Overview
382
+ What the API does
383
+
384
+ ## Parameters
385
+ | Name | Type | Required | Description |
386
+ |------|------|----------|-------------|
387
+
388
+ ## Response
389
+ Expected response format
390
+
391
+ ## Examples
392
+ Request/response examples
393
+
394
+ ## Error Handling
395
+ Possible errors and meanings
396
+ </code></pre>
397
+ <h2>File Organization</h2>
398
+ <h3>Directory Structure</h3>
399
+ <pre><code>doc-builder/
400
+ ├── README.md # Project overview
401
+ ├── CHANGELOG.md # Version history
402
+ ├── CLAUDE.md # AI assistant guide
403
+ ├── DOCUMENT-STANDARDS.md # This file
404
+ ├── docs/ # Additional documentation
405
+ │ ├── guides/ # How-to guides
406
+ │ ├── api/ # API documentation
407
+ │ ├── architecture/ # System design docs
408
+ │ └── troubleshooting/ # Problem-solving guides
409
+ </code></pre>
410
+ <h3>File Management</h3>
411
+ <ul>
412
+ <li>Keep active documentation in appropriate directories</li>
413
+ <li>Archive outdated docs with date suffix: <code>old-guide-2025-01-15.md</code></li>
414
+ <li>Remove unused files after archiving</li>
415
+ <li>Maintain README.md in each directory explaining contents</li>
416
+ </ul>
417
+ <h2>Special Considerations</h2>
418
+ <h3>Security</h3>
419
+ <ul>
420
+ <li>Never include credentials or API keys</li>
421
+ <li>Use placeholders for sensitive data: <code>API_KEY=&lt;your-api-key-here&gt;</code></li>
422
+ <li>Document security implications</li>
423
+ <li>Include security warnings where relevant</li>
424
+ </ul>
425
+ <h3>Performance</h3>
426
+ <ul>
427
+ <li>Document performance characteristics</li>
428
+ <li>Include benchmarks where applicable</li>
429
+ <li>Note resource requirements</li>
430
+ <li>Provide optimization tips</li>
431
+ </ul>
432
+ <h3>Accessibility</h3>
433
+ <ul>
434
+ <li>Use clear, simple language</li>
435
+ <li>Provide alt text for images</li>
436
+ <li>Structure documents logically</li>
437
+ <li>Consider screen reader users</li>
438
+ </ul>
439
+ <h2>Document Maintenance</h2>
440
+ <h3>Review Schedule</h3>
441
+ <ul>
442
+ <li>Technical docs: Review with each minor version</li>
443
+ <li>API docs: Review with any API change</li>
444
+ <li>Guides: Review quarterly</li>
445
+ <li>README: Update with significant changes</li>
446
+ </ul>
447
+ <h3>Update Process</h3>
448
+ <ol>
449
+ <li>Check document metadata</li>
450
+ <li>Verify technical accuracy</li>
451
+ <li>Update examples</li>
452
+ <li>Test code snippets</li>
453
+ <li>Update changelog</li>
454
+ <li>Commit with descriptive message</li>
455
+ </ol>
456
+ <h3>Document History</h3>
457
+ <p>Include at the bottom of long-lived documents:</p>
458
+ <pre><code class="language-markdown">## Document History
459
+
460
+ | Date | Version | Author | Changes |
461
+ |------|---------|--------|---------|
462
+ | 2025-07-21 | 1.0 | System | Initial creation |
463
+ | 2025-07-22 | 1.1 | Dev | Added examples |
464
+ </code></pre>
465
+ <h2>Tools and Automation</h2>
466
+ <h3>Building Documentation</h3>
467
+ <p>The doc-builder automatically:</p>
468
+ <ul>
469
+ <li>Generates navigation from folder structure</li>
470
+ <li>Extracts summaries for tooltips</li>
471
+ <li>Renders mermaid diagrams</li>
472
+ <li>Applies syntax highlighting</li>
473
+ <li>Creates responsive layouts</li>
474
+ </ul>
475
+ <h3>Preview Changes</h3>
476
+ <pre><code class="language-bash"># Preview documentation locally
477
+ npx doc-builder dev
478
+
479
+ # Build and check output
480
+ npx doc-builder build
481
+ open html/index.html
482
+ </code></pre>
483
+ <h2>Conclusion</h2>
484
+ <p>Following these standards ensures:</p>
485
+ <ul>
486
+ <li>Consistent, professional documentation</li>
487
+ <li>Easy navigation and discovery</li>
488
+ <li>Clear communication of technical concepts</li>
489
+ <li>Maintainable documentation over time</li>
490
+ </ul>
491
+ <p>Remember: Good documentation is as important as good code. It enables others (including your future self) to understand, use, and maintain the project effectively.</p>
492
+ <hr>
493
+ <h2>Document History</h2>
494
+ <table>
495
+ <thead>
496
+ <tr>
497
+ <th>Date</th>
498
+ <th>Version</th>
499
+ <th>Author</th>
500
+ <th>Changes</th>
501
+ </tr>
502
+ </thead>
503
+ <tbody><tr>
504
+ <td>2025-07-21</td>
505
+ <td>1.0</td>
506
+ <td>System</td>
507
+ <td>Initial creation from project standards</td>
508
+ </tr>
509
+ </tbody></table>
510
+
511
+ </div>
512
+ </main>
513
+ </div>
514
+
515
+ <!-- Scripts -->
516
+ <script src="/js/main.js"></script>
517
+
518
+ </body>
519
+ </html>