From 87d68c4ed0cefa82b13b3417646d311235d424db Mon Sep 17 00:00:00 2001 From: Arnau Orriols Date: Mon, 7 Oct 2024 11:59:08 +0100 Subject: [PATCH] Fix: support passing a file path instead of a file URL to `configureBlog` --- blog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog.tsx b/blog.tsx index 0bc7309..08ed81a 100644 --- a/blog.tsx +++ b/blog.tsx @@ -173,7 +173,7 @@ export async function configureBlog( let directory; try { - const blogPath = fromFileUrl(url); + const blogPath = URL.canParse(url) ? fromFileUrl(url) : url; directory = dirname(blogPath); } catch (e) { console.error(e);