@knowcode/doc-builder 1.5.21 → 1.5.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.
- package/.claude/settings.local.json +2 -1
- package/CLAUDE.md +7 -301
- package/CONTRIBUTING.md +148 -0
- package/GITHUB_SETUP.md +203 -0
- package/LICENSE +21 -0
- package/README.md +8 -9
- package/Screenshot 2025-07-22 at 19.51.21.png +0 -0
- package/assets/css/notion-style.css +3 -3
- package/doc-builder.config.js +1 -1
- package/html/README.html +37 -41
- package/html/css/notion-style.css +3 -3
- package/html/documentation-index.html +17 -9
- package/html/guides/authentication-guide.html +19 -11
- package/html/guides/claude-workflow-guide.html +17 -9
- package/html/guides/documentation-standards.html +17 -9
- package/html/guides/google-site-verification-guide.html +13 -4
- package/html/guides/phosphor-icons-guide.html +17 -9
- package/html/guides/seo-guide.html +17 -9
- package/html/guides/seo-optimization-guide.html +13 -5
- package/html/guides/troubleshooting-guide.html +17 -9
- package/html/guides/windows-setup-guide.html +17 -9
- package/html/index.html +37 -41
- package/html/launch/README.html +277 -0
- package/html/launch/bubble-plugin-specification.html +913 -0
- package/html/launch/go-to-market-strategy.html +643 -0
- package/html/launch/launch-announcements.html +573 -0
- package/html/sitemap.xml +41 -17
- package/html/vercel-cli-setup-guide.html +17 -9
- package/html/vercel-first-time-setup-guide.html +57 -34
- package/package.json +9 -1
package/CLAUDE.md
CHANGED
|
@@ -8,6 +8,7 @@ This file provides comprehensive guidance for Claude Code when working with the
|
|
|
8
8
|
**Version**: 1.4.3
|
|
9
9
|
**Purpose**: Transform markdown documentation into beautiful, searchable static HTML sites with a Notion-inspired design
|
|
10
10
|
**NPM Package**: Published at https://www.npmjs.com/package/@knowcode/doc-builder
|
|
11
|
+
**GitHub Repository**: https://github.com/wapdat/doc-builder
|
|
11
12
|
|
|
12
13
|
### Key Features
|
|
13
14
|
- 📝 **Markdown to HTML conversion** with syntax highlighting and mermaid diagram support
|
|
@@ -19,305 +20,10 @@ This file provides comprehensive guidance for Claude Code when working with the
|
|
|
19
20
|
- 📱 **Fully responsive** design
|
|
20
21
|
- 🔧 **Zero configuration** - works with sensible defaults
|
|
21
22
|
|
|
22
|
-
##
|
|
23
|
+
## Documentation Guidelines
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
│ └── js/
|
|
30
|
-
│ ├── main.js # Client-side functionality
|
|
31
|
-
│ └── auth.js # Authentication logic
|
|
32
|
-
├── lib/ # Core library files
|
|
33
|
-
│ ├── builder.js # Main build orchestrator
|
|
34
|
-
│ ├── core-builder.js # Core build logic & HTML generation
|
|
35
|
-
│ ├── config.js # Configuration management
|
|
36
|
-
│ ├── deploy.js # Vercel deployment logic
|
|
37
|
-
│ └── dev-server.js # Development server
|
|
38
|
-
├── scripts/ # NPM scripts
|
|
39
|
-
│ ├── npx-runner.js # NPX entry point
|
|
40
|
-
│ └── setup.js # Post-install setup
|
|
41
|
-
├── templates/ # HTML templates
|
|
42
|
-
├── cli.js # CLI entry point
|
|
43
|
-
├── index.js # Programmatic API entry point
|
|
44
|
-
├── package.json # NPM configuration
|
|
45
|
-
├── CHANGELOG.md # Version history
|
|
46
|
-
└── README.md # User documentation
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Technical Architecture
|
|
50
|
-
|
|
51
|
-
### Core Components
|
|
52
|
-
|
|
53
|
-
1. **CLI Interface** (`cli.js`)
|
|
54
|
-
- Commander.js based CLI with commands: build, dev, deploy, init
|
|
55
|
-
- Extensive help documentation built-in
|
|
56
|
-
- Interactive prompts for Vercel deployment
|
|
57
|
-
|
|
58
|
-
2. **Build System** (`lib/core-builder.js`)
|
|
59
|
-
- Scans for markdown files recursively
|
|
60
|
-
- Extracts titles and summaries for navigation tooltips
|
|
61
|
-
- Generates HTML with embedded navigation
|
|
62
|
-
- Copies static assets
|
|
63
|
-
- Auto-generates README.md if missing
|
|
64
|
-
|
|
65
|
-
3. **Navigation System**
|
|
66
|
-
- Automatically builds hierarchical navigation from folder structure
|
|
67
|
-
- Collapsible folder sections
|
|
68
|
-
- Active page highlighting
|
|
69
|
-
- Tooltips showing document summaries
|
|
70
|
-
- Search/filter functionality
|
|
71
|
-
|
|
72
|
-
4. **Deployment System** (`lib/deploy.js`)
|
|
73
|
-
- Integrated Vercel deployment
|
|
74
|
-
- Automatic project setup for first-time users
|
|
75
|
-
- Production and preview deployments
|
|
76
|
-
- vercel.json generation for proper routing
|
|
77
|
-
|
|
78
|
-
### Key Functions
|
|
79
|
-
|
|
80
|
-
#### core-builder.js
|
|
81
|
-
- `buildDocumentation(config)` - Main build orchestrator
|
|
82
|
-
- `processMarkdownFile(file, output, allFiles, config)` - Process individual markdown files
|
|
83
|
-
- `extractSummary(content)` - Extract document summary for tooltips
|
|
84
|
-
- `buildNavigationStructure(files, currentFile)` - Build navigation tree
|
|
85
|
-
- `generateHTML(title, content, navigation, currentPath, config)` - Generate final HTML
|
|
86
|
-
|
|
87
|
-
#### deploy.js
|
|
88
|
-
- `deployToVercel(config, isProduction)` - Deploy to Vercel
|
|
89
|
-
- `setupVercelProject(config)` - First-time Vercel setup
|
|
90
|
-
- `prepareDeployment(config)` - Prepare files for deployment
|
|
91
|
-
|
|
92
|
-
## Configuration
|
|
93
|
-
|
|
94
|
-
### Default Configuration (doc-builder.config.js)
|
|
95
|
-
```javascript
|
|
96
|
-
module.exports = {
|
|
97
|
-
siteName: 'Documentation',
|
|
98
|
-
siteDescription: 'Documentation site',
|
|
99
|
-
docsDir: 'docs', // Input directory
|
|
100
|
-
outputDir: 'html', // Output directory
|
|
101
|
-
features: {
|
|
102
|
-
authentication: false, // Enable password protection
|
|
103
|
-
changelog: true, // Auto-generate changelog
|
|
104
|
-
mermaid: true, // Mermaid diagram support
|
|
105
|
-
darkMode: true // Dark mode toggle
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Presets
|
|
111
|
-
The tool supports presets for common configurations. Currently available:
|
|
112
|
-
- `notion-inspired` - Default Notion-like styling
|
|
113
|
-
|
|
114
|
-
## Common Commands
|
|
115
|
-
|
|
116
|
-
### Development
|
|
117
|
-
```bash
|
|
118
|
-
# Install dependencies
|
|
119
|
-
npm install
|
|
120
|
-
|
|
121
|
-
# Run locally (development)
|
|
122
|
-
node cli.js dev
|
|
123
|
-
|
|
124
|
-
# Build documentation
|
|
125
|
-
node cli.js build
|
|
126
|
-
|
|
127
|
-
# Deploy to Vercel
|
|
128
|
-
node cli.js deploy
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### Testing
|
|
132
|
-
```bash
|
|
133
|
-
# Pack for local testing
|
|
134
|
-
npm pack
|
|
135
|
-
|
|
136
|
-
# Test in another project
|
|
137
|
-
npm install /path/to/doc-builder/knowcode-doc-builder-1.4.3.tgz
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Publishing
|
|
141
|
-
```bash
|
|
142
|
-
# Update version in package.json
|
|
143
|
-
npm version patch # or minor/major
|
|
144
|
-
|
|
145
|
-
# Publish to npm
|
|
146
|
-
npm publish
|
|
147
|
-
|
|
148
|
-
# Tag release
|
|
149
|
-
git tag v1.4.3
|
|
150
|
-
git push origin v1.4.3
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## Recent Changes & Known Issues
|
|
154
|
-
|
|
155
|
-
### Version 1.4.3 (2025-07-20)
|
|
156
|
-
- Fixed tooltip functionality by restoring extractSummary function
|
|
157
|
-
- Removed unwanted Home link from sidebar
|
|
158
|
-
- Fixed excessive left padding issue caused by JavaScript margin-left assignments
|
|
159
|
-
|
|
160
|
-
### Version 1.4.2 (2025-01-20)
|
|
161
|
-
- Fixed content layout to use flexbox properly
|
|
162
|
-
- Removed dynamic margin-left JavaScript that was overriding CSS
|
|
163
|
-
|
|
164
|
-
### Known Issues
|
|
165
|
-
- NPX caching can cause older versions to run - use `npm install` instead
|
|
166
|
-
- Global npm packages can interfere - check with `which doc-builder`
|
|
167
|
-
|
|
168
|
-
## Development Guidelines
|
|
169
|
-
|
|
170
|
-
### Code Style
|
|
171
|
-
- Use ES6+ features where appropriate
|
|
172
|
-
- Maintain consistent error handling with try/catch blocks
|
|
173
|
-
- Use chalk for colored console output
|
|
174
|
-
- Use ora for loading spinners
|
|
175
|
-
- Clear, descriptive variable and function names
|
|
176
|
-
|
|
177
|
-
### Testing Changes
|
|
178
|
-
1. Build the package: `npm pack`
|
|
179
|
-
2. Test in a real project before publishing
|
|
180
|
-
3. Verify all commands work: build, dev, deploy
|
|
181
|
-
4. Check generated HTML renders correctly
|
|
182
|
-
5. Test Vercel deployment
|
|
183
|
-
|
|
184
|
-
### Git Workflow
|
|
185
|
-
1. Create feature branch from main
|
|
186
|
-
2. Make changes with clear commits
|
|
187
|
-
3. Update CHANGELOG.md
|
|
188
|
-
4. Update version in package.json
|
|
189
|
-
5. Create PR with description of changes
|
|
190
|
-
6. After merge, publish to npm
|
|
191
|
-
|
|
192
|
-
### Publishing Checklist
|
|
193
|
-
- [ ] Update version in package.json
|
|
194
|
-
- [ ] Update CHANGELOG.md with changes
|
|
195
|
-
- [ ] Run `npm pack` and test locally
|
|
196
|
-
- [ ] Commit changes with version bump
|
|
197
|
-
- [ ] Run `npm publish`
|
|
198
|
-
- [ ] Create git tag for version
|
|
199
|
-
- [ ] Push tag to GitHub
|
|
200
|
-
|
|
201
|
-
## Debugging Tips
|
|
202
|
-
|
|
203
|
-
### Common Issues
|
|
204
|
-
|
|
205
|
-
1. **Build not finding files**
|
|
206
|
-
- Check docsDir configuration
|
|
207
|
-
- Ensure markdown files have .md extension
|
|
208
|
-
- Check for hidden directories (start with .)
|
|
209
|
-
|
|
210
|
-
2. **Vercel deployment fails**
|
|
211
|
-
- Ensure Vercel CLI is installed globally
|
|
212
|
-
- Check authentication with `vercel whoami`
|
|
213
|
-
- Verify Root Directory is empty in Vercel settings
|
|
214
|
-
|
|
215
|
-
3. **Styles not loading**
|
|
216
|
-
- Check asset paths in generated HTML
|
|
217
|
-
- Verify assets are copied to output directory
|
|
218
|
-
- Check browser console for 404 errors
|
|
219
|
-
|
|
220
|
-
4. **Navigation not showing files**
|
|
221
|
-
- Check file paths don't contain special characters
|
|
222
|
-
- Verify markdown files are valid
|
|
223
|
-
- Check console for JavaScript errors
|
|
224
|
-
|
|
225
|
-
### Debug Mode
|
|
226
|
-
Set environment variables for more verbose output:
|
|
227
|
-
```bash
|
|
228
|
-
DEBUG=doc-builder* node cli.js build
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## Integration with Other Projects
|
|
232
|
-
|
|
233
|
-
### As NPM Dependency
|
|
234
|
-
```json
|
|
235
|
-
{
|
|
236
|
-
"devDependencies": {
|
|
237
|
-
"@knowcode/doc-builder": "^1.4.3"
|
|
238
|
-
},
|
|
239
|
-
"scripts": {
|
|
240
|
-
"build:docs": "doc-builder build",
|
|
241
|
-
"dev:docs": "doc-builder dev",
|
|
242
|
-
"deploy:docs": "doc-builder deploy"
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
### Programmatic Usage
|
|
248
|
-
```javascript
|
|
249
|
-
const { build } = require('@knowcode/doc-builder');
|
|
250
|
-
|
|
251
|
-
const config = {
|
|
252
|
-
siteName: 'My Docs',
|
|
253
|
-
docsDir: './documentation',
|
|
254
|
-
outputDir: './dist'
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
build(config).then(() => {
|
|
258
|
-
console.log('Build complete!');
|
|
259
|
-
});
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
## Architecture Decisions
|
|
263
|
-
|
|
264
|
-
### Why Flexbox for Layout?
|
|
265
|
-
- Avoids JavaScript-based resizing issues
|
|
266
|
-
- Better responsive behavior
|
|
267
|
-
- Simpler to maintain
|
|
268
|
-
- Native browser support
|
|
269
|
-
|
|
270
|
-
### Why Extract Git History?
|
|
271
|
-
- This project was extracted from a monorepo using `git filter-branch`
|
|
272
|
-
- Preserves commit history for better understanding of evolution
|
|
273
|
-
- Allows independent versioning and releases
|
|
274
|
-
|
|
275
|
-
### Why Notion-Inspired Design?
|
|
276
|
-
- Clean, modern interface
|
|
277
|
-
- Familiar to many users
|
|
278
|
-
- Good information hierarchy
|
|
279
|
-
- Excellent readability
|
|
280
|
-
|
|
281
|
-
## Future Enhancements
|
|
282
|
-
|
|
283
|
-
### Planned Features
|
|
284
|
-
- [ ] Full-text search functionality
|
|
285
|
-
- [ ] PDF export capability
|
|
286
|
-
- [ ] Multiple theme support
|
|
287
|
-
- [ ] Plugin system for extensions
|
|
288
|
-
- [ ] Improved mermaid diagram styling
|
|
289
|
-
- [ ] Better mobile navigation UX
|
|
290
|
-
|
|
291
|
-
### Technical Debt
|
|
292
|
-
- [ ] Add comprehensive test suite
|
|
293
|
-
- [ ] Refactor CSS to use CSS modules or styled-components
|
|
294
|
-
- [ ] Improve build performance for large documentation sets
|
|
295
|
-
- [ ] Add progress indicators for long builds
|
|
296
|
-
|
|
297
|
-
## Support & Contributing
|
|
298
|
-
|
|
299
|
-
### Getting Help
|
|
300
|
-
- File issues at: https://github.com/your-username/doc-builder/issues
|
|
301
|
-
- Check existing issues before creating new ones
|
|
302
|
-
- Include version number and error messages
|
|
303
|
-
|
|
304
|
-
### Contributing
|
|
305
|
-
1. Fork the repository
|
|
306
|
-
2. Create feature branch
|
|
307
|
-
3. Add tests if applicable
|
|
308
|
-
4. Update documentation
|
|
309
|
-
5. Submit pull request
|
|
310
|
-
|
|
311
|
-
## License
|
|
312
|
-
|
|
313
|
-
MIT License - See LICENSE file for details
|
|
314
|
-
|
|
315
|
-
### NPM Features Documentation
|
|
316
|
-
- When we add new features - add it to the NPM documented bullet point features - if its a big feature give it a section
|
|
317
|
-
|
|
318
|
-
## Publishing Memories
|
|
319
|
-
- Note how to publish the npm and that there is a @publish.sh script to help
|
|
320
|
-
|
|
321
|
-
---
|
|
322
|
-
|
|
323
|
-
**Note**: This project was extracted from the cybersolstice monorepo on 2025-07-21 with full git history preservation.
|
|
25
|
+
- For this project documentation, do not include in each document:
|
|
26
|
+
- Generated timestamp
|
|
27
|
+
- Status field
|
|
28
|
+
- Verification status
|
|
29
|
+
- We do not want these metadata fields in the project documentation
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Contributing to Doc Builder
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to Doc Builder! It's people like you that make Doc Builder such a great tool.
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
By participating in this project, you are expected to uphold our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
8
|
+
|
|
9
|
+
## How Can I Contribute?
|
|
10
|
+
|
|
11
|
+
### Reporting Bugs
|
|
12
|
+
|
|
13
|
+
Before creating bug reports, please check existing issues as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible:
|
|
14
|
+
|
|
15
|
+
* **Use a clear and descriptive title**
|
|
16
|
+
* **Describe the exact steps to reproduce the problem**
|
|
17
|
+
* **Provide specific examples to demonstrate the steps**
|
|
18
|
+
* **Describe the behavior you observed and expected**
|
|
19
|
+
* **Include screenshots if relevant**
|
|
20
|
+
* **Include your environment details** (OS, Node.js version, npm version)
|
|
21
|
+
|
|
22
|
+
### Suggesting Enhancements
|
|
23
|
+
|
|
24
|
+
Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, please include:
|
|
25
|
+
|
|
26
|
+
* **Use a clear and descriptive title**
|
|
27
|
+
* **Provide a detailed description of the suggested enhancement**
|
|
28
|
+
* **Provide specific examples to demonstrate how it would work**
|
|
29
|
+
* **Describe the current behavior and expected behavior**
|
|
30
|
+
* **Explain why this enhancement would be useful**
|
|
31
|
+
|
|
32
|
+
### Your First Code Contribution
|
|
33
|
+
|
|
34
|
+
Unsure where to begin? You can start by looking through these issues:
|
|
35
|
+
|
|
36
|
+
* `good first issue` - issues which should only require a few lines of code
|
|
37
|
+
* `help wanted` - issues which need extra attention
|
|
38
|
+
|
|
39
|
+
### Pull Requests
|
|
40
|
+
|
|
41
|
+
1. Fork the repo and create your branch from `main`
|
|
42
|
+
2. If you've added code that should be tested, add tests
|
|
43
|
+
3. If you've changed APIs, update the documentation
|
|
44
|
+
4. Ensure the test suite passes
|
|
45
|
+
5. Make sure your code follows the existing style
|
|
46
|
+
6. Issue that pull request!
|
|
47
|
+
|
|
48
|
+
## Development Process
|
|
49
|
+
|
|
50
|
+
1. **Setup your environment**
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/YOUR_USERNAME/doc-builder.git
|
|
53
|
+
cd doc-builder
|
|
54
|
+
npm install
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Create a branch**
|
|
58
|
+
```bash
|
|
59
|
+
git checkout -b feature/your-feature-name
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
3. **Make your changes**
|
|
63
|
+
- Write code
|
|
64
|
+
- Add tests if applicable
|
|
65
|
+
- Update documentation
|
|
66
|
+
|
|
67
|
+
4. **Test your changes**
|
|
68
|
+
```bash
|
|
69
|
+
npm test
|
|
70
|
+
npm run build
|
|
71
|
+
npm run dev
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
5. **Commit your changes**
|
|
75
|
+
```bash
|
|
76
|
+
git add .
|
|
77
|
+
git commit -m "feat: add amazing feature"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
We follow [Conventional Commits](https://www.conventionalcommits.org/):
|
|
81
|
+
- `feat:` new feature
|
|
82
|
+
- `fix:` bug fix
|
|
83
|
+
- `docs:` documentation changes
|
|
84
|
+
- `style:` formatting, missing semicolons, etc
|
|
85
|
+
- `refactor:` code change that neither fixes a bug nor adds a feature
|
|
86
|
+
- `test:` adding missing tests
|
|
87
|
+
- `chore:` maintain
|
|
88
|
+
|
|
89
|
+
6. **Push to your fork**
|
|
90
|
+
```bash
|
|
91
|
+
git push origin feature/your-feature-name
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
7. **Open a Pull Request**
|
|
95
|
+
|
|
96
|
+
## Style Guide
|
|
97
|
+
|
|
98
|
+
### JavaScript Style Guide
|
|
99
|
+
|
|
100
|
+
* Use ES6+ features where appropriate
|
|
101
|
+
* 2 spaces for indentation
|
|
102
|
+
* Use semicolons
|
|
103
|
+
* Use `const` and `let`, avoid `var`
|
|
104
|
+
* Use meaningful variable names
|
|
105
|
+
* Add comments for complex logic
|
|
106
|
+
|
|
107
|
+
### Documentation Style Guide
|
|
108
|
+
|
|
109
|
+
* Use Markdown for all documentation
|
|
110
|
+
* Include code examples where relevant
|
|
111
|
+
* Keep line length to 80 characters where possible
|
|
112
|
+
* Use present tense ("Add feature" not "Added feature")
|
|
113
|
+
|
|
114
|
+
## Testing
|
|
115
|
+
|
|
116
|
+
* Write tests for new features
|
|
117
|
+
* Ensure all tests pass before submitting PR
|
|
118
|
+
* Aim for high code coverage
|
|
119
|
+
* Test edge cases
|
|
120
|
+
|
|
121
|
+
## Project Structure
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
doc-builder/
|
|
125
|
+
├── assets/ # Static assets
|
|
126
|
+
├── lib/ # Core library code
|
|
127
|
+
├── scripts/ # Build and utility scripts
|
|
128
|
+
├── templates/ # HTML templates
|
|
129
|
+
├── test/ # Test files
|
|
130
|
+
├── docs/ # Documentation
|
|
131
|
+
└── cli.js # CLI entry point
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Release Process
|
|
135
|
+
|
|
136
|
+
Maintainers will handle releases, but for reference:
|
|
137
|
+
|
|
138
|
+
1. Update version in `package.json`
|
|
139
|
+
2. Update `CHANGELOG.md`
|
|
140
|
+
3. Commit changes
|
|
141
|
+
4. Tag release
|
|
142
|
+
5. Push to npm
|
|
143
|
+
|
|
144
|
+
## Questions?
|
|
145
|
+
|
|
146
|
+
Feel free to open an issue with your question or reach out to the maintainers.
|
|
147
|
+
|
|
148
|
+
Thank you for contributing! 🎉
|
package/GITHUB_SETUP.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# GitHub Repository Setup Instructions
|
|
2
|
+
|
|
3
|
+
This guide will walk you through setting up the doc-builder project on GitHub.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- GitHub account
|
|
8
|
+
- Git installed locally
|
|
9
|
+
- Command line access
|
|
10
|
+
|
|
11
|
+
## Step 1: Create GitHub Repository
|
|
12
|
+
|
|
13
|
+
1. Go to https://github.com/new
|
|
14
|
+
2. Repository settings:
|
|
15
|
+
- **Repository name**: `doc-builder`
|
|
16
|
+
- **Description**: `Transform markdown into beautiful documentation sites with one-command Vercel deployment`
|
|
17
|
+
- **Public** repository (for open source)
|
|
18
|
+
- **DO NOT** initialize with README, .gitignore, or license (we already have these)
|
|
19
|
+
|
|
20
|
+
3. Click "Create repository"
|
|
21
|
+
|
|
22
|
+
## Step 2: Update Local Git Configuration
|
|
23
|
+
|
|
24
|
+
First, let's check the current remote:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
git remote -v
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You'll see it points to a local directory. We need to change this to GitHub.
|
|
31
|
+
|
|
32
|
+
## Step 3: Add GitHub as Remote
|
|
33
|
+
|
|
34
|
+
Since your repository is at https://github.com/wapdat/doc-builder:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Remove the existing remote
|
|
38
|
+
git remote remove origin
|
|
39
|
+
|
|
40
|
+
# Add GitHub as the new origin
|
|
41
|
+
git remote add origin https://github.com/wapdat/doc-builder.git
|
|
42
|
+
|
|
43
|
+
# Verify the change
|
|
44
|
+
git remote -v
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Step 4: Push to GitHub
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Push all branches and tags
|
|
51
|
+
git push -u origin main
|
|
52
|
+
git push --tags
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Step 5: Configure Repository Settings
|
|
56
|
+
|
|
57
|
+
On GitHub, go to Settings and configure:
|
|
58
|
+
|
|
59
|
+
### General Settings
|
|
60
|
+
- **Features**: Enable Issues, Projects, and Discussions
|
|
61
|
+
- **Pull Requests**: Allow merge commits, squash merging, and rebase merging
|
|
62
|
+
|
|
63
|
+
### Branch Protection (Settings → Branches)
|
|
64
|
+
For the `main` branch:
|
|
65
|
+
- [ ] Require pull request reviews before merging
|
|
66
|
+
- [ ] Dismiss stale pull request approvals
|
|
67
|
+
- [ ] Require status checks to pass
|
|
68
|
+
- [ ] Include administrators
|
|
69
|
+
|
|
70
|
+
### Pages (optional, for documentation)
|
|
71
|
+
- Source: Deploy from a branch
|
|
72
|
+
- Branch: main
|
|
73
|
+
- Folder: /docs
|
|
74
|
+
|
|
75
|
+
### Topics
|
|
76
|
+
Add these topics to help people discover your project:
|
|
77
|
+
- `documentation`
|
|
78
|
+
- `markdown`
|
|
79
|
+
- `static-site-generator`
|
|
80
|
+
- `vercel`
|
|
81
|
+
- `notion`
|
|
82
|
+
- `developer-tools`
|
|
83
|
+
- `nodejs`
|
|
84
|
+
- `npm-package`
|
|
85
|
+
|
|
86
|
+
## Step 6: Add Badges to README
|
|
87
|
+
|
|
88
|
+
Update your README.md to include GitHub badges:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
[](https://www.npmjs.com/package/@knowcode/doc-builder)
|
|
92
|
+
[](https://opensource.org/licenses/MIT)
|
|
93
|
+
[](https://github.com/wapdat/doc-builder/stargazers)
|
|
94
|
+
[](https://github.com/wapdat/doc-builder/issues)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## Step 7: Create Initial Release
|
|
98
|
+
|
|
99
|
+
1. Go to https://github.com/wapdat/doc-builder/releases
|
|
100
|
+
2. Click "Create a new release"
|
|
101
|
+
3. Tag version: `v1.5.21`
|
|
102
|
+
4. Release title: `v1.5.21 - Stable Release`
|
|
103
|
+
5. Description:
|
|
104
|
+
```markdown
|
|
105
|
+
## Doc Builder v1.5.21
|
|
106
|
+
|
|
107
|
+
First public release of Doc Builder on GitHub!
|
|
108
|
+
|
|
109
|
+
### Features
|
|
110
|
+
- ✨ Notion-inspired design
|
|
111
|
+
- 🚀 One-command Vercel deployment
|
|
112
|
+
- 🔍 Built-in search functionality
|
|
113
|
+
- 🌓 Dark mode support
|
|
114
|
+
- 📊 Mermaid diagram integration
|
|
115
|
+
- 🔐 Password protection option
|
|
116
|
+
|
|
117
|
+
### Installation
|
|
118
|
+
```bash
|
|
119
|
+
npm install -g @knowcode/doc-builder
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Quick Start
|
|
123
|
+
```bash
|
|
124
|
+
npx @knowcode/doc-builder@latest deploy
|
|
125
|
+
```
|
|
126
|
+
```
|
|
127
|
+
6. Click "Publish release"
|
|
128
|
+
|
|
129
|
+
## Step 8: Set Up GitHub Actions (Optional)
|
|
130
|
+
|
|
131
|
+
Create `.github/workflows/npm-publish.yml`:
|
|
132
|
+
|
|
133
|
+
```yaml
|
|
134
|
+
name: Publish to NPM
|
|
135
|
+
|
|
136
|
+
on:
|
|
137
|
+
release:
|
|
138
|
+
types: [created]
|
|
139
|
+
|
|
140
|
+
jobs:
|
|
141
|
+
publish:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
- uses: actions/setup-node@v4
|
|
146
|
+
with:
|
|
147
|
+
node-version: '20'
|
|
148
|
+
registry-url: 'https://registry.npmjs.org'
|
|
149
|
+
- run: npm ci
|
|
150
|
+
- run: npm test
|
|
151
|
+
- run: npm publish
|
|
152
|
+
env:
|
|
153
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
To use this:
|
|
157
|
+
1. Get npm token from https://www.npmjs.com/settings/YOUR_NPM_USERNAME/tokens
|
|
158
|
+
2. Add as secret in GitHub: Settings → Secrets → Actions → New repository secret
|
|
159
|
+
3. Name: `NPM_TOKEN`
|
|
160
|
+
|
|
161
|
+
## Step 9: Update Package.json
|
|
162
|
+
|
|
163
|
+
Add GitHub repository info to package.json:
|
|
164
|
+
|
|
165
|
+
```json
|
|
166
|
+
"repository": {
|
|
167
|
+
"type": "git",
|
|
168
|
+
"url": "git+https://github.com/wapdat/doc-builder.git"
|
|
169
|
+
},
|
|
170
|
+
"bugs": {
|
|
171
|
+
"url": "https://github.com/wapdat/doc-builder/issues"
|
|
172
|
+
},
|
|
173
|
+
"homepage": "https://github.com/wapdat/doc-builder#readme"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Step 10: Announce the Repository
|
|
177
|
+
|
|
178
|
+
Once everything is set up:
|
|
179
|
+
|
|
180
|
+
1. Update the demo site to link to GitHub
|
|
181
|
+
2. Update npm package to include repository link
|
|
182
|
+
3. Share on social media
|
|
183
|
+
4. Submit to awesome lists
|
|
184
|
+
5. Post in relevant communities
|
|
185
|
+
|
|
186
|
+
## Maintenance Tips
|
|
187
|
+
|
|
188
|
+
- Respond to issues promptly
|
|
189
|
+
- Review pull requests within a week
|
|
190
|
+
- Keep dependencies updated
|
|
191
|
+
- Tag releases consistently
|
|
192
|
+
- Maintain a clear roadmap
|
|
193
|
+
- Acknowledge contributors
|
|
194
|
+
|
|
195
|
+
## Next Steps
|
|
196
|
+
|
|
197
|
+
1. [ ] Create a GitHub Project board for roadmap
|
|
198
|
+
2. [ ] Set up GitHub Discussions for community
|
|
199
|
+
3. [ ] Add GitHub Sponsors if desired
|
|
200
|
+
4. [ ] Create GitHub Wiki for extended docs
|
|
201
|
+
5. [ ] Set up automated testing with GitHub Actions
|
|
202
|
+
|
|
203
|
+
The repository is configured for https://github.com/wapdat/doc-builder
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 KnowCode Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|