@mgks/docmd 0.2.7 → 0.2.9

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.
@@ -0,0 +1,89 @@
1
+ ---
2
+ title: "Container: Collapsible"
3
+ description: "Create accordion-style toggleable sections for FAQs, spoilers, or advanced details."
4
+ ---
5
+
6
+ # Collapsible Container
7
+
8
+ The `collapsible` container creates an accordion-style block that can be toggled open or closed. This is perfect for FAQs, "spoiler" content, or hiding complex details that aren't immediately necessary.
9
+
10
+ ## Usage
11
+
12
+ The syntax allows you to define the title and the default state (open or closed).
13
+
14
+ **Syntax:**
15
+ ```markdown
16
+ ::: collapsible [open] Title Text Here
17
+ The hidden content goes here.
18
+ :::
19
+ ```
20
+
21
+ - **`open`**: (Optional) If included, the section will be expanded by default on page load.
22
+ - **`Title Text Here`**: The text displayed on the clickable bar. If omitted, it defaults to "Click to expand".
23
+
24
+ ---
25
+
26
+ ## Examples
27
+
28
+ ### Basic Collapsible (Closed by Default)
29
+
30
+ Use this for content that should be hidden initially, like lengthy code examples or optional details.
31
+
32
+ **Code:**
33
+ ```markdown
34
+ ::: collapsible View Advanced Configuration
35
+ Here are the advanced settings for power users:
36
+ * `memory_limit`: Set the max heap size.
37
+ * `threads`: Number of worker threads.
38
+ :::
39
+ ```
40
+
41
+ **Rendered Preview:**
42
+
43
+ ::: collapsible View Advanced Configuration
44
+ Here are the advanced settings for power users:
45
+ * `memory_limit`: Set the max heap size.
46
+ * `threads`: Number of worker threads.
47
+ :::
48
+
49
+ ### Default Open
50
+
51
+ Use the `open` keyword if you want the content visible but capable of being tucked away.
52
+
53
+ **Code:**
54
+ ```markdown
55
+ ::: collapsible open Important Notice
56
+ This content is visible immediately but can be collapsed if it takes up too much space.
57
+ :::
58
+ ```
59
+
60
+ **Rendered Preview:**
61
+
62
+ ::: collapsible open Important Notice
63
+ This content is visible immediately but can be collapsed if it takes up too much space.
64
+ :::
65
+
66
+ ### FAQ Pattern
67
+
68
+ Collapsibles are ideal for Frequently Asked Questions.
69
+
70
+ **Code:**
71
+ ```markdown
72
+ ::: collapsible Is docmd free to use?
73
+ **Yes!** docmd is 100% open-source and free under the MIT license.
74
+ :::
75
+
76
+ ::: collapsible Can I host it on GitHub Pages?
77
+ Absolutely. The `build` command generates static HTML files that work perfectly on GitHub Pages, Netlify, or Vercel.
78
+ :::
79
+ ```
80
+
81
+ **Rendered Preview:**
82
+
83
+ ::: collapsible Is docmd free to use?
84
+ **Yes!** docmd is 100% open-source and free under the MIT license.
85
+ :::
86
+
87
+ ::: collapsible Can I host it on GitHub Pages?
88
+ Absolutely. The `build` command generates static HTML files that work perfectly on GitHub Pages, Netlify, or Vercel.
89
+ :::
@@ -197,6 +197,38 @@ docmd supports GitHub Flavored Markdown extensions including:
197
197
 
198
198
  Renders emoji symbols like: I ❤️ documentation! 🚀 😄
199
199
 
200
+ ## Custom Attributes (IDs and Classes)
201
+
202
+ You can add custom IDs and CSS classes to headers, images, and links using curly braces `{}`.
203
+
204
+ ### Custom IDs
205
+ By default, `docmd` generates IDs for headers automatically. You can override this:
206
+
207
+ ```markdown
208
+ ## My Header {#custom-id}
209
+ ```
210
+
211
+ ### Custom Classes
212
+ Add styling classes to elements:
213
+
214
+ ```markdown
215
+ ## Styled Header {.text-center .text-red}
216
+ ```
217
+
218
+ ### Links and Buttons
219
+ Create buttons using standard links and classes:
220
+
221
+ ```markdown
222
+ [Download Now](/download){.btn .btn-primary}
223
+ ```
224
+
225
+ ### Images
226
+ Control image styling directly:
227
+
228
+ ```markdown
229
+ ![Screenshot](image.png){width="100%" .shadow-lg}
230
+ ```
231
+
200
232
  ## Footnotes
201
233
 
202
234
  You can add footnotes to your content for references or additional information[^1].
@@ -65,6 +65,14 @@ To enable live change tracking for internal files during development, set the DO
65
65
  - **Temporarily:** Run `export DOCMD_DEV=true` in your terminal before starting the dev server.
66
66
  - **Permanently:** Add `export DOCMD_DEV=true` to your `~/.zshrc` file and run `source ~/.zshrc`.
67
67
 
68
+ ### Debugging Build Issues
69
+
70
+ If you are working on the build process and need to see detailed logs about asset processing or minification, you can run:
71
+
72
+ ```bash
73
+ DOCMD_DEBUG=true docmd build
74
+ ```
75
+
68
76
  ## Pull Request Process
69
77
 
70
78
  Once you're satisfied with your changes:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgks/docmd",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "Generate beautiful, lightweight static documentation sites directly from your Markdown files. Zero clutter, just content.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -42,11 +42,12 @@
42
42
  },
43
43
  "homepage": "https://github.com/mgks/docmd#readme",
44
44
  "dependencies": {
45
- "@mgks/docmd": "^0.2.5",
46
45
  "chalk": "^4.1.2",
47
46
  "chokidar": "^4.0.3",
47
+ "clean-css": "^5.3.3",
48
48
  "commander": "^14.0.0",
49
49
  "ejs": "^3.1.9",
50
+ "esbuild": "^0.27.0",
50
51
  "express": "^5.1.0",
51
52
  "fs-extra": "^11.2.0",
52
53
  "gray-matter": "^4.0.3",