Skip to content

Commit

Permalink
fix relative path in published websites, silex version
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Aug 28, 2023
1 parent e21cd42 commit b7af66b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ export default async function (config) {
// Replace /index.html with /
return type === 'html' && path.endsWith('/index.html') ? path.replace(/index\.html$/, '') : path
},
transformPermalink(path, type) {
// Make absolute paths relative
switch (type) {
case 'css':
return path.startsWith('/') ? `.${path}` : path
case 'asset':
return path.startsWith('/') ? `.${path}` : path
}
return path
},
})
return {}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "lexoyo",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@silexlabs/silex": "^3.0.0-alpha.109",
"@silexlabs/silex": "^3.0.0-alpha.117",
"@silexlabs/silex-dashboard": "^1.0.37"
},
"repository": {
Expand Down

0 comments on commit b7af66b

Please sign in to comment.