-
Notifications
You must be signed in to change notification settings - Fork 122
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
Migrate Mintlify to Docusaurus #586
Conversation
@MarcusSorealheis I recommend taking a look at the built-in blog system that Docusaurus has it's pretty cool if you'd prefer to have it hosted on our own site instead of externally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh damn this looks so good!
Apart from the comments, a few more things:
- When I start this I get a 404 on the homepage. Clicking on the
Docs
button then brings me to the correct pages. This might just be because it's the development server, but it seems likely that this is an actual bug. - I tested this with bun which seems to work out of the box with
bun install
andbun start
. The bun installation is ~27x faster (2sec vs 55sec) than the yarn installation, so we should probably use that instead 🚀 - We should add
pkgs.bun
(orpkgs.yarn
, if bun turns out to be bugged after all) to the flake here:Line 147 in 546484b
pkgs.cilium-cli
I think a bunch of the template files need to be removed or adjusted, but this seems to be much better.
I'm noticing that we now use .md
instead of .mdx
for the documentation files. Is it still correct to have the sections like
---
some info
---
in there?
Reviewed 38 of 38 files at r1, all commit messages.
Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Remote / large-ubuntu-22.04, pre-commit-checks
nativelink-docs/docusaurus.config.js
line 12 at r1 (raw file):
const config = { title: 'NativeLink', tagline: 'Dinosaurs are cool',
Is this tagline intentional?
nativelink-docs/docusaurus.config.js
line 18 at r1 (raw file):
url: 'https://docs.nativelink.dev', // Set the /<baseUrl>/ pathname under which your site is served // For GitHub pages deployment, it is often '/<projectName>/'
Let's remove all comments that "explain" how to configure docusaurus.
nativelink-docs/blog/2019-05-28-first-blog-post.md
line 6 at r1 (raw file):
authors: name: Gao Wei title: Docusaurus Core Team
Redundant.
nativelink-docs/blog/2019-05-29-long-blog-post.md
line 8 at r1 (raw file):
--- This is the summary of a very long blog post,
ditto
nativelink-docs/blog/2021-08-01-mdx-blog-post.mdx
line 1 at r1 (raw file):
---
ditto
nativelink-docs/blog/authors.yml
line 1 at r1 (raw file):
endi:
We'll need to figure out what to put here.
nativelink-docs/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg
line 0 at r1 (raw file):
redundant?
nativelink-docs/blog/2021-08-26-welcome/index.md
line 1 at r1 (raw file):
---
ditto
nativelink-docs/src/components/HomepageFeatures/index.js
line 7 at r1 (raw file):
const FeatureList = [ { title: 'Easy to Use',
This needs to be adjusted to our information.
nativelink-docs/src/pages/markdown-page.md
line 1 at r1 (raw file):
---
redundant?
nativelink-docs/static/img/docusaurus.png
line 0 at r1 (raw file):
redundant?
nativelink-docs/static/img/docusaurus-social-card.jpg
line 0 at r1 (raw file):
redundant?
nativelink-docs/static/img/favicon.ico
line 0 at r1 (raw file):
Is this our icon?
nativelink-docs/static/img/logo.svg
line 0 at r1 (raw file):
Is this our icon?
nativelink-docs/static/img/undraw_docusaurus_mountain.svg
line 1 at r1 (raw file):
<svg xmlns="http://www.w3.org/2000/svg" width="1088" height="687.962" viewBox="0 0 1088 687.962">
redundant?
nativelink-docs/static/img/undraw_docusaurus_react.svg
line 1 at r1 (raw file):
<svg xmlns="http://www.w3.org/2000/svg" width="1041.277" height="554.141" viewBox="0 0 1041.277 554.141">
redundant?
nativelink-docs/static/img/undraw_docusaurus_tree.svg
line 1 at r1 (raw file):
<svg xmlns="http://www.w3.org/2000/svg" width="1129" height="663" viewBox="0 0 1129 663">
redundant?
nativelink-docs/docs/About.mdx
line 22 at r1 (raw file):
Supports Unix-based operating systems and Windows. ## 🎯 Goals
fyi: I think for the initial migration it's fine to leave this. We can "fix" any content-related changes in subsequent commits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I was rerouting to Quickstart manually in index.js which is how you configured a subdomain for docs before but they have a new cleaner solution I migrated to however I broke the base route. It had a clean solution just by adding "Slug: /" to the header comment to have the base path direct to it.
- I agree this should easily work with bun since it's a simple static site, updated the README to recommend bun.
- Updated the flake.
- We can either use md or mdx, however mdx is a superset of md so I converted all of them to mdx for consistency sake and to avoid confusion if future devs (most likely future me lol) gets confused why mdx features aren't working for certain files.
Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Remote / large-ubuntu-22.04, pre-commit-checks
nativelink-docs/docusaurus.config.js
line 12 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
Is this tagline intentional?
No this was a default left in, change.
nativelink-docs/docusaurus.config.js
line 18 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
Let's remove all comments that "explain" how to configure docusaurus.
Done.
nativelink-docs/blog/2019-05-28-first-blog-post.md
line 6 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
Redundant.
Removed blog directory entirely as we're keeping external for now
nativelink-docs/blog/2019-05-29-long-blog-post.md
line 8 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
ditto
Removed blog directory entirely as we're keeping external for now
nativelink-docs/blog/2021-08-01-mdx-blog-post.mdx
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
ditto
Removed blog directory entirely as we're keeping external for now
nativelink-docs/blog/authors.yml
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
We'll need to figure out what to put here.
Removed blog directory entirely as we're keeping external for now
nativelink-docs/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg
line at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed blog directory entirely as we're keeping external for now
nativelink-docs/blog/2021-08-26-welcome/index.md
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
ditto
Removed blog directory entirely as we're keeping external for now
nativelink-docs/src/components/HomepageFeatures/index.js
line 7 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
This needs to be adjusted to our information.
Removed directory as we're not using Docusaurus for the marketing page.
nativelink-docs/src/pages/markdown-page.md
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed pages as we're not adding any routing other than to docs.
nativelink-docs/static/img/docusaurus.png
line at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed as not needed.
nativelink-docs/static/img/docusaurus-social-card.jpg
line at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed as not needed.
nativelink-docs/static/img/favicon.ico
line at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
Is this our icon?
No replaced it with the svg favicon, removed.
nativelink-docs/static/img/logo.svg
line at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
Is this our icon?
No, removed.
nativelink-docs/static/img/undraw_docusaurus_mountain.svg
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed.
nativelink-docs/static/img/undraw_docusaurus_react.svg
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed.
nativelink-docs/static/img/undraw_docusaurus_tree.svg
line 1 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
redundant?
Removed.
nativelink-docs/docs/About.mdx
line 22 at r1 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
fyi: I think for the initial migration it's fine to leave this. We can "fix" any content-related changes in subsequent commits.
Agreed main focus is migrating infrastructure and swapping out DNS quickly/smoothly to self-host the domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately I double checked and builds were not working correctly with bun so leaving yarn as the recommended package manager for now until I can get building to work.
Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Remote / large-ubuntu-22.04, pre-commit-checks
205da20
to
8f3d121
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 25 of 25 files at r2, all commit messages.
Reviewable status: complete! 1 of 1 LGTMs obtained
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 1 LGTMs obtained
.gitignore
line 15 at r2 (raw file):
result .bazelrc.user /node_modules
nit: Since we have the other gitignore in the nativelink-docs
directory, is this still needed?
nativelink-docs/package.json
line 3 at r2 (raw file):
{ "name": "my-website", "version": "0.0.0",
nit: name field.
nit: Not sure whether this could have implications for "multiple-version-docs". I.e. should this have the same version as nativelink?
b66d774
to
43399cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 1 LGTMs obtained
nativelink-docs/package.json
line 3 at r2 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
nit: name field.
nit: Not sure whether this could have implications for "multiple-version-docs". I.e. should this have the same version as nativelink?
Seems like the standard for this is to make is as clear as possible to know what's the latest version of the documentation so should probably try to have it mirror the version for nativelink?
.gitignore
line 15 at r2 (raw file):
Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…
nit: Since we have the other gitignore in the
nativelink-docs
directory, is this still needed?
No, will remove. Having separate gitignores will scale better for the monorepo.
43399cf
to
063e196
Compare
Description
Migrate over NativeLink Docs to Docusaurus.
Fixes #542
Type of change
not work as expected)
Will need to migrate deployment to our own Vercel org from the Mintlify dashboard
How Has This Been Tested?
Please also list any relevant details for your test configuration
Checklist
bazel test //...
passes locallygit amend
see some docsThis change is