mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
fix: breadcrumbs displayName issue for file names ending with index (#839)
This commit is contained in:
parent
ab0e20b4d0
commit
b5295e0f26
1 changed files with 2 additions and 2 deletions
|
@ -68,8 +68,8 @@ export default ((opts?: Partial<BreadcrumbOptions>) => {
|
||||||
folderIndex = new Map()
|
folderIndex = new Map()
|
||||||
// construct the index for the first time
|
// construct the index for the first time
|
||||||
for (const file of allFiles) {
|
for (const file of allFiles) {
|
||||||
if (file.slug?.endsWith("index")) {
|
|
||||||
const folderParts = file.slug?.split("/")
|
const folderParts = file.slug?.split("/")
|
||||||
|
if (folderParts?.at(-1) === "index") {
|
||||||
// 2nd last to exclude the /index
|
// 2nd last to exclude the /index
|
||||||
const folderName = folderParts?.at(-2)
|
const folderName = folderParts?.at(-2)
|
||||||
if (folderName) {
|
if (folderName) {
|
||||||
|
|
Loading…
Reference in a new issue