clickhouse-docs icon indicating copy to clipboard operation
clickhouse-docs copied to clipboard

Version individual sections for clients

Open Paultagoras opened this issue 10 months ago • 4 comments

As discussed https://github.com/ClickHouse/clickhouse-docs/pull/3071 it would be nice if we could have a single page with multiple versions, so that docs could be collapsed - it would help customers find the current version, while still allowing older access.

Paultagoras avatar Jan 23 '25 17:01 Paultagoras

@gingerwizard Is this something you're aware of how to do?

Paultagoras avatar Jan 23 '25 17:01 Paultagoras

yes we'll handle @Paultagoras

gingerwizard avatar Jan 29 '25 10:01 gingerwizard

https://github.com/facebook/docusaurus/issues/2528 ideal i think

gingerwizard avatar Jan 29 '25 11:01 gingerwizard

Adopting the Docusaurus approach to versioning on this isn't going to work without substantial changes to the structure of the docs I don't think - it's designed more for the use case where your entire project has a single version, rather than having different pages versioned.

@Paultagoras what if we have a React component which is a dropdown menu item on the page itself somewhere near the top of the page that can be used to select the version? When the user selects the version it will just do a page change. We use this trick here https://clickhouse.com/docs/knowledgebase for the component that lets you switch between "Recent" and "Grouped by tags". It's actually two separate pages but it gives the illusion that it's a single page application.

Image

Like this but on the page itself rather than in a menu:

Image

Only downside I can really think of is that we'll need to import this component on every version markdown page and have to manually update it on each page every time a new version is added. If new versions are infrequent then this shouldn't be too much of a problem either.

Blargian avatar Feb 27 '25 22:02 Blargian