Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 8fd8846

Browse files
committed
fix: make default config.yml absolute
1 parent edab0de commit 8fd8846

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/actions/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ function getConfigUrl() {
5252
console.info(`[StaticCMS] Using config file path: "${configLinkEl.href}"`);
5353
return configLinkEl.href;
5454
}
55-
return 'config.yml';
55+
56+
return `${window.location.origin}${window.location.pathname.slice(
57+
0,
58+
window.location.pathname.lastIndexOf('/'),
59+
)}/config.yml`;
5660
}
5761

5862
const setFieldDefaults =

0 commit comments

Comments
 (0)