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(docs): move to vitepress #5785

Merged
merged 5 commits into from Mar 3, 2024
Merged

Conversation

davidkna
Copy link
Member

Description

This PR moves the website generation from VuePress (1) to VitePress. This updated config file is now at docs/.vitepress/config.mts. I also bumped the bundled nerd font version (handling the NF v3 update) and clarified the font-face definition to only cover PUA code points.

Preview link

Issues that were handled in the migration:

  • .vuepress was moved to .vitepress and .vuepress/public to public
  • VitePress doesn't treat README.md files as index files, to avoid renaming the files I used the rewrites options to map the files to what VitePress expects (index.md)
  • Because internally the files now have a different name, I moved all links from x/y/z/README.md to x/y/z, avoiding mentioning the filenames directly
  • I changed absolute links to relative links to avoid inexpertly have them moving users from translated docs into the English docs
  • Some translated files contained invalid HTML, which had to be corrected before the build could proceed. To avoid issues with website publishes in the future due to the stronger checks, I added a CI check that builds the documentation.

Motivation and Context

From #5138

VuePress 1.x is stagnant, lacking development and maintenance. To keep the documentation site modern and accessible, we need to upgrade to the latest version.

This also means the doc builds can be done on recent node versions without issues again. External plug-ins are no longer required for features like sitemap generation, light/dark mode and code copy buttons. Sadly, the light/dark mode toggle depends more strongly on JavaScript compared to the previous version.

Both VuePress 2 and VitePress can be considered successors to VuePress 1, and both don't have a stable release yet and are in the RC phase.

Alternative to #5138

Screenshots (if appropriate):

How Has This Been Tested?

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

@davidkna davidkna force-pushed the website-vitepress branch 2 times, most recently from 46a9ac9 to b03910f Compare February 20, 2024 06:12
Copy link
Member

@matchai matchai left a comment

Choose a reason for hiding this comment

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

Amazing work! Things look fantastic with a fresh coat of paint.
Thank you for taking this on. It looks like it took a great deal of effort to keep things working as they were.

I've just got some style update suggestions, but I'll make a PR into yours to tackle those.

Comment on lines 11 to 12
.demo-video
width: 100%
Copy link
Member

Choose a reason for hiding this comment

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

Since the source video is 1526x956, it might be best to set that as the max-width to avoid it upscaling.

Comment on lines 3 to 6
.home .hero img
max-width: 500px !important
min-width: 300px
width: 100%
Copy link
Member

Choose a reason for hiding this comment

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

The logo unfortunately doesn't scale too nicely, particularly on mobile.

CleanShot 2024-02-24 at 14 42 51@2x

@@ -0,0 +1,72 @@
@import "palette"
Copy link
Member

Choose a reason for hiding this comment

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

The reason we were using stylus was because Vuepress used it for its own styles. Since we don't use much of stylus' advanced features, it might be simpler to stick to CSS for what little style overrides we need.

We'd need to inline the use of darken() and lighten(), but that should be it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! I've merged the PR and replaced the stylus with plain CSS.

@matchai
Copy link
Member

matchai commented Feb 24, 2024

This PR should patch up my suggestions: davidkna#83

@davidkna davidkna merged commit 7485c90 into starship:master Mar 3, 2024
21 checks passed
@davidkna davidkna deleted the website-vitepress branch March 3, 2024 16:55
@davidkna
Copy link
Member Author

davidkna commented Mar 3, 2024

Thanks for the reviews @matchai and @andytom!

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

Successfully merging this pull request may close these issues.

None yet

3 participants