living-documentation 1.0.0 → 1.0.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/README.md CHANGED
@@ -8,8 +8,6 @@ No cloud, no database, no build step — just point it at a folder of `.md` file
8
8
  ![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue)
9
9
  ![License](https://img.shields.io/badge/License-MIT-lightgrey)
10
10
 
11
- ---
12
-
13
11
  ## Features
14
12
 
15
13
  - **Sidebar** grouped by category, sorted by date (newest first)
@@ -91,13 +89,14 @@ Documents are parsed using this default pattern:
91
89
  YYYY_MM_DD_[Category]_title_words.md
92
90
  ```
93
91
 
94
- | Part | Example | Parsed as |
95
- |------|---------|-----------|
96
- | `2024_01_15` | `2024_01_15` | Date → Jan 15, 2024 |
97
- | `[DevOps]` | `[DevOps]` | Category → DevOps |
92
+ | Part | Example | Parsed as |
93
+ | ----------------- | ----------------- | ----------------------- |
94
+ | `2024_01_15` | `2024_01_15` | Date → Jan 15, 2024 |
95
+ | `[DevOps]` | `[DevOps]` | Category → DevOps |
98
96
  | `deploy_pipeline` | `deploy_pipeline` | Title → Deploy Pipeline |
99
97
 
100
98
  **Full example:**
99
+
101
100
  ```
102
101
  2024_01_15_[DevOps]_deploy_pipeline.md
103
102
  2024_03_20_[Frontend]_react_hooks_guide.md
@@ -153,13 +152,13 @@ living-documentation/
153
152
 
154
153
  ## API reference
155
154
 
156
- | Method | Endpoint | Description |
157
- |--------|----------|-------------|
158
- | `GET` | `/api/documents` | List all documents with metadata |
159
- | `GET` | `/api/documents/:id` | Get document content + rendered HTML |
160
- | `GET` | `/api/documents/search?q=` | Full-text search |
161
- | `GET` | `/api/config` | Read config |
162
- | `PUT` | `/api/config` | Update config (`title`, `theme`, `filenamePattern`) |
155
+ | Method | Endpoint | Description |
156
+ | ------ | -------------------------- | --------------------------------------------------- |
157
+ | `GET` | `/api/documents` | List all documents with metadata |
158
+ | `GET` | `/api/documents/:id` | Get document content + rendered HTML |
159
+ | `GET` | `/api/documents/search?q=` | Full-text search |
160
+ | `GET` | `/api/config` | Read config |
161
+ | `PUT` | `/api/config` | Update config (`title`, `theme`, `filenamePattern`) |
163
162
 
164
163
  ---
165
164
 
@@ -25,20 +25,23 @@
25
25
  <body class="h-full bg-gray-50 dark:bg-gray-950 text-gray-900 dark:text-gray-100">
26
26
 
27
27
  <!-- ── Header ── -->
28
- <header class="flex items-center justify-between px-6 h-14 border-b border-gray-200 dark:border-gray-800
28
+ <header class="flex items-center justify-between px-4 h-14 border-b border-gray-200 dark:border-gray-800
29
29
  bg-white dark:bg-gray-900 shadow-sm">
30
30
  <div class="flex items-center gap-3">
31
+ <span class="text-blue-600 dark:text-blue-400 text-xl select-none" aria-hidden="true">&#128218;</span>
32
+ <h1 class="text-base font-semibold tracking-tight">Admin Panel</h1>
33
+ </div>
34
+
35
+ <div class="flex items-center gap-3">
36
+ <button id="dark-toggle" title="Toggle dark mode"
37
+ class="p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors">
38
+ <span id="dark-icon" class="text-lg leading-none">☾</span>
39
+ </button>
40
+ <span class="text-gray-300 dark:text-gray-700">|</span>
31
41
  <a href="/" class="text-blue-600 dark:text-blue-400 hover:underline text-sm">
32
- &#8592; Back to docs
42
+ Back to docs &#8594;
33
43
  </a>
34
- <span class="text-gray-300 dark:text-gray-700">|</span>
35
- <h1 class="text-sm font-semibold">Admin Panel</h1>
36
44
  </div>
37
-
38
- <button id="dark-toggle" title="Toggle dark mode"
39
- class="p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors">
40
- <span id="dark-icon" class="text-lg leading-none">☾</span>
41
- </button>
42
45
  </header>
43
46
 
44
47
  <!-- ── Page ── -->
@@ -8,10 +8,8 @@
8
8
  <!-- Tailwind CSS + Typography plugin via CDN -->
9
9
  <script src="https://cdn.tailwindcss.com?plugins=typography"></script>
10
10
 
11
- <!-- Highlight.js — syntax highlighting -->
12
- <link id="hljs-light" rel="stylesheet"
13
- href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github.min.css" />
14
- <link id="hljs-dark" rel="stylesheet" disabled
11
+ <!-- Highlight.js — syntax highlighting (always dark) -->
12
+ <link rel="stylesheet"
15
13
  href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" />
16
14
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
17
15
 
@@ -49,7 +47,7 @@
49
47
  background: #374151; color: #f87171; padding: 0.1em 0.35em;
50
48
  border-radius: 0.25em; font-size: 0.875em;
51
49
  }
52
- .dark .prose pre { background: #1f2937; border: 1px solid #374151; }
50
+
53
51
  .dark .prose blockquote { border-color: #4b5563; color: #9ca3af; }
54
52
  .dark .prose hr { border-color: #374151; }
55
53
  .dark .prose table th { background: #1f2937; color: #f9fafb; }
@@ -201,8 +199,7 @@
201
199
  class="prose prose-gray dark:prose-invert max-w-none
202
200
  prose-headings:scroll-mt-4 prose-a:text-blue-600 dark:prose-a:text-blue-400
203
201
  prose-code:before:content-none prose-code:after:content-none
204
- prose-pre:bg-gray-50 prose-pre:border prose-pre:border-gray-200
205
- dark:prose-pre:bg-gray-900 dark:prose-pre:border-gray-700">
202
+ prose-pre:bg-[#0d1117] prose-pre:border prose-pre:border-gray-700">
206
203
  </div>
207
204
  </article>
208
205
 
@@ -241,8 +238,6 @@ function loadDarkPref() {
241
238
  function applyDarkMode(dark) {
242
239
  document.documentElement.classList.toggle('dark', dark);
243
240
  document.getElementById('dark-icon').textContent = dark ? '☀' : '☾';
244
- document.getElementById('hljs-light').disabled = dark;
245
- document.getElementById('hljs-dark').disabled = !dark;
246
241
  }
247
242
 
248
243
  function setupDarkToggle() {
@@ -250,8 +245,6 @@ function setupDarkToggle() {
250
245
  const isDark = document.documentElement.classList.toggle('dark');
251
246
  localStorage.setItem('ld-dark', isDark);
252
247
  document.getElementById('dark-icon').textContent = isDark ? '☀' : '☾';
253
- document.getElementById('hljs-light').disabled = isDark;
254
- document.getElementById('hljs-dark').disabled = !isDark;
255
248
  });
256
249
  }
257
250
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "living-documentation",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A CLI tool that serves a local Markdown documentation viewer",
5
5
  "main": "dist/src/server.js",
6
6
  "bin": {