-
Notifications
You must be signed in to change notification settings - Fork 671
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
Transition README Docs to Docusaurus-Netlify Setup #641
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 0bc5987:
|
- Remove remark-typescript-tools as it is incompatible with docusaurus v3. - Replace it with gulp-preserve-typescript-whitespace and some utility functions to achieve the same results. - This happened to work out somewhat even better since the build time for docs is reduced. - It also simplifies things since we go straight from TS -> MDX instead of MDX -> TS -> MDX.
- Copy CSS from Redux-toolkit. - Add external and internal link components for reusability and performance. - Add introduction section from README to website. - Move static assets to docs folder. - Replace markdown links with component links. - This was done because docusaurus has made some improvements with regards to links (preloading, prefetching, etc) as well as broken link detection.
- During previous commits, parts of the example for `createStructuredSelector` was accidentally removed. They are added back to README. - Fix minor formatting issues in README.
- Add code example files. These will get transpiled to code blocks in MDX during the build step. - This ensures we maintain accuracy in code examples and also prevents unnecessary redundancies by providing a single source of truth. - Fix the sidebar so that it somewhat resembles the RTK documentation. - Internal and external links still need to be converted to JSX.
Looking at this, and I'm rather confused by the setup approach here:
Couple nits on the
|
Yeah I'm still trying to figure it all out, so a lot is going to change. To answer some of your questions:
Another thing to note about |
I'll admit this is sort of a weird prejudice, but I don't like Gulp :) part of it is that it "feels" very outdated given the existence of newer tools, and I had a bad experience trying to rip it out of a project several years back. Are there any other tool pipelines that would work here instead of Gulp? Side note: could we also move the examples to a |
Trust me, I know. I don't like it either. Right now I'm trying to figure out if there are other ways.
I was just thinking the same thing. |
- Remove all the `gulp` related dependencies. - Add `compileExamples.ts` which accomplishes the same thing with `ts-node`.
- Add `insertCodeExamples` to allow insertion of code examples into MDX files. - Rename some of the example files. - Replace markdown links with JSX links.
- Remove extraneous dependencies - Add `ts-node` to devDependencies - Add `prettier` and `rimraf` to devDependencies - Simplify the commands inside `website/package.json`
Okay, let's get the initial setup in so I can iterate on config |
This PR kickstarts migrating the existing documentation from a
README
file to a Netlify site using Docusaurus.