@kenjura/ursa 0.35.0 → 0.39.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,25 @@
1
+ # 0.39.0
2
+ 2025-12-13
3
+
4
+ - Updated to node 24.5 to satisfy npm Trusted Publishing
5
+ - Refactored Github Actions
6
+ - Added CONTRIBUTING.md
7
+
8
+ # 0.38.0
9
+ 2025-12-13
10
+
11
+ - Updated Github Actions workflow to use OIDC for authentication
12
+
13
+ # 0.37.0
14
+ 2025-12-13
15
+
16
+ - Added Github Actions workflow for CI/CD (npm publish)
17
+
18
+ # 0.36.0
19
+ 2025-12-13
20
+
21
+ - Links to a valid .md file in source will now render as a link to the corresponding .html file (and show as an active link)
22
+
1
23
  # 0.35.0
2
24
  2025-12-11
3
25
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@kenjura/ursa",
3
3
  "author": "Andrew London <andrew@kenjura.com>",
4
4
  "type": "module",
5
- "version": "0.35.0",
5
+ "version": "0.39.0",
6
6
  "description": "static site generator from MD/wikitext/YML",
7
7
  "main": "lib/index.js",
8
8
  "bin": {
@@ -157,7 +157,24 @@ function resolveHref(href, validPaths, currentDocPath = null) {
157
157
  // Check if the href already has an extension
158
158
  const ext = extname(hrefWithoutHash);
159
159
  if (ext) {
160
- // Has extension but doesn't exist
160
+ // Special handling for .md links - convert to .html if valid
161
+ if (ext.toLowerCase() === '.md') {
162
+ // Remove .md and check if .html version exists
163
+ const pathWithoutMd = normalized.slice(0, -3); // Remove '.md'
164
+ const htmlPath = pathWithoutMd + '.html';
165
+ debugTries.push(`${normalized} (.md → .html) ${htmlPath} → ${validPaths.has(htmlPath) ? '✓' : '✗'}`);
166
+ if (validPaths.has(htmlPath)) {
167
+ // Convert .md to .html in the resolved href
168
+ const resolvedHref = absoluteHref.slice(0, -3) + '.html' + hash;
169
+ return { resolvedHref, inactive: false, debug: debugTries.join(' | ') };
170
+ }
171
+ // Also check without extension (in case valid paths don't have .html suffix)
172
+ if (validPaths.has(pathWithoutMd)) {
173
+ const resolvedHref = absoluteHref.slice(0, -3) + '.html' + hash;
174
+ return { resolvedHref, inactive: false, debug: debugTries.join(' | ') };
175
+ }
176
+ }
177
+ // Has extension but doesn't exist (or is not .md)
161
178
  debugTries.push(`${normalized} → ✗`);
162
179
  return { resolvedHref: absoluteHref + hash, inactive: true, debug: debugTries.join(' | ') };
163
180
  }