Skip to content

Commit 5647cea

Browse files
committed
chore: up
1 parent 907b8cc commit 5647cea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/waku/internal/middleware/md-router.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ export function middleware(): MiddlewareHandler {
103103
)
104104
text = result?.content ?? null
105105
} else {
106-
text = await fetchMarkdown(url, `/assets/md${url.pathname}`)
106+
const assetPath = url.pathname.endsWith('.md')
107+
? `/assets/md${url.pathname}`
108+
: `/assets/md${url.pathname}.md`
109+
text = await fetchMarkdown(url, assetPath)
107110
}
108111
if (!text) return next()
109112

0 commit comments

Comments
 (0)