#537 - Allow root path

This commit is contained in:
Elio Struyf
2023-03-14 22:47:10 +01:00
parent 1e3b4c8eaf
commit 265db6f5dd
3 changed files with 3 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@
- [#363](https://github.com/estruyf/vscode-front-matter/issues/363): Multiline support for the `string` field in data view
- [#513](https://github.com/estruyf/vscode-front-matter/issues/513): Added support for external UI scripts to add custom HTML on the dashboard elements
- [#530](https://github.com/estruyf/vscode-front-matter/issues/530): Implementation of the Front Matter AI 🤖 powered by [mendable.ai](https://mendable.ai)
- [#537](https://github.com/estruyf/vscode-front-matter/issues/537): Allow to use the root path `/` as the public folder
### 🎨 Enhancements
+1 -1
View File
@@ -174,7 +174,7 @@ export class Folders {
public static getStaticFolderRelativePath(): string | undefined {
let staticFolder = Settings.get<string>(SETTING_CONTENT_STATIC_FOLDER);
if (staticFolder && staticFolder.includes(WORKSPACE_PLACEHOLDER)) {
if (staticFolder && (staticFolder.includes(WORKSPACE_PLACEHOLDER) || staticFolder === '/')) {
staticFolder = Folders.getAbsFilePath(staticFolder);
const wsFolder = Folders.getWorkspaceFolder();
if (wsFolder) {
+1 -1
View File
@@ -69,6 +69,6 @@ export class Telemetry {
});
// Reset the events
this.events = [];
}, 1000) as NodeJS.Timeout;
}, 1000) as any as NodeJS.Timeout;
}
}