@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,129 @@
1
+ # Contributing to docmd
2
+
3
+ First off, thank you for considering contributing to `docmd`! It's people like you that make the open-source community such an amazing place to learn, inspire, and create.
4
+
5
+ We welcome contributions of all kinds: bug fixes, new features, documentation improvements, or even just typo fixes.
6
+
7
+ ## ⚡ Quick Links
8
+
9
+ * [**Documentation**](https://docmd.mgks.dev) - Read the docs to understand how the tool works.
10
+ * [**GitHub Issues**](https://github.com/mgks/docmd/issues) - Browse existing bugs or feature requests.
11
+ * [**Discussions**](https://github.com/mgks/docmd/discussions) - Ask questions or share ideas.
12
+
13
+ ---
14
+
15
+ ## 🛠️ Development Setup
16
+
17
+ `docmd` is a Node.js CLI tool. Developing it locally requires a slightly different setup than a standard web app.
18
+
19
+ ### Prerequisites
20
+ * **Node.js**: Version 22.x or higher.
21
+ * **npm**: Version 10.x or higher.
22
+
23
+ ### 1. Fork and Clone
24
+ 1. Fork the repository to your GitHub account.
25
+ 2. Clone your fork locally:
26
+ ```bash
27
+ git clone https://github.com/YOUR_USERNAME/docmd.git
28
+ cd docmd
29
+ ```
30
+
31
+ ### 2. Install Dependencies
32
+ ```bash
33
+ npm install
34
+ ```
35
+
36
+ ### 3. Link for Local Development
37
+ To test the CLI command (`docmd`) globally on your machine while modifying the source code, use `npm link`.
38
+
39
+ ```bash
40
+ # inside the project root
41
+ npm link
42
+ ```
43
+
44
+ Now, when you run `docmd` in *any* terminal window, it will use the code from your local folder.
45
+
46
+ ### 4. Running the Dev Server
47
+ We have a built-in test site located in the `docs/` folder (this is the documentation for docmd itself).
48
+
49
+ To start the dev server and watch for changes:
50
+
51
+ ```bash
52
+ # Method 1: Using the npm script (Recommended)
53
+ npm start
54
+
55
+ # Method 2: If you have linked the package
56
+ docmd dev
57
+ ```
58
+
59
+ ### 5. Developer Mode (Important)
60
+ By default, `docmd` only watches the user's content files. To make `docmd` watch **its own internal source code** (templates, css, core logic) and trigger a rebuild when you edit them, set the environment variable:
61
+
62
+ ```bash
63
+ # Mac/Linux
64
+ export DOCMD_DEV=true
65
+ npm start
66
+
67
+ # Windows (PowerShell)
68
+ $env:DOCMD_DEV="true"
69
+ npm start
70
+ ```
71
+
72
+ ---
73
+
74
+ ## 📂 Project Structure
75
+
76
+ Here is a map of the codebase to help you navigate:
77
+
78
+ ```text
79
+ bin/
80
+ └── docmd.js # The CLI entry point
81
+ src/
82
+ ├── commands/ # Logic for 'init', 'build', 'dev'
83
+ ├── core/
84
+ │ ├── config-loader.js # Loads docmd.config.js
85
+ │ ├── config-validator.js # Validates config structure
86
+ │ ├── file-processor.js # Orchestrates file reading
87
+ │ ├── html-generator.js # Injects content into EJS templates
88
+ │ └── markdown/ # The Core Parsing Engine
89
+ │ ├── containers.js # Callout/Card definitions
90
+ │ ├── rules.js # Complex logic (Tabs, Changelogs)
91
+ │ └── setup.js # MarkdownIt configuration
92
+ ├── plugins/ # Built-in plugins (SEO, Sitemap)
93
+ ├── templates/ # EJS HTML templates
94
+ └── assets/ # Internal CSS and JS (Themes)
95
+ docs/ # The documentation site content
96
+ site/ # The generated output folder (gitignored)
97
+ ```
98
+
99
+ ---
100
+
101
+ ## 🚀 Submitting a Pull Request
102
+
103
+ 1. **Create a Branch:** Always create a new branch for your changes.
104
+ * `feat/my-new-feature`
105
+ * `fix/bug-description`
106
+ * `docs/update-readme`
107
+ 2. **Make Changes:** Write clear, concise code.
108
+ 3. **Test:**
109
+ * Run `docmd build` to ensure the build process finishes without errors.
110
+ * Verify your changes visually by running `docmd dev`.
111
+ 4. **Commit:** We prefer [Conventional Commits](https://www.conventionalcommits.org/).
112
+ * `feat: add search bar`
113
+ * `fix: resolve css overflow in tables`
114
+ * `docs: fix typo in readme`
115
+ 5. **Push & Open PR:** Push your branch to your fork and open a Pull Request against the `main` branch of `mgks/docmd`.
116
+
117
+ ---
118
+
119
+ ## 🎨 Style Guidelines
120
+
121
+ * **Linting:** Please ensure your code follows the existing style. (We use standard ESLint/Prettier configurations).
122
+ * **No-Style:** If modifying `no-style` templates, ensure no external CSS is injected unless requested.
123
+ * **Compatibility:** `docmd` aims to be lightweight. Avoid adding heavy dependencies unless absolutely necessary.
124
+
125
+ ---
126
+
127
+ ## 🤝 Community
128
+
129
+ Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
@@ -39,7 +39,9 @@ jobs:
39
39
  # --- Publish to GitHub Packages (GPR) ---
40
40
  # ----------------------------------------
41
41
  - name: Configure NPM for GitHub Packages registry
42
- run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > ~/.npmrc
42
+ run: |
43
+ echo "@mgks:registry=https://npm.pkg.github.com" > ~/.npmrc
44
+ echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
43
45
 
44
46
  - name: Publish to GitHub Packages
45
47
  run: npm publish
package/README.md CHANGED
@@ -1,123 +1,160 @@
1
1
  <p align="center">
2
- <img src="https://github.com/mgks/docmd/blob/main/src/assets/images/docmd-logo.png" alt="docmd logo" width="70" />
3
- <br />
4
- <img src="https://github.com/mgks/docmd/blob/main/src/assets/images/docmd-logo-light.png" alt="docmd dark logo" width="180" />
2
+ <br>
3
+ <a href="https://docmd.mgks.dev">
4
+ <img src="https://github.com/mgks/docmd/blob/main/src/assets/images/docmd-logo-light.png?raw=true" alt="docmd logo" width="200" />
5
+ </a>
5
6
  </p>
6
7
 
7
8
  <p align="center">
8
- <b>Generate beautiful, lightweight static documentation sites from Markdown files.</b>
9
- <br>Zero clutter, just content.
9
+ <b>The minimalist, zero-config documentation generator for Node.js developers.</b>
10
+ <br>
11
+ Turn Markdown into beautiful, blazing-fast websites in seconds.
12
+ <br>
10
13
  </p>
11
14
 
12
15
  <p align="center">
13
- <a href="https://www.npmjs.com/package/@mgks/docmd"><img src="https://img.shields.io/npm/v/@mgks/docmd.svg" alt="npm version"></a>
14
- <a href="https://www.npmjs.com/package/@mgks/docmd"><img src="https://img.shields.io/npm/d18m/@mgks/docmd.svg" alt="npm downloads"></a>
15
- <a href="https://github.com/mgks/docmd/blob/main/LICENSE"><img src="https://img.shields.io/github/license/mgks/docmd.svg" alt="license"></a>
16
+ <a href="https://www.npmjs.com/package/@mgks/docmd"><img src="https://img.shields.io/npm/v/@mgks/docmd.svg?style=flat-square&color=007acc" alt="npm version"></a>
17
+ <a href="https://www.npmjs.com/package/@mgks/docmd"><img src="https://img.shields.io/npm/dt/@mgks/docmd.svg?style=flat-square&color=success" alt="npm downloads"></a>
18
+ <a href="https://github.com/mgks/docmd/blob/main/LICENSE"><img src="https://img.shields.io/github/license/mgks/docmd.svg?style=flat-square&color=blue" alt="license"></a>
19
+ <a href="https://github.com/mgks/docmd/stargazers"><img src="https://img.shields.io/github/stars/mgks/docmd?style=flat-square&logo=github" alt="stars"></a>
16
20
  </p>
17
21
 
18
- Docmd is a Node.js command-line tool for generating fast, beautiful, and lightweight static documentation sites from standard Markdown files. It champions the philosophy of "zero clutter, just content," prioritizing a simple authoring experience and a clean, performant result for readers.
22
+ <p align="center">
23
+ <a href="https://docmd.mgks.dev"><b>View Live Demo</b></a> •
24
+ <a href="https://docmd.mgks.dev/getting-started/installation/"><b>Documentation</b></a> •
25
+ <a href="https://github.com/mgks/docmd/issues"><b>Report Bug</b></a>
26
+ </p>
27
+
28
+ <br>
19
29
 
20
- **:rocket: [Live Preview](https://docmd.mgks.dev): Official documentation site powered by `docmd`.**
30
+ <p align="center">
31
+ <img width="2856" height="1558" alt="519536477-8d948e18-8e2d-420d-8902-96e1aafab1ba-modified" src="https://github.com/user-attachments/assets/5b883c80-8357-46e8-9adb-84e38a0da64c" />
32
+ <sup><i>docmd noStyle page preview in dark mode</i></sup>
33
+ </p>
21
34
 
22
- ## Key Features
35
+ ## 🚀 Why docmd?
23
36
 
24
- - **Markdown First:** Write your content in standard Markdown with simple YAML frontmatter.
25
- - **Beautiful Themes:** Comes with multiple built-in themes (`sky`, `ruby`, `retro`) and automatic light/dark mode support.
26
- - **Fast & Lightweight:** Blazing fast static site generation with a minimal client-side footprint.
27
- - **Rich Content:** Go beyond basic Markdown with custom components like callouts, cards, steps, tabs, and Mermaid diagrams.
28
- - **Built-in Plugins:** SEO meta tags, sitemap, and analytics are all included out-of-the-box.
29
- - **No-Style Pages:** Create completely custom pages (like landing pages) with full control over the HTML.
30
- - **Customizable:** Easily extend or override styles with your own CSS and JavaScript.
31
- - **Smart CLI:** Intelligent configuration validation catches typos and errors early. Simple workflow with `init`, `dev`, and `build`.
32
- - **Deploy Anywhere:** The generated `site/` folder can be hosted on any static web host (GitHub Pages, Netlify, Vercel, etc.).
37
+ Most documentation tools today are too heavy (React hydration, massive bundles) or require ecosystems you don't use (Python/Ruby).
33
38
 
34
- ## Installation and Usage
39
+ **docmd** fills the gap. It is a native Node.js tool that generates **pure, static HTML**.
35
40
 
36
- **Prerequisites:** [Node.js](https://nodejs.org/) (version 22.x or higher) is required.
41
+ * ⚡ **Blazing Fast:** No hydration delay. Instant page loads.
42
+ * 🛠 **Zero Config:** Works out of the box with sensible defaults.
43
+ * 🎨 **Theming:** Built-in light/dark modes and multiple themes (`sky`, `ruby`, `retro`).
44
+ * 📦 **Node.js Native:** No Python, no Gemfiles. Just `npm install`.
45
+ * 🧩 **Rich Content:** Built-in support for Callouts, Cards, Tabs, Steps, and Changelogs.
37
46
 
38
- ### Global Installation (Recommended)
47
+ ## 🏁 Quick Start
39
48
 
40
- This is the recommended approach for developers who will use `docmd` across multiple projects. It makes the `docmd` command available system-wide.
49
+ You don't need to install anything globally to try it out.
41
50
 
42
- **1. Install Globally:**
43
51
  ```bash
44
- npm install -g @mgks/docmd
52
+ # 1. Initialize a new project
53
+ npx @mgks/docmd init my-docs
54
+
55
+ # 2. Enter directory
56
+ cd my-docs
57
+
58
+ # 3. Start the dev server
59
+ npm start
60
+ ```
61
+
62
+ **Dev server output:**
63
+
64
+ ```
65
+
66
+ _ _
67
+ _| |___ ___ _____ _| |
68
+ | . | . | _| | . |
69
+ |___|___|___|_|_|_|___|
70
+
71
+ v0.x.x
72
+
73
+
74
+ 🚀 Performing initial build for dev server...
75
+ ✅ Generated sitemap at ./site/sitemap.xml
76
+ ✅ Initial build complete.
77
+ 👀 Watching for changes in:
78
+ - Source: ./docs
79
+ - Config: ./docmd.config.js
80
+ - Assets: ./assets
81
+ - docmd Templates: ./src/templates (internal)
82
+ - docmd Assets: ./src/assets (internal)
83
+ 🎉 Dev server started at http://localhost:3000
84
+ Serving content from: ./site
85
+ Live reload is active. Browser will refresh automatically when files change.
45
86
  ```
46
87
 
47
- **2. Basic Workflow:**
48
- Once installed, you can use the `docmd` command directly in any project folder.
88
+ ## Features
49
89
 
50
- * **Initialize a Project:**
51
- ```bash
52
- # This creates docs/, docmd.config.js, and a sample index.md
53
- docmd init
54
- ```
90
+ | Feature | Description |
91
+ | :--- | :--- |
92
+ | **Markdown First** | Standard Markdown + Frontmatter. No proprietary syntax to learn. |
93
+ | **Smart CLI** | Intelligent config validation catches typos before they break your build. |
94
+ | **Custom Containers** | Use `::: callout`, `::: card`, `::: steps`, `::: tabs`, `::: collapsible`, `::: changelog`, and more to enrich content. |
95
+ | **Diagrams** | Create flowcharts, relationship diagrams, journey, piecharts, graphs, timelines and more with Mermaid. |
96
+ | **No-Style Pages** | Create custom landing pages (highly customizable custom HTML pages) without theme constraints. |
97
+ | **Auto Dark Mode** | Respects system preference and saves user choice. |
98
+ | **Plugins** | SEO, Sitemap, and Analytics support included out-of-the-box. |
55
99
 
56
- * **Start the Dev Server:**
57
- ```bash
58
- # Starts a live-reloading server at http://localhost:3000
59
- docmd dev
60
- ```
100
+ ## 🆚 Comparison
61
101
 
62
- * **Build for Production:**
63
- ```bash
64
- # Generates the static site into the `site/` directory
65
- docmd build
66
- ```
102
+ How does `docmd` stack up against the giants?
67
103
 
68
- ### Quick Start (Alternative)
104
+ | Feature | docmd | Docusaurus | MkDocs (Material) | Mintlify |
105
+ | :--- | :--- | :--- | :--- | :--- |
106
+ | **Language** | **Node.js** | React.js | Python | Proprietary |
107
+ | **Output** | **Static HTML** | React SPA | Static HTML | Hosted / Next.js |
108
+ | **JS Payload** | **Tiny (< 15kb)** | Heavy | Minimal | Medium |
109
+ | **Setup** | **~2 mins** | ~15 mins | ~10 mins | Instant (SaaS) |
110
+ | **Cost** | **100% Free OSS** | 100% Free OSS | 100% Free OSS | Freemium |
69
111
 
70
- If you prefer not to install packages globally, you can use `npx` to run `docmd` on-demand. This is a great way to try it out or use it in a single project.
112
+ 👉 *[Read the full comparison](https://docmd.mgks.dev/comparison/)*
71
113
 
72
- 1. **Create and Initialize Your Project:**
73
- This command will download the latest version, create a `my-docs` folder, and set up the project files inside it.
74
- ```bash
75
- npx @mgks/docmd init my-docs
76
- ```
114
+ ## 📦 Installation
77
115
 
78
- 2. **Start the Development Server:**
79
- Navigate into your new project and use `npx` again to start the server.
80
- ```bash
81
- cd my-docs
82
- npx @mgks/docmd dev
83
- ```
116
+ For frequent use, install globally:
84
117
 
85
- Your new documentation site is now running at `http://localhost:3000`.
118
+ ```bash
119
+ npm install -g @mgks/docmd
120
+ ```
86
121
 
87
- ## Documentation
122
+ ### Commands
88
123
 
89
- For a complete guide, visit the official documentation: **[docmd.mgks.dev](https://docmd.mgks.dev)**.
124
+ * `docmd init` - Create a new documentation project.
125
+ * `docmd dev` - Start the live-reloading local server.
126
+ * `docmd build` - Generate static files to `site/` for deployment.
90
127
 
91
- ### Essential Topics
92
- - **[Getting Started](https://docmd.mgks.dev/getting-started/installation/):** Installation and basic CLI usage.
93
- - **[Custom Containers](https://docmd.mgks.dev/content/containers/):** How to use Callouts, Cards, Tabs, and Steps.
94
- - **[Theming](https://docmd.mgks.dev/theming/):** Customizing colors, dark mode, and adding your logo.
95
- - **[Plugins](https://docmd.mgks.dev/plugins/):** SEO, Analytics, and Sitemap configuration.
96
- - **[Recipes](https://docmd.mgks.dev/recipes/):** Step-by-step guides for common tasks like Custom Fonts and Landing Pages.
97
- - **[Comparison](https://docmd.mgks.dev/comparison/):** How `docmd` stacks up against Docusaurus, MkDocs, and others.
128
+ ## 🎨 Themes
98
129
 
99
- ## Contributing
130
+ Switching themes is as easy as changing one line in your `docmd.config.js`.
100
131
 
101
- We welcome contributions of all kinds! Whether it's reporting a bug, suggesting a feature, or submitting a pull request, your help is appreciated.
132
+ ```javascript
133
+ module.exports = {
134
+ theme: {
135
+ name: 'sky', // Options: 'default', 'sky', 'ruby', 'retro'
136
+ defaultMode: 'dark'
137
+ }
138
+ }
139
+ ```
102
140
 
103
- 1. Fork the repository.
104
- 2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/docmd.git`
105
- 3. Install dependencies: `npm install`
106
- 4. Make your changes and test them thoroughly.
107
- 5. Submit a pull request to the `main` branch.
141
+ ## 🤝 Contributing
108
142
 
109
- Please check our [contributing guidelines](https://docmd.mgks.dev/contributing/) for more detailed information.
143
+ We welcome contributions! Please see our [Contribution Guidelines](.github/CONTRIBUTING.md) for details.
110
144
 
111
- ## Support the Project
145
+ 1. Fork the repository.
146
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`).
147
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
148
+ 4. Push to the branch (`git push origin feature/AmazingFeature`).
149
+ 5. Open a Pull Request.
112
150
 
113
- If you find `docmd` useful, please consider:
151
+ ## ❤️ Support
114
152
 
115
- - Starring the repository on GitHub.
116
- - Sharing it with others who might benefit.
117
- - Reporting issues or submitting pull requests.
153
+ This project is open source and free to use. If you find it valuable, please consider:
118
154
 
119
- ❤️ **[GitHub Sponsors](https://github.com/sponsors/mgks): Become a sponsor to support the ongoing development of `docmd`.**
155
+ 1. ⭐️ **Starring the repo** on GitHub (it helps a lot!)
156
+ 2. ☕ **[Sponsoring the project](https://github.com/sponsors/mgks)** to support ongoing development.
120
157
 
121
- ## License
158
+ ## 📄 License
122
159
 
123
- Docmd is licensed under the [MIT License](https://github.com/mgks/docmd/blob/main/LICENSE).
160
+ Distributed under the MIT License. See `LICENSE` for more information.
package/config.js CHANGED
@@ -19,6 +19,7 @@ module.exports = {
19
19
  // Directory Configuration
20
20
  srcDir: 'docs', // Source directory for Markdown files
21
21
  outputDir: 'site', // Directory for generated static site
22
+ minify: true, // Enable/disable HTML/CSS/JS minification
22
23
 
23
24
  // Sidebar Configuration
24
25
  sidebar: {
@@ -88,6 +89,15 @@ module.exports = {
88
89
  // Add other future plugin configurations here by their key
89
90
  },
90
91
 
92
+ // "Edit this page" Link Configuration
93
+ editLink: {
94
+ enabled: true,
95
+ // The URL to the folder containing your docs in the git repo
96
+ // Note: It usually ends with /edit/main/docs or /blob/main/docs
97
+ baseUrl: 'https://github.com/mgks/docmd/edit/main/docs',
98
+ text: 'Edit this page on GitHub'
99
+ },
100
+
91
101
  // Navigation Structure (Sidebar)
92
102
  // Icons are kebab-case names from Lucide Icons (https://lucide.dev/)
93
103
  navigation: [
@@ -103,6 +113,7 @@ module.exports = {
103
113
  { title: 'Basic Usage', path: '/getting-started/basic-usage', icon: 'play' },
104
114
  ],
105
115
  },
116
+ { title: 'Configuration', path: '/configuration', icon: 'settings' },
106
117
  {
107
118
  title: 'Content',
108
119
  icon: 'layout-template',
@@ -123,6 +134,8 @@ module.exports = {
123
134
  { title: 'Cards', path: '/content/containers/cards', icon: 'panel-top' },
124
135
  { title: 'Steps', path: '/content/containers/steps', icon: 'list-ordered' },
125
136
  { title: 'Tabs', path: '/content/containers/tabs', icon: 'columns-3' },
137
+ { title: 'Collapsible', path: '/content/containers/collapsible', icon: 'chevrons-down' },
138
+ { title: 'Changelogs', path: '/content/containers/changelogs', icon: 'logs' },
126
139
  { title: 'Buttons', path: '/content/containers/buttons', icon: 'mouse-pointer-click' },
127
140
  { title: 'Nested Containers', path: '/content/containers/nested-containers', icon: 'folder-tree' },
128
141
  ]
@@ -131,7 +144,6 @@ module.exports = {
131
144
  { title: 'No-Style Example', path: '/content/no-style-example', icon: 'sparkles' },
132
145
  ],
133
146
  },
134
- { title: 'Configuration', path: '/configuration', icon: 'settings' },
135
147
  {
136
148
  title: 'Theming',
137
149
  icon: 'palette',
@@ -125,6 +125,14 @@ module.exports = {
125
125
  * **Default:** `'site'`
126
126
  * **Description:** Directory where the static site will be generated.
127
127
 
128
+ ## `minify`
129
+ * **Type:** `Boolean`
130
+ * **Optional**
131
+ * **Default:** `true` when running `docmd build`, `false` when running `docmd dev`.
132
+ * **Description:** Controls whether CSS and JavaScript assets are minified (compressed) during the build.
133
+ * **Usage:** You can force this to `false` if you need to debug production builds.
134
+ * **Example:** `minify: false`
135
+
128
136
  ### `autoTitleFromH1`
129
137
  * **Type:** `Boolean`
130
138
  * **Default:** `true`
@@ -145,7 +153,9 @@ module.exports = {
145
153
  ### `copyCode`
146
154
  * **Type:** `Boolean`
147
155
  * **Default:** `true`
148
- * **Description:** If `true`, a "Copy" button will be added to the top-right corner of all code blocks, allowing users to easily copy the code to their clipboard with a single click. **Note:** This setting only applies to regular pages. For noStyle pages, copy code functionality must be explicitly enabled via the `components.mainScripts: true` setting.
156
+ * **Description:** If `true`, a "Copy" button will be added to the top-right corner of all code blocks, allowing users to easily copy the code to their clipboard with a single click.
157
+
158
+ **Note:** This setting only applies to regular pages. For noStyle pages, copy code functionality must be explicitly enabled via the `components.mainScripts: true` setting.
149
159
 
150
160
  ## `sidebar` (Object)
151
161
 
@@ -218,6 +228,24 @@ Configures the visual theme of your site.
218
228
  * `sitemap: { defaultChangefreq: 'weekly', defaultPriority: 0.8 }`
219
229
  * **See Also:** [Plugins](/plugins/)
220
230
 
231
+ ## `editLink` (Object, Optional)
232
+ * **Type:** `Object`
233
+ * **Description:** Configures a link in the page footer that points to the source file on GitHub (or GitLab/Bitbucket), allowing users to propose changes.
234
+ * **Properties:**
235
+ * `enabled` (Boolean): Set to `true` to show the link.
236
+ * `baseUrl` (String): The base URL to your repository's documentation source folder.
237
+ * *GitHub Example:* `https://github.com/USERNAME/REPO/edit/main/docs`
238
+ * *Note:* Do not include a trailing slash. `docmd` appends the file path automatically.
239
+ * `text` (String, Optional): The text to display. Defaults to "Edit this page".
240
+ * **Example:**
241
+ ```javascript
242
+ editLink: {
243
+ enabled: true,
244
+ baseUrl: 'https://github.com/mgks/docmd/edit/main/docs',
245
+ text: 'Edit on GitHub'
246
+ }
247
+ ```
248
+
221
249
  ## `navigation` (Array of Objects)
222
250
  * **Description:** Defines the sidebar navigation. (Content mostly same as before, but add the `icon` property explanation).
223
251
  * **Navigation Item Properties:**
@@ -0,0 +1,128 @@
1
+ ---
2
+ title: "Container: Changelogs"
3
+ description: "Create a beautiful, timeline-style version history for your project."
4
+ ---
5
+
6
+ # Changelog Container
7
+
8
+ The `changelog` container allows you to present version history and release notes in a clean, timeline layout. It separates metadata (dates/versions) from the narrative content, making it easy for users to scan updates.
9
+
10
+ ## Usage
11
+
12
+ The changelog container uses a specific syntax where entries are separated by `==` markers.
13
+
14
+ ::: callout info
15
+ Container blocks (like `::: changelog`) should be preceded by a blank line.
16
+ :::
17
+
18
+ **Syntax:**
19
+ ```markdown
20
+ ::: changelog
21
+
22
+ == Version/Date String
23
+ Content for this version.
24
+ Supports **Markdown**, lists, and other containers.
25
+
26
+ == Next Version/Date String
27
+ Content for the next version.
28
+
29
+ :::
30
+ ```
31
+
32
+ **`==`**: This marker denotes the start of a new entry. Everything after `==` on the same line is treated as the "Date" or "Version" badge on the left side of the timeline.
33
+
34
+ ---
35
+
36
+ ## Examples
37
+
38
+ ### Basic Version History
39
+
40
+ **Code:**
41
+ ```markdown
42
+ ::: changelog
43
+
44
+ == v2.0.0 (2025-01-15)
45
+ ### Major Update 🚀
46
+ We completely rewrote the core engine for better performance.
47
+
48
+ * Added new plugin system
49
+ * Improved build speed by 50%
50
+
51
+ == v1.1.0 (2024-12-01)
52
+ ### Feature Drop
53
+ Added support for custom themes and dark mode.
54
+
55
+ == v1.0.0 (2024-11-10)
56
+ Initial public release.
57
+ :::
58
+ ```
59
+
60
+ **Rendered Preview:**
61
+
62
+ ::: changelog
63
+
64
+ == v2.0.0 (2025-01-15)
65
+ ### Major Update 🚀
66
+ We completely rewrote the core engine for better performance.
67
+
68
+ * Added new plugin system
69
+ * Improved build speed by 50%
70
+
71
+ == v1.1.0 (2024-12-01)
72
+ ### Feature Drop
73
+ Added support for custom themes and dark mode.
74
+
75
+ == v1.0.0 (2024-11-10)
76
+ Initial public release.
77
+ :::
78
+
79
+ ### Changelog with Nested Elements
80
+
81
+ You can put anything inside a changelog entry, including callouts and code blocks.
82
+
83
+ **Code:**
84
+ ````markdown
85
+ ::: changelog
86
+
87
+ == v3.0.0-beta
88
+ ### The Future is Here
89
+
90
+ ::: callout warning Breaking Changes
91
+ This release changes the config format. Please update your `docmd.config.js`.
92
+ :::
93
+
94
+ **New Config Example:**
95
+ ```javascript
96
+ module.exports = {
97
+ version: 3,
98
+ // ...
99
+ }
100
+ ```
101
+
102
+ == v2.5.0
103
+ Maintenance release with bug fixes.
104
+ :::
105
+ ````
106
+
107
+ **Rendered Preview:**
108
+
109
+ ::: changelog
110
+
111
+ == v3.0.0-beta
112
+ ### The Future is Here
113
+
114
+ ::: callout warning Breaking Changes
115
+ This release changes the config format. Please update your `docmd.config.js`.
116
+ :::
117
+
118
+ **New Config Example:**
119
+ ```javascript
120
+ module.exports = {
121
+ version: 3,
122
+ // ...
123
+ }
124
+ ```
125
+
126
+ == v2.5.0
127
+ Maintenance release with bug fixes.
128
+ :::