md-lv 1.0.3 → 1.1.1
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 +3 -3
- package/bin/mdlv.js +5 -5
- package/package.json +4 -4
- package/public/js/app.js +1 -1
- package/public/js/navigation.js +1 -1
- package/public/js/search.js +1 -1
- package/public/styles/base.css +2 -2
- package/public/styles/modern.css +4 -2
- package/src/routes/api.js +0 -3
- package/src/routes/directory.js +1 -4
- package/templates/page.html +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# md-lv
|
|
2
2
|
|
|
3
3
|
> Serve Markdown files as HTML with live features
|
|
4
4
|
|
|
@@ -123,8 +123,8 @@ $$
|
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
125
|
# Clone repository
|
|
126
|
-
git clone https://github.com/
|
|
127
|
-
cd markdown-viewer
|
|
126
|
+
git clone https://github.com/no-problem-dev/markdown-live-viewer.git
|
|
127
|
+
cd markdown-live-viewer
|
|
128
128
|
|
|
129
129
|
# Install dependencies
|
|
130
130
|
npm install
|
package/bin/mdlv.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { run } from '../src/cli.js';
|
|
4
|
-
|
|
5
|
-
run(process.argv);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { run } from '../src/cli.js';
|
|
4
|
+
|
|
5
|
+
run(process.argv);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "md-lv",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Serve Markdown files as HTML with live features - syntax highlighting, Mermaid diagrams, and MathJax formulas",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
|
48
|
-
"url": "git+https://github.com/no-problem-dev/markdown-viewer.git"
|
|
48
|
+
"url": "git+https://github.com/no-problem-dev/markdown-live-viewer.git"
|
|
49
49
|
},
|
|
50
50
|
"bugs": {
|
|
51
|
-
"url": "https://github.com/no-problem-dev/markdown-viewer/issues"
|
|
51
|
+
"url": "https://github.com/no-problem-dev/markdown-live-viewer/issues"
|
|
52
52
|
},
|
|
53
|
-
"homepage": "https://github.com/no-problem-dev/markdown-viewer#readme",
|
|
53
|
+
"homepage": "https://github.com/no-problem-dev/markdown-live-viewer#readme",
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"express": "^5.0.0",
|
|
56
56
|
"commander": "^12.0.0",
|
package/public/js/app.js
CHANGED
package/public/js/navigation.js
CHANGED
package/public/js/search.js
CHANGED
package/public/styles/base.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
|
-
|
|
2
|
+
md-lv Base Styles
|
|
3
3
|
GitHub-inspired Markdown styling
|
|
4
4
|
========================================================================== */
|
|
5
5
|
|
|
@@ -177,7 +177,7 @@ table tr {
|
|
|
177
177
|
}
|
|
178
178
|
|
|
179
179
|
table tr:nth-child(2n) {
|
|
180
|
-
background-color: #
|
|
180
|
+
background-color: #eef1f4;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/* Horizontal Rule */
|
package/public/styles/modern.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* ==========================================================================
|
|
2
|
-
|
|
2
|
+
md-lv Modern Styles
|
|
3
3
|
Dark mode support and enhanced UI
|
|
4
4
|
========================================================================== */
|
|
5
5
|
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--color-border: #e1e4e8;
|
|
17
17
|
--color-border-strong: #c6cbd1;
|
|
18
18
|
--color-code-bg: #f6f8fa;
|
|
19
|
+
--color-table-row-alt: #eef1f4;
|
|
19
20
|
--color-blockquote-border: #dfe2e5;
|
|
20
21
|
--color-success: #28a745;
|
|
21
22
|
--color-warning: #ffc107;
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
--color-border: #30363d;
|
|
41
42
|
--color-border-strong: #484f58;
|
|
42
43
|
--color-code-bg: #161b22;
|
|
44
|
+
--color-table-row-alt: #1c2128;
|
|
43
45
|
--color-blockquote-border: #3b434b;
|
|
44
46
|
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
|
|
45
47
|
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
|
|
@@ -210,7 +212,7 @@ table tr {
|
|
|
210
212
|
}
|
|
211
213
|
|
|
212
214
|
table tr:nth-child(2n) {
|
|
213
|
-
background-color: var(--color-
|
|
215
|
+
background-color: var(--color-table-row-alt);
|
|
214
216
|
color: var(--color-text);
|
|
215
217
|
}
|
|
216
218
|
|
package/src/routes/api.js
CHANGED
|
@@ -22,9 +22,6 @@ async function getAllFiles(dir, baseDir, maxDepth = 5, currentDepth = 0) {
|
|
|
22
22
|
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
23
23
|
|
|
24
24
|
for (const entry of entries) {
|
|
25
|
-
// 隠しファイル・ディレクトリをスキップ
|
|
26
|
-
if (entry.name.startsWith('.')) continue;
|
|
27
|
-
|
|
28
25
|
// node_modules をスキップ
|
|
29
26
|
if (entry.name === 'node_modules') continue;
|
|
30
27
|
|
package/src/routes/directory.js
CHANGED
|
@@ -73,11 +73,8 @@ router.get(/^\/.*/, async (req, res, next) => {
|
|
|
73
73
|
return a.name.localeCompare(b.name);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// 隠しファイルをフィルタ(オプション)
|
|
77
|
-
const visible = sorted.filter(entry => !entry.name.startsWith('.'));
|
|
78
|
-
|
|
79
76
|
// HTML リスト生成
|
|
80
|
-
const listHtml =
|
|
77
|
+
const listHtml = sorted.map(entry => {
|
|
81
78
|
const isDir = entry.isDirectory;
|
|
82
79
|
const href = path.join(requestPath, entry.name) + (isDir ? '/' : '');
|
|
83
80
|
const iconClass = getIconClass(entry.name, isDir);
|
package/templates/page.html
CHANGED