Skip to content

Commit

Permalink
Allow . for media_folder
Browse files Browse the repository at this point in the history
  • Loading branch information
kyoshino committed Nov 22, 2024
1 parent 6e3cca5 commit 577aea4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/services/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ siteConfig.subscribe((config) => {
.sort((a, b) => compare(Object.values(a.filePathMap)[0], Object.values(b.filePathMap)[0])),
];

const globalMediaFolder = stripSlashes(_globalMediaFolder);
// Normalize the media folder: an empty string, `/` and `.` are all considered as the root folder
const globalMediaFolder = stripSlashes(_globalMediaFolder).replace(/^\.$/, '');

// Some frameworks expect asset paths starting with `@`, like `@assets/images/...`. Remove an
// extra leading slash in that case. A trailing slash should always be removed internally.
Expand Down

0 comments on commit 577aea4

Please sign in to comment.