-
Notifications
You must be signed in to change notification settings - Fork 373
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
docs: move website generation into this repository #1261
Conversation
Currently we geneate our docs using a build script at https://github.com/tigerbeetle/docs and content from https://github.com/tigerbeetle/tigerbeetle. Streamline this by moving the content and build script together. Note that I regenrated lockfile from strach during the import, to shrink its size from 1.5MiB to 0.7MiB, and to fix couple of issues reported by `npm audit`.
- remove docker: I believe it's docusaurus job to come up with correct hashes for the content, independent of the build machine. - remove repo cloning dance --- that's the purpose of this PR, no need to clone anything if everything is in the same repository - remove the old hack --- condition on the link rewriting
Our sed link rewriting produces a garbage URL here.
No need to copy between docs & build, as we'll be preparing the repo manually anyway.
`./zig/zig build ci -- langauge=node` now does the equivalent
e60b4e2
to
77a6ddc
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.
Code looks good. Want to note that zig build ci -- --language=node
works locally on my native linux machine but fails with unable to get absolute bin path: getwd: no such file or directory
in docker on WSL2 for some reason.
Huh, but not really that unexpected --- I've noticed that Zig API are not as robust when used in cross-platform way. As we are not actively testing on WSL, I'd say that's an OK failure to have, and we can debug it lazily (eg, when it actually prevents us from debugging some real issue). |
This PR moves the brains of https://github.com/tigerbeetledb/docs into the main repo, leaving the
docs
repo as a stograge for pre-rendered GitHub pages.The main conceptual simplification here is that we no longer need to do this repo clone dance:
tigerbeetle/scripts/validate_docs.sh
Lines 9 to 21 in b65a28d
Originally, I had the ambition to replace the whole
build.sh
withzig
, but I scaled that back --- our doc generation is still quite messy (esp with the manual link rewrites), and I'd love to, as usual, approach that holistically, instead of just rewriting the current logic in Zig. Notably, the documentation generator we are using, docusaurus, released a new major version like yesterday (https://docusaurus.io/blog/releases/3.0), which gives me a lot of food for thought, esp coupled with the pretty large package-lock.json we are importing here. But let that simmer for quite a bit!