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

docs: move website generation into this repository #1261

Merged
merged 14 commits into from
Nov 3, 2023
Merged

Conversation

matklad
Copy link
Member

@matklad matklad commented Nov 2, 2023

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:

Originally, I had the ambition to replace the whole build.sh with zig, 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!

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.
Copy link
Contributor

@kprotty kprotty left a 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.

@matklad matklad added this pull request to the merge queue Nov 3, 2023
@matklad
Copy link
Member Author

matklad commented Nov 3, 2023

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).

Merged via the queue into main with commit 2ee0605 Nov 3, 2023
27 checks passed
@matklad matklad deleted the matklad/docs-website branch November 3, 2023 17:25
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

2 participants