solo-doc 0.3.0 → 0.3.2
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.
|
@@ -47,6 +47,15 @@ class OCPStrategy {
|
|
|
47
47
|
this.name = 'OCP (Red Hat OpenShift)';
|
|
48
48
|
}
|
|
49
49
|
async execute(url, options) {
|
|
50
|
+
// Fix missing language code in URL (common mistake)
|
|
51
|
+
// https://docs.redhat.com/documentation/... -> https://docs.redhat.com/en/documentation/...
|
|
52
|
+
if (url.includes('docs.redhat.com/documentation/')) {
|
|
53
|
+
const fixedUrl = url.replace('docs.redhat.com/documentation/', 'docs.redhat.com/en/documentation/');
|
|
54
|
+
console.log(chalk_1.default.yellow(`[OCP] Detected missing language code. Auto-fixing URL:`));
|
|
55
|
+
console.log(chalk_1.default.gray(`Original: ${url}`));
|
|
56
|
+
console.log(chalk_1.default.cyan(`Fixed: ${fixedUrl}`));
|
|
57
|
+
url = fixedUrl;
|
|
58
|
+
}
|
|
50
59
|
// Optimisation: Try to convert multi-page URL (/html/) to single-page URL (/html-single/)
|
|
51
60
|
// Example: .../html/building_applications/index -> .../html-single/building_applications/index
|
|
52
61
|
if (url.includes('/html/') && !url.includes('/html-single/')) {
|
package/package.json
CHANGED
package/solo-doc-prompt.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
**Prompt模板**:
|
|
19
19
|
```
|
|
20
20
|
基于OpenShift文档的目录树,和上面的详细对比总结。
|
|
21
|
-
将对比结果整合到OpenShift的Markdown树中:在每个章节或子章节(不超过3
|
|
21
|
+
将对比结果整合到OpenShift的Markdown树中:在每个章节或子章节(不超过3 级):
|
|
22
|
+
- **OpenShift Link**: [当前章节或者子章节的具体链接]。
|
|
22
23
|
- **Comparison with Alauda**: [详细对比描述,用中文,200-300字,内容包括差异、谁更好、Alauda补充建议]。
|
|
23
24
|
- **Alauda Link**: [相关链接或No relevant links,确保无空白]。
|
|
24
25
|
|