@mgks/docmd 0.3.7 → 0.3.9
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/LICENSE +1 -1
- package/README.md +61 -63
- package/bin/docmd.js +13 -16
- package/bin/postinstall.js +4 -4
- package/package.json +13 -11
- package/src/assets/css/docmd-highlight-dark.css +86 -1
- package/src/assets/css/docmd-highlight-light.css +86 -1
- package/src/assets/css/docmd-main.css +574 -465
- package/src/assets/css/docmd-theme-retro.css +105 -106
- package/src/assets/css/docmd-theme-ruby.css +92 -92
- package/src/assets/css/docmd-theme-sky.css +63 -64
- 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/js/docmd-image-lightbox.js +2 -2
- package/src/assets/js/docmd-main.js +39 -1
- package/src/assets/js/docmd-mermaid.js +1 -1
- package/src/assets/js/docmd-search.js +1 -1
- package/src/commands/build.js +71 -370
- package/src/commands/dev.js +141 -80
- package/src/commands/init.js +107 -132
- package/src/commands/live.js +145 -0
- package/src/core/asset-manager.js +72 -0
- package/src/core/config-loader.js +3 -2
- package/src/core/config-validator.js +1 -1
- package/src/core/file-processor.js +13 -9
- package/src/core/fs-utils.js +40 -0
- package/src/core/html-generator.js +68 -77
- package/src/core/icon-renderer.js +1 -1
- package/src/core/logger.js +1 -1
- package/src/core/markdown/containers.js +1 -1
- package/src/core/markdown/renderers.js +1 -1
- package/src/core/markdown/rules.js +138 -91
- package/src/core/markdown/setup.js +9 -20
- package/src/core/navigation-helper.js +52 -40
- package/src/index.js +12 -0
- package/src/live/core.js +5 -1
- package/src/live/index.html +16 -1
- package/src/live/live.css +157 -68
- package/src/plugins/analytics.js +1 -1
- package/src/plugins/seo.js +26 -36
- package/src/plugins/sitemap.js +2 -2
- package/src/templates/layout.ejs +50 -81
- package/src/templates/navigation.ejs +23 -76
- package/src/templates/no-style.ejs +115 -129
- package/src/templates/partials/theme-init.js +12 -12
- package/src/templates/toc.ejs +6 -35
- package/dist/assets/css/docmd-highlight-dark.css +0 -1
- package/dist/assets/css/docmd-highlight-light.css +0 -1
- package/dist/assets/css/docmd-main.css +0 -1627
- package/dist/assets/css/docmd-theme-retro.css +0 -868
- package/dist/assets/css/docmd-theme-ruby.css +0 -629
- package/dist/assets/css/docmd-theme-sky.css +0 -618
- package/dist/assets/favicon.ico +0 -0
- package/dist/assets/images/docmd-logo-dark.png +0 -0
- package/dist/assets/images/docmd-logo-light.png +0 -0
- package/dist/assets/images/docmd-logo.png +0 -0
- package/dist/assets/js/docmd-image-lightbox.js +0 -74
- package/dist/assets/js/docmd-main.js +0 -222
- package/dist/assets/js/docmd-mermaid.js +0 -205
- package/dist/assets/js/docmd-search.js +0 -218
- package/dist/assets/js/mermaid.min.js +0 -2811
- package/dist/assets/js/minisearch.js +0 -2013
- package/dist/docmd-live.js +0 -30748
- package/dist/index.html +0 -201
- package/dist/live.css +0 -167
- package/docmd.config.js +0 -175
- package/scripts/build-live.js +0 -157
- package/scripts/failsafe.js +0 -37
- package/scripts/test-live.js +0 -54
- package/src/assets/images/docmd-logo.png +0 -0
- package/src/live/templates.js +0 -9
package/dist/index.html
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Docmd Live</title>
|
|
7
|
-
<link rel="stylesheet" href="live.css">
|
|
8
|
-
<script src="docmd-live.js"></script>
|
|
9
|
-
</head>
|
|
10
|
-
<body class="mode-split mobile-tab-editor">
|
|
11
|
-
|
|
12
|
-
<!-- Top Bar (Desktop) -->
|
|
13
|
-
<div class="top-bar">
|
|
14
|
-
<div class="logo">
|
|
15
|
-
<a href="/" class="back-link" id="back-btn" title="Back to Home" aria-label="Back to Home">
|
|
16
|
-
<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">
|
|
17
|
-
<path d="m12 19-7-7 7-7"/>
|
|
18
|
-
<path d="M19 12H5"/>
|
|
19
|
-
</svg>
|
|
20
|
-
</a>
|
|
21
|
-
docmd <span>Live</span>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div class="view-controls desktop-only">
|
|
25
|
-
<button class="view-btn active" onclick="setViewMode('split')" id="btn-split">Split View</button>
|
|
26
|
-
<button class="view-btn" onclick="setViewMode('single')" id="btn-single">Single View</button>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<!-- Single View Tabs (Visible only when in Single Mode on Desktop) -->
|
|
30
|
-
<div class="view-controls" id="single-view-tabs" style="display:none;">
|
|
31
|
-
<button class="view-btn active" onclick="switchSingleTab('editor')" id="btn-tab-edit">Editor</button>
|
|
32
|
-
<button class="view-btn" onclick="switchSingleTab('preview')" id="btn-tab-prev">Preview</button>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<!-- Workspace -->
|
|
37
|
-
<div class="workspace" id="workspace">
|
|
38
|
-
<!-- Editor -->
|
|
39
|
-
<div class="pane editor-pane" id="editorPane">
|
|
40
|
-
<div class="pane-header">Markdown</div>
|
|
41
|
-
<textarea id="input" spellcheck="false">---
|
|
42
|
-
title: My Page
|
|
43
|
-
description: Start editing to see changes instantly.
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
# Hello World
|
|
47
|
-
|
|
48
|
-
This is a **live** preview.
|
|
49
|
-
|
|
50
|
-
::: callout tip
|
|
51
|
-
Try resizing the window or switching to mobile view!
|
|
52
|
-
:::
|
|
53
|
-
|
|
54
|
-
## Features
|
|
55
|
-
1. Responsive Design
|
|
56
|
-
2. Split or Tabbed view
|
|
57
|
-
3. Instant Rendering
|
|
58
|
-
</textarea>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<!-- Resizer Handle -->
|
|
62
|
-
<div class="resizer" id="resizer"></div>
|
|
63
|
-
|
|
64
|
-
<!-- Preview -->
|
|
65
|
-
<div class="pane preview-pane" id="previewPane">
|
|
66
|
-
<div class="pane-header">Preview</div>
|
|
67
|
-
<iframe id="preview"></iframe>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<!-- Mobile Bottom Tabs -->
|
|
72
|
-
<div class="mobile-tabs">
|
|
73
|
-
<button class="mobile-tab-btn active" onclick="setMobileTab('editor')" id="mob-edit">Editor</button>
|
|
74
|
-
<button class="mobile-tab-btn" onclick="setMobileTab('preview')" id="mob-prev">Preview</button>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<script>
|
|
78
|
-
// --- Core Logic ---
|
|
79
|
-
const input = document.getElementById('input');
|
|
80
|
-
const preview = document.getElementById('preview');
|
|
81
|
-
const backBtn = document.getElementById('back-btn');
|
|
82
|
-
|
|
83
|
-
function render() {
|
|
84
|
-
try {
|
|
85
|
-
let html = docmd.compile(input.value, {
|
|
86
|
-
siteTitle: 'My Project', // User can change this in real config, but here we set a default
|
|
87
|
-
search: false,
|
|
88
|
-
theme: { name: 'sky', defaultMode: 'light' },
|
|
89
|
-
sidebar: { collapsible: false }
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
// --- INJECTIONS ---
|
|
93
|
-
|
|
94
|
-
// 1. Force links to open in new tab (Fixes infinite iframe recursion)
|
|
95
|
-
html = html.replace('<head>', '<head><base target="_blank">');
|
|
96
|
-
|
|
97
|
-
// 2. Hide Sidebar Header via CSS
|
|
98
|
-
const customStyle = `
|
|
99
|
-
<style>
|
|
100
|
-
.sidebar-header { display: none !important; }
|
|
101
|
-
.sidebar-nav { margin-top: 1rem; }
|
|
102
|
-
</style>
|
|
103
|
-
`;
|
|
104
|
-
html = html.replace('</body>', `${customStyle}</body>`);
|
|
105
|
-
// ------------------
|
|
106
|
-
|
|
107
|
-
const doc = preview.contentWindow.document;
|
|
108
|
-
doc.open();
|
|
109
|
-
doc.write(html);
|
|
110
|
-
doc.close();
|
|
111
|
-
} catch (e) { console.error(e); }
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// Debounce Render
|
|
115
|
-
let timer;
|
|
116
|
-
input.addEventListener('input', () => {
|
|
117
|
-
clearTimeout(timer);
|
|
118
|
-
timer = setTimeout(render, 300);
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
// Initial Render
|
|
122
|
-
render();
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
// --- Resizer Logic ---
|
|
126
|
-
const resizer = document.getElementById('resizer');
|
|
127
|
-
const editorPane = document.getElementById('editorPane');
|
|
128
|
-
const workspace = document.getElementById('workspace');
|
|
129
|
-
let isResizing = false;
|
|
130
|
-
|
|
131
|
-
resizer.addEventListener('mousedown', (e) => {
|
|
132
|
-
isResizing = true;
|
|
133
|
-
resizer.classList.add('resizing');
|
|
134
|
-
preview.style.pointerEvents = 'none';
|
|
135
|
-
document.body.style.cursor = 'col-resize';
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
document.addEventListener('mousemove', (e) => {
|
|
139
|
-
if (!isResizing) return;
|
|
140
|
-
const containerWidth = workspace.offsetWidth;
|
|
141
|
-
const newEditorWidth = (e.clientX / containerWidth) * 100;
|
|
142
|
-
if (newEditorWidth > 15 && newEditorWidth < 85) {
|
|
143
|
-
editorPane.style.width = newEditorWidth + '%';
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
document.addEventListener('mouseup', () => {
|
|
148
|
-
if (isResizing) {
|
|
149
|
-
isResizing = false;
|
|
150
|
-
resizer.classList.remove('resizing');
|
|
151
|
-
preview.style.pointerEvents = 'auto';
|
|
152
|
-
document.body.style.cursor = 'default';
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// --- View Mode Logic (Desktop) ---
|
|
158
|
-
function setViewMode(mode) {
|
|
159
|
-
document.body.classList.remove('mode-split', 'mode-single');
|
|
160
|
-
document.body.classList.add('mode-' + mode);
|
|
161
|
-
|
|
162
|
-
document.getElementById('btn-split').classList.toggle('active', mode === 'split');
|
|
163
|
-
document.getElementById('btn-single').classList.toggle('active', mode === 'single');
|
|
164
|
-
|
|
165
|
-
document.getElementById('single-view-tabs').style.display = mode === 'single' ? 'flex' : 'none';
|
|
166
|
-
|
|
167
|
-
if (mode === 'single') {
|
|
168
|
-
switchSingleTab('editor');
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function switchSingleTab(tab) {
|
|
173
|
-
document.body.classList.remove('show-editor', 'show-preview');
|
|
174
|
-
document.body.classList.add('show-' + tab);
|
|
175
|
-
|
|
176
|
-
document.getElementById('btn-tab-edit').classList.toggle('active', tab === 'editor');
|
|
177
|
-
document.getElementById('btn-tab-prev').classList.toggle('active', tab === 'preview');
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
// --- Mobile Logic ---
|
|
182
|
-
function setMobileTab(tab) {
|
|
183
|
-
document.body.classList.remove('mobile-tab-editor', 'mobile-tab-preview');
|
|
184
|
-
document.body.classList.add('mobile-tab-' + tab);
|
|
185
|
-
|
|
186
|
-
document.getElementById('mob-edit').classList.toggle('active', tab === 'editor');
|
|
187
|
-
document.getElementById('mob-prev').classList.toggle('active', tab === 'preview');
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// --- Back Button Logic ---
|
|
191
|
-
if (window.history.length <= 1) {
|
|
192
|
-
backBtn.style.display = 'none';
|
|
193
|
-
} else {
|
|
194
|
-
backBtn.addEventListener('click', (e) => {
|
|
195
|
-
e.preventDefault();
|
|
196
|
-
window.history.back();
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
</script>
|
|
200
|
-
</body>
|
|
201
|
-
</html>
|
package/dist/live.css
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--header-height: 50px;
|
|
3
|
-
--border-color: #e0e0e0;
|
|
4
|
-
--bg-color: #f9fafb;
|
|
5
|
-
--primary-color: #007bff;
|
|
6
|
-
--resizer-width: 8px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
height: 100vh;
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: column;
|
|
14
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
15
|
-
overflow: hidden;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* --- Top Bar --- */
|
|
19
|
-
.top-bar {
|
|
20
|
-
height: var(--header-height);
|
|
21
|
-
background: #fff;
|
|
22
|
-
border-bottom: 1px solid var(--border-color);
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
padding: 0 1rem;
|
|
27
|
-
flex-shrink: 0;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.logo {
|
|
31
|
-
font-weight: 700;
|
|
32
|
-
font-size: 1.1rem;
|
|
33
|
-
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
|
-
gap: 12px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.logo span {
|
|
39
|
-
background: var(--primary-color);
|
|
40
|
-
color: white;
|
|
41
|
-
padding: 2px 6px;
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
font-size: 0.75rem;
|
|
44
|
-
text-transform: uppercase;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.back-link {
|
|
48
|
-
display: flex;
|
|
49
|
-
align-items: center;
|
|
50
|
-
justify-content: center;
|
|
51
|
-
color: #666;
|
|
52
|
-
transition: color 0.2s, transform 0.2s;
|
|
53
|
-
text-decoration: none;
|
|
54
|
-
padding: 4px;
|
|
55
|
-
border-radius: 4px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.back-link:hover {
|
|
59
|
-
color: var(--primary-color);
|
|
60
|
-
background: #f0f0f0;
|
|
61
|
-
transform: translateX(-2px);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.view-controls { display: flex; gap: 8px; background: #f0f0f0; padding: 3px; border-radius: 6px; }
|
|
65
|
-
.view-btn { border: none; background: transparent; padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; color: #666; font-weight: 500; }
|
|
66
|
-
.view-btn.active { background: white; color: black; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
|
|
67
|
-
|
|
68
|
-
/* --- Main Layout --- */
|
|
69
|
-
.workspace {
|
|
70
|
-
flex: 1;
|
|
71
|
-
display: flex;
|
|
72
|
-
position: relative;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.pane {
|
|
77
|
-
height: 100%;
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
min-width: 300px; /* Minimum width constraint */
|
|
81
|
-
background: white;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.pane-header {
|
|
85
|
-
padding: 8px 16px;
|
|
86
|
-
font-size: 0.75rem;
|
|
87
|
-
font-weight: 600;
|
|
88
|
-
text-transform: uppercase;
|
|
89
|
-
color: #888;
|
|
90
|
-
background: var(--bg-color);
|
|
91
|
-
border-bottom: 1px solid var(--border-color);
|
|
92
|
-
flex-shrink: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/* Editor Pane */
|
|
96
|
-
.editor-pane { width: 50%; }
|
|
97
|
-
textarea#input {
|
|
98
|
-
flex: 1;
|
|
99
|
-
border: none;
|
|
100
|
-
resize: none;
|
|
101
|
-
padding: 20px;
|
|
102
|
-
font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
|
|
103
|
-
font-size: 14px;
|
|
104
|
-
line-height: 1.6;
|
|
105
|
-
outline: none;
|
|
106
|
-
background: var(--bg-color);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/* Preview Pane */
|
|
110
|
-
.preview-pane { flex: 1; background: white; }
|
|
111
|
-
iframe#preview { width: 100%; height: 100%; border: none; display: block; }
|
|
112
|
-
|
|
113
|
-
/* --- Resizer Handle --- */
|
|
114
|
-
.resizer {
|
|
115
|
-
width: var(--resizer-width);
|
|
116
|
-
background: var(--bg-color);
|
|
117
|
-
border-left: 1px solid var(--border-color);
|
|
118
|
-
border-right: 1px solid var(--border-color);
|
|
119
|
-
cursor: col-resize;
|
|
120
|
-
display: flex;
|
|
121
|
-
align-items: center;
|
|
122
|
-
justify-content: center;
|
|
123
|
-
transition: background 0.2s;
|
|
124
|
-
z-index: 10;
|
|
125
|
-
}
|
|
126
|
-
.resizer:hover, .resizer.resizing { background: #e0e0e0; }
|
|
127
|
-
.resizer::after { content: "||"; color: #aaa; font-size: 10px; letter-spacing: 1px; }
|
|
128
|
-
|
|
129
|
-
/* --- View Modes (Single vs Split) --- */
|
|
130
|
-
|
|
131
|
-
/* Single Mode (Mobile style on Desktop) */
|
|
132
|
-
body.mode-single .resizer { display: none; }
|
|
133
|
-
body.mode-single .pane { width: 100% !important; min-width: 0; }
|
|
134
|
-
body.mode-single .editor-pane { display: none; }
|
|
135
|
-
body.mode-single .preview-pane { display: none; }
|
|
136
|
-
body.mode-single.show-editor .editor-pane { display: flex; }
|
|
137
|
-
body.mode-single.show-preview .preview-pane { display: flex; }
|
|
138
|
-
|
|
139
|
-
/* --- Mobile Responsive Overrides --- */
|
|
140
|
-
@media (max-width: 768px) {
|
|
141
|
-
/* Force single mode on mobile, hide desktop view controls */
|
|
142
|
-
.desktop-only { display: none !important; }
|
|
143
|
-
.resizer { display: none !important; }
|
|
144
|
-
|
|
145
|
-
.pane { width: 100% !important; }
|
|
146
|
-
.editor-pane { display: none; }
|
|
147
|
-
.preview-pane { display: none; }
|
|
148
|
-
|
|
149
|
-
body.mobile-tab-editor .editor-pane { display: flex; }
|
|
150
|
-
body.mobile-tab-preview .preview-pane { display: flex; }
|
|
151
|
-
|
|
152
|
-
.mobile-tabs {
|
|
153
|
-
display: flex !important;
|
|
154
|
-
position: fixed;
|
|
155
|
-
bottom: 0; left: 0; right: 0;
|
|
156
|
-
height: 50px;
|
|
157
|
-
background: white;
|
|
158
|
-
border-top: 1px solid var(--border-color);
|
|
159
|
-
z-index: 100;
|
|
160
|
-
}
|
|
161
|
-
.mobile-tab-btn { flex: 1; border: none; background: transparent; font-weight: 600; color: #888; cursor: pointer; }
|
|
162
|
-
.mobile-tab-btn.active { color: var(--primary-color); border-top: 2px solid var(--primary-color); }
|
|
163
|
-
|
|
164
|
-
.workspace { padding-bottom: 50px; } /* Space for tabs */
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
.mobile-tabs { display: none; } /* Hidden on desktop */
|
package/docmd.config.js
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
// Source file from the docmd project — https://github.com/mgks/docmd
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
// --- Core Metadata ---
|
|
5
|
-
siteTitle: 'docmd',
|
|
6
|
-
siteUrl: 'https://docmd.mgks.dev', // No trailing slash
|
|
7
|
-
|
|
8
|
-
// --- Branding ---
|
|
9
|
-
logo: {
|
|
10
|
-
light: 'assets/images/docmd-logo-light.png',
|
|
11
|
-
dark: 'assets/images/docmd-logo-dark.png',
|
|
12
|
-
alt: 'docmd Logo',
|
|
13
|
-
href: './',
|
|
14
|
-
},
|
|
15
|
-
favicon: 'assets/favicon.ico',
|
|
16
|
-
|
|
17
|
-
// --- Structure ---
|
|
18
|
-
srcDir: 'docs', // Source markdown files directory
|
|
19
|
-
outputDir: 'site', // Output directory for generated site
|
|
20
|
-
|
|
21
|
-
// --- Features & UX ---
|
|
22
|
-
search: true, // Built-in offline search
|
|
23
|
-
minify: true, // Production build optimization
|
|
24
|
-
autoTitleFromH1: true, // Auto-generate title from first H1 if frontmatter title is missing
|
|
25
|
-
copyCode: true, // Enable "copy to clipboard" on code blocks
|
|
26
|
-
pageNavigation: true, // Next/Prev links
|
|
27
|
-
|
|
28
|
-
// --- Sidebar & Theme ---
|
|
29
|
-
sidebar: {
|
|
30
|
-
collapsible: true,
|
|
31
|
-
defaultCollapsed: false,
|
|
32
|
-
},
|
|
33
|
-
theme: {
|
|
34
|
-
name: 'sky', // 'default', 'sky', 'ruby', 'retro'
|
|
35
|
-
defaultMode: 'light', // 'light' or 'dark'
|
|
36
|
-
enableModeToggle: true, // Show theme mode toggle button
|
|
37
|
-
positionMode: 'top', // 'top' or 'bottom' of header
|
|
38
|
-
codeHighlight: true, // Enable code syntax highlighting
|
|
39
|
-
customCss: [], // Add paths relative to outputDir here
|
|
40
|
-
},
|
|
41
|
-
customJs: [
|
|
42
|
-
'assets/js/docmd-image-lightbox.js',
|
|
43
|
-
],
|
|
44
|
-
|
|
45
|
-
// --- Plugins ---
|
|
46
|
-
plugins: {
|
|
47
|
-
seo: {
|
|
48
|
-
defaultDescription: 'The minimalist, zero-config documentation generator for Node.js developers.',
|
|
49
|
-
openGraph: {
|
|
50
|
-
defaultImage: 'assets/images/docmd-preview.png',
|
|
51
|
-
},
|
|
52
|
-
twitter: {
|
|
53
|
-
cardType: 'summary_large_image',
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
analytics: {
|
|
57
|
-
googleV4: {
|
|
58
|
-
measurementId: 'G-W8BCN0W4RF'
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
sitemap: {
|
|
62
|
-
defaultChangefreq: 'weekly',
|
|
63
|
-
defaultPriority: 0.8
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
// --- Doc Source Link ---
|
|
68
|
-
editLink: {
|
|
69
|
-
enabled: true,
|
|
70
|
-
baseUrl: 'https://github.com/mgks/docmd/edit/main/docs',
|
|
71
|
-
text: 'Edit this page on GitHub'
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
// --- Navigation ---
|
|
75
|
-
navigation: [
|
|
76
|
-
{ title: 'Welcome', path: './', icon: 'feather' },
|
|
77
|
-
{ title: 'Overview', path: './overview', icon: 'home' },
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
title: 'Getting Started',
|
|
81
|
-
icon: 'rocket',
|
|
82
|
-
path: './getting-started/',
|
|
83
|
-
children: [
|
|
84
|
-
{ title: 'Installation', path: './getting-started/installation', icon: 'download' },
|
|
85
|
-
{ title: 'Basic Usage', path: './getting-started/basic-usage', icon: 'play' },
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
{ title: 'Configuration', path: './configuration', icon: 'settings' },
|
|
90
|
-
{
|
|
91
|
-
title: 'Content',
|
|
92
|
-
icon: 'layout-template',
|
|
93
|
-
path: './content/',
|
|
94
|
-
collapsible: true,
|
|
95
|
-
children: [
|
|
96
|
-
{ title: 'Markdown Syntax', path: './content/markdown-syntax', icon: 'code-2' },
|
|
97
|
-
{ title: 'Frontmatter', path: './content/frontmatter', icon: 'file-text' },
|
|
98
|
-
{ title: 'Images & Lightbox', path: './content/images', icon: 'image' },
|
|
99
|
-
{ title: 'Search', path: './content/search', icon: 'search' },
|
|
100
|
-
{ title: 'Mermaid Diagrams', path: './content/mermaid', icon: 'network' },
|
|
101
|
-
{
|
|
102
|
-
title: 'Containers',
|
|
103
|
-
path: './content/containers/',
|
|
104
|
-
icon: 'box',
|
|
105
|
-
collapsible: true,
|
|
106
|
-
children: [
|
|
107
|
-
{ title: 'Callouts', path: './content/containers/callouts', icon: 'megaphone' },
|
|
108
|
-
{ title: 'Cards', path: './content/containers/cards', icon: 'panel-top' },
|
|
109
|
-
{ title: 'Steps', path: './content/containers/steps', icon: 'list-ordered' },
|
|
110
|
-
{ title: 'Tabs', path: './content/containers/tabs', icon: 'columns-3' },
|
|
111
|
-
{ title: 'Collapsible', path: './content/containers/collapsible', icon: 'chevrons-down' },
|
|
112
|
-
{ title: 'Changelogs', path: './content/containers/changelogs', icon: 'history' },
|
|
113
|
-
{ title: 'Buttons', path: './content/containers/buttons', icon: 'mouse-pointer-click' },
|
|
114
|
-
{ title: 'Nested Containers', path: './content/containers/nested-containers', icon: 'folder-tree' },
|
|
115
|
-
]
|
|
116
|
-
},
|
|
117
|
-
{ title: 'No-Style Pages', path: './content/no-style-pages', icon: 'layout' },
|
|
118
|
-
{ title: 'Live Preview', path: './content/live-preview', icon: 'monitor-play' },
|
|
119
|
-
],
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
title: 'Theming',
|
|
124
|
-
icon: 'palette',
|
|
125
|
-
path: './theming/',
|
|
126
|
-
collapsible: true,
|
|
127
|
-
children: [
|
|
128
|
-
{ title: 'Available Themes', path: './theming/available-themes', icon: 'layout-grid' },
|
|
129
|
-
{ title: 'Light & Dark Mode', path: './theming/light-dark-mode', icon: 'sun-moon' },
|
|
130
|
-
{ title: 'Custom CSS & JS', path: './theming/custom-css-js', icon: 'file-code' },
|
|
131
|
-
{ title: 'Icons', path: './theming/icons', icon: 'pencil-ruler' },
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
|
|
135
|
-
{
|
|
136
|
-
title: 'Plugins',
|
|
137
|
-
icon: 'puzzle',
|
|
138
|
-
path: './plugins/',
|
|
139
|
-
collapsible: true,
|
|
140
|
-
children: [
|
|
141
|
-
{ title: 'SEO & Meta', path: './plugins/seo', icon: 'search' },
|
|
142
|
-
{ title: 'Analytics', path: './plugins/analytics', icon: 'bar-chart' },
|
|
143
|
-
{ title: 'Sitemap', path: './plugins/sitemap', icon: 'map' },
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
{
|
|
148
|
-
title: 'Recipes',
|
|
149
|
-
icon: 'chef-hat',
|
|
150
|
-
path: './recipes/',
|
|
151
|
-
collapsible: true,
|
|
152
|
-
children: [
|
|
153
|
-
{ title: 'Landing Page', path: './recipes/landing-page', icon: 'layout-template' },
|
|
154
|
-
{ title: 'Custom Fonts', path: './recipes/custom-fonts', icon: 'type' },
|
|
155
|
-
{ title: 'Favicon', path: './recipes/favicon', icon: 'image-plus' },
|
|
156
|
-
],
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
{ title: 'CLI Commands', path: './cli-commands', icon: 'terminal' },
|
|
160
|
-
{ title: 'Deployment', path: './deployment', icon: 'upload-cloud' },
|
|
161
|
-
{ title: 'Comparison', path: './comparison', icon: 'scale' },
|
|
162
|
-
{ title: 'Contributing', path: './contributing', icon: 'git-pull-request' },
|
|
163
|
-
|
|
164
|
-
{ title: 'GitHub', path: 'https://github.com/mgks/docmd', icon: 'github', external: true },
|
|
165
|
-
{ title: 'Discussions', path: 'https://github.com/mgks/docmd/discussions', icon: 'message-circle', external: true },
|
|
166
|
-
],
|
|
167
|
-
|
|
168
|
-
// --- Footer & Sponsor ---
|
|
169
|
-
footer: '© ' + new Date().getFullYear() + ' Project docmd.',
|
|
170
|
-
sponsor: {
|
|
171
|
-
enabled: true,
|
|
172
|
-
title: 'Sponsor',
|
|
173
|
-
link: 'https://github.com/sponsors/mgks',
|
|
174
|
-
},
|
|
175
|
-
};
|