Skip to content

Commit

Permalink
#653 - Auto-register content folders
Browse files Browse the repository at this point in the history
  • Loading branch information
estruyf committed Sep 21, 2023
1 parent 4a701dd commit f2eef85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/listeners/dashboard/SsgListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class SsgListener extends BaseListener {

try {
// Check if the content folder exists
const folderName = `/src/content/${name}`;
const folderName = `/src/content/${collection.name}`;
const folderUri = Uri.joinPath(Folders.getWorkspaceFolder()!, folderName);
await workspace.fs.readDirectory(folderUri);

Expand All @@ -76,7 +76,7 @@ export class SsgListener extends BaseListener {
contentType: [collection.name]
});

contentType.previewPath = `'${name}'`;
contentType.previewPath = `'${collection.name}'`;
} catch (e) {
// Something failed, so it seems the folder does not exist
}
Expand Down

0 comments on commit f2eef85

Please sign in to comment.