@mgks/docmd 0.3.1 → 0.3.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 +5 -1
- package/package.json +28 -24
- package/src/templates/layout.ejs +16 -6
- package/src/templates/no-style.ejs +5 -1
- package/src/templates/partials/theme-init.js +20 -16
- package/src/templates/toc.ejs +1 -1
- 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/css/docmd-highlight-dark.css +0 -1
- package/src/assets/css/docmd-highlight-light.css +0 -1
- package/src/assets/css/docmd-main.css +0 -1608
- package/src/assets/css/docmd-theme-retro.css +0 -868
- package/src/assets/css/docmd-theme-ruby.css +0 -629
- package/src/assets/css/docmd-theme-sky.css +0 -618
- package/src/assets/favicon.ico +0 -0
- package/src/assets/images/docmd-logo-dark.png +0 -0
- package/src/assets/images/docmd-logo-light.png +0 -0
- package/src/assets/images/docmd-logo.png +0 -0
- package/src/assets/images/docmd-preview.png +0 -0
- package/src/assets/js/docmd-image-lightbox.js +0 -74
- package/src/assets/js/docmd-main.js +0 -249
- package/src/assets/js/docmd-mermaid.js +0 -205
- package/src/assets/js/docmd-search.js +0 -218
package/README.md
CHANGED
|
@@ -159,4 +159,8 @@ This project is open source and free to use. If you find it valuable, please con
|
|
|
159
159
|
|
|
160
160
|
## 📄 License
|
|
161
161
|
|
|
162
|
-
Distributed under the MIT License. See `LICENSE` for more information.
|
|
162
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
163
|
+
|
|
164
|
+
> **{ github.com/mgks }**
|
|
165
|
+
>
|
|
166
|
+
>  
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgks/docmd",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Generate beautiful, lightweight static documentation sites directly from your Markdown files. Zero clutter, just content.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -18,29 +18,8 @@
|
|
|
18
18
|
"postinstall": "node ./bin/postinstall.js",
|
|
19
19
|
"lint": "eslint .",
|
|
20
20
|
"format": "prettier --write .",
|
|
21
|
-
"test": "echo \"
|
|
21
|
+
"test": "echo \"No tests specified currently\" && exit 0"
|
|
22
22
|
},
|
|
23
|
-
"engines": {
|
|
24
|
-
"node": ">=22.0.0"
|
|
25
|
-
},
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "git+https://github.com/mgks/docmd.git"
|
|
29
|
-
},
|
|
30
|
-
"keywords": [
|
|
31
|
-
"markdown",
|
|
32
|
-
"static-site-generator",
|
|
33
|
-
"documentation",
|
|
34
|
-
"ssg",
|
|
35
|
-
"docs",
|
|
36
|
-
"generator"
|
|
37
|
-
],
|
|
38
|
-
"author": "Ghazi <hello@mgks.dev>",
|
|
39
|
-
"license": "MIT",
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://github.com/mgks/docmd/issues"
|
|
42
|
-
},
|
|
43
|
-
"homepage": "https://github.com/mgks/docmd#readme",
|
|
44
23
|
"dependencies": {
|
|
45
24
|
"chalk": "^4.1.2",
|
|
46
25
|
"chokidar": "^4.0.3",
|
|
@@ -72,5 +51,30 @@
|
|
|
72
51
|
},
|
|
73
52
|
"directories": {
|
|
74
53
|
"doc": "docs"
|
|
75
|
-
}
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"markdown",
|
|
57
|
+
"static-site-generator",
|
|
58
|
+
"documentation",
|
|
59
|
+
"ssg",
|
|
60
|
+
"docs",
|
|
61
|
+
"generator"
|
|
62
|
+
],
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=18.0.0"
|
|
65
|
+
},
|
|
66
|
+
"author": {
|
|
67
|
+
"name": "Ghazi",
|
|
68
|
+
"url": "https://mgks.dev"
|
|
69
|
+
},
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "git+https://github.com/mgks/docmd.git"
|
|
73
|
+
},
|
|
74
|
+
"bugs": {
|
|
75
|
+
"url": "https://github.com/mgks/docmd/issues"
|
|
76
|
+
},
|
|
77
|
+
"homepage": "https://github.com/mgks/docmd#readme",
|
|
78
|
+
"funding": "https://github.com/sponsors/mgks",
|
|
79
|
+
"license": "MIT"
|
|
76
80
|
}
|
package/src/templates/layout.ejs
CHANGED
|
@@ -13,14 +13,19 @@
|
|
|
13
13
|
|
|
14
14
|
<%- faviconLinkHtml || '' %> <%# Favicon %>
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
<!-- Define Default Mode (Variable for script) -->
|
|
17
|
+
<script>
|
|
18
|
+
window.DOCMD_DEFAULT_MODE = "<%= defaultMode %>";
|
|
19
|
+
</script>
|
|
19
20
|
|
|
21
|
+
<!-- Highlight.js Theme -->
|
|
20
22
|
<% if (config.theme?.codeHighlight !== false) { %>
|
|
21
23
|
<link rel="stylesheet" id="highlight-theme" href="<%= relativePathToRoot %>assets/css/docmd-highlight-<%= defaultMode === 'dark' ? 'dark' : 'light' %>.css" data-base-href="<%= relativePathToRoot %>assets/css/">
|
|
22
24
|
<% } %>
|
|
23
25
|
|
|
26
|
+
<!-- Main Theme -->
|
|
27
|
+
<link rel="stylesheet" href="<%= relativePathToRoot %>assets/css/docmd-main.css">
|
|
28
|
+
|
|
24
29
|
<%- themeCssLinkHtml || '' %> <%# For theme.name specific CSS %>
|
|
25
30
|
|
|
26
31
|
<% (customCssFiles || []).forEach(cssFile => { %>
|
|
@@ -29,10 +34,13 @@
|
|
|
29
34
|
|
|
30
35
|
<%- pluginStylesHtml || '' %> <%# Plugin specific CSS %>
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
<!-- This checks storage and updates HTML attr + Highlight CSS before final paint -->
|
|
38
|
+
<%- themeInitScript %>
|
|
39
|
+
|
|
40
|
+
<%- pluginHeadScriptsHtml || '' %> <%# Plugin specific head scripts %>
|
|
33
41
|
</head>
|
|
34
42
|
<body class="<%= sidebarConfig.collapsible ? 'sidebar-collapsible' : 'sidebar-not-collapsible' %>"
|
|
35
|
-
data-
|
|
43
|
+
data-default-collapsed="<%= sidebarConfig.defaultCollapsed %>"
|
|
36
44
|
data-copy-code-enabled="<%= config.copyCode === true %>">
|
|
37
45
|
<aside class="sidebar">
|
|
38
46
|
<div class="sidebar-header">
|
|
@@ -44,11 +52,13 @@
|
|
|
44
52
|
<% } else { %>
|
|
45
53
|
<h1><a href="<%= relativePathToRoot %>index.html"><%= siteTitle %></a></h1>
|
|
46
54
|
<% } %>
|
|
55
|
+
<span class="mobile-view sidebar-menu-button float-right">
|
|
56
|
+
<%- renderIcon("ellipsis-vertical") %>
|
|
57
|
+
</span>
|
|
47
58
|
</div>
|
|
48
59
|
<%- navigationHtml %>
|
|
49
60
|
<% if (theme && theme.enableModeToggle && theme.positionMode !== 'top') { %>
|
|
50
61
|
<button id="theme-toggle-button" aria-label="Toggle theme" class="theme-toggle-button">
|
|
51
|
-
<%# renderIcon is available in the global EJS scope from html-generator %>
|
|
52
62
|
<%- renderIcon('sun', { class: 'icon-sun' }) %>
|
|
53
63
|
<%- renderIcon('moon', { class: 'icon-moon' }) %>
|
|
54
64
|
</button>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<% } %>
|
|
18
18
|
|
|
19
19
|
<% if (frontmatter.components?.themeMode !== false) { %>
|
|
20
|
-
|
|
20
|
+
<script>window.DOCMD_DEFAULT_MODE = "<%= defaultMode %>";</script>
|
|
21
21
|
<% } %>
|
|
22
22
|
|
|
23
23
|
<% if (frontmatter.components?.css !== false) { %>
|
|
@@ -27,6 +27,10 @@
|
|
|
27
27
|
<% } %>
|
|
28
28
|
<% } %>
|
|
29
29
|
|
|
30
|
+
<% if (frontmatter.components?.themeMode !== false) { %>
|
|
31
|
+
<%- themeInitScript %>
|
|
32
|
+
<% } %>
|
|
33
|
+
|
|
30
34
|
<% if (frontmatter.components?.theme !== false) { %>
|
|
31
35
|
<%- themeCssLinkHtml || '' %>
|
|
32
36
|
<% } %>
|
|
@@ -5,22 +5,26 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
(function() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
try {
|
|
9
|
+
// Determine Theme
|
|
10
|
+
var localValue = localStorage.getItem('docmd-theme');
|
|
11
|
+
var configValue = window.DOCMD_DEFAULT_MODE || 'light';
|
|
12
|
+
var theme = localValue ? localValue : configValue;
|
|
13
|
+
|
|
14
|
+
// Set HTML Attribute (for main CSS variables)
|
|
15
|
+
document.documentElement.setAttribute('data-theme', theme);
|
|
16
|
+
|
|
17
|
+
// Handle Highlight.js Theme (if present)
|
|
18
|
+
var highlightLink = document.getElementById('highlight-theme');
|
|
19
|
+
if (highlightLink) {
|
|
20
|
+
var baseHref = highlightLink.getAttribute('data-base-href');
|
|
21
|
+
// Check if the current href matches the desired theme
|
|
22
|
+
// If not, swap it immediately before the browser renders code blocks
|
|
23
|
+
if (baseHref && !highlightLink.href.includes('docmd-highlight-' + theme)) {
|
|
24
|
+
highlightLink.href = baseHref + 'docmd-highlight-' + theme + '.css';
|
|
22
25
|
}
|
|
23
|
-
} catch (e) {
|
|
24
|
-
console.error('Error applying theme from localStorage', e);
|
|
25
26
|
}
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.error('Theme init failed', e);
|
|
29
|
+
}
|
|
26
30
|
})();
|
package/src/templates/toc.ejs
CHANGED
|
@@ -54,7 +54,7 @@ if (shouldShowToc && !frontmatter?.toc || frontmatter?.toc !== 'false') {
|
|
|
54
54
|
if (tocHeadings.length > 1) {
|
|
55
55
|
%>
|
|
56
56
|
<div class="toc-container">
|
|
57
|
-
<h2 class="toc-title">On This Page
|
|
57
|
+
<h2 class="toc-title">On This Page<span class="mobile-view toc-menu-button float-right"><%- renderIcon("chevrons-down-up") %></span></h2>
|
|
58
58
|
<ul class="toc-list">
|
|
59
59
|
<% tocHeadings.forEach(heading => { %>
|
|
60
60
|
<li class="toc-item toc-level-<%= heading.level %>">
|
package/.gitattributes
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
-
overall community
|
|
27
|
-
|
|
28
|
-
## Enforcement Responsibilities
|
|
29
|
-
|
|
30
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
31
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
32
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
33
|
-
or harmful.
|
|
34
|
-
|
|
35
|
-
## Enforcement
|
|
36
|
-
|
|
37
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
38
|
-
reported to the community leaders responsible for enforcement at hello@mgks.dev.
|
|
39
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
-
|
|
41
|
-
## Attribution
|
|
42
|
-
|
|
43
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
44
|
-
version 2.1, available at
|
|
45
|
-
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
46
|
-
|
|
47
|
-
[homepage]: https://www.contributor-covenant.org
|
|
48
|
-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
package/.github/CONTRIBUTING.md
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# Contributing to docmd
|
|
2
|
-
|
|
3
|
-
First off, thank you for considering contributing to `docmd`! It's people like you that make the open-source community such an amazing place to learn, inspire, and create.
|
|
4
|
-
|
|
5
|
-
We welcome contributions of all kinds: bug fixes, new features, documentation improvements, or even just typo fixes.
|
|
6
|
-
|
|
7
|
-
## ⚡ Quick Links
|
|
8
|
-
|
|
9
|
-
* [**Documentation**](https://docmd.mgks.dev) - Read the docs to understand how the tool works.
|
|
10
|
-
* [**GitHub Issues**](https://github.com/mgks/docmd/issues) - Browse existing bugs or feature requests.
|
|
11
|
-
* [**Discussions**](https://github.com/mgks/docmd/discussions) - Ask questions or share ideas.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## 🛠️ Development Setup
|
|
16
|
-
|
|
17
|
-
`docmd` is a Node.js CLI tool. Developing it locally requires a slightly different setup than a standard web app.
|
|
18
|
-
|
|
19
|
-
### Prerequisites
|
|
20
|
-
* **Node.js**: Version 22.x or higher.
|
|
21
|
-
* **npm**: Version 10.x or higher.
|
|
22
|
-
|
|
23
|
-
### 1. Fork and Clone
|
|
24
|
-
1. Fork the repository to your GitHub account.
|
|
25
|
-
2. Clone your fork locally:
|
|
26
|
-
```bash
|
|
27
|
-
git clone https://github.com/YOUR_USERNAME/docmd.git
|
|
28
|
-
cd docmd
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 2. Install Dependencies
|
|
32
|
-
```bash
|
|
33
|
-
npm install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### 3. Link for Local Development
|
|
37
|
-
To test the CLI command (`docmd`) globally on your machine while modifying the source code, use `npm link`.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# inside the project root
|
|
41
|
-
npm link
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Now, when you run `docmd` in *any* terminal window, it will use the code from your local folder.
|
|
45
|
-
|
|
46
|
-
### 4. Running the Dev Server
|
|
47
|
-
We have a built-in test site located in the `docs/` folder (this is the documentation for docmd itself).
|
|
48
|
-
|
|
49
|
-
To start the dev server and watch for changes:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
# Method 1: Using the npm script (Recommended)
|
|
53
|
-
npm start
|
|
54
|
-
|
|
55
|
-
# Method 2: If you have linked the package
|
|
56
|
-
docmd dev
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### 5. Developer Mode (Important)
|
|
60
|
-
By default, `docmd` only watches the user's content files. To make `docmd` watch **its own internal source code** (templates, css, core logic) and trigger a rebuild when you edit them, set the environment variable:
|
|
61
|
-
|
|
62
|
-
```bash
|
|
63
|
-
# Mac/Linux
|
|
64
|
-
export DOCMD_DEV=true
|
|
65
|
-
npm start
|
|
66
|
-
|
|
67
|
-
# Windows (PowerShell)
|
|
68
|
-
$env:DOCMD_DEV="true"
|
|
69
|
-
npm start
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## 📂 Project Structure
|
|
75
|
-
|
|
76
|
-
Here is a map of the codebase to help you navigate:
|
|
77
|
-
|
|
78
|
-
```text
|
|
79
|
-
bin/
|
|
80
|
-
└── docmd.js # The CLI entry point
|
|
81
|
-
src/
|
|
82
|
-
├── commands/ # Logic for 'init', 'build', 'dev'
|
|
83
|
-
├── core/
|
|
84
|
-
│ ├── config-loader.js # Loads docmd.config.js
|
|
85
|
-
│ ├── config-validator.js # Validates config structure
|
|
86
|
-
│ ├── file-processor.js # Orchestrates file reading
|
|
87
|
-
│ ├── html-generator.js # Injects content into EJS templates
|
|
88
|
-
│ └── markdown/ # The Core Parsing Engine
|
|
89
|
-
│ ├── containers.js # Callout/Card definitions
|
|
90
|
-
│ ├── rules.js # Complex logic (Tabs, Changelogs)
|
|
91
|
-
│ └── setup.js # MarkdownIt configuration
|
|
92
|
-
├── plugins/ # Built-in plugins (SEO, Sitemap)
|
|
93
|
-
├── templates/ # EJS HTML templates
|
|
94
|
-
└── assets/ # Internal CSS and JS (Themes)
|
|
95
|
-
docs/ # The documentation site content
|
|
96
|
-
site/ # The generated output folder (gitignored)
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## 🚀 Submitting a Pull Request
|
|
102
|
-
|
|
103
|
-
1. **Create a Branch:** Always create a new branch for your changes.
|
|
104
|
-
* `feat/my-new-feature`
|
|
105
|
-
* `fix/bug-description`
|
|
106
|
-
* `docs/update-readme`
|
|
107
|
-
2. **Make Changes:** Write clear, concise code.
|
|
108
|
-
3. **Test:**
|
|
109
|
-
* Run `docmd build` to ensure the build process finishes without errors.
|
|
110
|
-
* Verify your changes visually by running `docmd dev`.
|
|
111
|
-
4. **Commit:** We prefer [Conventional Commits](https://www.conventionalcommits.org/).
|
|
112
|
-
* `feat: add search bar`
|
|
113
|
-
* `fix: resolve css overflow in tables`
|
|
114
|
-
* `docs: fix typo in readme`
|
|
115
|
-
5. **Push & Open PR:** Push your branch to your fork and open a Pull Request against the `main` branch of `mgks/docmd`.
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## 🎨 Style Guidelines
|
|
120
|
-
|
|
121
|
-
* **Linting:** Please ensure your code follows the existing style. (We use standard ESLint/Prettier configurations).
|
|
122
|
-
* **No-Style:** If modifying `no-style` templates, ensure no external CSS is injected unless requested.
|
|
123
|
-
* **Compatibility:** `docmd` aims to be lightweight. Avoid adding heavy dependencies unless absolutely necessary.
|
|
124
|
-
|
|
125
|
-
---
|
|
126
|
-
|
|
127
|
-
## 🤝 Community
|
|
128
|
-
|
|
129
|
-
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
|
package/.github/FUNDING.yml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# These are supported funding model platforms
|
|
2
|
-
|
|
3
|
-
github: mgks # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
-
patreon: # Replace with a single Patreon username
|
|
5
|
-
open_collective: # Replace with a single Open Collective username
|
|
6
|
-
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
-
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
-
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
-
liberapay: # Replace with a single Liberapay username
|
|
10
|
-
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
-
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
12
|
-
polar: # Replace with a single Polar username
|
|
13
|
-
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
|
|
14
|
-
thanks_dev: # Replace with a single thanks.dev username
|
|
15
|
-
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
name: 🐞 Bug Report
|
|
2
|
-
description: Create a report to help us improve docmd
|
|
3
|
-
title: "[Bug]: "
|
|
4
|
-
labels: ["bug", "triage"]
|
|
5
|
-
body:
|
|
6
|
-
- type: markdown
|
|
7
|
-
attributes:
|
|
8
|
-
value: |
|
|
9
|
-
Thanks for taking the time to fill out this bug report!
|
|
10
|
-
- type: input
|
|
11
|
-
id: version
|
|
12
|
-
attributes:
|
|
13
|
-
label: docmd version
|
|
14
|
-
description: What version of docmd are you using? (e.g. 0.2.6)
|
|
15
|
-
placeholder: 0.2.6
|
|
16
|
-
validations:
|
|
17
|
-
required: true
|
|
18
|
-
- type: input
|
|
19
|
-
id: node-version
|
|
20
|
-
attributes:
|
|
21
|
-
label: Node.js version
|
|
22
|
-
placeholder: v20.x
|
|
23
|
-
validations:
|
|
24
|
-
required: true
|
|
25
|
-
- type: dropdown
|
|
26
|
-
id: os
|
|
27
|
-
attributes:
|
|
28
|
-
label: OS
|
|
29
|
-
options:
|
|
30
|
-
- macOS
|
|
31
|
-
- Windows
|
|
32
|
-
- Linux
|
|
33
|
-
validations:
|
|
34
|
-
required: true
|
|
35
|
-
- type: textarea
|
|
36
|
-
id: description
|
|
37
|
-
attributes:
|
|
38
|
-
label: Description
|
|
39
|
-
description: A clear and concise description of what the bug is.
|
|
40
|
-
validations:
|
|
41
|
-
required: true
|
|
42
|
-
- type: textarea
|
|
43
|
-
id: reproduction
|
|
44
|
-
attributes:
|
|
45
|
-
label: Steps to Reproduce
|
|
46
|
-
description: Please provide the steps to reproduce the behavior.
|
|
47
|
-
placeholder: |
|
|
48
|
-
1. Run 'docmd init'
|
|
49
|
-
2. Add configuration...
|
|
50
|
-
3. Run 'docmd build'
|
|
51
|
-
4. See error...
|
|
52
|
-
validations:
|
|
53
|
-
required: true
|
|
54
|
-
- type: textarea
|
|
55
|
-
id: expected
|
|
56
|
-
attributes:
|
|
57
|
-
label: Expected Behavior
|
|
58
|
-
description: A clear and concise description of what you expected to happen.
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
name: 💡 Feature Request
|
|
2
|
-
description: Suggest an idea for this project
|
|
3
|
-
title: "[Feature]: "
|
|
4
|
-
labels: ["enhancement"]
|
|
5
|
-
body:
|
|
6
|
-
- type: markdown
|
|
7
|
-
attributes:
|
|
8
|
-
value: |
|
|
9
|
-
Thanks for suggesting a new feature!
|
|
10
|
-
- type: textarea
|
|
11
|
-
id: problem
|
|
12
|
-
attributes:
|
|
13
|
-
label: Is your feature request related to a problem?
|
|
14
|
-
description: A clear and concise description of what the problem is.
|
|
15
|
-
placeholder: I'm always frustrated when...
|
|
16
|
-
- type: textarea
|
|
17
|
-
id: solution
|
|
18
|
-
attributes:
|
|
19
|
-
label: Describe the solution you'd like
|
|
20
|
-
description: A clear and concise description of what you want to happen.
|
|
21
|
-
validations:
|
|
22
|
-
required: true
|
|
23
|
-
- type: textarea
|
|
24
|
-
id: alternatives
|
|
25
|
-
attributes:
|
|
26
|
-
label: Describe alternatives you've considered
|
|
27
|
-
description: A clear and concise description of any alternative solutions or features you've considered.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
## Description
|
|
2
|
-
<!-- Please include a summary of the change and which issue is fixed. -->
|
|
3
|
-
|
|
4
|
-
Fixes # (issue)
|
|
5
|
-
|
|
6
|
-
## Type of change
|
|
7
|
-
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
|
|
8
|
-
- [ ] ✨ New feature (non-breaking change which adds functionality)
|
|
9
|
-
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
-
- [ ] 📝 Documentation update
|
|
11
|
-
|
|
12
|
-
## Checklist:
|
|
13
|
-
- [ ] I have performed a self-review of my own code
|
|
14
|
-
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
15
|
-
- [ ] I have made corresponding changes to the documentation
|
|
16
|
-
- [ ] My changes generate no new warnings
|
package/.github/SECURITY.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
| Version | Supported |
|
|
6
|
-
| ------- | ------------------ |
|
|
7
|
-
| 0.2.x | :white_check_mark: |
|
|
8
|
-
| 0.1.x | :x: |
|
|
9
|
-
|
|
10
|
-
## Reporting a Vulnerability
|
|
11
|
-
|
|
12
|
-
Use this section to tell people how to report a vulnerability.
|
|
13
|
-
|
|
14
|
-
Please do not report security vulnerabilities through public GitHub issues.
|
|
15
|
-
|
|
16
|
-
If you have discovered a security vulnerability in `docmd`, please email hello@mgks.dev.
|
|
17
|
-
|
|
18
|
-
We will do our best to respond within 48 hours.
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
name: deploy docmd
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [main] # Your default branch
|
|
6
|
-
workflow_dispatch: # Allows manual triggering
|
|
7
|
-
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
pages: write
|
|
11
|
-
id-token: write
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build-and-deploy:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
environment:
|
|
17
|
-
name: github-pages
|
|
18
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
19
|
-
steps:
|
|
20
|
-
- name: Checkout 🛎️
|
|
21
|
-
uses: actions/checkout@v4
|
|
22
|
-
|
|
23
|
-
- name: Set up Node.js ⚙️
|
|
24
|
-
uses: actions/setup-node@v4
|
|
25
|
-
with:
|
|
26
|
-
node-version: '22'
|
|
27
|
-
cache: 'npm'
|
|
28
|
-
|
|
29
|
-
- name: Install Dependencies 📦
|
|
30
|
-
run: npm ci
|
|
31
|
-
|
|
32
|
-
- name: Build docmd's Own Docs 🛠️
|
|
33
|
-
run: node ./bin/docmd.js build
|
|
34
|
-
|
|
35
|
-
- name: Setup Pages
|
|
36
|
-
uses: actions/configure-pages@v5
|
|
37
|
-
|
|
38
|
-
- name: Upload artifact
|
|
39
|
-
uses: actions/upload-pages-artifact@v3
|
|
40
|
-
with:
|
|
41
|
-
path: ./site
|
|
42
|
-
|
|
43
|
-
- name: Deploy to GitHub Pages 🚀
|
|
44
|
-
id: deployment
|
|
45
|
-
uses: actions/deploy-pages@v4
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: Publish Package to NPM and GitHub Packages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
permissions:
|
|
12
|
-
contents: read
|
|
13
|
-
packages: write
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout repository
|
|
16
|
-
uses: actions/checkout@v4
|
|
17
|
-
|
|
18
|
-
- name: Set up Node.js v22
|
|
19
|
-
uses: actions/setup-node@v4
|
|
20
|
-
with:
|
|
21
|
-
node-version: '22'
|
|
22
|
-
cache: 'npm'
|
|
23
|
-
|
|
24
|
-
- name: Install dependencies
|
|
25
|
-
run: npm ci
|
|
26
|
-
|
|
27
|
-
# ------------------------------------------
|
|
28
|
-
# --- Publish to NPM Registry (npmjs.com) ---
|
|
29
|
-
# ------------------------------------------
|
|
30
|
-
- name: Configure NPM for public registry
|
|
31
|
-
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
|
|
32
|
-
|
|
33
|
-
- name: Publish to NPM Registry
|
|
34
|
-
run: npm publish --access=public
|
|
35
|
-
# env:
|
|
36
|
-
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
|
-
|
|
38
|
-
# ----------------------------------------
|
|
39
|
-
# --- Publish to GitHub Packages (GPR) ---
|
|
40
|
-
# ----------------------------------------
|
|
41
|
-
- name: Configure NPM for GitHub Packages registry
|
|
42
|
-
run: |
|
|
43
|
-
echo "@mgks:registry=https://npm.pkg.github.com" > ~/.npmrc
|
|
44
|
-
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
|
|
45
|
-
|
|
46
|
-
- name: Publish to GitHub Packages
|
|
47
|
-
run: npm publish
|
|
48
|
-
env:
|
|
49
|
-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
package/assets/css/welcome.css
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Source file from the docmd project — https://github.com/mgks/docmd
|
|
3
|
-
* Welcome page stylesheet for the docmd project's own documentation
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
:root,html[data-theme=light]{--primary-color:#047bf1;--primary-hover:#026ed9;--text-color:#333;--text-light:#666;--bg-color:#fff;--bg-secondary:#f8f9fa;--border-color:#eaeaea}.theme-toggle,body{color:var(--text-color);display:flex}.logo-text,h1{font-weight:700}.install-code pre,.logo-text{font-family:'PT Mono',monospace}:root{--shadow-color:#00000014;--container-padding:5rem}@media (prefers-color-scheme:dark){:root{--primary-color:#047bf1;--primary-hover:#026ed9;--text-color:#e0e0e0;--text-light:#aaa;--bg-color:#121212;--bg-secondary:#1e1e1e;--border-color:#333;--shadow-color:#0000004d}}[data-theme=light]{--shadow-color:#00000059}[data-theme=dark]{--primary-color:#1955b6;--primary-hover:#084dbd;--text-color:#e0e0e0;--text-light:#aaa;--bg-color:#121212;--bg-secondary:#1e1e1e;--border-color:#333;--shadow-color:#000000de}*{margin:0;padding:0;box-sizing:border-box}body{font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;line-height:1.5;background-color:var(--bg-color);height:100vh;overflow:hidden}.landing-container{display:flex;width:100%;height:100%;padding:0 var(--container-padding);max-width:1600px;margin:0 auto}.content-side{flex:1;padding:3rem 2rem 3rem 0;display:flex;flex-direction:column;justify-content:center}.preview-side{flex:1;display:flex;align-items:center;justify-content:flex-start;position:relative;overflow:visible}.header-top{position:absolute;top:2rem;right:3rem;z-index:100}.theme-toggle{background:var(--bg-secondary);border:1px solid var(--border-color);width:40px;height:40px;border-radius:50%;align-items:center;justify-content:center;cursor:pointer;transition:.2s}.theme-toggle:hover{background:var(--border-color)}.logo{margin-bottom:1.5rem;display:flex;align-items:center}.buttons,.features,.install-section,.tagline{margin-bottom:2rem}.logo svg{height:48px;width:auto}.logo-text{font-size:2em;margin-left:.25em}h1{font-size:3rem;margin-bottom:1rem;letter-spacing:-.02em}.tagline{font-size:1.25rem;color:var(--text-light);font-weight:400}.btn-primary,.feature-icon{background-color:var(--primary-color);color:#fff}.features{display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem}.feature{display:flex;align-items:flex-start;gap:.75rem}.feature-icon{width:32px;height:32px;border-radius:6px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.feature-text{font-size:.9rem}.feature-text strong{display:block;margin-bottom:.25rem}.buttons{display:flex;gap:1rem}.btn{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-radius:8px;font-weight:600;font-size:1rem;text-decoration:none;transition:.2s}.btn-primary{border:none}.btn-secondary,.install-code pre{background-color:var(--bg-secondary);border:1px solid var(--border-color)}.btn-primary:hover{background-color:var(--primary-hover)}.btn-secondary{color:var(--text-color)}.btn-secondary:hover{background-color:var(--border-color)}.social-links{display:flex;gap:1rem;padding:0 .25em}.social-link{color:var(--text-light);transition:color .2s}.social-link:hover{color:var(--primary-color)}.preview-stack{position:relative;width:100%;height:400px;transform:translateX(15%);perspective:1000px}.preview-image{position:absolute;width:100%;max-width:700px;height:400px;border-radius:20px;box-shadow:0 25px 50px -12px var(--shadow-color);transition:.3s;overflow:hidden}.preview-image img{width:100%;height:100%;object-fit:cover;object-position:left top;border-radius:8px;pointer-events:none}.preview-image.top{z-index:3;transform:rotate(3deg) translateY(-10%) translateX(7%)}.preview-image.middle{z-index:2;transform:rotate(-3deg) translateY(1%) translateX(-2%)}.preview-image.bottom{z-index:1;transform:rotate(-8deg) translateY(10%) translateX(-10%)}[data-theme=dark] .preview-image .dark-img,[data-theme=light] .preview-image .light-img{display:block}[data-theme=dark] .preview-image .light-img,[data-theme=light] .preview-image .dark-img{display:none}@media (max-width:1400px){:root{--container-padding:3rem}.preview-stack{transform:translateX(15%)}}@media (max-width:1200px){:root{--container-padding:2rem}.preview-side{display:none}.content-side{max-width:100%;padding:3rem 0}.header-top{right:2rem}}@media (max-width:768px){:root{--container-padding:1.5rem}body{overflow:auto}.content-side{padding:2rem 0}.features{grid-template-columns:1fr}.buttons{flex-direction:column}.header-top{padding:1rem 0;text-align:center;right:1rem}h1{font-size:2.5rem}.tagline{font-size:1em;font-weight:500}.landing-container{padding:1rem;flex-direction:column}}.social-links .lucide-heart-handshake{color:#cd2727}.install-code{position:relative;display:inline-block}.install-code pre{border-radius:8px;padding:1rem 3.5rem 1rem 1rem;margin:0;font-size:.9rem;color:var(--text-color)}.install-code code{background:0 0;padding:0;color:inherit}.copy-button{position:absolute;top:.5rem;right:.5rem;background:var(--bg-color);border:1px solid var(--border-color);border-radius:4px;padding:.5rem;cursor:pointer;transition:.2s;color:var(--text-light)}.copy-button:hover{background:var(--border-color);color:var(--text-color)}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|