Skip to content
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: support overviewHeaders and subPage overview #894

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

Timeless0911
Copy link
Contributor

@Timeless0911 Timeless0911 commented Apr 2, 2024

Summary

  1. support overviewHeaders to control the minimum title displayed in the overview page, config in _meta.json and front matter are both takes effect.
[
  {
    "type": "file",
    "name": "react-apis",
    "overviewHeaders": [2]
  },
  {
    "type": "dir",
    "name": "ui-props",
    "label": "css.ui-props",
    "overviewDepth": [],
    "collapsible": true,
    "collapsed": true
  },
]
---
overviewHeaders: [2]
---
  1. support subpage overview by writing a file with the same name as sidebar in the upper folder of sidebar with frontmatter
---
overview: true
---

image

Or writing a index.mdx in the siderbar dir folder with frontmatter and register it in _meta.json

image

Related Issue

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

Copy link

netlify bot commented Apr 2, 2024

Deploy Preview for aquamarine-blini-95325f ready!

Name Link
🔨 Latest commit 5695286
🔍 Latest deploy log https://app.netlify.com/sites/aquamarine-blini-95325f/deploys/6613b26e51718d0008a36551
😎 Deploy Preview https://deploy-preview-894--aquamarine-blini-95325f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 84 (🟢 up 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@Timeless0911 Timeless0911 changed the title feat: support overviewDepth to control the minimum title displayed in… feat: support overviewDepth and subPage overview Apr 2, 2024
@Timeless0911 Timeless0911 force-pushed the feat/overview-depth branch 2 times, most recently from 6d89a48 to 70a4e8d Compare April 2, 2024 05:51
@Timeless0911 Timeless0911 force-pushed the feat/overview-depth branch 4 times, most recently from 40c4fd3 to 85aebfd Compare April 2, 2024 08:48
@Timeless0911 Timeless0911 requested a review from 10Derozan April 2, 2024 09:33
@Timeless0911
Copy link
Contributor Author

!canary

@Timeless0911 Timeless0911 force-pushed the feat/overview-depth branch 3 times, most recently from f719ce6 to 530093d Compare April 7, 2024 08:47
@sanyuan0704
Copy link
Contributor

Is overviewHeaders instead overviewDepth a better choice? We can support the following config:

{
  "overviewHeaders": [2, 3]
}

@sanyuan0704
Copy link
Contributor

The overview config may be supported in frontmatter:

---
overviewHeaders: [2]
---

Refer extractApiHeaders in vuepress https://vt.insx.dev/api/config-frontmatter.html#extractapiheaders

@Timeless0911 Timeless0911 changed the title feat: support overviewDepth and subPage overview feat: support overviewHeaders and subPage overview Apr 8, 2024
@Timeless0911 Timeless0911 force-pushed the feat/overview-depth branch from 530093d to 0920e78 Compare April 8, 2024 03:42
@Timeless0911 Timeless0911 force-pushed the feat/overview-depth branch from 55a4784 to 5695286 Compare April 8, 2024 09:01
@Timeless0911
Copy link
Contributor Author

!canary

@Timeless0911 Timeless0911 requested a review from sanyuan0704 April 8, 2024 10:02
@sanyuan0704
Copy link
Contributor

🎉

@Timeless0911 Timeless0911 marked this pull request as draft April 8, 2024 10:50
@Timeless0911 Timeless0911 marked this pull request as ready for review April 8, 2024 12:01
@Timeless0911 Timeless0911 requested a review from chenjiahan April 8, 2024 12:04
@chenjiahan chenjiahan merged commit c958a9f into main Apr 8, 2024
12 checks passed
@chenjiahan chenjiahan deleted the feat/overview-depth branch April 8, 2024 12:13
@chenjiahan
Copy link
Member

👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants