zengen 0.2.3 → 0.2.5

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 (123) hide show
  1. package/.zen/meta.json +26 -12
  2. package/.zen/src/ar-SA/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +36 -36
  3. package/.zen/src/ar-SA/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  4. package/.zen/src/da-DK/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
  5. package/.zen/src/da-DK/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  6. package/.zen/src/de-DE/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +24 -24
  7. package/.zen/src/de-DE/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  8. package/.zen/src/en-US/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
  9. package/.zen/src/en-US/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  10. package/.zen/src/es-ES/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +34 -34
  11. package/.zen/src/es-ES/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  12. package/.zen/src/es-MX/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
  13. package/.zen/src/es-MX/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  14. package/.zen/src/fi-FI/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
  15. package/.zen/src/fi-FI/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  16. package/.zen/src/fr-FR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +26 -26
  17. package/.zen/src/fr-FR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  18. package/.zen/src/hi-IN/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
  19. package/.zen/src/hi-IN/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  20. package/.zen/src/id-ID/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
  21. package/.zen/src/id-ID/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  22. package/.zen/src/it-IT/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +38 -38
  23. package/.zen/src/it-IT/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  24. package/.zen/src/ja-JP/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
  25. package/.zen/src/ja-JP/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  26. package/.zen/src/ko-KR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +25 -25
  27. package/.zen/src/ko-KR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  28. package/.zen/src/nl-NL/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
  29. package/.zen/src/nl-NL/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  30. package/.zen/src/no-NO/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +32 -32
  31. package/.zen/src/no-NO/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  32. package/.zen/src/pl-PL/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
  33. package/.zen/src/pl-PL/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  34. package/.zen/src/pt-BR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +34 -34
  35. package/.zen/src/pt-BR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  36. package/.zen/src/pt-PT/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +28 -28
  37. package/.zen/src/pt-PT/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  38. package/.zen/src/ru-RU/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +37 -37
  39. package/.zen/src/ru-RU/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  40. package/.zen/src/sv-SE/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
  41. package/.zen/src/sv-SE/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  42. package/.zen/src/th-TH/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
  43. package/.zen/src/th-TH/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  44. package/.zen/src/tr-TR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
  45. package/.zen/src/tr-TR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  46. package/.zen/src/uk-UA/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
  47. package/.zen/src/uk-UA/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  48. package/.zen/src/vi-VN/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +24 -24
  49. package/.zen/src/vi-VN/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
  50. package/.zen/src/zh-Hans/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +14 -11
  51. package/.zen/src/zh-Hans/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +31 -0
  52. package/.zen/src/zh-Hant/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +18 -15
  53. package/.zen/src/zh-Hant/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +31 -0
  54. package/dist/ai/extractMetadataFromMarkdown.js +3 -3
  55. package/dist/ai/extractMetadataFromMarkdown.js.map +1 -1
  56. package/dist/build/pipeline.d.ts.map +1 -1
  57. package/dist/build/pipeline.js +2 -40
  58. package/dist/build/pipeline.js.map +1 -1
  59. package/dist/process/scanSourceFiles.d.ts +5 -0
  60. package/dist/process/scanSourceFiles.d.ts.map +1 -0
  61. package/dist/process/scanSourceFiles.js +64 -0
  62. package/dist/process/scanSourceFiles.js.map +1 -0
  63. package/dist/process/template.d.ts.map +1 -1
  64. package/dist/process/template.js +26 -4
  65. package/dist/process/template.js.map +1 -1
  66. package/dist/types.d.ts +1 -0
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/utils/frontmatter.js +1 -1
  69. package/dist/utils/frontmatter.js.map +1 -1
  70. package/dist/utils/sha256.d.ts +2 -0
  71. package/dist/utils/sha256.d.ts.map +1 -0
  72. package/dist/utils/sha256.js +7 -0
  73. package/dist/utils/sha256.js.map +1 -0
  74. package/docs/tricks.md +15 -0
  75. package/package.json +1 -1
  76. package/src/ai/extractMetadataFromMarkdown.ts +3 -3
  77. package/src/build/pipeline.ts +1 -45
  78. package/src/process/scanSourceFiles.ts +65 -0
  79. package/src/process/template.ts +32 -4
  80. package/src/types.ts +1 -0
  81. package/src/utils/frontmatter.ts +1 -1
  82. package/src/utils/sha256.ts +4 -0
  83. package/.zen/src/de-DE/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  84. package/.zen/src/de-DE/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  85. package/.zen/src/en-US/01d04f7c17b4a541ead9d759d877b30b403e15b849182a49eb1f62bd29ecd18c.md +0 -120
  86. package/.zen/src/en-US/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  87. package/.zen/src/en-US/1b798c44a4f353e47296ca83d5905e37e6aba3e90bbd9bc3b3d34fc12059a2ca.md +0 -75
  88. package/.zen/src/en-US/1e96be58d76c60056b708eb5bd8b8b81d7b5845d9cfe0b879d85068a5f11df3a.md +0 -189
  89. package/.zen/src/en-US/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  90. package/.zen/src/en-US/5ec990146b35e00de2630559126ee07f7cdcddeb23b0e8cab3d85b4181353e26.md +0 -53
  91. package/.zen/src/en-US/6124ea88edec5bde737b26b21f71ecfeffe4e73151784856edf813ee231a4baa.md +0 -11
  92. package/.zen/src/en-US/80ae9bed74fc6348a7c1fe9f33e86b65f5d919169721f77bcf0e1bc29fbdb4f9.md +0 -61
  93. package/.zen/src/en-US/afbf4998656c97181d0edc711e388ad11e0f08f5c6f329861327202462a3a34a.md +0 -63
  94. package/.zen/src/en-US/f0c2799126931ccd113a0c45b1e623870b0d4f4f400becf6dd877da8f1011517.md +0 -40
  95. package/.zen/src/en-US/fdfca9b960d0eaa8b2b96fe988ead7481d2c0b16f66ebc94fb477139b4178cdc.md +0 -65
  96. package/.zen/src/es-ES/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  97. package/.zen/src/es-ES/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  98. package/.zen/src/fr-FR/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  99. package/.zen/src/fr-FR/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  100. package/.zen/src/ja-JP/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -71
  101. package/.zen/src/ja-JP/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  102. package/.zen/src/ko-KR/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  103. package/.zen/src/pt-PT/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  104. package/.zen/src/pt-PT/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  105. package/.zen/src/ru-RU/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  106. package/.zen/src/ru-RU/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  107. package/.zen/src/zh-Hans/01d04f7c17b4a541ead9d759d877b30b403e15b849182a49eb1f62bd29ecd18c.md +0 -120
  108. package/.zen/src/zh-Hans/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
  109. package/.zen/src/zh-Hans/084ef1f6a0167df8621c673c79211309d4af6c588e7bbe3e043f7c244edd0ac6.md +0 -80
  110. package/.zen/src/zh-Hans/1b798c44a4f353e47296ca83d5905e37e6aba3e90bbd9bc3b3d34fc12059a2ca.md +0 -77
  111. package/.zen/src/zh-Hans/1e96be58d76c60056b708eb5bd8b8b81d7b5845d9cfe0b879d85068a5f11df3a.md +0 -189
  112. package/.zen/src/zh-Hans/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
  113. package/.zen/src/zh-Hans/5ec990146b35e00de2630559126ee07f7cdcddeb23b0e8cab3d85b4181353e26.md +0 -55
  114. package/.zen/src/zh-Hans/6124ea88edec5bde737b26b21f71ecfeffe4e73151784856edf813ee231a4baa.md +0 -11
  115. package/.zen/src/zh-Hans/80ae9bed74fc6348a7c1fe9f33e86b65f5d919169721f77bcf0e1bc29fbdb4f9.md +0 -63
  116. package/.zen/src/zh-Hans/afbf4998656c97181d0edc711e388ad11e0f08f5c6f329861327202462a3a34a.md +0 -63
  117. package/.zen/src/zh-Hans/f0c2799126931ccd113a0c45b1e623870b0d4f4f400becf6dd877da8f1011517.md +0 -40
  118. package/.zen/src/zh-Hans/fdfca9b960d0eaa8b2b96fe988ead7481d2c0b16f66ebc94fb477139b4178cdc.md +0 -65
  119. package/dist/scan/files.d.ts +0 -7
  120. package/dist/scan/files.d.ts.map +0 -1
  121. package/dist/scan/files.js +0 -54
  122. package/dist/scan/files.js.map +0 -1
  123. package/src/scan/files.ts +0 -17
@@ -1,189 +0,0 @@
1
- ---
2
- title: ZEN Documentation Site Best Practices
3
- summary: This document introduces best practices for building documentation sites using ZEN, covering multilingual management, performance optimization, deployment strategies, maintenance recommendations, common issue solutions, and advanced techniques, aiming to help users efficiently develop and maintain documentation.
4
- tags:
5
- - ZEN
6
- - Documentation Site
7
- - Best Practices
8
- - Performance Optimization
9
- - Deployment Strategy
10
- - Multilingual Management
11
- - Maintenance Recommendations
12
- inferred_lang: en-US
13
- ---
14
-
15
- # Best Practices
16
-
17
- This document introduces best practices for building documentation sites using ZEN.
18
-
19
- ## Multilingual Management
20
-
21
- ### Translation Strategy
22
-
23
- 1. **Primary Language First**: Write the complete documentation in your native language first.
24
- 2. **Incremental Translation**: Only translate modified parts after each update.
25
- 3. **Terminology Consistency**: Create a glossary to maintain translation consistency.
26
- 4. **Human Review**: It is recommended to perform human review after AI translation.
27
-
28
- ## Performance Optimization
29
-
30
- ### Build Optimization
31
-
32
- 1. **Incremental Builds**: Use `--watch` mode for development.
33
- 2. **Cache Utilization**: ZEN automatically caches processing results.
34
- 3. **Parallel Processing**: Files are automatically processed in parallel on multi-core CPUs.
35
-
36
- ### Development Workflow
37
-
38
- ```bash
39
- # Watch for changes during development
40
- cd docs
41
- npx zengen build --watch
42
-
43
- # Start development server
44
- npx zengen build --watch --serve
45
-
46
- # Production build
47
- npx zengen build
48
- ```
49
-
50
- ## Deployment Strategy
51
-
52
- ### CI/CD Integration
53
-
54
- #### GitHub Actions Example
55
-
56
- ```yaml
57
- name: Build and Deploy Documentation
58
- on:
59
- push:
60
- branches: [main]
61
- paths:
62
- - 'docs/**'
63
- - '.github/workflows/docs.yml'
64
-
65
- jobs:
66
- build:
67
- runs-on: ubuntu-latest
68
- steps:
69
- - name: Checkout repository
70
- uses: actions/checkout@v4
71
-
72
- - name: Setup Node.js
73
- uses: actions/setup-node@v4
74
- with:
75
- node-version: '20.x'
76
-
77
- - name: Build documentation
78
- run: |
79
- cd docs
80
- npx zengen build --base-url /my-docs
81
-
82
- - name: Deploy to GitHub Pages
83
- uses: peaceiris/actions-gh-pages@v3
84
- with:
85
- github_token: ${{ secrets.GITHUB_TOKEN }}
86
- publish_dir: docs/.zen/dist
87
- ```
88
-
89
- #### Custom Deployment Script
90
-
91
- ```bash
92
- #!/bin/bash
93
- # deploy-docs.sh
94
-
95
- # Switch to the documentation directory
96
- cd docs
97
-
98
- # Build documentation
99
- npx zengen build
100
-
101
- # Sync to server
102
- rsync -avz .zen/dist/ user@server:/var/www/docs/
103
-
104
- # Clean cache
105
- rm -rf .zen/cache
106
- ```
107
-
108
- ### Cloud Deployment Options
109
-
110
- - **GitHub Pages**: Free hosting for documentation.
111
- - **Vercel**: Automatic deployment for static sites.
112
- - **Netlify**: Supports form handling and redirects.
113
- - **AWS S3 + CloudFront**: Enterprise-grade static hosting.
114
-
115
- ## Maintenance Recommendations
116
-
117
- ### Regular Updates
118
-
119
- 1. **Content Review**: Check documentation accuracy monthly.
120
- 2. **Link Checking**: Regularly check for broken links.
121
- 3. **Performance Monitoring**: Monitor page load speed.
122
- 4. **User Feedback**: Collect user feedback to improve documentation.
123
-
124
- ### Version Control
125
-
126
- 1. **Documentation Versioning**: Synchronize with software versions.
127
- 2. **Changelog**: Record documentation update history.
128
- 3. **Rollback Mechanism**: Support quick rollback to previous versions.
129
-
130
- ## Common Issues
131
-
132
- ### Slow Build Speed
133
-
134
- **Solutions:**
135
-
136
- - Reduce unnecessary images and resources.
137
- - Use `--watch` mode for incremental development.
138
- - Split large documents into multiple smaller files.
139
- - Disable unnecessary processors.
140
-
141
- ### Poor Translation Quality
142
-
143
- **Solutions:**
144
-
145
- - Provide context to the AI translator.
146
- - Create a glossary to improve consistency.
147
- - Perform human review for critical content.
148
- - Adjust translation prompts.
149
-
150
- ### Complex Navigation Structure
151
-
152
- **Solutions:**
153
-
154
- - Maintain a flat directory structure.
155
- - Use clear heading hierarchies.
156
- - Provide search functionality.
157
- - Use sidebar navigation appropriately.
158
-
159
- ### High Memory Usage
160
-
161
- **Solutions:**
162
-
163
- - Reduce the number of files processed simultaneously.
164
- - Disable caching (not recommended).
165
- - Increase system memory.
166
- - Process large documents in batches.
167
-
168
- ## Advanced Techniques
169
-
170
- ### Custom Template Techniques
171
-
172
- 1. **Responsive Design**: Ensure the template displays correctly on mobile devices.
173
- 2. **Theme Switching**: Implement dark/light themes.
174
- 3. **Code Highlighting**: Integrate highlight.js or other highlighting libraries.
175
- 4. **Search Functionality**: Add client-side search.
176
-
177
- ### Integrating Other Tools
178
-
179
- 1. **Image Optimization**: Use sharp or imagemin to optimize images.
180
- 2. **SEO Optimization**: Add meta tags and structured data.
181
- 3. **Analytics Integration**: Integrate Google Analytics or Plausible.
182
- 4. **CDN Acceleration**: Use a CDN to accelerate static resources.
183
-
184
- ### Monitoring and Logging
185
-
186
- 1. **Build Logs**: Use `--verbose` to view detailed logs.
187
- 2. **Error Monitoring**: Set up error monitoring and alerts.
188
- 3. **Performance Monitoring**: Monitor build time and resource usage.
189
- 4. **User Analytics**: Analyze documentation usage.
@@ -1,81 +0,0 @@
1
- ---
2
- title: ZEN - Markdown Documentation Site Builder
3
- summary: ZEN is a clean Markdown static site generator that emphasizes content-first and minimalism. It leverages AI for intelligent navigation and multilingual translation, helping users focus on writing without complex configurations.
4
- tags:
5
- - Markdown
6
- - Static Site Generator
7
- - AI Translation
8
- - Multilingual
9
- - Minimalism
10
- - Documentation Tool
11
- - ZEN
12
- inferred_lang: en-US
13
- ---
14
-
15
- # ZEN - A Clean Markdown Documentation Site Builder
16
-
17
- [简体中文](https://zccz14.github.io/ZEN/zh-Hans) |
18
- [English](https://zccz14.github.io/ZEN/en-US) |
19
- [Español](https://zccz14.github.io/ZEN/es-ES) |
20
- [Português](https://zccz14.github.io/ZEN/pt-PT) |
21
- [Русский](https://zccz14.github.io/ZEN/ru-RU) |
22
- [Français](https://zccz14.github.io/ZEN/fr-FR) |
23
- [日本語](https://zccz14.github.io/ZEN/ja-JP) |
24
- [한국어](https://zccz14.github.io/ZEN/ko-KR) |
25
- [Deutsch](https://zccz14.github.io/ZEN/de-DE) |
26
-
27
- Why create another Markdown static site generator? I've rethought how documentation tools can better serve writers in the AI era:
28
-
29
- - **Return to Content**: Minimize distractions, focus on writing
30
-
31
- Let documentation return to its essence, let writing return to tranquility.
32
-
33
- First, I don't want to be a librarian. Sometimes I want to jot down some content, but I might not have thought of its title yet, or haven't formed a specific organization. I hope LLMs will automatically help me generate titles, create summaries, categorize, navigate, and handle other organizational tasks.
34
-
35
- Second, my study must be kept clean. I don't want complex build tools, fiddling with intricate documentation configurations, or complicated structures. Every time I see the configuration files and project structures of tools like Docusaurus, VuePress, or Astro, I get a headache. Now, ZEN chooses to hide all configurations in the `.zen` directory, sweeping them into a corner. Users only need to focus on writing content; everything else is handled by ZEN. All other directories are your writing space; you can organize your Markdown files however you like.
36
-
37
- - **Return to Native Language**: Write in your native language, smoothly build multilingual versions
38
-
39
- Life is short; I'm too lazy to translate. People can best express the depth of their thinking when using their native language. But staying connected with the world is also necessary; I don't want to give up multilingual communication. So, I want a tool that lets me write in my native language while allowing more people to see my content. Current i18n solutions not only require you to translate yourself but also maintain content updates, which is too troublesome. I choose to use LLMs to help with translation, saving me a lot of time and enabling one-click multilingual translation.
40
-
41
- ## Core Features
42
-
43
- 1. **Static Site Generation**
44
- - Build any folder containing Markdown files into a static HTML site.
45
-
46
- 2. **Intelligent Navigation**
47
- - Generate site maps and navigation. You don't need to maintain the original directory structure of the Markdown source files; you can move source files around freely.
48
-
49
- 3. **Incremental i18n Translation**
50
- - Use LLMs for incremental i18n translation, allowing users to write Markdown in their native language while the site can be multilingual.
51
-
52
- ## Design Philosophy
53
-
54
- - **Minimalism**: Minimal configuration, maximum flexibility.
55
- - **Content-First**: Focus on writing, not tool configuration.
56
- - **AI-Powered**: Leverage AI for translation and content organization.
57
- - **Cross-Language**: Support multilingual content creation and display.
58
-
59
- ## Quick Start
60
-
61
- ### Recommended Usage
62
-
63
- **It is recommended that users switch to the directory containing Markdown files and directly use the following command to start building:**
64
-
65
- ```bash
66
- # Set environment variables (modify according to your actual situation)
67
- export OPENAI_API_KEY="sk-xxxxxx" # Required: Please replace with your OpenAI API Key
68
- export OPENAI_BASE_URL="https://api.openai.com/v1" # Optional, defaults to the official OpenAI API
69
- export OPENAI_MODEL="gpt-3.5-turbo" # Optional, defaults to the gpt-3.5-turbo model
70
-
71
- # Build the site, supporting multilingual translation
72
- npx zengen@latest build --lang zh-Hans --lang en-US --verbose
73
- ```
74
-
75
- **View more parameters or help**:
76
-
77
- ```bash
78
- npx zengen
79
- ```
80
-
81
- **Note**: ZEN enforces using the current directory as the source directory and outputs to the `.zen/dist` directory. It does not support specifying source and output directory parameters.
@@ -1,53 +0,0 @@
1
- ---
2
- title: ZEN Advanced Usage Guide
3
- summary: This document introduces the advanced features of ZEN, including custom HTML templates, configuration options (such as source directory, output directory, template, base URL, and multilingual support), and the plugin system, helping users extend and customize the ZEN tool.
4
- tags:
5
- - ZEN
6
- - Advanced Usage
7
- - Custom Templates
8
- - Configuration Options
9
- - Plugin System
10
- - Documentation Generation
11
- - Multilingual Support
12
- inferred_lang: en-US
13
- ---
14
-
15
- # Advanced Usage
16
-
17
- An in-depth introduction to the advanced features and configuration options of ZEN.
18
-
19
- ## Custom Templates
20
-
21
- ZEN supports custom HTML templates:
22
-
23
- ```bash
24
- zengen build --src ./docs --out ./dist --template ./custom-template.html
25
- ```
26
-
27
- ## Configuration Options
28
-
29
- Can be configured in the `.zenrc` file:
30
-
31
- ```json
32
- {
33
- "srcDir": "./docs",
34
- "outDir": "./dist",
35
- "template": "./template.html",
36
- "baseUrl": "https://example.com",
37
- "i18n": {
38
- "sourceLang": "zh-Hans",
39
- "targetLangs": ["en-US", "ja-JP"]
40
- }
41
- }
42
- ```
43
-
44
- ## Plugin System
45
-
46
- ZEN supports plugin extensions:
47
-
48
- ```typescript
49
- interface MarkdownProcessor {
50
- beforeParse?(content: string, fileInfo: FileInfo): string | Promise<string>;
51
- afterParse?(html: string, fileInfo: FileInfo): string | Promise<string>;
52
- }
53
- ```
@@ -1,11 +0,0 @@
1
- ---
2
- title: Test Document
3
- summary: 这是一个测试文档,内容为空,仅包含标题。
4
- tags:
5
- - 测试
6
- - 文档
7
- - 示例
8
- inferred_lang: en-US
9
- ---
10
-
11
- # Test Document
@@ -1,61 +0,0 @@
1
- ---
2
- title: ZEN Configuration Guide
3
- summary: This document introduces the configuration and usage of the ZEN tool, including basic commands such as building documentation, live preview, and starting a development server, as well as detailed explanations of command-line options like --watch, --serve, and --port.
4
- tags:
5
- - ZEN
6
- - Configuration Guide
7
- - Command Line
8
- - Documentation Build
9
- - Development Server
10
- - Minimalism
11
- inferred_lang: en-US
12
- ---
13
-
14
- # Configuration Guide
15
-
16
- ZEN is designed with a minimalist philosophy, making its configuration very simple.
17
-
18
- ## Command Line Usage
19
-
20
- ### Basic Commands
21
-
22
- ```bash
23
- # Build documentation (recommended usage)
24
- npx zengen build
25
-
26
- # Live preview (watch for file changes)
27
- npx zengen build --watch
28
-
29
- # Start development server (requires --watch)
30
- npx zengen build --watch --serve
31
-
32
- # Custom port
33
- npx zengen build --watch --serve --port 8080
34
-
35
- # Show verbose logs
36
- npx zengen build --verbose
37
-
38
- # Set base URL
39
- npx zengen build --base-url /my-docs
40
-
41
- # View help
42
- npx zengen
43
- ```
44
-
45
- **Important Notes:**
46
-
47
- - ZEN enforces the use of the current directory as the source directory, outputting to the `.zen/dist` directory.
48
- - Specifying source and output directories via command-line arguments is no longer supported.
49
- - When using `--watch` mode, modifying files triggers automatic rebuilds.
50
-
51
- ### Command Line Options
52
-
53
- | Option | Short | Description | Default |
54
- | ------------ | ----- | ------------------------------------------------ | ----------- |
55
- | `--watch` | `-w` | Watch for file changes and rebuild automatically | `false` |
56
- | `--serve` | `-s` | Start development server (requires `--watch`) | `false` |
57
- | `--port` | `-p` | Development server port | `3000` |
58
- | `--host` | | Development server host | `localhost` |
59
- | `--verbose` | `-v` | Show verbose logs | `false` |
60
- | `--base-url` | | Site base URL | None |
61
- | `--help` | `-h` | Show help information | None |
@@ -1,63 +0,0 @@
1
- ---
2
- title: ZEN - Markdown Documentation Site Builder
3
- summary: ZEN is a minimalist Markdown static site generator that emphasizes content-first, hides configuration, and leverages AI to empower users to focus on writing in their native language, while supporting multilingual translation and intelligent navigation.
4
- tags:
5
- - Markdown
6
- - Static Site Generation
7
- - AI Translation
8
- - Multilingual
9
- - Minimalism
10
- - Content-First
11
- - Documentation Tool
12
- inferred_lang: en-US
13
- ---
14
-
15
- # ZEN - A Minimalist Markdown Documentation Site Builder
16
-
17
- [简体中文](https://zccz14.github.io/ZEN/zh-Hans) | [English](https://zccz14.github.io/ZEN/en-US)
18
-
19
- Why create another Markdown static site generator?
20
-
21
- - **Return to Content**: Minimize distractions, let you focus on writing
22
-
23
- Let documentation return to its essence, let writing return to tranquility. I don't want complex build tools with complicated configurations, I dislike fiddling with intricate documentation setups and convoluted structures. Every time I see the configuration files and project structures of tools like Docusaurus, VuePress, or Astro, my head hurts. Now, ZEN chooses to hide all configuration in the `.zen` directory, sweeping it into a corner. Users only need to focus on writing content; ZEN handles the rest. All other directories are your writing space; you can organize your Markdown files however you like. LLMs will automatically help you generate titles, create summaries, categorize, and generate navigation. You really only need to focus on writing.
24
-
25
- - **Return to Native Language**: Write only in your native language, smoothly build multilingual versions
26
-
27
- Life is short, I'm too lazy to translate. People can best express the depth of their thinking when using their native language. But staying connected to the world is also necessary; I don't want to give up multilingual communication. So I wanted a tool that allows me to write in my native language while also letting more people see my content. Current i18n solutions not only require you to translate yourself but also to maintain content updates, which is too troublesome. I choose to use LLMs to handle translation for me, saving me a lot of time and enabling one-click translation into multiple languages.
28
-
29
- ## Core Features
30
-
31
- 1. **Static Site Generation**
32
- - Build any folder containing Markdown files into a static HTML site.
33
-
34
- 2. **Intelligent Navigation**
35
- - Generate site maps and navigation without needing to maintain the original directory structure of the Markdown source files.
36
-
37
- 3. **Incremental i18n Translation**
38
- - Use LLMs for incremental i18n translation, allowing users to write Markdown in their native language while the audience can be multilingual.
39
-
40
- ## Design Philosophy
41
-
42
- - **Minimalism**: Minimal configuration, maximum flexibility.
43
- - **Content-First**: Focus on writing, not tool configuration.
44
- - **AI-Powered**: Leverage AI for translation and content organization.
45
- - **Cross-Language**: Support multilingual content creation and display.
46
-
47
- ## Quick Start
48
-
49
- ### Recommended Usage
50
-
51
- **It is recommended that users switch to the directory containing their Markdown files and directly use the following command to start building:**
52
-
53
- ```bash
54
- npx zengen build
55
- ```
56
-
57
- **To view more parameters or help:**
58
-
59
- ```bash
60
- npx zengen
61
- ```
62
-
63
- **Note**: ZEN enforces using the current directory as the source directory and outputs to the `.zen/dist` directory. It does not support specifying source and output directory parameters.
@@ -1,40 +0,0 @@
1
- ---
2
- title: Quick Start Guide
3
- summary: This document introduces how to quickly get started with the ZEN documentation generator, including installation steps, basic usage, and main features.
4
- tags:
5
- - ZEN Documentation Generator
6
- - Quick Start
7
- - Installation
8
- - Basic Usage
9
- - Features
10
- - Markdown
11
- - Build Command
12
- inferred_lang: en-US
13
- ---
14
-
15
- # Quick Start Guide
16
-
17
- This document introduces how to quickly get started with the ZEN documentation generator.
18
-
19
- ## Installation
20
-
21
- ```bash
22
- npm install -g zengen
23
- ```
24
-
25
- ## Basic Usage
26
-
27
- 1. Create a documentation directory
28
- 2. Write Markdown files
29
- 3. Run the build command
30
-
31
- ```bash
32
- zengen build --src ./docs --out ./dist
33
- ```
34
-
35
- ## Features
36
-
37
- - Minimal configuration
38
- - Built-in responsive templates
39
- - AI-assisted metadata extraction
40
- - Multi-language support
@@ -1,65 +0,0 @@
1
- ---
2
- title: ZEN Documentation Site Example
3
- summary: Introducing ZEN documentation builder, a minimalist Markdown documentation site generator, including features, quick start guide, code examples, and next-step learning resources.
4
- tags:
5
- - ZEN
6
- - Documentation Builder
7
- - Markdown
8
- - Site Generator
9
- - Quick Start
10
- - Code Examples
11
- - Multi-language Support
12
- inferred_lang: en-US
13
- ---
14
-
15
- # ZEN Documentation Site Example
16
-
17
- Welcome to the ZEN documentation builder! This is a minimalist Markdown documentation site generator.
18
-
19
- ## Features
20
-
21
- - **Minimal Configuration**: No complex configuration files required
22
- - **Content-First**: Focus on writing, not tool configuration
23
- - **Smart Navigation**: Automatically generates site maps and navigation
24
- - **Multi-language Support**: Supports incremental i18n translation
25
-
26
- ## Quick Start
27
-
28
- ```bash
29
- # Build documentation using npx (recommended)
30
- npx zengen build
31
-
32
- # Live preview (watches for file changes)
33
- npx zengen build --watch
34
-
35
- # View more parameters or help
36
- npx zengen
37
- ```
38
-
39
- **Note**: ZEN enforces the use of the current directory as the source directory and outputs to the `.zen/dist` directory. Specifying source and output directory parameters is no longer supported.
40
-
41
- ## Code Examples
42
-
43
- ```javascript
44
- // This is a JavaScript example
45
- const zen = require('zengen');
46
-
47
- async function buildDocs() {
48
- await zen.build({
49
- // ZEN now enforces using the current directory as the source directory
50
- // Outputs to the .zen/dist directory
51
- });
52
- }
53
- ```
54
-
55
- ```python
56
- # This is a Python example
57
- def hello_world():
58
- print("Hello from ZEN!")
59
- ```
60
-
61
- ## Next Steps
62
-
63
- 1. Read the [API Documentation](./api.md)
64
- 2. Check the [Configuration Guide](./config.md)
65
- 3. Learn about [Best Practices](./best-practices.md)
@@ -1,73 +0,0 @@
1
- ---
2
- title: ZEN - Herramienta para construir sitios de documentación en Markdown
3
- summary: ZEN es una herramienta minimalista para generar sitios estáticos a partir de Markdown, centrada en la escritura de contenido. Utiliza IA para gestionar traducciones y navegación, soporta construcción multilingüe y no requiere configuración compleja.
4
- tags:
5
- - Markdown
6
- - Generador de sitios estáticos
7
- - Traducción por IA
8
- - Multilingüe
9
- - Minimalismo
10
- - Herramienta de documentación
11
- - ZEN
12
- inferred_lang: es-ES
13
- ---
14
-
15
- # ZEN - Herramienta sencilla para construir sitios de documentación en Markdown
16
-
17
- [简体中文](https://zccz14.github.io/ZEN/zh-Hans) | [English](https://zccz14.github.io/ZEN/en-US) | [Español](https://zccz14.github.io/ZEN/es-ES)
18
-
19
- ¿Por qué crear otro generador de sitios estáticos con Markdown? He reconsiderado cómo las herramientas de documentación pueden servir mejor a los escritores en la era de la IA:
20
-
21
- - **Regreso al contenido**: Minimizar las distracciones, concentrarse en escribir
22
-
23
- Devolver la esencia a la documentación y la tranquilidad a la escritura.
24
-
25
- Primero, no quiero ser un bibliotecario. A veces quiero escribir algo, pero quizás aún no he pensado en su título o no he organizado bien las ideas. Me gustaría que una LLM generara automáticamente títulos, resúmenes, categorías, navegación y otras tareas de organización.
26
-
27
- Segundo, mi estudio debe estar ordenado. No quiero herramientas de construcción con configuraciones complejas, ni lidiar con estructuras complicadas. Cada vez que veo los archivos de configuración y la estructura de proyectos de herramientas como Docusaurus, VuePress o Astro, me duele la cabeza. Ahora, ZEN opta por ocultar toda la configuración en el directorio `.zen`, apartándola a un rincón, para que el usuario solo se centre en escribir el contenido y deje el resto a ZEN. Todos los demás directorios son su espacio de escritura, donde puede organizar sus archivos Markdown como desee.
28
-
29
- - **Regreso a la lengua materna**: Escribir en la lengua materna, construir versiones multilingües sin esfuerzo
30
-
31
- La vida es corta, no tengo ganas de traducir. Uno alcanza su máxima profundidad de pensamiento cuando usa su lengua materna. Pero al mismo tiempo, es necesario mantenerse conectado con el mundo; no quiero renunciar a la comunicación multilingüe. Por eso deseo una herramienta que me permita escribir en mi lengua materna y, a la vez, llegar a más personas con mi contenido. Actualmente, la internacionalización (i18n) requiere que uno mismo traduzca y mantenga las actualizaciones del contenido, lo cual es muy tedioso. He optado por usar una LLM para que me ayude con las traducciones, ahorrándome mucho tiempo y permitiéndome completar traducciones a múltiples idiomas con un solo clic.
32
-
33
- ## Funcionalidades básicas
34
-
35
- 1. **Generación de sitios estáticos**
36
- - Convierte cualquier carpeta que contenga archivos Markdown en un sitio web estático HTML.
37
-
38
- 2. **Navegación inteligente**
39
- - Genera un mapa del sitio y navegación. No es necesario mantener la estructura de directorios original de los archivos fuente Markdown; puedes mover los archivos fuente libremente.
40
-
41
- 3. **Traducción incremental i18n**
42
- - Utiliza LLM para realizar traducciones i18n incrementales, permitiendo a los usuarios escribir Markdown en su lengua materna, pero siendo el resultado multilingüe.
43
-
44
- ## Filosofía de diseño
45
-
46
- - **Minimalismo**: Mínima configuración, máxima flexibilidad.
47
- - **Contenido primero**: Enfocarse en escribir, no en configurar herramientas.
48
- - **Potenciado por IA**: Utiliza la IA para gestionar traducciones y organización del contenido.
49
- - **Multilingüe**: Soporta la creación y visualización de contenido en múltiples idiomas.
50
-
51
- ## Comenzar rápidamente
52
-
53
- ### Forma recomendada de uso
54
-
55
- **Se recomienda que el usuario cambie al directorio que contiene los archivos Markdown y utilice directamente el siguiente comando para comenzar la construcción:**
56
-
57
- ```bash
58
- # Establecer variables de entorno (modificar según su situación real)
59
- export OPENAI_API_KEY="sk-xxxxxx" # Obligatorio: reemplazar con su propia clave de API de OpenAI
60
- export OPENAI_BASE_URL="https://api.openai.com/v1" # Opcional, por defecto usa la API oficial de OpenAI
61
- export OPENAI_MODEL="gpt-3.5-turbo" # Opcional, por defecto usa el modelo gpt-3.5-turbo
62
-
63
- # Construir el sitio, soporta traducción multilingüe
64
- npx zengen@latest build --lang zh-Hans --lang en-US --verbose
65
- ```
66
-
67
- **Ver más parámetros o ayuda**:
68
-
69
- ```bash
70
- npx zengen
71
- ```
72
-
73
- **Nota**: ZEN obliga a usar el directorio actual como directorio fuente y la salida se genera en el directorio `.zen/dist`. No admite parámetros para especificar directorios de origen o de salida.