mdsvr 2.0.1 → 2.0.2

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 CHANGED
@@ -31,10 +31,10 @@ npx mdsvr ./docs
31
31
  npx mdsvr ./docs --init
32
32
 
33
33
  # With options
34
- npx mdsvr ./notes --port 4000 --open
34
+ npx mdsvr ./notes --port 1800 --open
35
35
 
36
36
  # Expose to LAN
37
- npx mdsvr . --host 0.0.0.0 --port 8080
37
+ npx mdsvr . --host 0.0.0.0 --port 1800
38
38
  ```
39
39
 
40
40
  ## Installation
@@ -44,6 +44,24 @@ npm install -g mdsvr
44
44
  mdsvr ./docs
45
45
  ```
46
46
 
47
+ ## Docker
48
+
49
+ Pull and run with Docker:
50
+
51
+ ```bash
52
+ docker pull thedeployer/mdsvr:latest
53
+ docker run -d --name docs-server -p 1800:1800 -v /path/to/docs:/app/docs thedeployer/mdsvr:latest
54
+ ```
55
+
56
+ Then open http://localhost:1800 in your browser.
57
+
58
+ ### Build from source
59
+
60
+ ```bash
61
+ docker build -t mdsvr:latest .
62
+ docker run -d --name docs-server -p 1800:1800 -v /path/to/docs:/app/docs mdsvr:latest
63
+ ```
64
+
47
65
  ## CLI Usage
48
66
 
49
67
  ```
@@ -51,7 +69,7 @@ Usage: mdsvr [dir] [options]
51
69
 
52
70
  Options:
53
71
  [dir] Root directory to serve (default: .)
54
- -p, --port N Port number (default: 1900)
72
+ -p, --port N Port number (default: 1800)
55
73
  --host H Bind address (default: localhost)
56
74
  -o, --open Auto-open browser
57
75
  -s, --silent Suppress console output
package/dist/cli.js CHANGED
@@ -7,7 +7,7 @@ import { validateSettingsFile, generateDefaultSettings, } from "./settings/index
7
7
  function parseArgs(argv) {
8
8
  const args = {
9
9
  dir: ".",
10
- port: 1900,
10
+ port: 1800,
11
11
  host: "localhost",
12
12
  open: false,
13
13
  silent: false,
@@ -62,7 +62,7 @@ Usage: mdsvr [dir] [options]
62
62
 
63
63
  Options:
64
64
  [dir] Root directory to serve (default: .)
65
- -p, --port N Port number (default: 1900)
65
+ -p, --port N Port number (default: 1800)
66
66
  --host H Bind address (default: localhost)
67
67
  -o, --open Auto-open browser
68
68
  -s, --silent Suppress console output
@@ -67,7 +67,7 @@ async function readDirRecursive(dirPath, rootDir, baseUrl, settings) {
67
67
  return entries;
68
68
  }
69
69
  export async function generateFeed(rootDir, settings) {
70
- const baseUrl = settings.site.baseUrl || "http://localhost:1900";
70
+ const baseUrl = settings.site.baseUrl || "http://localhost:1800";
71
71
  const feedUrl = settings.seo.rss?.feedUrl || "/feed.xml";
72
72
  const siteUrl = settings.seo.rss?.siteUrl || baseUrl;
73
73
  const entries = await readDirRecursive(rootDir, rootDir, baseUrl, settings);
@@ -63,7 +63,7 @@ async function readDirRecursive(dirPath, rootDir, baseUrl, settings) {
63
63
  return entries;
64
64
  }
65
65
  export async function generateSitemap(rootDir, settings) {
66
- const baseUrl = settings.site.baseUrl || "http://localhost:1900";
66
+ const baseUrl = settings.site.baseUrl || "http://localhost:1800";
67
67
  const entries = await readDirRecursive(rootDir, rootDir, baseUrl, settings);
68
68
  // Sort by URL for consistent output
69
69
  entries.sort((a, b) => a.url.localeCompare(b.url));
package/dist/server.js CHANGED
@@ -27,7 +27,7 @@ export async function createServer(rootDir, options = {}) {
27
27
  if (currentSettings.search.enabled) {
28
28
  searchIndexCache = await buildSearchIndex(absoluteRoot, currentSettings);
29
29
  }
30
- const port = options.port ?? 1900;
30
+ const port = options.port ?? 1800;
31
31
  const host = options.host ?? "localhost";
32
32
  const watchSettingsEnabled = options.watchSettings ?? true;
33
33
  const maxRetries = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdsvr",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Full-featured documentation website server with MDX support, site settings, SEO, and navigation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -65,4 +65,4 @@
65
65
  "type": "git",
66
66
  "url": "git+https://github.com/satoshiman/mdsvr.git"
67
67
  }
68
- }
68
+ }