@mgks/docmd 0.1.2 → 0.1.4

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 (38) hide show
  1. package/.github/workflows/deploy-docmd.yml +2 -2
  2. package/README.md +3 -1
  3. package/assets/css/welcome.css +378 -0
  4. package/assets/images/preview-dark-1.png +0 -0
  5. package/assets/images/preview-dark-2.png +0 -0
  6. package/assets/images/preview-dark-3.png +0 -0
  7. package/assets/images/preview-light-1.png +0 -0
  8. package/assets/images/preview-light-2.png +0 -0
  9. package/assets/images/preview-light-3.png +0 -0
  10. package/config.js +8 -3
  11. package/docs/cli-commands.md +1 -2
  12. package/docs/configuration.md +34 -22
  13. package/docs/content/frontmatter.md +2 -2
  14. package/docs/content/index.md +5 -4
  15. package/docs/content/markdown-syntax.md +4 -4
  16. package/docs/content/no-style-example.md +110 -0
  17. package/docs/content/no-style-pages.md +202 -0
  18. package/docs/contributing.md +7 -0
  19. package/docs/deployment.md +22 -31
  20. package/docs/getting-started/basic-usage.md +3 -2
  21. package/docs/getting-started/index.md +3 -3
  22. package/docs/getting-started/installation.md +1 -1
  23. package/docs/index.md +137 -53
  24. package/docs/overview.md +56 -0
  25. package/docs/plugins/sitemap.md +1 -1
  26. package/docs/theming/assets-management.md +1 -1
  27. package/docs/theming/available-themes.md +29 -51
  28. package/package.json +1 -1
  29. package/src/assets/css/docmd-main.css +2 -1
  30. package/src/assets/css/docmd-theme-ruby.css +606 -0
  31. package/src/commands/build.js +239 -203
  32. package/src/commands/dev.js +75 -30
  33. package/src/commands/init.js +2 -0
  34. package/src/core/file-processor.js +67 -5
  35. package/src/core/html-generator.js +16 -3
  36. package/src/plugins/sitemap.js +15 -1
  37. package/src/templates/layout.ejs +1 -1
  38. package/src/templates/no-style.ejs +159 -0
@@ -0,0 +1,110 @@
1
+ ---
2
+ title: "No-Style Page Example"
3
+ description: "An example of a page using the no-style feature"
4
+ noStyle: true
5
+ components:
6
+ meta: true
7
+ favicon: true
8
+ css: true
9
+ theme: true
10
+ scripts: true
11
+ customHead: |
12
+ <style>
13
+ body {
14
+ font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
15
+ margin: 0;
16
+ padding: 0;
17
+ line-height: 1.6;
18
+ }
19
+ .container {
20
+ max-width: 800px;
21
+ margin: 0 auto;
22
+ padding: 40px 20px;
23
+ }
24
+ .header {
25
+ text-align: center;
26
+ margin-bottom: 40px;
27
+ }
28
+ .header h1 {
29
+ font-size: 3rem;
30
+ margin-bottom: 10px;
31
+ color: #4a6cf7;
32
+ }
33
+ .header p {
34
+ font-size: 1.2rem;
35
+ color: #666;
36
+ }
37
+ .content {
38
+ background-color: #f8f9fa;
39
+ padding: 30px;
40
+ border-radius: 8px;
41
+ box-shadow: 0 2px 10px rgba(0,0,0,0.05);
42
+ }
43
+ .button {
44
+ display: inline-block;
45
+ padding: 12px 24px;
46
+ background-color: #4a6cf7;
47
+ color: white;
48
+ text-decoration: none;
49
+ border-radius: 4px;
50
+ font-weight: 600;
51
+ margin-top: 20px;
52
+ }
53
+ .button:hover {
54
+ background-color: #3a5ce4;
55
+ }
56
+ [data-theme="dark"] {
57
+ color-scheme: dark;
58
+ }
59
+ [data-theme="dark"] body {
60
+ background-color: #121212;
61
+ color: #e0e0e0;
62
+ }
63
+ [data-theme="dark"] .content {
64
+ background-color: #1e1e1e;
65
+ box-shadow: 0 2px 10px rgba(0,0,0,0.2);
66
+ }
67
+ [data-theme="dark"] .header p {
68
+ color: #aaa;
69
+ }
70
+ </style>
71
+ bodyClass: "no-style-example"
72
+ ---
73
+
74
+ <div class="container">
75
+ <div class="header">
76
+ <h1>No-Style Page Example</h1>
77
+ <p>This page demonstrates the no-style feature with a custom layout</p>
78
+ </div>
79
+
80
+ <div class="content">
81
+ <h2>What is this page?</h2>
82
+ <p>
83
+ This is an example page that uses the <code>noStyle: true</code> frontmatter option to create a completely custom page layout.
84
+ Unlike regular documentation pages, this page doesn't use the standard docmd layout with sidebar navigation and table of contents.
85
+ </p>
86
+
87
+ <h2>How does it work?</h2>
88
+ <p>
89
+ The <code>noStyle</code> option tells docmd to use a special template that only includes the components you explicitly request
90
+ via the <code>components</code> object in frontmatter. This gives you complete control over the page structure.
91
+ </p>
92
+
93
+ <h2>Features enabled on this page:</h2>
94
+ <ul>
95
+ <li><strong>meta</strong>: Meta tags, title, and description for SEO</li>
96
+ <li><strong>favicon</strong>: The site favicon</li>
97
+ <li><strong>css</strong>: Basic CSS for markdown content</li>
98
+ <li><strong>theme</strong>: Theme support for light/dark mode</li>
99
+ <li><strong>scripts</strong>: JavaScript for functionality</li>
100
+ </ul>
101
+
102
+ <h2>Custom styling</h2>
103
+ <p>
104
+ This page includes custom CSS in the <code>customHead</code> frontmatter field. This allows you to define page-specific styles
105
+ without affecting the rest of your site.
106
+ </p>
107
+
108
+ <a href="/content/no-style-pages/" class="button">Get Back to No-Style Pages Documentation</a>
109
+ </div>
110
+ </div>
@@ -0,0 +1,202 @@
1
+ ---
2
+ title: "No-Style Pages"
3
+ description: "Create custom standalone pages with minimal styling and only the components you need."
4
+ ---
5
+
6
+ # No-Style Pages
7
+
8
+ docmd offers a "no-style" page format that gives you maximum flexibility to create custom standalone pages while still leveraging the docmd infrastructure. This is perfect for creating:
9
+
10
+ - Landing pages with custom layouts
11
+ - Welcome pages with unique designs
12
+ - Single-page websites
13
+ - Special marketing pages
14
+ - Any page that needs a completely custom design
15
+
16
+ ## How It Works
17
+
18
+ To create a no-style page, add `noStyle: true` to your page's frontmatter. This tells docmd to use a special template that only includes the components you explicitly request.
19
+
20
+ By default, a no-style page will render just your content with minimal HTML structure. You can then selectively enable specific components via the `components` object in frontmatter.
21
+
22
+ ## HTML Support
23
+
24
+ No-style pages fully support raw HTML content without any escaping or processing. You can write pure HTML in your markdown files, and it will be rendered exactly as written. This gives you complete control over the page structure and design.
25
+
26
+ Unlike regular markdown pages, where HTML might be processed or escaped, no-style pages treat your content as raw HTML, making them perfect for custom layouts and designs.
27
+
28
+ ## Basic Example
29
+
30
+ Here's a minimal example of a no-style page:
31
+
32
+ ```yaml
33
+ ---
34
+ title: "Welcome"
35
+ description: "Welcome to my project"
36
+ noStyle: true
37
+ components:
38
+ meta: true # Include meta tags, title, description
39
+ css: false # Don't include default CSS
40
+ ---
41
+
42
+ <div style="text-align: center; padding: 50px;">
43
+ <h1>Welcome to My Project</h1>
44
+ <p>This is a completely custom page with only the components I need.</p>
45
+ <a href="/docs/" class="button">View Documentation</a>
46
+ </div>
47
+ ```
48
+
49
+ ## Available Components
50
+
51
+ You can control exactly which components are included in your page by setting them to `true` or `false` in the `components` object:
52
+
53
+ | Component | Description | Default |
54
+ |-----------|-------------|---------|
55
+ | `meta` | Meta tags, title, description | `true` |
56
+ | `siteTitle` | Include site title after page title | `true` |
57
+ | `favicon` | Include favicon | `true` |
58
+ | `css` | Include main CSS | `false` |
59
+ | `highlight` | Include syntax highlighting CSS | `false` |
60
+ | `theme` | Include theme-specific CSS | `false` |
61
+ | `customCss` | Include custom CSS files from config | `false` |
62
+ | `pluginStyles` | Include plugin-specific CSS | `false` |
63
+ | `pluginHeadScripts` | Include plugin scripts in head | `false` |
64
+ | `layout` | Use main content layout (`true`, `'full'`, or `false`) | `false` |
65
+ | `sidebar` | Include sidebar | `false` |
66
+ | `header` | Include page header | `false` |
67
+ | `pageTitle` | Include page title in header | `false` |
68
+ | `footer` | Include page footer | `false` |
69
+ | `branding` | Include docmd branding in footer | `false` |
70
+ | `logo` | Include logo in sidebar | `false` |
71
+ | `navigation` | Include navigation in sidebar | `false` |
72
+ | `themeToggle` | Include theme toggle button | `false` |
73
+ | `toc` | Include table of contents | `false` |
74
+ | `scripts` | Include all scripts | `false` |
75
+ | `customJs` | Include custom JS files from config | `false` |
76
+ | `pluginBodyScripts` | Include plugin scripts at end of body | `false` |
77
+
78
+ ## Layout Options
79
+
80
+ The `components.layout` property has three possible values:
81
+
82
+ - `false` (default): No layout wrapper, just your raw content
83
+ - `true`: Use the main content layout with optional header and footer
84
+ - `'full'`: Same as `true`, a full layout with content area
85
+
86
+ ## Sidebar Option
87
+
88
+ If you set `components.sidebar: true`, the sidebar will be included with optional logo, navigation, and theme toggle button.
89
+
90
+ ## Custom HTML in Head and Body
91
+
92
+ You can also include custom HTML in the head and body sections:
93
+
94
+ ```yaml
95
+ ---
96
+ title: "Custom Page"
97
+ noStyle: true
98
+ customHead: |
99
+ <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
100
+ <style>
101
+ body { font-family: 'Roboto', sans-serif; }
102
+ </style>
103
+ customScripts: |
104
+ <script>
105
+ document.addEventListener('DOMContentLoaded', () => {
106
+ console.log('Page loaded!');
107
+ });
108
+ </script>
109
+ bodyClass: "landing-page"
110
+ ---
111
+ ```
112
+
113
+ ## Complete Example
114
+
115
+ Here's a more complete example of a landing page:
116
+
117
+ ```yaml
118
+ ---
119
+ title: "My Project"
120
+ description: "A powerful tool for developers"
121
+ noStyle: true
122
+ components:
123
+ meta: true
124
+ favicon: true
125
+ css: true
126
+ theme: true
127
+ layout: true
128
+ header: true
129
+ pageTitle: true
130
+ footer: true
131
+ branding: true
132
+ scripts: true
133
+ customHead: |
134
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
135
+ <style>
136
+ body { font-family: 'Poppins', sans-serif; }
137
+ .hero { text-align: center; padding: 80px 20px; }
138
+ .cta-button { display: inline-block; padding: 12px 24px; background: #4a6cf7; color: white;
139
+ text-decoration: none; border-radius: 4px; font-weight: 600; }
140
+ </style>
141
+ bodyClass: "landing-page"
142
+ ---
143
+
144
+ <div class="hero">
145
+ <h1>Welcome to My Project</h1>
146
+ <p>A powerful tool that helps developers build amazing things.</p>
147
+ <a href="/docs/" class="cta-button">Get Started</a>
148
+ </div>
149
+
150
+ <div class="features">
151
+ <div class="feature">
152
+ <h2>Easy to Use</h2>
153
+ <p>Simple API and clear documentation make it easy to get started.</p>
154
+ </div>
155
+ <div class="feature">
156
+ <h2>Powerful</h2>
157
+ <p>Advanced features for when you need them.</p>
158
+ </div>
159
+ <div class="feature">
160
+ <h2>Flexible</h2>
161
+ <p>Adapt to your workflow, not the other way around.</p>
162
+ </div>
163
+ </div>
164
+ ```
165
+
166
+ ## HTML and Markdown Mixed Content
167
+
168
+ No-style pages support both HTML and Markdown content. You can freely mix them in your page:
169
+
170
+ ```markdown
171
+ ---
172
+ title: "Mixed Content"
173
+ noStyle: true
174
+ components:
175
+ meta: true
176
+ css: true
177
+ ---
178
+
179
+ <div style="text-align: center">
180
+ <h1>My Custom Page</h1>
181
+ </div>
182
+
183
+ ## Regular Markdown Heading
184
+
185
+ This is regular **Markdown** content that will be processed normally.
186
+
187
+ <div class="custom-section">
188
+ <h3>HTML Section</h3>
189
+ <p>This is HTML content within the page.</p>
190
+ </div>
191
+
192
+ - Markdown list item 1
193
+ - Markdown list item 2
194
+ ```
195
+
196
+ ## Best Practices
197
+
198
+ 1. Start with minimal components and add only what you need
199
+ 2. Use the `customHead` property for page-specific styles
200
+ 3. Consider creating a separate CSS file for your custom pages
201
+ 4. Test your page in both light and dark modes if using theme support
202
+ 5. Remember that no-style pages still benefit from docmd's plugins (SEO, analytics, etc.)
@@ -58,6 +58,13 @@ To set up `docmd` for local development:
58
58
  * Follow the existing code style and formatting.
59
59
  * Consider running `npm run lint` to check for style issues (if set up).
60
60
 
61
+ ### Environment Setup
62
+
63
+ To enable live change tracking for internal files during development, set the DOCMD_DEV environment variable:
64
+
65
+ - **Temporarily:** Run `export DOCMD_DEV=true` in your terminal before starting the dev server.
66
+ - **Permanently:** Add `export DOCMD_DEV=true` to your `~/.zshrc` file and run `source ~/.zshrc`.
67
+
61
68
  ## Pull Request Process
62
69
 
63
70
  Once you're satisfied with your changes:
@@ -59,14 +59,12 @@ The most robust and automated way to deploy to GitHub Pages is using a GitHub Ac
59
59
  Create a file at `.github/workflows/deploy-docs.yml` with the following content:
60
60
 
61
61
  ```yaml
62
- name: Deploy docmd docs to Pages
62
+ name: Deploy docmd docs to GitHub Pages
63
63
 
64
64
  on:
65
- # Run on pushes to main branch
66
65
  push:
67
- branches: ["main"]
68
- # Allows manual workflow trigger from Actions tab
69
- workflow_dispatch:
66
+ branches: ["main"] # Your default branch
67
+ workflow_dispatch: # Allows manual workflow trigger from Actions tab
70
68
 
71
69
  # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
72
70
  permissions:
@@ -74,46 +72,39 @@ permissions:
74
72
  pages: write
75
73
  id-token: write
76
74
 
77
- # Allow only one concurrent deployment
78
- concurrency:
79
- group: "pages"
80
- cancel-in-progress: false
81
-
82
75
  jobs:
83
- build:
76
+ build-and-deploy:
84
77
  runs-on: ubuntu-latest
78
+ environment:
79
+ name: github-pages
80
+ url: ${{ steps.deployment.outputs.page_url }}
85
81
  steps:
86
82
  - name: Checkout
87
- uses: actions/checkout@v3
88
- - name: Setup Node.js
89
- uses: actions/setup-node@v3
83
+ uses: actions/checkout@v4
84
+
85
+ - name: Set up Node.js
86
+ uses: actions/setup-node@v4
90
87
  with:
91
- node-version: '20' # Or the Node.js version docmd supports/requires
88
+ node-version: '22'
92
89
  cache: 'npm'
90
+
93
91
  - name: Install docmd (globally or from devDependencies)
94
- # If docmd is a dev dependency of the project being documented:
95
- # run: npm ci && npm run build:docs # Assuming 'build:docs' script runs 'docmd build'
96
- # If installing docmd globally for this action:
97
- run: npm install -g docmd # Or your scoped package name e.g. @mgks/docmd
92
+ run: npm install -g @mgks/docmd
93
+
98
94
  - name: Build site with docmd
99
95
  run: docmd build # Assumes config.js is in the root and correctly points to srcDir/outputDir
96
+
100
97
  - name: Setup Pages
101
- uses: actions/configure-pages@v3
98
+ uses: actions/configure-pages@v5
99
+
102
100
  - name: Upload artifact
103
- uses: actions/upload-pages-artifact@v2
101
+ uses: actions/upload-pages-artifact@v3
104
102
  with:
105
- # This should be your outputDir path
106
- path: './site' # or './docs' if you set outputDir: 'docs'
107
- deploy:
108
- environment:
109
- name: github-pages
110
- url: ${{ steps.deployment.outputs.page_url }}
111
- runs-on: ubuntu-latest
112
- needs: build
113
- steps:
103
+ path: ./site # This should be your outputDir path
104
+
114
105
  - name: Deploy to GitHub Pages
115
106
  id: deployment
116
- uses: actions/deploy-pages@v2
107
+ uses: actions/deploy-pages@v4
117
108
  ```
118
109
 
119
110
  Then:
@@ -36,6 +36,7 @@ Create your Markdown (`.md`) files inside the `docs/` directory. You can organiz
36
36
 
37
37
  ```
38
38
  my-awesome-docs/
39
+ ├── assets/
39
40
  ├── docs/
40
41
  │ ├── index.md
41
42
  │ └── api/
@@ -47,7 +48,7 @@ my-awesome-docs/
47
48
  └── config.js
48
49
  ```
49
50
 
50
- Each Markdown file should start with YAML frontmatter to define metadata like the page title. See [Writing Content > Frontmatter](/writing-content/frontmatter/) for details.
51
+ Each Markdown file should start with YAML frontmatter to define metadata like the page title. See [Content > Frontmatter](/content/frontmatter/) for details.
51
52
 
52
53
  ## 3. Preview Your Site (`docmd dev`)
53
54
 
@@ -85,4 +86,4 @@ This command:
85
86
 
86
87
  The contents of the `site/` directory are all you need to deploy your documentation. You can upload this folder to any static web hosting provider. See [Deployment](/deployment/) for more information.
87
88
 
88
- This covers the fundamental workflow of using `docmd`. Next, you'll want to learn more about [Writing Content](/writing-content/) and [Configuration](/configuration/).
89
+ This covers the fundamental workflow of using `docmd`. Next, you'll want to learn more about [Content](/content/) and [Configuration](/configuration/).
@@ -11,11 +11,11 @@ Whether you're documenting a new open-source project, an internal tool, or just
11
11
 
12
12
  ## What You'll Learn:
13
13
 
14
- * **[Installation](./installation.md):** How to install `docmd` on your system using npm.
15
- * **[Basic Usage](./basic-usage.md):**
14
+ * **[Installation](/getting-started/installation/):** How to install `docmd` on your system using npm.
15
+ * **[Basic Usage](/getting-started/basic-usage/):**
16
16
  * Initializing a new `docmd` project with `docmd init`.
17
17
  * Adding and structuring your Markdown content.
18
18
  * Building your static site with `docmd build`.
19
19
  * Previewing your site with live reloading using `docmd dev`.
20
20
 
21
- Ready to begin? Let's start with [Installation](./installation.md).
21
+ Ready to begin? Let's start with [Installation](/getting-started/installation/).
@@ -5,7 +5,7 @@ description: "Learn how to install docmd on your system globally or as a project
5
5
 
6
6
  # Installation
7
7
 
8
- You can install `docmd` using npm (Node Package Manager), which comes with Node.js. If you don't have Node.js and npm installed, please visit [nodejs.org](https://nodejs.org/) to download and install them first (Node.js version 20.x or higher is recommended for `docmd`).
8
+ You can install `docmd` using npm (Node Package Manager), which comes with Node.js. If you don't have Node.js and npm installed, please visit [nodejs.org](https://nodejs.org/) to download and install them first (Node.js version 22.x or higher is required for `docmd`).
9
9
 
10
10
  ## Global Installation (Recommended for CLI Use)
11
11
 
package/docs/index.md CHANGED
@@ -1,56 +1,140 @@
1
1
  ---
2
- title: "Minimalist Markdown Docs Generator"
3
- description: "Generate beautiful, lightweight static documentation sites directly from your Markdown files with docmd. Zero clutter, just content."
2
+ title: "Documentation. Zero Clutter. Just Content."
3
+ description: "A lightweight static documentation site generator that transforms Markdown into beautiful, responsive documentation websites."
4
+ noStyle: true
5
+ components:
6
+ meta: true
7
+ favicon: true
8
+ css: false
9
+ theme: false
10
+ scripts: false
11
+ customHead: |
12
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
13
+ <link rel="preconnect" href="https://fonts.googleapis.com">
14
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
15
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PT+Mono:wght@700&display=swap" rel="stylesheet">
16
+ <link rel="stylesheet" href="/assets/css/welcome.css">
17
+ <script>
18
+ // Initialize theme from localStorage or system preference
19
+ function initTheme() {
20
+ const storedTheme = localStorage.getItem('docmd-theme');
21
+ if (storedTheme) {
22
+ document.body.setAttribute('data-theme', storedTheme);
23
+ } else {
24
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
25
+ document.body.setAttribute('data-theme', prefersDark ? 'dark' : 'light');
26
+ }
27
+ }
28
+
29
+ // Toggle theme between light and dark
30
+ function toggleTheme() {
31
+ const currentTheme = document.body.getAttribute('data-theme');
32
+ const newTheme = currentTheme === 'light' ? 'dark' : 'light';
33
+ document.body.setAttribute('data-theme', newTheme);
34
+ localStorage.setItem('docmd-theme', newTheme);
35
+ }
36
+
37
+ // Run on page load
38
+ document.addEventListener('DOMContentLoaded', initTheme);
39
+ </script>
4
40
  ---
5
41
 
6
- # docmd
7
-
8
- **Generate beautiful, lightweight static documentation sites directly from your Markdown files. Zero clutter, just content.**
9
-
10
- `docmd` is a Node.js-based command-line tool that transforms a directory of Markdown files (`.md`) into a clean, fast, and themeable static website. It prioritizes simplicity for the author, leveraging standard Markdown and intuitive configuration, while producing elegant and functional documentation sites.
11
-
12
- ::: callout tip
13
- This very documentation site is built using `docmd`!
14
- :::
15
-
16
- ## Core Philosophy
17
-
18
- * **Markdown First:** Your content lives in standard `.md` files with simple YAML frontmatter.
19
- * **Minimal Configuration:** Sensible defaults with straightforward overrides via `config.js`.
20
- * **Lightweight Build:** Fast generation process using Node.js, no complex framework dependencies for the build itself.
21
- * **Beautiful Defaults:** Clean, responsive design with light/dark themes and syntax highlighting out-of-the-box.
22
- * **Static Output:** Deploy the generated `site/` folder anywhere (GitHub Pages, Netlify, Vercel, etc.).
23
-
24
- ## Key Features
25
-
26
- * 📝 **Standard Markdown & Frontmatter:** Write content naturally, define page metadata (title, description) easily.
27
- * 🎨 **Themeable:** Built-in light/dark modes, customizable via CSS variables. Uses `highlight.js` for code blocks.
28
- * 🧩 **Custom Containers:** Add richer components like callouts, cards, and steps using simple `::: name :::` syntax.
29
- * ⚙️ **Config-Driven Navigation:** Define your site structure and sidebar navigation in `config.js`. Supports nested items.
30
- * 🚀 **Fast Static Build:** Node.js script quickly processes files into optimized HTML & CSS.
31
- * 💻 **Simple CLI:** Easy-to-use commands (`docmd build`, `docmd init`, `docmd dev`) with clear feedback.
32
- * 🌐 **Deploy Anywhere:** Generates a standard static `site/` directory.
33
-
34
- ## Get Started Quickly
35
-
36
- 1. **Install `docmd`:**
37
- ```bash
38
- npm install -g @mgks/docmd
39
- ```
40
- 2. **Initialize Your Project:**
41
- ```bash
42
- cd my-project-docs
43
- docmd init
44
- ```
45
- 3. **Write Your Content:**
46
- Create `.md` files in the `docs/` directory.
47
- 4. **Preview Live:**
48
- ```bash
49
- docmd dev
50
- ```
51
- 5. **Build for Production:**
52
- ```bash
53
- docmd build
54
- ```
55
-
56
- Dive into the [Getting Started](/getting-started/installation/) guide for more details, or explore the sidebar to learn about specific features.
42
+ <div class="header-top">
43
+ <button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark/light mode">
44
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun-moon-icon lucide-sun-moon"><path d="M12 8a2.83 2.83 0 0 0 4 4 4 4 0 1 1-4-4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.9 4.9 1.4 1.4"/><path d="m17.7 17.7 1.4 1.4"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.3 17.7-1.4 1.4"/><path d="m19.1 4.9-1.4 1.4"/></svg>
45
+ </button>
46
+ </div>
47
+
48
+ <div class="landing-container">
49
+ <div class="content-side">
50
+ <div class="logo">
51
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-feather-icon lucide-feather"><path d="M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z"/><path d="M16 8 2 22"/><path d="M17.5 15H9"/></svg>
52
+ <span class="logo-text">docmd</span>
53
+ </div>
54
+
55
+ <h1>Beautiful Documentation.<br />Zero Clutter. Just Content.</h1>
56
+
57
+ <p class="tagline">
58
+ Transform your Markdown files into elegant, responsive documentation sites with zero setup.
59
+ </p>
60
+
61
+ <div class="features">
62
+ <div class="feature">
63
+ <div class="feature-icon">
64
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file-down-icon lucide-file-down"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/><path d="M12 18v-6"/><path d="m9 15 3 3 3-3"/></svg>
65
+ </div>
66
+ <div class="feature-text">
67
+ <strong>Markdown Powered</strong>
68
+ Write in Markdown get clean HTML
69
+ </div>
70
+ </div>
71
+
72
+ <div class="feature">
73
+ <div class="feature-icon">
74
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone"><path d="M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8"/><path d="M10 19v-3.96 3.15"/><path d="M7 19h5"/><rect width="6" height="10" x="16" y="12" rx="2"/></svg>
75
+ </div>
76
+ <div class="feature-text">
77
+ <strong>Responsive Design</strong>
78
+ Looks great on any device
79
+ </div>
80
+ </div>
81
+
82
+ <div class="feature">
83
+ <div class="feature-icon">
84
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sun-icon lucide-sun"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
85
+ </div>
86
+ <div class="feature-text">
87
+ <strong>Light & Dark Modes</strong>
88
+ Themes with auto dark mode
89
+ </div>
90
+ </div>
91
+
92
+ <div class="feature">
93
+ <div class="feature-icon">
94
+ <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
95
+ </div>
96
+ <div class="feature-text">
97
+ <strong>Highly Customizable</strong>
98
+ Extend with plugins & containers
99
+ </div>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="buttons">
104
+ <a href="/getting-started/" class="btn btn-primary">
105
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-rocket-icon lucide-rocket"><path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z"/><path d="m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z"/><path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/><path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/></svg>
106
+ Get Started
107
+ </a>
108
+ <a href="https://github.com/mgks/docmd" target="_blank" rel="noopener" class="btn btn-secondary">
109
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"></path><path d="M9 18c-4.51 2-5-2-7-2"></path></svg>
110
+ GitHub
111
+ </a>
112
+ </div>
113
+
114
+ <div class="social-links">
115
+ <a href="https://github.com/sponsors/mgks" target="_blank" rel="noopener" class="social-link" title="Buy me a Coffee – GitHub Sponsors">
116
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heart-handshake-icon lucide-heart-handshake"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/><path d="M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66"/><path d="m18 15-2-2"/><path d="m15 18-2-2"/></svg>
117
+ </a>
118
+ <a href="https://twitter.com/share?url=https://docmd.mgks.dev" target="_blank" rel="noopener" class="social-link">
119
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4.5-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z"></path></svg>
120
+ </a>
121
+ </div>
122
+ </div>
123
+
124
+ <div class="preview-side">
125
+ <div class="preview-stack">
126
+ <div class="preview-image top">
127
+ <img src="/assets/images/preview-light-1.png" alt="docmd documentation preview" class="light-img">
128
+ <img src="/assets/images/preview-dark-1.png" alt="docmd documentation preview" class="dark-img">
129
+ </div>
130
+ <div class="preview-image middle">
131
+ <img src="/assets/images/preview-light-2.png" alt="docmd documentation preview" class="light-img">
132
+ <img src="/assets/images/preview-dark-2.png" alt="docmd documentation preview" class="dark-img">
133
+ </div>
134
+ <div class="preview-image bottom">
135
+ <img src="/assets/images/preview-light-3.png" alt="docmd documentation preview" class="light-img">
136
+ <img src="/assets/images/preview-dark-3.png" alt="docmd documentation preview" class="dark-img">
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </div>