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

poc: [M3-7799] - Improve Docs Site Sidebar #10214

Merged
merged 10 commits into from
Feb 22, 2024

Conversation

bnussman-akamai
Copy link
Contributor

@bnussman-akamai bnussman-akamai commented Feb 21, 2024

Description πŸ“

  • Updates the docs site sidebar to be generated based on file names and folder structure of the docs/ folder πŸ—‚οΈ
  • I think this will be nice because it will enable anyone to add documentation without needing to modify any Vitepress configuration πŸ”§
  • Updates Vitepress to latest πŸ†•

Preview πŸ“·

Before After
Screenshot 2024-02-21 at 3 46 12 PM Screenshot 2024-02-21 at 4 45 18 PM

How to test πŸ§ͺ

  • Check out this PR
  • Create a test markdown file at docs/development-guide/example/testing.md with some markdown in it
  • Run yarn docs
  • Go to http://localhost:5173/manager/
  • Observe that the new docs page was added to the sidebar with correct nesting πŸ“‚

As an Author I have considered πŸ€”

  • πŸ‘€ Doing a self review
  • ❔ Our contribution guidelines
  • 🀏 Splitting feature into small PRs
  • βž• Adding a changeset
  • πŸ§ͺ Providing/Improving test coverage
  • πŸ” Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • πŸ‘£ Providing comprehensive reproduction steps
  • πŸ“‘ Providing or updating our documentation
  • πŸ•› Scheduling a pair reviewing session
  • πŸ“± Providing mobile support
  • β™Ώ Providing accessibility support

@bnussman-akamai bnussman-akamai requested a review from a team as a code owner February 21, 2024 20:19
@bnussman-akamai bnussman-akamai requested review from mjac0bs and hana-linode and removed request for a team February 21, 2024 20:19
@bnussman-akamai bnussman-akamai changed the title docs testing poc: [M3-7799] - Improve Docs Site Sidebar Feb 21, 2024
@bnussman-akamai bnussman-akamai self-assigned this Feb 21, 2024
@bnussman-akamai bnussman-akamai added the Documentation Improving / adding to our documentation label Feb 21, 2024
Copy link

github-actions bot commented Feb 21, 2024

Coverage Report: βœ…
Base Coverage: 81.33%
Current Coverage: 81.33%

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to create this so I could call replaceAll in docs/.vitepress/plugins/sidebar.ts

Comment on lines -18 to -23
sidebar: [
{
text: "Development Guide",
items: guides,
},
],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of having to do this manually, it will be done automatically based on the folder/file names πŸŽ‰πŸ—‚οΈ

Copy link
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes!

confirmed dynamic sidebar works as expected and build succeeds βœ…

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, thank you!

Edit re comment below: @bnussman-akamai Whoops. Correct screenshot below.

image

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Feb 22, 2024
@bnussman-akamai
Copy link
Contributor Author

@mjac0bs What you sent in the screenshot doesn't look quite right. πŸ€”

The title in the sidebar should be My Test Section based on the fact you named the file 15-my-test-section.md

You'll have to restart the VitePress server for the sidebar to regenerate when you checkout my PR.

@bnussman-akamai bnussman-akamai merged commit 232dd2c into linode:develop Feb 22, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! Documentation Improving / adding to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants