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

[website] New Website built with Docusaurus v2 #3088

Merged
merged 4 commits into from Mar 16, 2022

Conversation

nicoloboschi
Copy link
Contributor

@nicoloboschi nicoloboschi commented Mar 9, 2022

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 a site3 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:

  • Static pages (homepage, community, project, download, bps)
  • Created versioned documentation with sidebars
  • Release notes
  • Created scripts for the build and instructions in the README.md
  • Javadoc are still included at the same url they are now (to keep compatibility)
  • "archive" directory from asf-site must be kept after the first deploy

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:

  • Use Markdown pages as most as possible. Markdown is a static language and it is usable also from a non developer contributor.
  • Do not add new things. Do not remove obsolete stuff.
  • Use the Docusaurus basic configuration, both for design (navbar, sidebar, footer) and for styling.

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.

  • Navbar for main contents, versioning and download
  • Sidebar for the docs navigation with back and next buttons
  • Summary on the right for paragraphs

Styling

Docusaurus comes with a default theme with customizable colors palette.

  • I took the main BK color and created a palette following the Docusaurus guide.
  • I set the same font of the current site.

The current site is built with Bulma CSS. Docusaurus uses Infima by default. I think we should go with the builtin one because:

  • We should avoid to write our own css (less stuff to maintain)
  • It is not necessary with the current styling (very simple)

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 :

  • it adds a weird step during the release process (you have the template file and so on).
  • It is hard to link to the "release notes" because you have to link to the latest release

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.

@nicoloboschi nicoloboschi marked this pull request as draft March 9, 2022 15:47
@nicoloboschi nicoloboschi force-pushed the site3-init branch 2 times, most recently from 20a6846 to c6c3d0c Compare March 9, 2022 16:37
@nicoloboschi nicoloboschi marked this pull request as ready for review March 9, 2022 20:22
@eolivelli
Copy link
Contributor

I would like to unblock this work.
I will merge this patch if no one objects, it is not a code change, it brings no harm

@eolivelli eolivelli merged commit 46a1552 into apache:master Mar 16, 2022
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

3 participants