Skip to content

Commit

Permalink
Add base path
Browse files Browse the repository at this point in the history
  • Loading branch information
prokawsar committed Nov 26, 2024
1 parent a7edc0f commit 2a079b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mdsvex.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
if (node.type === 'element' && node.tagName === 'img') {
// Check if src is a relative path
if (node.properties.src && !node.properties.src.startsWith('http')) {
node.properties.src = `${BASE_PATH}${node.properties.src}`.replace(/^\.?\/?/, '/')
node.properties.src = BASE_PATH + node.properties.src.replace(/^\.?\/?/, '/')
}
}
return node
Expand Down

0 comments on commit 2a079b7

Please sign in to comment.