@aigne/doc-smith 0.8.3 → 0.8.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 (58) hide show
  1. package/.aigne/doc-smith/config.yaml +3 -3
  2. package/.aigne/doc-smith/preferences.yml +58 -12
  3. package/.aigne/doc-smith/upload-cache.yaml +600 -207
  4. package/CHANGELOG.md +22 -0
  5. package/README.md +77 -5
  6. package/agents/input-generator.mjs +12 -6
  7. package/agents/publish-docs.mjs +53 -4
  8. package/docs/_sidebar.md +1 -1
  9. package/docs/advanced-how-it-works.md +55 -60
  10. package/docs/advanced-how-it-works.zh.md +60 -65
  11. package/docs/advanced-quality-assurance.md +73 -38
  12. package/docs/advanced-quality-assurance.zh.md +73 -38
  13. package/docs/advanced.md +2 -14
  14. package/docs/advanced.zh.md +5 -17
  15. package/docs/changelog.md +41 -4
  16. package/docs/changelog.zh.md +77 -40
  17. package/docs/cli-reference.md +79 -13
  18. package/docs/cli-reference.zh.md +92 -26
  19. package/docs/configuration-interactive-setup.md +102 -49
  20. package/docs/configuration-interactive-setup.zh.md +102 -49
  21. package/docs/configuration-language-support.md +69 -39
  22. package/docs/configuration-language-support.zh.md +68 -38
  23. package/docs/configuration-llm-setup.md +25 -62
  24. package/docs/configuration-llm-setup.zh.md +25 -62
  25. package/docs/configuration-preferences.md +79 -67
  26. package/docs/configuration-preferences.zh.md +78 -67
  27. package/docs/configuration.md +122 -109
  28. package/docs/configuration.zh.md +130 -117
  29. package/docs/features-generate-documentation.md +44 -24
  30. package/docs/features-generate-documentation.zh.md +52 -32
  31. package/docs/features-publish-your-docs.md +41 -40
  32. package/docs/features-publish-your-docs.zh.md +50 -49
  33. package/docs/features-translate-documentation.md +73 -17
  34. package/docs/features-translate-documentation.zh.md +76 -20
  35. package/docs/features-update-and-refine.md +72 -21
  36. package/docs/features-update-and-refine.zh.md +80 -29
  37. package/docs/features.md +24 -28
  38. package/docs/features.zh.md +25 -29
  39. package/docs/getting-started.md +87 -38
  40. package/docs/getting-started.zh.md +88 -39
  41. package/docs/overview.md +17 -35
  42. package/docs/overview.zh.md +18 -36
  43. package/package.json +9 -8
  44. package/prompts/content-detail-generator.md +1 -0
  45. package/prompts/document/custom-code-block.md +101 -0
  46. package/prompts/document/d2-chart/rules.md +941 -1031
  47. package/prompts/document/detail-generator.md +7 -53
  48. package/tests/input-generator.test.mjs +2 -2
  49. package/tests/kroki-utils.test.mjs +88 -17
  50. package/utils/auth-utils.mjs +9 -2
  51. package/utils/blocklet.mjs +25 -6
  52. package/utils/constants.mjs +17 -1
  53. package/utils/deploy.mjs +404 -0
  54. package/utils/kroki-utils.mjs +22 -14
  55. package/utils/markdown-checker.mjs +1 -1
  56. package/utils/utils.mjs +3 -2
  57. package/prompts/document/d2-chart/diy-examples.md +0 -44
  58. package/prompts/document/d2-chart/shape-rules.md +0 -182
@@ -0,0 +1,101 @@
1
+ <custom_code_block>
2
+ ## Enhanced Attributes for Markdown Code Blocks
3
+
4
+ When generating Markdown, you can add enhanced attributes to code blocks to provide richer functionality and better display effects. These attributes allow you to specify **titles**, **icons**, and more for code blocks.
5
+
6
+ ** Please use these enhanced attributes as much as possible to improve display effects **
7
+
8
+ ### Attribute Definition
9
+
10
+ The following are the available enhanced attributes and their descriptions:
11
+
12
+ * `language`: The language of the code block (e.g., `javascript`, `python`, `html`). This attribute is placed directly after the three backticks (\`\`\`).
13
+ * `title`: The title of the code block, which is optional.
14
+ * `icon`: The icon displayed next to the code block, which is optional. This value must be a valid **Iconify icon name** (e.g., `logos:javascript`, `mdi:folder-open`).
15
+
16
+ ### Attribute Usage
17
+
18
+ * `language` and `title` are written directly after \`\`\`, separated by spaces.
19
+ * Other attributes (`icon`) must be provided in **key=value** format, separated by spaces.
20
+
21
+ ### Examples
22
+
23
+ <good_example>
24
+ The following are some examples of Markdown code blocks using enhanced attributes:
25
+
26
+ **Example 1: Code block with title and icon**
27
+
28
+ ```javascript Shopping Cart Class icon=logos:javascript
29
+ class ShoppingCart {
30
+ constructor() {
31
+ this.items = [];
32
+ this.discounts = [];
33
+ this.taxRate = 0.08;
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Example 2: Code block with icon only**
39
+
40
+ ```javascript icon=logos:javascript
41
+ class ShoppingCart {
42
+ constructor() {
43
+ this.items = [];
44
+ this.discounts = [];
45
+ this.taxRate = 0.08;
46
+ }
47
+ }
48
+ ```
49
+
50
+ **Example 3: Code block with title only**
51
+
52
+ ```javascript Shopping Cart Class
53
+ class ShoppingCart {
54
+ constructor() {
55
+ this.items = [];
56
+ this.discounts = [];
57
+ this.taxRate = 0.08;
58
+ }
59
+ }
60
+ ```
61
+
62
+ **Example 4: Basic code block**
63
+
64
+ ```javascript
65
+ class ShoppingCart {
66
+ constructor() {
67
+ this.items = [];
68
+ this.discounts = [];
69
+ this.taxRate = 0.08;
70
+ }
71
+ }
72
+ ```
73
+ </good_example>
74
+
75
+ <bad_example>
76
+ **Example 1**
77
+
78
+ There are two errors in this example:
79
+ - Language name should not include suffixes, like ',no_run' in the example
80
+ - Title does not need a key specified, just configure the value directly
81
+
82
+ ```rust,no_run title="main.rs" icon=logos:rust
83
+ use tokio::runtime::Runtime;
84
+ use tokio::net::TcpListener;
85
+
86
+ fn main() -> Result<(), Box<dyn std::error::Error>> {
87
+ // Create the runtime
88
+ let rt = Runtime::new()?;
89
+
90
+ // Spawn the root task
91
+ rt.block_on(async {
92
+ let listener = TcpListener::bind("127.0.0.1:8080").await.unwrap();
93
+ println!("Listening on: {}", listener.local_addr().unwrap());
94
+ // ... application logic ...
95
+ });
96
+ Ok(())
97
+ }
98
+ ```
99
+
100
+ </bad_example>
101
+ </custom_code_block>