#322 - Show folder name for index page

This commit is contained in:
Elio Struyf
2022-04-12 17:07:28 +02:00
parent bd47a09d1e
commit 31ca9d4e8b
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
+1 -1
View File
@@ -19,7 +19,7 @@ const FileItem: React.FunctionComponent<IFileItemProps> = ({ name, folderName, p
};
const itemName = useMemo(() => {
if (folderName && name.startsWith("index.md")) {
if (folderName && name.includes("index.")) {
return folderName;
}