Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"@docusaurus/core": "3.8.0",
"@docusaurus/types": "3.8.0",
"@docusaurus/utils": "3.8.0",
"@docusaurus/utils-validation": "3.8.0",
"tslib": "^2.6.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import {Joi} from '@docusaurus/utils-validation';
import {posixPath} from '@docusaurus/utils';
import {isValidLayerName} from './layers';
import type {OptionValidationContext} from '@docusaurus/types';

Expand All @@ -20,7 +21,10 @@ export type Options = {
// Not ideal to compute layers using "filePath.includes()"
// But this is mostly temporary until we add first-class layers everywhere
function layerFor(...params: string[]) {
return (filePath: string) => params.some((p) => filePath.includes(p));
return (filePath: string) => {
const posixFilePath = posixPath(filePath);
return params.some((p) => posixFilePath.includes(p));
};
}

// Object order matters, it defines the layer order
Expand Down
Loading