pingcap / website-docs

The next generation of PingCAP Docs. Powered by Gatsby ⚛️.
https://docs.pingcap.com/
MIT License
22 stars 33 forks source link

Create a variable for the latest product version in TiDB user documents #177

Open qiancai opened 2 years ago

qiancai commented 2 years ago

Is your feature request related to a problem? Please describe.

Currently, when there is a new product version, the Docs team needs to update the current product version to the new version by searching the current version and replacing it with the new version.

However, not all product versions need to be updated to the new version, because some of them are just version-specific information, so the Docs team has to check each replacement (usually more than 100 instances) individually and update the version-specific information back to the old version, which is quite time-consuming and prone to errors.

Describe the solution you'd like

  1. Create a variable for the latest product version and add the variable definition to one Markdown file. For example, the variable name could be "tidb_latest_version", and the variable value could be "TiDB v5.0.4“。

  2. In each place where the product version needs to be pumped, update the product version (for example, TiDB v5.0.4) to the variable name (for example, $tidb_latest_version$).

  3. In the future, if there is a new product release, the Docs team can only update the variable value in that variable definition file.