[website] New Website built with Docusaurus v2 #3088
Merged
+64,037
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
There was an initial effort to migrate the current website to Docusaurus #2426
All the work has been done under the directory
site2
and using Docusaurus v1. Since the v1 is obsolete and there were a lot of copy-paste from somewhere (I believe from Apache Pulsar) I decided to restart using Docusaurus v2, so I created asite3
directory.This pull request contains the whole migration of the website. I have made some changes for different reasons that have to be agreed with the other contributors and I will highlight them in a specific section of this document.
The goal is to not add new sections or improve the current website content but to move that to a modern tooling solution.
NOTE: I do not expect that this PR would be reviewable from the code but splitting it in multiple pulls would have made the process very slow; this is only a migration of existing content.
I deployed the final result to: https://nicoloboschi.github.io/bookkeeper/
Changes
Migrated the whole website:
Migration tweaks
The current documentation is done with Jekyll and Markdown syntax. Docusaurus supports pages written with Markdown, MDX (markdown+JSX) and React.js components.
I had to replace the Jekyll syntax with something else. Unfortunately there is not such support builtin in Docusaurus. I got inspired from Apache Pulsar website solution that basically replace the variables before starting the build process (with regex substitutions).
I followed some principles in order to keep the documentation the easiest as possible:
Design
As the main advantage of migrating to Docusaurus is the maintainability aspect, I decided to only use the builtin features of Docusaurus. Actually the current site is pretty similar to this one.
Styling
Docusaurus comes with a default theme with customizable colors palette.
The current site is built with Bulma CSS. Docusaurus uses Infima by default. I think we should go with the builtin one because:
Main differences
Keep only one versioned doc per minor release
Currently there is a versioned doc for each PATCH release. This adds a lot of pages and noise to the website. A patch release is not supposed to edit the website. I decided to keep only the latest patch release for each minor. I documented this in the release instructions (README.md)
The release notes are still there for each release.
Release notes
At the moment, each release documentation has his own release notes page. This is ok but :
I decided to migrate to a single page release notes with a paragraph per release.
Links
I removed the Github and Twitter buttons from the nav bar. They are now in the footer.
Community meeting calendar
Currently this is embedded with a iframe. Iframe is a security hole and it causes Docusaurus to give a lot of errors. I replaced it with an external link.