Skip to content

docs: docusaurus versioning setup #2270

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

yslpn
Copy link
Contributor

@yslpn yslpn commented Jun 21, 2025

Description

Implement Docusaurus versioning for js-lingui documentation website with support for current version (5.x) and archived version (4.x). Reorganize project structure to separate versioned documentation from static pages and blog content.

Closes #2126

Types of changes

  • Documentation update
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Copy link

vercel bot commented Jun 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
js-lingui ✅ Ready (Inspect) Visit Preview Jul 2, 2025 7:23pm

Copy link

github-actions bot commented Jun 21, 2025

size-limit report 📦

Path Size
packages/core/dist/index.mjs 2.91 KB (0%)
packages/detect-locale/dist/index.mjs 618 B (0%)
packages/react/dist/index.mjs 1.35 KB (0%)

@timofei-iatsenko timofei-iatsenko changed the title feat: docusaurus versioning setup docs: docusaurus versioning setup Jun 23, 2025
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.82%. Comparing base (6bb8983) to head (88905f8).
Report is 198 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2270      +/-   ##
==========================================
- Coverage   77.05%   76.82%   -0.24%     
==========================================
  Files          84       89       +5     
  Lines        2157     2498     +341     
  Branches      555      650      +95     
==========================================
+ Hits         1662     1919     +257     
- Misses        382      463      +81     
- Partials      113      116       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yslpn yslpn marked this pull request as draft June 24, 2025 14:38
@yslpn
Copy link
Contributor Author

yslpn commented Jun 24, 2025

I don't know, we should think about an approach to not refer to the code in the main repository. Because the links always show the current main branch. Referencing tags is not very convenient, but it's better.

I think we can leave it like this for now, and do something later. The current version is quite good.

@yslpn
Copy link
Contributor Author

yslpn commented Jun 24, 2025

There were a lot of file changes. It's very difficult to review. I apologize, but it's necessary.

@yslpn yslpn marked this pull request as ready for review June 24, 2025 15:46
@timofei-iatsenko
Copy link
Collaborator

LGTM

@vonovak
Copy link
Collaborator

vonovak commented Jul 2, 2025

I'm here just to comment on one thing: we don't release major versions all too often, and therefore I'm not sure versioned docs are worth adding - there's a non-negligible amount of complexity and extra maintenance this brings; also outlined in https://docusaurus.io/docs/versioning

Up for @andrii-bodnar to decide, personally I'd avoid adding this. Just my 2 cents.

@andrii-bodnar
Copy link
Contributor

I agree with @vonovak. Adding versioned docs brings more work and complexity, especially since we don't release major updates very often. This is actually why I've put off dealing with this for so long myself - I had a lot of doubts and lacked strong reasons to implement it.

About the v4 docs requests after v5 was released, there have only been a couple, and we just shared the right links, like this one for v4: https://js-lingui-git-stable-4x-crowdin.vercel.app/. We could also set up a separate Vercel deployment for each stable-xx branch if needed.

At the very least, we can make those existing links easier for people to find without pulling this bunch of documents into the repository which will grow with each major version.

Anyway, @yslpn thank you for the contribution! I believe we can create separate PRs for some commits (deps update, Readme, prism-react-renderer, etc.)

@timofei-iatsenko
Copy link
Collaborator

I strongly believe Lingui need a versioned docs. Even if the major versions are not released oftenly, many people not updating they projects right away. They may keep version 3 or 4 for longer periods. Having docs only for latest versions very confusing, because the docs doesnt have a hints "was added in v5.1.0". So even considering increased mainteance work i strongly see value in this.

@andrii-bodnar
Copy link
Contributor

Having a dedicated deployment for each version solves this issue. We can just put these links in a more prominent place. Even in versioned docs, new features don't mention exactly which version they were added in, so this confusion may appear there as well.

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.

Versioned docs
4 participants