mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-06-24 03:51:09 +02:00
#322 - Show folder name for index page
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user