-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(theme): support multi-level sidebar #851
Conversation
Hi! Did you accidently close this PR? |
Hello, I found a css wrong and temporarily closed this PR. |
Ah okay! Kia will review this once he gets some time. By the way, you can also convert a PR to draft while you're working on it. |
Thanks, I learned. |
期待该 pr 早日合并 |
Looking forward to having this merged! |
Early release pls ~~ |
627c344
to
6e58475
Compare
6e58475
to
2193750
Compare
@yizhi996 Hey I did some updates. Can you check if current code works fine? |
I think the I think that the following function could work recursively (demo): function getFlatSideBarLinks(sidebar) {
return sidebar
.map((item) =>
Array.isArray(item.items)
? [item, ...getFlatSideBarLinks(item.items)]
: [item]
)
.flat();
} I tested it on this branch, and it seems to work (although TypeScript is not happy):
|
Ah, yes thanks @titouanmathis. This actually slipped my mind. Will fix this tomorrow. I'm marking the PR as draft for now. |
@brc-dd Thanks for the updates to the PR! now it works with |
@brc-dd @titouanmathis I have fixed prev and next footer links problem, please check it works fine, thanks. |
#737, fixes #926
Preview: