Docusaurus2 upgrade for master#14411
Conversation
(cherry picked from commit 94b4ea3)
…inator/CostBalancerStrategy.java
…inator/CostBalancerStrategyTest.java
|
@vtlim and @techdocsmith can you review and approve this PR: Check out the PR and do Should we add a GHA step that just runs I guess i should also update https://github.com/apache/druid/blob/master/distribution/asf-release-process-guide.md#update-druidapacheorg in this PR |
|
Updated |
…. included a broken link to test
|
|
Co-authored-by: Victoria Lim <vtlim@users.noreply.github.com>
| ~ under the License. | ||
| --> | ||
|
|
||
| # Druid doc builder |
There was a problem hiding this comment.
why do we still need 'website_old' path and small set of files? since this was already merged into a release branch it seems safe to just dump it
|
@techdocsmith @317brian it looks like this removed the website/pom.xml but I couldn't find an explanation for that. This seems to have broken dependabot, because the module is still referenced in one of the maven profiles in the main |
|
Hi @xvrl, this removed the pom.xml for the website directory cause the Druid docs for staging/production aren't built in this repo anymore: #15113 (comment) I forgot to do that piece of the followup. I'll put up a PR that deletes the profile. |
The website pom was removed as part of apache#14411 so we no longer need to reference it as a module and the profile can be removed. Dependabot is currently failing trying to look for this module, so removing it should also fix that.
The website pom was removed as part of #14411 so we no longer need to reference it as a module and the profile can be removed. Dependabot is currently failing trying to look for this module, so removing it should also fix that.

Description
This PR updates master to Docusaurus 2. It backs up the previous website directory to
website_old. We can delete it after we’re ready to merge this PR.You can see a build preview here: https://druid-n5fxtlvhm-317brian.vercel.app/docs/latest/design/. It is completely unstyled and uses OOTB Docusaurus2 settings since this repo only acts as the source of truth for docs.
apache/druid-website-srcis what builds the prod site.Related PRs:
druid-website-srcto Docusaurus 2. Docusaurus2 conversion druid-website-src#394Benefits
Changed
subcategory->categoryids->itemswebsite/docusaurus.config.jsdocs/operations/getting-started.md. There was a redirect that was written for it. The redirect never gets generated though because the page existed. Deleting the file allows for the redirect to get built.)Stayed the same
npm/yarn installand run the site withnpm/yarn start.apache/druid-website-src.apache/druid-website-src. I didn’t see a need to style this repo since the main concern would be the Markdown rendering correctly, and they both use the same Markdown parser.druid-website-srcstill builds the production siteNeed help on the following:
The link checking script and broken link behavior. I copied the link checking script over and updated the path to actually point at the build output from
npm run build, but the output is different depending on how the filepath is declared:const entries = fg.sync(['./build/docs/**/*.html'])results in:There are 13232 issues. That's definitely wrongconst entries = fg.sync(['./build/docs/latest/*.html'])results in 1 issue:Could not find '/docs/latest/design/' linked from './build/docs/latest/index.html. I think the issue is that it's not going through the directories recursively, so it can't find the file. But if we do the**instead oflatest, we get 13k issues.Neither of these are the actual link I broke intentionally to test the link checker, which Docusaurus 2 detects when you run
npm run build:In the meantime, we can configure Docusaurus 2 to do a one of 2 things on broken links when someone runs the site or tries to build it:
We can either set it to log a command line msg like so for
npm run start/build:We went with this option. See #14411 (comment)

Or we can surface an error in the rendered site:
The user can close the error and navigate around the site still.
This PR has:
Thanks @ektravel, @writer-jill, @techdocsmith, and @vtlim for helping get this together.