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

Change Request: Permanent solution for multiple docs sites #18229

Closed
1 task done
mdjermanovic opened this issue Mar 25, 2024 · 4 comments · Fixed by #18260
Closed
1 task done

Change Request: Permanent solution for multiple docs sites #18229

mdjermanovic opened this issue Mar 25, 2024 · 4 comments · Fixed by #18260
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features documentation Relates to ESLint's documentation enhancement This change enhances an existing feature of ESLint

Comments

@mdjermanovic
Copy link
Member

ESLint version

v9.0.0-rc.0

What problem do you want to solve?

Currently, our docs site implementation supports publishing three versions: head (development), next (prerelease), and latest.

When we release v9 final, we'd like the docs for v8.x (v8.57.0) to be available too. Publishing docs for previous versions is currently not supported.

Also, whenever we release a new version, the version selectors on all docs sites should ideally be updated automatically.

Here's an overview of docs sites we'll have in the future.

List Item = entry in version selectors.

image

Currently, we have:

List Item Branch URL Path
HEAD main /docs/head/
v9.0.0-rc.0 next /docs/next/
v8.57.0 latest /docs/latest/

When we release v9 final, we'll have:

List Item Branch URL Path
HEAD main /docs/head/
v9.0.0 latest /docs/latest/
v8.57.0 v8.x /docs/v8.x/

When we release first v10 prerelease (e.g., after v9.26.0), we'll have:

List Item Branch URL Path
HEAD main /docs/head/
v10.0.0-alpha.0 next /docs/next/
v9.26.0 latest /docs/latest/
v8.57.0 v8.x /docs/v8.x/

When we release v10 final, we'll have:

List Item Branch URL Path
HEAD main /docs/head/
v10.0.0 latest /docs/latest/
v9.26.0 v9.x /docs/v9.x/
v8.57.0 v8.x /docs/v8.x/

What do you think is the correct solution?

As for the v8.x docs:

  1. We should update this code to handle vNN.x branches.
  2. We should update eslint.org redirects to enable docs/v8.x, similar to eslint/eslint.org@f10378f. Netlify is already set up to deploy from the v8.x branch.

As for the version selectors, that's more complicated. The idea is to:

  1. Make a json file with data for all versions that should be currently displayed in version selectors: an array of { version, branch, pathPrefix }.
  2. Update the release process to update this file according to what version has just been released.
  3. Update docs site code to fetch this file from the main branch during builds (similar to 19370e5) and use that data in version selectors.
  4. Add a workflow that runs after each release and triggers rebuilds of all docs sites on Netlify (similar to 473411e).

Does this make sense?

Participation

  • I am willing to submit a pull request for this change.

Additional comments

Notes:

  1. Changes in the docs site code should be ported to all relevant branches (e.g., to v8.x).

Questions:

  1. What do we plan to do with https://eslint.org/docs/next/ when we release v9 final - shall we keep this docs site or shall we drop it until v10 prereleases?
@mdjermanovic mdjermanovic added enhancement This change enhances an existing feature of ESLint documentation Relates to ESLint's documentation core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion labels Mar 25, 2024
@nzakas
Copy link
Member

nzakas commented Mar 28, 2024

This sounds like a proposal just to update how we fill in the dropdown vs. more wholesale changes?

And just a reminder, when you move an issue into "Feedback Needed", please ping @eslint/eslint-team

@mdjermanovic
Copy link
Member Author

Yes, perhaps the wording "permanent" wasn't appropriate. I only intended to address synchronization of version dropdowns on docs sites, which is a problem we'll have when we release the v9 final. The solution would also account for future prereleases and future major releases (v10, v11...) so that we don't have the same problem every year, thus "permanent". The sites would keep building from respective branches, only the version list would be fetched from another place (e.g., from the main branch). Did you have something else in mind for a long-term solution?

@nzakas
Copy link
Member

nzakas commented Mar 29, 2024

That all sounds good to me. It's just the title sounded almost like "let's rethink how we're doing multiple docs sites in general", which I do think is a conversation we need to have...but for now, happy to get the dropdown synchronization correct. 😄

@mdjermanovic mdjermanovic self-assigned this Apr 3, 2024
@mdjermanovic
Copy link
Member Author

Working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion core Relates to ESLint's core APIs and features documentation Relates to ESLint's documentation enhancement This change enhances an existing feature of ESLint
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants