@mgks/docmd 0.1.2 → 0.1.3
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.
- package/README.md +3 -1
- package/assets/css/welcome.css +362 -0
- package/assets/images/preview-dark-1.png +0 -0
- package/assets/images/preview-dark-2.png +0 -0
- package/assets/images/preview-dark-3.png +0 -0
- package/assets/images/preview-light-1.png +0 -0
- package/assets/images/preview-light-2.png +0 -0
- package/assets/images/preview-light-3.png +0 -0
- package/config.js +5 -2
- package/docs/content/no-style-example.md +110 -0
- package/docs/content/no-style-pages.md +202 -0
- package/docs/index.md +140 -53
- package/docs/overview.md +56 -0
- package/package.json +1 -1
- package/src/commands/build.js +239 -203
- package/src/commands/dev.js +70 -28
- package/src/core/file-processor.js +67 -5
- package/src/core/html-generator.js +16 -3
- package/src/plugins/sitemap.js +15 -1
- package/src/templates/no-style.ejs +159 -0
|
@@ -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.)
|
package/docs/index.md
CHANGED
|
@@ -1,56 +1,143 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: "
|
|
3
|
-
description: "
|
|
2
|
+
title: "docmd: 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: true
|
|
11
|
+
themeToggle: false
|
|
12
|
+
lightbox: false
|
|
13
|
+
customHead: |
|
|
14
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
15
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
16
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PT+Mono:wght@700&display=swap" rel="stylesheet">
|
|
17
|
+
<link rel="stylesheet" href="/assets/css/welcome.css">
|
|
18
|
+
<script>
|
|
19
|
+
// Initialize theme from localStorage or system preference
|
|
20
|
+
function initTheme() {
|
|
21
|
+
const storedTheme = localStorage.getItem('docmd-theme');
|
|
22
|
+
if (storedTheme) {
|
|
23
|
+
document.body.setAttribute('data-theme', storedTheme);
|
|
24
|
+
} else {
|
|
25
|
+
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
26
|
+
document.body.setAttribute('data-theme', prefersDark ? 'dark' : 'light');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Toggle theme between light and dark
|
|
31
|
+
function toggleTheme() {
|
|
32
|
+
const currentTheme = document.body.getAttribute('data-theme');
|
|
33
|
+
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
|
|
34
|
+
document.body.setAttribute('data-theme', newTheme);
|
|
35
|
+
localStorage.setItem('docmd-theme', newTheme);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Run on page load
|
|
39
|
+
document.addEventListener('DOMContentLoaded', initTheme);
|
|
40
|
+
</script>
|
|
4
41
|
---
|
|
5
42
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
43
|
+
<div class="header-top">
|
|
44
|
+
<button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark/light mode">
|
|
45
|
+
<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>
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<div class="landing-container">
|
|
50
|
+
<div class="content-side">
|
|
51
|
+
<div class="logo">
|
|
52
|
+
<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>
|
|
53
|
+
<span class="logo-text">docmd</span>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<h1>Beautiful Documentation.<br />Zero Clutter. Just Content.</h1>
|
|
57
|
+
|
|
58
|
+
<p class="tagline">
|
|
59
|
+
Transform your Markdown files into elegant, responsive documentation sites with zero setup.
|
|
60
|
+
</p>
|
|
61
|
+
|
|
62
|
+
<div class="features">
|
|
63
|
+
<div class="feature">
|
|
64
|
+
<div class="feature-icon">
|
|
65
|
+
<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>
|
|
66
|
+
</div>
|
|
67
|
+
<div class="feature-text">
|
|
68
|
+
<strong>Markdown Powered</strong>
|
|
69
|
+
Write in Markdown – get clean HTML
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="feature">
|
|
74
|
+
<div class="feature-icon">
|
|
75
|
+
<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>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="feature-text">
|
|
78
|
+
<strong>Responsive Design</strong>
|
|
79
|
+
Looks great on any device
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div class="feature">
|
|
84
|
+
<div class="feature-icon">
|
|
85
|
+
<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>
|
|
86
|
+
</div>
|
|
87
|
+
<div class="feature-text">
|
|
88
|
+
<strong>Light & Dark Modes</strong>
|
|
89
|
+
Themes with auto dark mode
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div class="feature">
|
|
94
|
+
<div class="feature-icon">
|
|
95
|
+
<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>
|
|
96
|
+
</div>
|
|
97
|
+
<div class="feature-text">
|
|
98
|
+
<strong>Highly Customizable</strong>
|
|
99
|
+
Extend with plugins & containers
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
|
|
104
|
+
<a href="https://www.producthunt.com/posts/docmd?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-docmd" target="_blank" style="margin-bottom: .5em;"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=963681&theme=dark&t=1747100482899" alt="docmd - Generate beautiful, light documentation sites from Markdown. | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54"></a>
|
|
105
|
+
|
|
106
|
+
<div class="buttons">
|
|
107
|
+
<a href="/getting-started/" class="btn btn-primary">
|
|
108
|
+
<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>
|
|
109
|
+
Get Started
|
|
110
|
+
</a>
|
|
111
|
+
<a href="https://github.com/mgks/docmd" target="_blank" rel="noopener" class="btn btn-secondary">
|
|
112
|
+
<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>
|
|
113
|
+
GitHub
|
|
114
|
+
</a>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<div class="social-links">
|
|
118
|
+
<a href="https://github.com/sponsors/mgks" target="_blank" rel="noopener" class="social-link" title="Buy me a Coffee – GitHub Sponsors">
|
|
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" 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>
|
|
120
|
+
</a>
|
|
121
|
+
<!--<a href="https://twitter.com/share?url=https://docmd.mgks.dev" target="_blank" rel="noopener" class="social-link">
|
|
122
|
+
<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>
|
|
123
|
+
</a>-->
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div class="preview-side">
|
|
128
|
+
<div class="preview-stack">
|
|
129
|
+
<div class="preview-image top">
|
|
130
|
+
<img src="/assets/images/preview-light-1.png" alt="docmd documentation preview" class="light-img">
|
|
131
|
+
<img src="/assets/images/preview-dark-1.png" alt="docmd documentation preview" class="dark-img">
|
|
132
|
+
</div>
|
|
133
|
+
<div class="preview-image middle">
|
|
134
|
+
<img src="/assets/images/preview-light-2.png" alt="docmd documentation preview" class="light-img">
|
|
135
|
+
<img src="/assets/images/preview-dark-2.png" alt="docmd documentation preview" class="dark-img">
|
|
136
|
+
</div>
|
|
137
|
+
<div class="preview-image bottom">
|
|
138
|
+
<img src="/assets/images/preview-light-3.png" alt="docmd documentation preview" class="light-img">
|
|
139
|
+
<img src="/assets/images/preview-dark-3.png" alt="docmd documentation preview" class="dark-img">
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
package/docs/overview.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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."
|
|
4
|
+
---
|
|
5
|
+
|
|
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.
|
package/package.json
CHANGED