Skip to content

Commit bf39786

Browse files
committed
fix: Images with trailingSlash enabled
Thanks to: arthelokyo/astrowind#596 (comment)
1 parent 3c6a5c4 commit bf39786

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

vendor/integration/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ export default ({ config: _themeConfig = 'src/config.yaml' } = {}): AstroIntegra
3232
site: SITE.site,
3333
base: SITE.base,
3434

35+
// Fix images not working when `trailingSlash` is enabled in config.yaml
36+
// `trailingSlash` needed since GitHub pages adds them forcefully,
37+
// else, CircularMenu opened notebook pages wouldn't have formatting.
38+
// https://github.com/arthelokyo/astrowind/issues/596#issuecomment-2698298670
39+
image: {
40+
endpoint: {
41+
route: SITE.trailingSlash ? '/_image/' : '/_image',
42+
}
43+
},
44+
3545
trailingSlash: SITE.trailingSlash ? 'always' : 'never',
3646

3747
vite: {

0 commit comments

Comments
 (0)