@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.
- package/.github/workflows/deploy-docmd.yml +2 -2
- package/README.md +3 -1
- package/assets/css/welcome.css +378 -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 +8 -3
- package/docs/cli-commands.md +1 -2
- package/docs/configuration.md +34 -22
- package/docs/content/frontmatter.md +2 -2
- package/docs/content/index.md +5 -4
- package/docs/content/markdown-syntax.md +4 -4
- package/docs/content/no-style-example.md +110 -0
- package/docs/content/no-style-pages.md +202 -0
- package/docs/contributing.md +7 -0
- package/docs/deployment.md +22 -31
- package/docs/getting-started/basic-usage.md +3 -2
- package/docs/getting-started/index.md +3 -3
- package/docs/getting-started/installation.md +1 -1
- package/docs/index.md +137 -53
- package/docs/overview.md +56 -0
- package/docs/plugins/sitemap.md +1 -1
- package/docs/theming/assets-management.md +1 -1
- package/docs/theming/available-themes.md +29 -51
- package/package.json +1 -1
- package/src/assets/css/docmd-main.css +2 -1
- package/src/assets/css/docmd-theme-ruby.css +606 -0
- package/src/commands/build.js +239 -203
- package/src/commands/dev.js +75 -30
- package/src/commands/init.js +2 -0
- 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/layout.ejs +1 -1
- package/src/templates/no-style.ejs +159 -0
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/docs/plugins/sitemap.md
CHANGED
|
@@ -85,4 +85,4 @@ sitemap: false
|
|
|
85
85
|
|
|
86
86
|
## Verifying Your Sitemap
|
|
87
87
|
|
|
88
|
-
After building your site, check the generated sitemap at `your-site/sitemap.xml`. You can also submit the sitemap URL to search engines like Google Search Console or Bing Webmaster Tools to help them discover and index your content more efficiently.
|
|
88
|
+
After building your site, check the generated sitemap at `your-site/sitemap.xml`. You can also submit the sitemap URL to search engines like Google Search Console or Bing Webmaster Tools to help them discover and index your content more efficiently.
|
|
@@ -123,4 +123,4 @@ For more information on deployment, see the [Deployment](/deployment/) documenta
|
|
|
123
123
|
## Related Topics
|
|
124
124
|
|
|
125
125
|
- [Custom CSS & JS](/theming/custom-css-js/) - Learn how to configure custom CSS and JavaScript
|
|
126
|
-
- [Theming](/theming/) - Explore other theming options for your documentation site
|
|
126
|
+
- [Theming](/theming/) - Explore other theming options for your documentation site
|
|
@@ -7,79 +7,57 @@ description: "An overview of the built-in themes provided by docmd."
|
|
|
7
7
|
|
|
8
8
|
`docmd` allows you to choose from a selection of built-in themes to quickly change the overall look and feel of your documentation site. You can specify the theme in your `config.js` file using the `theme.name` property.
|
|
9
9
|
|
|
10
|
-
## 1. `default` Theme
|
|
11
|
-
|
|
12
|
-
* **`theme.name: 'default'`** (This is the default if `theme.name` is not specified)
|
|
13
|
-
* **Description:** The standard `docmd` theme. It's designed to be clean, modern, responsive, and highly readable. It features:
|
|
14
|
-
* A collapsible sidebar for navigation.
|
|
15
|
-
* Support for light and dark color modes.
|
|
16
|
-
* Clear typography optimized for documentation.
|
|
17
|
-
* Well-styled custom containers (callouts, cards, steps).
|
|
18
|
-
* Effective syntax highlighting for code blocks.
|
|
19
|
-
* **When to use:** A great general-purpose theme suitable for most documentation projects.
|
|
20
|
-
|
|
21
10
|
```javascript
|
|
22
11
|
// config.js
|
|
23
12
|
module.exports = {
|
|
24
13
|
// ...
|
|
25
14
|
theme: {
|
|
26
|
-
name: 'default',
|
|
27
|
-
defaultMode: 'light',
|
|
15
|
+
name: 'theme-name', // Options: 'default', 'sky', 'ruby'
|
|
16
|
+
defaultMode: 'light', // or 'dark'
|
|
28
17
|
// ...
|
|
29
18
|
},
|
|
30
19
|
// ...
|
|
31
20
|
};
|
|
32
21
|
```
|
|
33
22
|
|
|
23
|
+
## 1. `default` Theme
|
|
24
|
+
|
|
25
|
+
* **`theme.name: 'default'`**
|
|
26
|
+
* **Description:** The foundation of all docmd themes. This is not a separate theme but the base styling that's always included regardless of which theme you select. It provides:
|
|
27
|
+
* Basic layout structure with sidebar and content area
|
|
28
|
+
* Essential typography and spacing
|
|
29
|
+
* Core styling for documentation elements like code blocks, tables, and custom containers
|
|
30
|
+
* Light and dark mode foundation
|
|
31
|
+
* **When to use:** When you want a minimalist, clean interface without additional styling layers. This is the most lightweight option.
|
|
32
|
+
|
|
34
33
|
## 2. `sky` Theme
|
|
35
34
|
|
|
36
|
-
* **`theme.name: 'sky'`**
|
|
35
|
+
* **`theme.name: 'sky'`** (This is the default if `theme.name` is not specified)
|
|
37
36
|
* **Description:** A modern theme inspired by popular documentation platforms, with a fresh and airy design. It features:
|
|
38
|
-
* A clean, minimalist interface with subtle shadows and rounded corners
|
|
39
|
-
* Custom typography with improved readability
|
|
40
|
-
* Refined color palette for both light and dark modes
|
|
41
|
-
* Enhanced callout and container styles
|
|
42
|
-
* Premium documentation feel with careful attention to spacing and contrast
|
|
37
|
+
* A clean, minimalist interface with subtle shadows and rounded corners
|
|
38
|
+
* Custom typography with improved readability
|
|
39
|
+
* Refined color palette for both light and dark modes
|
|
40
|
+
* Enhanced callout and container styles
|
|
41
|
+
* Premium documentation feel with careful attention to spacing and contrast
|
|
43
42
|
* **When to use:** When you want a premium, polished look for your documentation site.
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
// config.js
|
|
47
|
-
module.exports = {
|
|
48
|
-
// ...
|
|
49
|
-
theme: {
|
|
50
|
-
name: 'sky',
|
|
51
|
-
defaultMode: 'light', // or 'dark'
|
|
52
|
-
// ...
|
|
53
|
-
},
|
|
54
|
-
// ...
|
|
55
|
-
};
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Light and Dark Mode
|
|
59
|
-
|
|
60
|
-
All themes support both light and dark color modes. You can set the default mode using the `theme.defaultMode` property and enable a toggle button with `theme.enableModeToggle`:
|
|
61
|
-
|
|
62
|
-
```javascript
|
|
63
|
-
// config.js
|
|
64
|
-
module.exports = {
|
|
65
|
-
// ...
|
|
66
|
-
theme: {
|
|
67
|
-
name: 'sky', // or 'default'
|
|
68
|
-
defaultMode: 'dark', // Start in dark mode
|
|
69
|
-
enableModeToggle: true, // Show a toggle button in the sidebar
|
|
70
|
-
// ...
|
|
71
|
-
},
|
|
72
|
-
// ...
|
|
73
|
-
};
|
|
74
|
-
```
|
|
44
|
+
## 3. `ruby` Theme
|
|
75
45
|
|
|
76
|
-
|
|
46
|
+
* **`theme.name: 'ruby'`**
|
|
47
|
+
* **Description:** An elegant, vibrant theme inspired by the precious gemstone. It features:
|
|
48
|
+
* Rich, jewel-toned color palette centered around ruby reds and complementary colors
|
|
49
|
+
* Sophisticated typography with serif headings and sans-serif body text
|
|
50
|
+
* Distinctive card and callout designs with gem-like faceted styling
|
|
51
|
+
* Subtle gradients and depth effects that evoke the brilliance of gemstones
|
|
52
|
+
* Luxurious dark mode with deep, rich backgrounds and vibrant accent colors
|
|
53
|
+
* **When to use:** When you want your documentation to have a distinctive, premium feel with rich colors and elegant typography.
|
|
77
54
|
|
|
78
55
|
## How Themes Work
|
|
79
56
|
|
|
80
57
|
Each theme consists of CSS files located within `docmd`'s internal assets. When you select a theme name, `docmd` links the corresponding stylesheet in your site's HTML:
|
|
81
58
|
|
|
82
59
|
- `default` theme uses the base CSS with no additional theme stylesheet
|
|
83
|
-
- `sky` theme loads `theme-sky.css` with its custom styling
|
|
60
|
+
- `sky` theme loads `docmd-theme-sky.css` with its custom styling on top of the default CSS
|
|
61
|
+
- `ruby` theme loads `docmd-theme-ruby.css` with its custom styling on top of the default CSS
|
|
84
62
|
|
|
85
63
|
You can further customize any chosen theme using the `theme.customCss` option in your `config.js` to add your own overrides or additional styles. See [Custom CSS & JS](/theming/custom-css-js/) for details.
|
package/package.json
CHANGED