diff --git a/CHANGELOG.md b/CHANGELOG.md index a61226a9..db4a2d42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#263](https://github.com/estruyf/vscode-front-matter/issues/263): WYSIWYG string field option - [#314](https://github.com/estruyf/vscode-front-matter/issues/314): New preview actions to open the page in the browser and refresh the preview +- [#322](https://github.com/estruyf/vscode-front-matter/issues/322): Show parent folder name when file is an index page (`index.md` / `_index.md`) ### ⚡️ Optimizations diff --git a/src/panelWebView/components/FileItem.tsx b/src/panelWebView/components/FileItem.tsx index 38321ee0..f6ff23c7 100644 --- a/src/panelWebView/components/FileItem.tsx +++ b/src/panelWebView/components/FileItem.tsx @@ -19,7 +19,7 @@ const FileItem: React.FunctionComponent = ({ name, folderName, p }; const itemName = useMemo(() => { - if (folderName && name.startsWith("index.md")) { + if (folderName && name.includes("index.")) { return folderName; }