@mgks/docmd 0.3.2 → 0.3.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/README.md +5 -1
- package/package.json +28 -24
- package/.gitattributes +0 -2
- package/.github/CODE_OF_CONDUCT.md +0 -48
- package/.github/CONTRIBUTING.md +0 -129
- package/.github/FUNDING.yml +0 -15
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -58
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -27
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -16
- package/.github/SECURITY.md +0 -18
- package/.github/workflows/deploy-docmd.yml +0 -45
- package/.github/workflows/npm-publish.yml +0 -49
- package/assets/css/welcome.css +0 -6
- package/assets/images/preview-dark-1.webp +0 -0
- package/assets/images/preview-dark-2.webp +0 -0
- package/assets/images/preview-dark-3.webp +0 -0
- package/assets/images/preview-dark-welcome.png +0 -0
- package/assets/images/preview-light-1.webp +0 -0
- package/assets/images/preview-light-2.webp +0 -0
- package/assets/images/preview-light-3.webp +0 -0
- package/docs/cli-commands.md +0 -108
- package/docs/comparison.md +0 -56
- package/docs/configuration.md +0 -289
- package/docs/content/containers/buttons.md +0 -88
- package/docs/content/containers/callouts.md +0 -154
- package/docs/content/containers/cards.md +0 -93
- package/docs/content/containers/changelogs.md +0 -128
- package/docs/content/containers/collapsible.md +0 -89
- package/docs/content/containers/index.md +0 -35
- package/docs/content/containers/nested-containers.md +0 -329
- package/docs/content/containers/steps.md +0 -175
- package/docs/content/containers/tabs.md +0 -228
- package/docs/content/custom-containers.md +0 -24
- package/docs/content/frontmatter.md +0 -84
- package/docs/content/images.md +0 -205
- package/docs/content/index.md +0 -19
- package/docs/content/markdown-syntax.md +0 -309
- package/docs/content/mermaid.md +0 -723
- package/docs/content/no-style-example.md +0 -112
- package/docs/content/no-style-pages.md +0 -226
- package/docs/content/search.md +0 -68
- package/docs/contributing.md +0 -101
- package/docs/deployment.md +0 -120
- package/docs/getting-started/basic-usage.md +0 -89
- package/docs/getting-started/index.md +0 -21
- package/docs/getting-started/installation.md +0 -75
- package/docs/index.md +0 -168
- package/docs/overview.md +0 -63
- package/docs/plugins/analytics.md +0 -75
- package/docs/plugins/index.md +0 -70
- package/docs/plugins/seo.md +0 -127
- package/docs/plugins/sitemap.md +0 -87
- package/docs/recipes/custom-fonts.md +0 -43
- package/docs/recipes/favicon.md +0 -38
- package/docs/recipes/index.md +0 -12
- package/docs/recipes/landing-page.md +0 -46
- package/docs/theming/assets-management.md +0 -126
- package/docs/theming/available-themes.md +0 -77
- package/docs/theming/custom-css-js.md +0 -79
- package/docs/theming/icons.md +0 -92
- package/docs/theming/index.md +0 -19
- package/docs/theming/light-dark-mode.md +0 -114
- package/src/assets/images/docmd-preview.png +0 -0
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Basic Usage"
|
|
3
|
-
description: "Learn the basic commands to initialize, build, and preview your docmd site."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Basic Usage
|
|
7
|
-
|
|
8
|
-
Once `docmd` is [installed](/getting-started/installation/), using it involves a few simple commands to manage your documentation project.
|
|
9
|
-
|
|
10
|
-
## 1. Initialize Your Project (`docmd init`)
|
|
11
|
-
|
|
12
|
-
Navigate to the directory where you want to create your documentation project. If the directory doesn't exist, create it first.
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
mkdir my-awesome-docs
|
|
16
|
-
cd my-awesome-docs
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Then, run the `init` command:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
docmd init
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
This command sets up the basic structure for your `docmd` project:
|
|
26
|
-
|
|
27
|
-
* `docs/`: An empty directory where your Markdown source files will live.
|
|
28
|
-
* `docs/index.md`: A sample Markdown file to get you started.
|
|
29
|
-
* `docmd.config.js`: A configuration file for your site, pre-filled with sensible defaults.
|
|
30
|
-
|
|
31
|
-
You'll typically edit config file to set your site title and define the navigation structure, and then start adding your `.md` files to the `docs/` directory.
|
|
32
|
-
|
|
33
|
-
## 2. Add and Structure Content
|
|
34
|
-
|
|
35
|
-
Create your Markdown (`.md`) files inside the `docs/` directory. You can organize them into subdirectories as needed. For example:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
my-awesome-docs/
|
|
39
|
-
├── assets/
|
|
40
|
-
├── docs/
|
|
41
|
-
│ ├── index.md
|
|
42
|
-
│ └── api/
|
|
43
|
-
│ ├── introduction.md
|
|
44
|
-
│ └── endpoints.md
|
|
45
|
-
│ └── guides/
|
|
46
|
-
│ ├── setup.md
|
|
47
|
-
│ └── advanced.md
|
|
48
|
-
└── docmd.config.js
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Each Markdown file should start with YAML frontmatter to define metadata like the page title. See [Content > Frontmatter](/content/frontmatter/) for details.
|
|
52
|
-
|
|
53
|
-
## 3. Preview Your Site (`docmd dev`)
|
|
54
|
-
|
|
55
|
-
While you're writing content or configuring your site, you'll want to see a live preview. The `dev` command starts a local development server with live reloading.
|
|
56
|
-
|
|
57
|
-
In your project's root directory (e.g., `my-awesome-docs/`), run:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
docmd dev
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
This will:
|
|
64
|
-
1. Perform an initial build of your site.
|
|
65
|
-
2. Start a web server, typically at `http://localhost:3000`.
|
|
66
|
-
3. Watch your `docs/` directory and `docmd.config.js` for changes.
|
|
67
|
-
4. Automatically rebuild the site and refresh your browser when changes are detected.
|
|
68
|
-
|
|
69
|
-
Open `http://localhost:3000` in your web browser to see your site. Any changes you save to your Markdown files or config file will be reflected live in the browser.
|
|
70
|
-
|
|
71
|
-
To stop the development server, press `Ctrl+C` in your terminal.
|
|
72
|
-
|
|
73
|
-
## 4. Build Your Static Site (`docmd build`)
|
|
74
|
-
|
|
75
|
-
When you're ready to deploy your documentation or create a production version, use the `build` command:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
docmd build
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
This command:
|
|
82
|
-
1. Reads your `docmd.config.js`.
|
|
83
|
-
2. Processes all `.md` files in your `docs/` directory.
|
|
84
|
-
3. Generates the complete static HTML, CSS, and JavaScript assets.
|
|
85
|
-
4. Outputs the entire site into a `site/` directory (by default, configurable in `docmd.config.js`).
|
|
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.
|
|
88
|
-
|
|
89
|
-
This covers the fundamental workflow of using `docmd`. Next, you'll want to learn more about [Content](/content/) and [Configuration](/configuration/).
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Getting Started with docmd"
|
|
3
|
-
description: "An overview of how to get up and running with docmd for your documentation needs."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Getting Started Overview
|
|
7
|
-
|
|
8
|
-
Welcome to `docmd`! This section will guide you through installing `docmd`, initializing your first documentation project, and understanding the basic commands to build and preview your site.
|
|
9
|
-
|
|
10
|
-
Whether you're documenting a new open-source project, an internal tool, or just want a simple way to publish Markdown content as a website, `docmd` aims to make the process straightforward and enjoyable.
|
|
11
|
-
|
|
12
|
-
## What You'll Learn:
|
|
13
|
-
|
|
14
|
-
* **[Installation](/getting-started/installation/):** How to install `docmd` on your system using npm.
|
|
15
|
-
* **[Basic Usage](/getting-started/basic-usage/):**
|
|
16
|
-
* Initializing a new `docmd` project with `docmd init`.
|
|
17
|
-
* Adding and structuring your Markdown content.
|
|
18
|
-
* Building your static site with `docmd build`.
|
|
19
|
-
* Previewing your site with live reloading using `docmd dev`.
|
|
20
|
-
|
|
21
|
-
Ready to begin? Let's start with [Installation](/getting-started/installation/).
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Installation"
|
|
3
|
-
description: "Learn how to install docmd on your system globally or as a project dependency."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Installation
|
|
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 22.x or higher is required for `docmd`).
|
|
9
|
-
|
|
10
|
-
## Global Installation (Recommended for CLI Use)
|
|
11
|
-
|
|
12
|
-
For using `docmd` as a command-line tool across multiple projects, global installation is the most convenient method.
|
|
13
|
-
|
|
14
|
-
Open your terminal or command prompt and run:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install -g @mgks/docmd
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
This command downloads `docmd` and makes the `docmd` executable available in your system's PATH.
|
|
21
|
-
|
|
22
|
-
### Verify Installation
|
|
23
|
-
After installation, you can verify that `docmd` is installed correctly by running:
|
|
24
|
-
```bash
|
|
25
|
-
docmd --version
|
|
26
|
-
```
|
|
27
|
-
This should print the installed version of `docmd`. You can also see available commands with:
|
|
28
|
-
```bash
|
|
29
|
-
docmd --help
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Local Installation (Per Project)
|
|
33
|
-
|
|
34
|
-
Alternatively, you might prefer to install `docmd` as a development dependency for a specific project. This is useful if you want to lock down a specific version of `docmd` for that project or use it within npm scripts.
|
|
35
|
-
|
|
36
|
-
Navigate to your project's root directory in the terminal and run:
|
|
37
|
-
```bash
|
|
38
|
-
npm install --save-dev @mgks/docmd
|
|
39
|
-
```
|
|
40
|
-
*(Or `npm install --save-dev @username/docmd` for a scoped package.)*
|
|
41
|
-
|
|
42
|
-
When installed locally, `docmd` is not directly available as a global command. You can run it using:
|
|
43
|
-
|
|
44
|
-
* **`npx` (Recommended):** `npx` is a tool that comes with npm and allows you to execute package binaries.
|
|
45
|
-
```bash
|
|
46
|
-
npx docmd init
|
|
47
|
-
npx docmd build
|
|
48
|
-
```
|
|
49
|
-
* **NPM Scripts:** Add scripts to your project's `package.json`:
|
|
50
|
-
```json
|
|
51
|
-
// package.json
|
|
52
|
-
{
|
|
53
|
-
"scripts": {
|
|
54
|
-
"docs:init": "docmd init",
|
|
55
|
-
"docs:dev": "docmd dev",
|
|
56
|
-
"docs:build": "docmd build"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
Then, you can run them like:
|
|
61
|
-
```bash
|
|
62
|
-
npm run docs:dev
|
|
63
|
-
npm run docs:build
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Troubleshooting
|
|
67
|
-
|
|
68
|
-
* **Permission Errors (EACCES):** If you encounter permission errors during global installation on macOS or Linux, you might need to run the command with `sudo`:
|
|
69
|
-
```bash
|
|
70
|
-
sudo npm install -g @mgks/docmd
|
|
71
|
-
```
|
|
72
|
-
However, a better long-term solution is often to [configure npm to use a directory you own](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).
|
|
73
|
-
* **Command Not Found:** If `docmd` is not found after global installation, ensure that the npm global binaries directory is in your system's PATH.
|
|
74
|
-
|
|
75
|
-
With `docmd` installed, you're ready to move on to [Basic Usage](/getting-started/basic-usage/) to create and manage your documentation site.
|
package/docs/index.md
DELETED
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
---
|
|
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
|
-
themeMode: true
|
|
11
|
-
scripts: false
|
|
12
|
-
mainScripts: false
|
|
13
|
-
lightbox: false
|
|
14
|
-
seo:
|
|
15
|
-
ldJson:
|
|
16
|
-
"@context": "https://schema.org"
|
|
17
|
-
"@type": "SoftwareApplication"
|
|
18
|
-
name: "docmd"
|
|
19
|
-
operatingSystem: "Any"
|
|
20
|
-
applicationCategory: "DeveloperApplication"
|
|
21
|
-
url: "https://docmd.mgks.dev"
|
|
22
|
-
description: "docmd is a Node.js-powered static site generator for Markdown documentation. It features custom containers, multiple themes, and zero client-side bloat."
|
|
23
|
-
creator:
|
|
24
|
-
"@type": "Person"
|
|
25
|
-
name: "Ghazi"
|
|
26
|
-
sameAs:
|
|
27
|
-
- "https://github.com/mgks"
|
|
28
|
-
- "https://mgks.dev"
|
|
29
|
-
codeRepository: "https://github.com/mgks/docmd"
|
|
30
|
-
releaseNotes: "See GitHub Releases for changelog"
|
|
31
|
-
programmingLanguage: "Node.js"
|
|
32
|
-
installUrl: "https://www.npmjs.com/package/@mgks/docmd"
|
|
33
|
-
customHead: |
|
|
34
|
-
<link rel="stylesheet" href="/assets/css/welcome.css">
|
|
35
|
-
<script>
|
|
36
|
-
function toggleTheme() {
|
|
37
|
-
const currentTheme = document.documentElement.getAttribute('data-theme');
|
|
38
|
-
const newTheme = currentTheme === 'light' ? 'dark' : 'light';
|
|
39
|
-
document.documentElement.setAttribute('data-theme', newTheme);
|
|
40
|
-
localStorage.setItem('docmd-theme', newTheme);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function copyToClipboard(text) {
|
|
44
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
45
|
-
const button = event.target.closest('.copy-button');
|
|
46
|
-
const originalHTML = button.innerHTML;
|
|
47
|
-
button.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>';
|
|
48
|
-
button.style.color = '#10b981';
|
|
49
|
-
setTimeout(() => {
|
|
50
|
-
button.innerHTML = originalHTML;
|
|
51
|
-
button.style.color = '';
|
|
52
|
-
}, 2000);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
</script>
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
<div class="header-top">
|
|
59
|
-
<button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark/light mode">
|
|
60
|
-
<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>
|
|
61
|
-
</button>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<div class="landing-container">
|
|
65
|
-
<div class="content-side">
|
|
66
|
-
<div class="logo">
|
|
67
|
-
<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>
|
|
68
|
-
<span class="logo-text">docmd</span>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<h1>Beautiful Documentation.<br />Zero Clutter. Just Content.</h1>
|
|
72
|
-
|
|
73
|
-
<p class="tagline">
|
|
74
|
-
Transform your Markdown files into elegant, responsive documentation sites with zero setup.
|
|
75
|
-
</p>
|
|
76
|
-
|
|
77
|
-
<div class="features">
|
|
78
|
-
<div class="feature">
|
|
79
|
-
<div class="feature-icon">
|
|
80
|
-
<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>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="feature-text">
|
|
83
|
-
<strong>Markdown Powered</strong>
|
|
84
|
-
Write in Markdown – get clean HTML
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div class="feature">
|
|
89
|
-
<div class="feature-icon">
|
|
90
|
-
<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>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="feature-text">
|
|
93
|
-
<strong>Responsive Design</strong>
|
|
94
|
-
Looks great on any device
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<div class="feature">
|
|
99
|
-
<div class="feature-icon">
|
|
100
|
-
<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>
|
|
101
|
-
</div>
|
|
102
|
-
<div class="feature-text">
|
|
103
|
-
<strong>Light & Dark Modes</strong>
|
|
104
|
-
Themes with auto dark mode
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div class="feature">
|
|
109
|
-
<div class="feature-icon">
|
|
110
|
-
<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>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="feature-text">
|
|
113
|
-
<strong>Highly Customizable</strong>
|
|
114
|
-
Extend with plugins & containers
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
|
|
119
|
-
<div class="install-section">
|
|
120
|
-
<div class="install-code">
|
|
121
|
-
<pre><code>npm install @mgks/docmd</code></pre>
|
|
122
|
-
<button class="copy-button" onclick="copyToClipboard('npm install @mgks/docmd')" aria-label="Copy npm install command">
|
|
123
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
124
|
-
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
125
|
-
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
126
|
-
</svg>
|
|
127
|
-
</button>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
|
|
131
|
-
<div class="buttons">
|
|
132
|
-
<a href="/getting-started/" class="btn btn-primary">
|
|
133
|
-
<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>
|
|
134
|
-
Get Started
|
|
135
|
-
</a>
|
|
136
|
-
<a href="https://github.com/mgks/docmd" target="_blank" rel="noopener" class="btn btn-secondary">
|
|
137
|
-
<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>
|
|
138
|
-
GitHub
|
|
139
|
-
</a>
|
|
140
|
-
</div>
|
|
141
|
-
|
|
142
|
-
<div class="social-links">
|
|
143
|
-
<a href="https://github.com/sponsors/mgks" target="_blank" rel="noopener" class="social-link" title="Buy me a Coffee – GitHub Sponsors">
|
|
144
|
-
<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>
|
|
145
|
-
</a>
|
|
146
|
-
<a href="https://twitter.com/share?url=https://docmd.mgks.dev" target="_blank" rel="noopener" class="social-link">
|
|
147
|
-
<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>
|
|
148
|
-
</a>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<div class="preview-side">
|
|
153
|
-
<div class="preview-stack">
|
|
154
|
-
<div class="preview-image top">
|
|
155
|
-
<img src="/assets/images/preview-light-1.webp" alt="docmd documentation preview" class="light-img" loading="lazy">
|
|
156
|
-
<img src="/assets/images/preview-dark-1.webp" alt="docmd documentation preview" class="dark-img" loading="lazy">
|
|
157
|
-
</div>
|
|
158
|
-
<div class="preview-image middle">
|
|
159
|
-
<img src="/assets/images/preview-light-2.webp" alt="docmd documentation preview" class="light-img" loading="lazy">
|
|
160
|
-
<img src="/assets/images/preview-dark-2.webp" alt="docmd documentation preview" class="dark-img" loading="lazy">
|
|
161
|
-
</div>
|
|
162
|
-
<div class="preview-image bottom">
|
|
163
|
-
<img src="/assets/images/preview-light-3.webp" alt="docmd documentation preview" class="light-img" loading="lazy">
|
|
164
|
-
<img src="/assets/images/preview-dark-3.webp" alt="docmd documentation preview" class="dark-img" loading="lazy">
|
|
165
|
-
</div>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
package/docs/overview.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
```
|
|
7
|
-
_ _
|
|
8
|
-
_| |___ ___ _____ _| |
|
|
9
|
-
| . | . | _| | . |
|
|
10
|
-
|___|___|___|_|_|_|___|
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
**Generate beautiful, lightweight static documentation sites directly from your Markdown files. Zero clutter, just content.**
|
|
15
|
-
|
|
16
|
-
`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.
|
|
17
|
-
|
|
18
|
-
::: callout tip
|
|
19
|
-
This very documentation site is built using `docmd`!
|
|
20
|
-
:::
|
|
21
|
-
|
|
22
|
-
## Core Philosophy
|
|
23
|
-
|
|
24
|
-
* **Markdown First:** Your content lives in standard `.md` files with simple YAML frontmatter.
|
|
25
|
-
* **Minimal Configuration:** Sensible defaults with straightforward overrides via `docmd.config.js`.
|
|
26
|
-
* **Lightweight Build:** Fast generation process using Node.js, no complex framework dependencies for the build itself.
|
|
27
|
-
* **Beautiful Defaults:** Clean, responsive design with light/dark themes and syntax highlighting out-of-the-box.
|
|
28
|
-
* **Static Output:** Deploy the generated `site/` folder anywhere (GitHub Pages, Netlify, Vercel, etc.).
|
|
29
|
-
|
|
30
|
-
## Key Features
|
|
31
|
-
|
|
32
|
-
* 📝 **Standard Markdown & Frontmatter:** Write content naturally, define page metadata (title, description) easily.
|
|
33
|
-
* 🔍 **Smart Search:** Built-in, offline-capable full-text search with fuzzy matching and highlighting. No API keys required.
|
|
34
|
-
* 🎨 **Themeable:** Built-in light/dark modes, customizable via CSS variables. Uses `highlight.js` for code blocks.
|
|
35
|
-
* 🧩 **Custom Containers:** Add richer components like callouts, cards, and steps using simple `::: name :::` syntax.
|
|
36
|
-
* ⚙️ **Config-Driven Navigation:** Define your site structure and sidebar navigation in `docmd.config.js`. Supports nested items.
|
|
37
|
-
* 🚀 **Fast Static Build:** Node.js script quickly processes files into optimized HTML & CSS.
|
|
38
|
-
* 💻 **Simple CLI:** Easy-to-use commands (`docmd build`, `docmd init`, `docmd dev`) with clear feedback.
|
|
39
|
-
* 🌐 **Deploy Anywhere:** Generates a standard static `site/` directory.
|
|
40
|
-
|
|
41
|
-
## Get Started Quickly
|
|
42
|
-
|
|
43
|
-
1. **Install `docmd`:**
|
|
44
|
-
```bash
|
|
45
|
-
npm install -g @mgks/docmd
|
|
46
|
-
```
|
|
47
|
-
2. **Initialize Your Project:**
|
|
48
|
-
```bash
|
|
49
|
-
cd my-project-docs
|
|
50
|
-
docmd init
|
|
51
|
-
```
|
|
52
|
-
3. **Write Your Content:**
|
|
53
|
-
Create `.md` files in the `docs/` directory.
|
|
54
|
-
4. **Preview Live:**
|
|
55
|
-
```bash
|
|
56
|
-
docmd dev
|
|
57
|
-
```
|
|
58
|
-
5. **Build for Production:**
|
|
59
|
-
```bash
|
|
60
|
-
docmd build
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Dive into the [Getting Started](/getting-started/installation/) guide for more details, or explore the sidebar to learn about specific features.
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Analytics Integration"
|
|
3
|
-
description: "Integrate web analytics services like Google Analytics into your docmd site to track visitor traffic."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Analytics Integration Plugin
|
|
7
|
-
|
|
8
|
-
`docmd` allows you to easily integrate popular web analytics services into your documentation site using the built-in analytics plugin. This helps you understand your audience, track page views, and gather insights into how your documentation is being used.
|
|
9
|
-
|
|
10
|
-
## Enabling Analytics Plugin
|
|
11
|
-
|
|
12
|
-
You enable analytics by adding the analytics plugin and its configuration to the `plugins` object in your config file.
|
|
13
|
-
|
|
14
|
-
**Example:**
|
|
15
|
-
|
|
16
|
-
```javascript
|
|
17
|
-
module.exports = {
|
|
18
|
-
// ...
|
|
19
|
-
plugins: {
|
|
20
|
-
// Analytics plugin configuration
|
|
21
|
-
analytics: {
|
|
22
|
-
// For Google Analytics 4 (GA4)
|
|
23
|
-
googleV4: {
|
|
24
|
-
measurementId: 'G-XXXXXXXXXX' // Your GA4 Measurement ID
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
// For Google Universal Analytics (Legacy)
|
|
28
|
-
// googleUA: {
|
|
29
|
-
// trackingId: 'UA-XXXXXXXXX-Y' // Your Universal Analytics Tracking ID
|
|
30
|
-
// }
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
// ... other plugins
|
|
34
|
-
},
|
|
35
|
-
// ...
|
|
36
|
-
};
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Choose the analytics service and version you want to use by configuring the appropriate section.
|
|
40
|
-
|
|
41
|
-
## Available Analytics Options
|
|
42
|
-
|
|
43
|
-
### Google Analytics 4 (GA4)
|
|
44
|
-
|
|
45
|
-
* **Configuration Key:** `googleV4`
|
|
46
|
-
* **Description:** Integrates the latest version of Google Analytics, GA4. This is the recommended version for new Google Analytics setups.
|
|
47
|
-
* **Options:**
|
|
48
|
-
* `measurementId` (String, Required): Your Google Analytics 4 Measurement ID, which typically looks like `G-XXXXXXXXXX`.
|
|
49
|
-
* **Action:** Injects the standard Google Analytics 4 `gtag.js` tracking snippet into your pages.
|
|
50
|
-
|
|
51
|
-
### Google Universal Analytics (Legacy)
|
|
52
|
-
|
|
53
|
-
* **Configuration Key:** `googleUA`
|
|
54
|
-
* **Description:** Integrates the older version of Google Analytics, known as Universal Analytics (UA). Note that Google has sunset Universal Analytics as of July 2023.
|
|
55
|
-
* **Options:**
|
|
56
|
-
* `trackingId` (String, Required): Your Google Universal Analytics Tracking ID, which typically looks like `UA-XXXXXXXXX-Y`.
|
|
57
|
-
* **Action:** Injects the standard Google Universal Analytics `analytics.js` tracking snippet into your pages.
|
|
58
|
-
|
|
59
|
-
## Important Considerations
|
|
60
|
-
|
|
61
|
-
* **Choose One Google Analytics Version:** If using Google Analytics, configure *either* `googleUA` *or* `googleV4`, but not both for the same property, to avoid incorrect data collection.
|
|
62
|
-
* **Privacy and Consent:**
|
|
63
|
-
* Be mindful of user privacy when implementing analytics.
|
|
64
|
-
* Clearly disclose your use of analytics (and any cookies set by them) in your site's privacy policy or a cookie consent banner if required by regulations in your target regions (e.g., GDPR, CCPA).
|
|
65
|
-
* Consider features like IP anonymization if your analytics provider offers them and it's appropriate for your privacy stance.
|
|
66
|
-
* **Testing:** After enabling the analytics plugin and deploying your site, verify that data is being collected correctly in your analytics provider's dashboard. Use browser developer tools (Network tab) to check if the tracking script is loading.
|
|
67
|
-
|
|
68
|
-
## Future Analytics Support
|
|
69
|
-
|
|
70
|
-
`docmd` may add support for other privacy-focused or popular analytics providers in the future, such as:
|
|
71
|
-
* Plausible Analytics
|
|
72
|
-
* Fathom Analytics
|
|
73
|
-
* Simple Analytics
|
|
74
|
-
|
|
75
|
-
Check the latest `docmd` documentation or GitHub repository for updates on supported analytics integrations.
|
package/docs/plugins/index.md
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Using Plugins with docmd"
|
|
3
|
-
description: "Extend docmd's functionality with built-in plugins."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Extending docmd with Plugins
|
|
7
|
-
|
|
8
|
-
`docmd` supports a plugin system to add extra features and integrations to your documentation site without bloating the core tool. Plugins can modify the build process, inject content into pages, or add site-wide functionalities.
|
|
9
|
-
|
|
10
|
-
## Enabling Plugins
|
|
11
|
-
|
|
12
|
-
You enable and configure plugins in your config file within the `plugins` object. Each plugin is configured using its key with a corresponding configuration object.
|
|
13
|
-
|
|
14
|
-
```javascript
|
|
15
|
-
module.exports = {
|
|
16
|
-
// ... other config ...
|
|
17
|
-
plugins: {
|
|
18
|
-
// SEO Plugin
|
|
19
|
-
seo: {
|
|
20
|
-
defaultDescription: 'Your site-wide meta description',
|
|
21
|
-
openGraph: {
|
|
22
|
-
defaultImage: '/assets/images/og-preview.png',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
// Analytics Plugin
|
|
26
|
-
analytics: {
|
|
27
|
-
googleV4: {
|
|
28
|
-
measurementId: 'G-XXXXXXXXXX'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
// Sitemap Plugin
|
|
32
|
-
sitemap: {
|
|
33
|
-
defaultChangefreq: 'weekly',
|
|
34
|
-
defaultPriority: 0.8
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
// ...
|
|
38
|
-
};
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Core Plugins
|
|
42
|
-
|
|
43
|
-
`docmd` ships with several core plugins that you can easily enable:
|
|
44
|
-
|
|
45
|
-
* **[SEO & Meta Tags](/plugins/seo/):** Automatically generates common SEO-related meta tags (description, Open Graph, Twitter Cards).
|
|
46
|
-
* **[Analytics Integration](/plugins/analytics/):** Easily add tracking snippets for popular web analytics services like Google Analytics.
|
|
47
|
-
* **[Sitemap](/plugins/sitemap/):** Generates a sitemap.xml file for search engines to better discover and index your content.
|
|
48
|
-
|
|
49
|
-
Click on the links above or see the sidebar for detailed configuration of each core plugin.
|
|
50
|
-
|
|
51
|
-
## How Plugins Work
|
|
52
|
-
|
|
53
|
-
Plugins in `docmd` hook into various parts of the build process:
|
|
54
|
-
|
|
55
|
-
* They can add meta tags and scripts to the page head
|
|
56
|
-
* They can inject content or scripts at the beginning or end of the page body
|
|
57
|
-
* They can generate additional files in the output directory
|
|
58
|
-
* They can modify the HTML output of pages
|
|
59
|
-
|
|
60
|
-
All plugins are designed to be configurable through your config file, giving you control over their behavior.
|
|
61
|
-
|
|
62
|
-
## Future Plugin Development
|
|
63
|
-
|
|
64
|
-
The plugin system is designed with future extensibility in mind. As `docmd` evolves, we plan to:
|
|
65
|
-
|
|
66
|
-
* Add more built-in plugins for common documentation needs
|
|
67
|
-
* Create an API for developers to build custom plugins
|
|
68
|
-
* Enable community contribution of third-party plugins
|
|
69
|
-
|
|
70
|
-
For now, focus on utilizing the available core plugins to enhance your site's functionality.
|