zengen 0.2.4 → 0.2.6
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/.zen/meta.json +27 -18
- package/.zen/src/ar-SA/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +36 -36
- package/.zen/src/ar-SA/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/da-DK/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
- package/.zen/src/da-DK/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/de-DE/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +24 -24
- package/.zen/src/de-DE/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/en-US/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
- package/.zen/src/en-US/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/es-ES/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +34 -34
- package/.zen/src/es-ES/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/es-MX/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
- package/.zen/src/es-MX/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/fi-FI/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
- package/.zen/src/fi-FI/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/fr-FR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +26 -26
- package/.zen/src/fr-FR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/hi-IN/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
- package/.zen/src/hi-IN/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/id-ID/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
- package/.zen/src/id-ID/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/it-IT/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +38 -38
- package/.zen/src/it-IT/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/ja-JP/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
- package/.zen/src/ja-JP/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/ko-KR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +25 -25
- package/.zen/src/ko-KR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/nl-NL/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
- package/.zen/src/nl-NL/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/no-NO/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +32 -32
- package/.zen/src/no-NO/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/pl-PL/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +27 -27
- package/.zen/src/pl-PL/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/pt-BR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +34 -34
- package/.zen/src/pt-BR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/pt-PT/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +28 -28
- package/.zen/src/pt-PT/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/ru-RU/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +37 -37
- package/.zen/src/ru-RU/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/sv-SE/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +29 -29
- package/.zen/src/sv-SE/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/th-TH/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
- package/.zen/src/th-TH/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/tr-TR/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +31 -31
- package/.zen/src/tr-TR/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/uk-UA/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +30 -30
- package/.zen/src/uk-UA/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/vi-VN/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +24 -24
- package/.zen/src/vi-VN/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +30 -0
- package/.zen/src/zh-Hans/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +14 -11
- package/.zen/src/zh-Hans/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +31 -0
- package/.zen/src/zh-Hant/74541be9d53c64107a548e09847244d52bff803960942cd2bfbd2a8600afb805.md +18 -15
- package/.zen/src/zh-Hant/9d0485c244a80b14dcc92ef91cf5ff82220ed774ebb5e09549929ac75200c7bc.md +31 -0
- package/assets/templates/default/layout.html +8 -5
- package/dist/ai/extractMetadataFromMarkdown.js +3 -3
- package/dist/ai/extractMetadataFromMarkdown.js.map +1 -1
- package/dist/process/scanSourceFiles.d.ts.map +1 -1
- package/dist/process/scanSourceFiles.js +6 -0
- package/dist/process/scanSourceFiles.js.map +1 -1
- package/dist/process/template.js +8 -6
- package/dist/process/template.js.map +1 -1
- package/dist/utils/frontmatter.js +1 -1
- package/dist/utils/frontmatter.js.map +1 -1
- package/docs/tricks.md +15 -0
- package/package.json +1 -1
- package/src/ai/extractMetadataFromMarkdown.ts +3 -3
- package/src/process/scanSourceFiles.ts +8 -0
- package/src/process/template.ts +10 -10
- package/src/utils/frontmatter.ts +1 -1
- package/.github/workflows/version.yml +0 -88
- package/.zen/src/de-DE/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/de-DE/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/en-US/01d04f7c17b4a541ead9d759d877b30b403e15b849182a49eb1f62bd29ecd18c.md +0 -120
- package/.zen/src/en-US/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/en-US/1b798c44a4f353e47296ca83d5905e37e6aba3e90bbd9bc3b3d34fc12059a2ca.md +0 -75
- package/.zen/src/en-US/1e96be58d76c60056b708eb5bd8b8b81d7b5845d9cfe0b879d85068a5f11df3a.md +0 -189
- package/.zen/src/en-US/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/en-US/5ec990146b35e00de2630559126ee07f7cdcddeb23b0e8cab3d85b4181353e26.md +0 -53
- package/.zen/src/en-US/6124ea88edec5bde737b26b21f71ecfeffe4e73151784856edf813ee231a4baa.md +0 -11
- package/.zen/src/en-US/80ae9bed74fc6348a7c1fe9f33e86b65f5d919169721f77bcf0e1bc29fbdb4f9.md +0 -61
- package/.zen/src/en-US/afbf4998656c97181d0edc711e388ad11e0f08f5c6f329861327202462a3a34a.md +0 -63
- package/.zen/src/en-US/f0c2799126931ccd113a0c45b1e623870b0d4f4f400becf6dd877da8f1011517.md +0 -40
- package/.zen/src/en-US/fdfca9b960d0eaa8b2b96fe988ead7481d2c0b16f66ebc94fb477139b4178cdc.md +0 -65
- package/.zen/src/es-ES/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/es-ES/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/fr-FR/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/fr-FR/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/ja-JP/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -71
- package/.zen/src/ja-JP/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/ko-KR/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/pt-PT/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/pt-PT/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/ru-RU/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/ru-RU/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/zh-Hans/01d04f7c17b4a541ead9d759d877b30b403e15b849182a49eb1f62bd29ecd18c.md +0 -120
- package/.zen/src/zh-Hans/04319611d7cde718d0e82da8e034e04b15fb3bb37c3784d8f7313577c5178b06.md +0 -73
- package/.zen/src/zh-Hans/084ef1f6a0167df8621c673c79211309d4af6c588e7bbe3e043f7c244edd0ac6.md +0 -80
- package/.zen/src/zh-Hans/1b798c44a4f353e47296ca83d5905e37e6aba3e90bbd9bc3b3d34fc12059a2ca.md +0 -77
- package/.zen/src/zh-Hans/1e96be58d76c60056b708eb5bd8b8b81d7b5845d9cfe0b879d85068a5f11df3a.md +0 -189
- package/.zen/src/zh-Hans/48eb2ad3e174cd06ed16c959fa58e0381dbc4a4147fa3456b21eea2b3d67c329.md +0 -81
- package/.zen/src/zh-Hans/5ec990146b35e00de2630559126ee07f7cdcddeb23b0e8cab3d85b4181353e26.md +0 -55
- package/.zen/src/zh-Hans/6124ea88edec5bde737b26b21f71ecfeffe4e73151784856edf813ee231a4baa.md +0 -11
- package/.zen/src/zh-Hans/80ae9bed74fc6348a7c1fe9f33e86b65f5d919169721f77bcf0e1bc29fbdb4f9.md +0 -63
- package/.zen/src/zh-Hans/afbf4998656c97181d0edc711e388ad11e0f08f5c6f329861327202462a3a34a.md +0 -63
- package/.zen/src/zh-Hans/f0c2799126931ccd113a0c45b1e623870b0d4f4f400becf6dd877da8f1011517.md +0 -40
- package/.zen/src/zh-Hans/fdfca9b960d0eaa8b2b96fe988ead7481d2c0b16f66ebc94fb477139b4178cdc.md +0 -65
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ZEN - Markdown-Dokumentationsseiten-Generator
|
|
3
|
-
summary: ZEN ist ein minimalistisches, statisches Site-Generierungstool für Markdown, das Inhalte priorisiert und Minimalismus betont. Es nutzt KI für intelligente Navigation und mehrsprachige Übersetzung, um Nutzern zu helfen, sich auf das Schreiben zu konzentrieren, ohne komplexe Konfigurationen.
|
|
4
|
-
tags:
|
|
5
|
-
- Markdown
|
|
6
|
-
- Statische Site-Generierung
|
|
7
|
-
- KI-Übersetzung
|
|
8
|
-
- Mehrsprachig
|
|
9
|
-
- Minimalismus
|
|
10
|
-
- Dokumentationstool
|
|
11
|
-
- ZEN
|
|
12
|
-
inferred_lang: de-DE
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# ZEN - Minimalistisches Markdown-Dokumentationsseiten-Tool
|
|
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
|
-
Warum noch ein statischer Markdown-Site-Generator? Ich habe überlegt, wie Dokumentationstools im KI-Zeitalter Autoren besser dienen können:
|
|
28
|
-
|
|
29
|
-
- **Zurück zu den Inhalten**: Minimale Ablenkung, Fokus auf das Schreiben
|
|
30
|
-
|
|
31
|
-
Lasst die Dokumentation zu ihrem Wesen zurückkehren und das Schreiben zur Ruhe.
|
|
32
|
-
|
|
33
|
-
Erstens: Ich möchte kein Bibliothekar sein. Manchmal möchte ich etwas aufschreiben, aber vielleicht habe ich noch keinen Titel dafür oder es ist noch nicht besonders organisiert. Ich wünsche mir, dass eine LLM automatisch Titel generiert, Zusammenfassungen erstellt, kategorisiert, Navigation erstellt und andere organisatorische Aufgaben übernimmt.
|
|
34
|
-
|
|
35
|
-
Zweitens: Mein Arbeitszimmer muss aufgeräumt sein. Ich möchte keine komplexen Build-Tools konfigurieren, mich nicht mit komplizierten Dokumenteneinstellungen herumschlagen und keine komplexen Strukturen. Jedes Mal, wenn ich die Konfigurationsdateien und Projektstrukturen von Tools wie Docusaurus, VuePress oder Astro sehe, bekomme ich Kopfschmerzen. Jetzt versteckt ZEN alle Konfigurationen im `.zen`-Verzeichnis, schiebt sie in die Ecke. Der Nutzer muss sich nur auf den Inhalt konzentrieren, den Rest erledigt ZEN. Alle anderen Verzeichnisse sind Ihr Schreibbereich, Sie können Ihre Markdown-Dateien beliebig organisieren.
|
|
36
|
-
|
|
37
|
-
- **Zurück zur Muttersprache**: In der Muttersprache schreiben, nahtlos mehrsprachige Versionen erstellen
|
|
38
|
-
|
|
39
|
-
Das Leben ist kurz, ich bin zu faul zum Übersetzen. Man denkt am tiefsten in seiner Muttersprache. Gleichzeitig ist es notwendig, mit der Welt verbunden zu bleiben, ich möchte den mehrsprachigen Austausch nicht aufgeben. Daher wünsche ich mir ein Tool, mit dem ich in meiner Muttersprache schreiben kann, aber gleichzeitig mehr Menschen meine Inhalte zugänglich machen kann. Aktuelle i18n-Lösungen erfordern nicht nur eigene Übersetzungen, sondern auch die Pflege von Inhaltsaktualisierungen – das ist zu umständlich. Ich nutze LLMs für Übersetzungen, das spart mir viel Zeit und mehrsprachige Übersetzungen sind mit einem Klick erledigt.
|
|
40
|
-
|
|
41
|
-
## Grundlegende Funktionen
|
|
42
|
-
|
|
43
|
-
1. **Statische Site-Generierung**
|
|
44
|
-
- Erstellt aus einem beliebigen Ordner mit Markdown-Dateien eine statische HTML-Website.
|
|
45
|
-
|
|
46
|
-
2. **Intelligente Navigation**
|
|
47
|
-
- Generiert eine Sitemap und Navigation. Die ursprüngliche Verzeichnisstruktur der Markdown-Quelldateien muss nicht beibehalten werden, Quelldateien können beliebig verschoben werden.
|
|
48
|
-
|
|
49
|
-
3. **Inkrementelle i18n-Übersetzung**
|
|
50
|
-
- Nutzt LLMs für inkrementelle i18n-Übersetzungen. Nutzer schreiben Markdown in ihrer Muttersprache, können aber mehrsprachige Inhalte bereitstellen.
|
|
51
|
-
|
|
52
|
-
## Designphilosophie
|
|
53
|
-
|
|
54
|
-
- **Minimalismus**: Minimale Konfiguration, maximale Flexibilität.
|
|
55
|
-
- **Inhalte zuerst**: Fokus auf das Schreiben, nicht auf Tool-Konfiguration.
|
|
56
|
-
- **KI-gestützt**: Nutzt KI für Übersetzung und Inhaltsorganisation.
|
|
57
|
-
- **Mehrsprachig**: Unterstützt mehrsprachige Inhaltserstellung und -darstellung.
|
|
58
|
-
|
|
59
|
-
## Schnellstart
|
|
60
|
-
|
|
61
|
-
### Empfohlene Verwendung
|
|
62
|
-
|
|
63
|
-
**Es wird empfohlen, in das Verzeichnis mit den Markdown-Dateien zu wechseln und direkt mit dem folgenden Befehl mit dem Build zu beginnen:**
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
# Umgebungsvariablen setzen (an Ihre Situation anpassen)
|
|
67
|
-
export OPENAI_API_KEY="sk-xxxxxx" # Erforderlich: Bitte durch Ihren OpenAI API Key ersetzen
|
|
68
|
-
export OPENAI_BASE_URL="https://api.openai.com/v1" # Optional, standardmäßig wird die offizielle OpenAI-API verwendet
|
|
69
|
-
export OPENAI_MODEL="gpt-3.5-turbo" # Optional, standardmäßig wird das gpt-3.5-turbo-Modell verwendet
|
|
70
|
-
|
|
71
|
-
# Site bauen, mit mehrsprachiger Übersetzungsunterstützung
|
|
72
|
-
npx zengen@latest build --lang zh-Hans --lang en-US --verbose
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Weitere Parameter oder Hilfe anzeigen**:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
npx zengen
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
**Hinweis**: ZEN erzwingt die Verwendung des aktuellen Verzeichnisses als Quellverzeichnis und gibt die Dateien im Verzeichnis `.zen/dist` aus. Das Angeben von Quell- und Ausgabeverzeichnissen als Parameter wird nicht unterstützt.
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: GitHub Pages Deployment Configuration
|
|
3
|
-
summary: This document describes the GitHub Pages deployment configuration for the ZEN project documentation site, including workflow, trigger conditions, build steps, custom configuration, troubleshooting, and manual trigger methods.
|
|
4
|
-
tags:
|
|
5
|
-
- GitHub Pages
|
|
6
|
-
- Deployment Configuration
|
|
7
|
-
- Workflow
|
|
8
|
-
- Documentation Build
|
|
9
|
-
- Troubleshooting
|
|
10
|
-
- ZEN Project
|
|
11
|
-
inferred_lang: en-US
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# GitHub Pages Deployment Configuration
|
|
15
|
-
|
|
16
|
-
This directory contains the GitHub Pages deployment configuration for the ZEN project documentation site.
|
|
17
|
-
|
|
18
|
-
## Workflow
|
|
19
|
-
|
|
20
|
-
### `pages.yml`
|
|
21
|
-
|
|
22
|
-
This workflow automatically builds the ZEN project documentation site and deploys it to GitHub Pages.
|
|
23
|
-
|
|
24
|
-
**Trigger Conditions:**
|
|
25
|
-
|
|
26
|
-
- Push to the `main` branch (when changes occur in `demo/src/`, `package.json`, or workflow files)
|
|
27
|
-
- Pull Request targeting the `main` branch
|
|
28
|
-
- Manual trigger
|
|
29
|
-
|
|
30
|
-
**Workflow Steps:**
|
|
31
|
-
|
|
32
|
-
1. **Checkout code**: Check out code from the remote branch to ensure code synchronization.
|
|
33
|
-
2. **Set up Node.js**: Configure the Node.js 20.x environment.
|
|
34
|
-
3. **Install dependencies**: Install project dependencies using `npm ci`.
|
|
35
|
-
4. **Build zengen**: Build the local zengen package.
|
|
36
|
-
5. **Install zengen**: Install the locally built zengen as a global tool.
|
|
37
|
-
6. **Test zengen CLI**: Verify the CLI tool functions correctly.
|
|
38
|
-
7. **Build documentation site**: Build the documentation using `cd demo/src && zengen build`, outputting to the `.zen/dist` directory.
|
|
39
|
-
8. **Configure Pages**: Set up GitHub Pages.
|
|
40
|
-
9. **Upload artifact**: Upload the built documentation site as a Pages artifact.
|
|
41
|
-
10. **Deploy to GitHub Pages**: Automatically deploy to GitHub Pages.
|
|
42
|
-
|
|
43
|
-
## Accessing the Documentation Site
|
|
44
|
-
|
|
45
|
-
After successful deployment, the documentation site will be accessible at the following URL:
|
|
46
|
-
|
|
47
|
-
```
|
|
48
|
-
https://[username].github.io/[repository-name]/
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Custom Configuration
|
|
52
|
-
|
|
53
|
-
### Custom Domain
|
|
54
|
-
|
|
55
|
-
If a custom domain is needed, you can add a CNAME file after the build step:
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
# Create CNAME file (if a custom domain is needed)
|
|
59
|
-
echo "docs.example.com" > docs-dist/CNAME
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Build Options
|
|
63
|
-
|
|
64
|
-
Currently used build command:
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
cd demo/src
|
|
68
|
-
zengen build --verbose
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Available options:
|
|
72
|
-
|
|
73
|
-
- `--verbose`: Show verbose output.
|
|
74
|
-
- `--watch`: Watch mode (not suitable for CI/CD).
|
|
75
|
-
- `--template`: Specify a custom template file.
|
|
76
|
-
- `--config`: Specify a configuration file.
|
|
77
|
-
|
|
78
|
-
### Environment Variables
|
|
79
|
-
|
|
80
|
-
The workflow uses the following environment variables:
|
|
81
|
-
|
|
82
|
-
- `GITHUB_TOKEN`: Automatically provided GitHub token.
|
|
83
|
-
- `NODE_VERSION`: Node.js version (defaults to 20.x).
|
|
84
|
-
|
|
85
|
-
## Troubleshooting
|
|
86
|
-
|
|
87
|
-
### Build Failure
|
|
88
|
-
|
|
89
|
-
1. **Check Node.js version**: Ensure a supported Node.js version is used.
|
|
90
|
-
2. **Verify dependency installation**: Ensure `npm ci` executes successfully.
|
|
91
|
-
3. **Check build output**: Review the verbose output of `zengen build`.
|
|
92
|
-
4. **CLI output directory issue**: ZEN now forces output to the `.zen/dist` directory and no longer supports the `--out` parameter.
|
|
93
|
-
|
|
94
|
-
### Deployment Failure
|
|
95
|
-
|
|
96
|
-
1. **Check permissions**: Ensure the workflow has correct write permissions for Pages.
|
|
97
|
-
2. **Verify artifact**: Ensure the `.zen/dist` directory contains valid HTML files.
|
|
98
|
-
3. **Review logs**: Check GitHub Actions logs for detailed error messages.
|
|
99
|
-
|
|
100
|
-
### Documentation Not Updated
|
|
101
|
-
|
|
102
|
-
1. **Check trigger conditions**: Ensure files in the `demo/src/` directory were modified.
|
|
103
|
-
2. **Wait for deployment completion**: GitHub Pages deployment may take a few minutes.
|
|
104
|
-
3. **Clear browser cache**: The browser may be caching an old version.
|
|
105
|
-
|
|
106
|
-
## Manual Trigger
|
|
107
|
-
|
|
108
|
-
Deployment can be manually triggered via the GitHub Actions interface:
|
|
109
|
-
|
|
110
|
-
1. Go to the repository's "Actions" tab.
|
|
111
|
-
2. Select the "Deploy to GitHub Pages" workflow.
|
|
112
|
-
3. Click the "Run workflow" button.
|
|
113
|
-
4. Select the branch and run.
|
|
114
|
-
|
|
115
|
-
## Related Files
|
|
116
|
-
|
|
117
|
-
- `demo/src/`: Documentation source files (Markdown format).
|
|
118
|
-
- `package.json`: Project configuration and dependencies.
|
|
119
|
-
- `src/cli.ts`: zengen CLI tool implementation.
|
|
120
|
-
- `src/builder.ts`: Documentation builder implementation.
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ZEN - Markdown Documentation Site Builder
|
|
3
|
-
summary: ZEN is a minimalist Markdown static site generator focused on content writing. It leverages AI for translation and navigation, supports multilingual builds, and requires no complex configuration.
|
|
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 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? I've been rethinking how documentation tools can better serve writers in the AI era:
|
|
20
|
-
|
|
21
|
-
- **Return to Content**: Minimize distractions, focus on writing.
|
|
22
|
-
|
|
23
|
-
Let documentation return to its essence, and let writing return to tranquility.
|
|
24
|
-
|
|
25
|
-
First, I don't want to be a librarian. Sometimes I want to jot down some content, but I might not have thought of a title yet, or haven't formed a specific structure. I hope LLMs will automatically help me generate titles, summaries, categorize, and organize navigation.
|
|
26
|
-
|
|
27
|
-
Second, my study must be kept tidy. 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, my head hurts. Now, ZEN chooses to hide all configurations in the `.zen` directory, swept 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.
|
|
28
|
-
|
|
29
|
-
- **Return to Native Language**: Write in your native language, build multilingual versions seamlessly.
|
|
30
|
-
|
|
31
|
-
Life is short; I'm too lazy to translate. People can best express the depth of their thinking when using their native language. Yet, staying connected to the world is 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 enabling more people to see my content. Current i18n solutions not only require manual translation but also self-maintenance of content updates, which is too troublesome. I choose to use LLMs to handle translation for me, saving a lot of time and enabling one-click translation into multiple languages.
|
|
32
|
-
|
|
33
|
-
## Core Features
|
|
34
|
-
|
|
35
|
-
1. **Static Site Generation**
|
|
36
|
-
- Build any folder containing Markdown files into a static HTML site.
|
|
37
|
-
|
|
38
|
-
2. **Intelligent Navigation**
|
|
39
|
-
- 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.
|
|
40
|
-
|
|
41
|
-
3. **Incremental i18n Translation**
|
|
42
|
-
- Use LLMs for incremental i18n translation, allowing users to write Markdown in their native language while the site can be multilingual.
|
|
43
|
-
|
|
44
|
-
## Design Philosophy
|
|
45
|
-
|
|
46
|
-
- **Minimalism**: Minimal configuration, maximum flexibility.
|
|
47
|
-
- **Content First**: Focus on writing, not tool configuration.
|
|
48
|
-
- **AI-Powered**: Leverage AI for translation and content organization.
|
|
49
|
-
- **Cross-Language**: Support multilingual content creation and display.
|
|
50
|
-
|
|
51
|
-
## Quick Start
|
|
52
|
-
|
|
53
|
-
### Recommended Usage
|
|
54
|
-
|
|
55
|
-
**It is recommended to switch to the directory containing your Markdown files and directly use the following command to start building:**
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
# Set environment variables (modify according to your actual situation)
|
|
59
|
-
export OPENAI_API_KEY="sk-xxxxxx" # Required: Replace with your OpenAI API Key
|
|
60
|
-
export OPENAI_BASE_URL="https://api.openai.com/v1" # Optional, defaults to the official OpenAI API
|
|
61
|
-
export OPENAI_MODEL="gpt-3.5-turbo" # Optional, defaults to the gpt-3.5-turbo model
|
|
62
|
-
|
|
63
|
-
# Build the site with support for multilingual translation
|
|
64
|
-
npx zengen@latest build --lang zh-Hans --lang en-US --verbose
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**To view more parameters or help**:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
npx zengen
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**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,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ZEN - Markdown Documentation Site Builder
|
|
3
|
-
summary: ZEN is a minimalist static site generator focused on building HTML sites from Markdown folders. It supports intelligent navigation and AI-powered incremental translation, emphasizing content-first and cross-language support without complex configuration.
|
|
4
|
-
tags:
|
|
5
|
-
- Markdown
|
|
6
|
-
- Static Site Generation
|
|
7
|
-
- AI Translation
|
|
8
|
-
- Minimalism
|
|
9
|
-
- Multilingual
|
|
10
|
-
- Documentation Tool
|
|
11
|
-
- ZEN
|
|
12
|
-
inferred_lang: en-US
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# ZEN - A Concise Markdown Documentation Site Builder
|
|
16
|
-
|
|
17
|
-
> 📖 **Reading Note**: This README is the Chinese version. The English version will be automatically generated by AI translation.
|
|
18
|
-
|
|
19
|
-
## Project Motivation
|
|
20
|
-
|
|
21
|
-
### Return to Content
|
|
22
|
-
|
|
23
|
-
I enjoy contemplation but dislike complex build tools, fiddling with intricate documentation configurations, and complicated structures.
|
|
24
|
-
|
|
25
|
-
### Return to Native Language
|
|
26
|
-
|
|
27
|
-
Life is short, I use AI translation. Stay connected with the world.
|
|
28
|
-
|
|
29
|
-
## Core Features
|
|
30
|
-
|
|
31
|
-
1. **Static Site Generation**
|
|
32
|
-
- Build a static HTML site from any folder containing Markdown files.
|
|
33
|
-
|
|
34
|
-
2. **Intelligent Navigation**
|
|
35
|
-
- Generate site maps and navigation without needing to preserve the original directory structure of the Markdown source files.
|
|
36
|
-
|
|
37
|
-
3. **Incremental i18n Translation**
|
|
38
|
-
- Use LLM for incremental i18n translation, allowing users to write Markdown in their native language while supporting multilingual audiences.
|
|
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 Markdown files and directly use the following command to start building:**
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npx zengen build
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Other Usages
|
|
58
|
-
|
|
59
|
-
1. **Live Preview (Watch for file changes)**:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
npx zengen build --watch
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
2. **View more parameters or help**:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
npx zengen
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Note**: ZEN enforces using the current directory as the source directory and outputs to the `.zen/dist` directory. Specifying source and output directory parameters is no longer supported.
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
**ZEN** - Let documentation return to its essence, let writing return to tranquility.
|
|
@@ -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
|
-
```
|