@docmd/ui 0.4.4 → 0.4.6
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 +26 -1
- package/assets/css/docmd-highlight-dark.css +14 -2
- package/assets/css/docmd-highlight-light.css +14 -2
- package/assets/css/docmd-main.css +29 -2
- package/assets/js/docmd-image-lightbox.js +13 -1
- package/assets/js/docmd-main.js +13 -1
- package/index.js +14 -0
- package/package.json +1 -1
- package/templates/layout.ejs +17 -6
- package/templates/navigation.ejs +7 -2
- package/templates/no-style.ejs +8 -1
- package/templates/partials/theme-init.js +13 -1
- package/templates/toc.ejs +6 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -5,4 +5,29 @@ The visual foundation of **docmd**.
|
|
|
5
5
|
Contains:
|
|
6
6
|
- **Templates:** EJS layout files (`layout.ejs`, `no-style.ejs`).
|
|
7
7
|
- **Assets:** Core CSS and JavaScript.
|
|
8
|
-
- **Icons:** SVG icon sets.
|
|
8
|
+
- **Icons:** SVG icon sets.
|
|
9
|
+
|
|
10
|
+
## The docmd Ecosystem
|
|
11
|
+
|
|
12
|
+
`docmd` is a modular system. Here are the official packages:
|
|
13
|
+
|
|
14
|
+
**The Engine**
|
|
15
|
+
* [**@docmd/core**](https://www.npmjs.com/package/@docmd/core) - The CLI runner and build orchestrator.
|
|
16
|
+
* [**@docmd/parser**](https://www.npmjs.com/package/@docmd/parser) - The pure Markdown-to-HTML logic.
|
|
17
|
+
* [**@docmd/live**](https://www.npmjs.com/package/@docmd/live) - The browser-based Live Editor bundle.
|
|
18
|
+
|
|
19
|
+
**Interface & Design**
|
|
20
|
+
* [**@docmd/ui**](https://www.npmjs.com/package/@docmd/ui) - Base EJS templates and assets.
|
|
21
|
+
* [**@docmd/themes**](https://www.npmjs.com/package/@docmd/themes) - Official themes (Sky, Ruby, Retro).
|
|
22
|
+
|
|
23
|
+
**Plugins**
|
|
24
|
+
* [**@docmd/plugin-search**](https://www.npmjs.com/package/@docmd/plugin-search) - Offline full-text search.
|
|
25
|
+
* [**@docmd/plugin-mermaid**](https://www.npmjs.com/package/@docmd/plugin-mermaid) - Diagrams and flowcharts.
|
|
26
|
+
* [**@docmd/plugin-seo**](https://www.npmjs.com/package/@docmd/plugin-seo) - Meta tags and Open Graph data.
|
|
27
|
+
* [**@docmd/plugin-sitemap**](https://www.npmjs.com/package/@docmd/plugin-sitemap) - Automatic sitemap generation.
|
|
28
|
+
* [**@docmd/plugin-llms**](https://www.npmjs.com/package/@docmd/plugin-llms) - AI context generation.
|
|
29
|
+
* [**@docmd/plugin-analytics**](https://www.npmjs.com/package/@docmd/plugin-analytics) - Google Analytics integration.
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
Distributed under the MIT License. See `LICENSE` for more information.
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
|
-
pre code.hljs {
|
|
15
|
+
pre code.hljs {
|
|
4
16
|
display: block;
|
|
5
17
|
overflow-x: auto;
|
|
6
18
|
padding: 1em
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
|
-
pre code.hljs {
|
|
15
|
+
pre code.hljs {
|
|
4
16
|
display: block;
|
|
5
17
|
overflow-x: auto;
|
|
6
18
|
padding: 1em
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
15
|
/*
|
|
4
16
|
* docmd-main.css
|
|
@@ -100,6 +112,20 @@ a:any-link {
|
|
|
100
112
|
color: var(--link-color)
|
|
101
113
|
}
|
|
102
114
|
|
|
115
|
+
.skip-link {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: -100px;
|
|
118
|
+
left: 0;
|
|
119
|
+
background: var(--bg-color);
|
|
120
|
+
color: var(--link-color);
|
|
121
|
+
padding: 8px;
|
|
122
|
+
z-index: 9999;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.skip-link:focus {
|
|
126
|
+
top: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
103
129
|
.sidebar {
|
|
104
130
|
scrollbar-gutter: stable;
|
|
105
131
|
display: flex;
|
|
@@ -411,7 +437,8 @@ pre {
|
|
|
411
437
|
padding: 1.25em;
|
|
412
438
|
color: var(--code-text);
|
|
413
439
|
overflow-x: auto;
|
|
414
|
-
position: relative
|
|
440
|
+
position: relative;
|
|
441
|
+
white-space: pre;
|
|
415
442
|
}
|
|
416
443
|
|
|
417
444
|
code {
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
15
|
/*
|
|
4
16
|
* A simple lightbox implementation for gallery images
|
package/assets/js/docmd-main.js
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
15
|
/*
|
|
4
16
|
* Main client-side script for docmd UI interactions
|
package/index.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
const path = require('path');
|
|
2
16
|
|
|
3
17
|
module.exports = {
|
package/package.json
CHANGED
package/templates/layout.ejs
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
---------------------------------------------------------------
|
|
3
|
+
docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
@website https://docmd.io
|
|
5
|
+
[docmd-source] - Please do not remove this header.
|
|
6
|
+
---------------------------------------------------------------
|
|
7
|
+
-->
|
|
8
|
+
|
|
2
9
|
<!DOCTYPE html>
|
|
3
10
|
<html lang="en">
|
|
4
11
|
<head>
|
|
5
12
|
<meta charset="UTF-8">
|
|
13
|
+
<meta name="generator" content="docmd v0.4.x">
|
|
6
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
15
|
|
|
8
16
|
<!-- Define Globals -->
|
|
@@ -52,7 +60,7 @@
|
|
|
52
60
|
<body class="<%= sidebarConfig.collapsible ? 'sidebar-collapsible' : 'sidebar-not-collapsible' %>"
|
|
53
61
|
data-default-collapsed="<%= sidebarConfig.defaultCollapsed %>"
|
|
54
62
|
data-copy-code-enabled="<%= config.copyCode === true %>">
|
|
55
|
-
|
|
63
|
+
<a href="#main-content" class="skip-link">Skip to main content</a>
|
|
56
64
|
<aside class="sidebar">
|
|
57
65
|
<div class="sidebar-header">
|
|
58
66
|
<% if (logo && logo.light && logo.dark) { %>
|
|
@@ -116,7 +124,7 @@
|
|
|
116
124
|
<% } %>
|
|
117
125
|
</div>
|
|
118
126
|
|
|
119
|
-
<main class="content-area">
|
|
127
|
+
<main class="content-area" id="main-content">
|
|
120
128
|
<div class="content-layout">
|
|
121
129
|
<div class="main-content">
|
|
122
130
|
<%- content %>
|
|
@@ -183,13 +191,16 @@
|
|
|
183
191
|
</div>
|
|
184
192
|
<% } %>
|
|
185
193
|
|
|
186
|
-
<!--
|
|
194
|
+
<!-- CORE JS -->
|
|
195
|
+
<script src="<%= relativePathToRoot %>assets/js/docmd-main.js?v=<%= buildHash %>"></script>
|
|
196
|
+
|
|
197
|
+
<!-- PLUGINS -->
|
|
187
198
|
<%- pluginBodyScriptsHtml || '' %>
|
|
188
199
|
|
|
189
|
-
<!--
|
|
200
|
+
<!-- CUSTOM JS -->
|
|
190
201
|
<% (customJsFiles || []).forEach(jsFile => {
|
|
191
202
|
if (jsFile && jsFile.trim() !== '') { %>
|
|
192
|
-
<script src="<%= relativePathToRoot %><%- jsFile.startsWith('/') ? jsFile.substring(1) : jsFile %>"></script>
|
|
203
|
+
<script src="<%= relativePathToRoot %><%- jsFile.startsWith('/') ? jsFile.substring(1) : jsFile %>?v=<%= buildHash %>"></script>
|
|
193
204
|
<% } }); %>
|
|
194
205
|
</body>
|
|
195
206
|
</html>
|
package/templates/navigation.ejs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
<%#
|
|
1
|
+
<%# ---------------------------------------------------------------
|
|
2
|
+
# docmd : the minimalist, zero-config documentation generator.
|
|
3
|
+
# @website https://docmd.io
|
|
4
|
+
# [docmd-source] - Please do not remove this header.
|
|
5
|
+
# ---------------------------------------------------------------
|
|
6
|
+
%>
|
|
2
7
|
|
|
3
|
-
<nav class="sidebar-nav" aria-label="Main
|
|
8
|
+
<nav class="sidebar-nav" aria-label="Main Navigation">
|
|
4
9
|
<ul>
|
|
5
10
|
<%
|
|
6
11
|
function normalizePath(p) {
|
package/templates/no-style.ejs
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
<!--
|
|
2
|
+
---------------------------------------------------------------
|
|
3
|
+
docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
@website https://docmd.io
|
|
5
|
+
[docmd-source] - Please do not remove this header.
|
|
6
|
+
---------------------------------------------------------------
|
|
7
|
+
-->
|
|
2
8
|
|
|
3
9
|
<!DOCTYPE html>
|
|
4
10
|
<html lang="en">
|
|
5
11
|
<head>
|
|
6
12
|
<meta charset="UTF-8">
|
|
13
|
+
<meta name="generator" content="docmd v0.4.x">
|
|
7
14
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
15
|
|
|
9
16
|
<!-- 1. GLOBALS -->
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --------------------------------------------------------------------
|
|
3
|
+
* docmd : the minimalist, zero-config documentation generator.
|
|
4
|
+
*
|
|
5
|
+
* @package @docmd/core (and ecosystem)
|
|
6
|
+
* @website https://docmd.io
|
|
7
|
+
* @repository https://github.com/docmd-io/docmd
|
|
8
|
+
* @license MIT
|
|
9
|
+
* @copyright Copyright (c) 2025 docmd.io
|
|
10
|
+
*
|
|
11
|
+
* [docmd-source] - Please do not remove this header.
|
|
12
|
+
* --------------------------------------------------------------------
|
|
13
|
+
*/
|
|
2
14
|
|
|
3
15
|
(function() {
|
|
4
16
|
try {
|
package/templates/toc.ejs
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
<%#
|
|
1
|
+
<%# ---------------------------------------------------------------
|
|
2
|
+
# docmd : the minimalist, zero-config documentation generator.
|
|
3
|
+
# @website https://docmd.io
|
|
4
|
+
# [docmd-source] - Please do not remove this header.
|
|
5
|
+
# ---------------------------------------------------------------
|
|
6
|
+
%>
|
|
2
7
|
|
|
3
8
|
<%
|
|
4
9
|
function decodeHtmlEntities(html) {
|