diff --git a/docusaurus.config.js b/docusaurus.config.js
index 3164ab7a99b..c0ff0bfaf13 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -1,4 +1,5 @@
const versionedLinks = require("./src/mdx/versionedLinks");
+const { unsupportedVersions } = require("./src/versions");
module.exports = {
title: "Camunda Platform 8 Docs",
@@ -87,9 +88,9 @@ module.exports = {
className: "dropdown-unsupported-versions",
value: "Unsupported versions",
},
- ...["1.2", "1.1", "1.0", "0.26", "0.25"].map((version) => ({
- label: version,
- href: `https://unsupported.docs.camunda.io/${version}/`,
+ ...unsupportedVersions.map((version) => ({
+ label: version.label,
+ href: `https://unsupported.docs.camunda.io/${version.urlSuffix}/`,
})),
],
},
@@ -256,10 +257,8 @@ module.exports = {
"/docs/**/assets/**",
"/docs/**/tags/**",
"/docs/next/**",
- "/docs/1.3/**",
"/docs/8.0/**",
"/docs/8.1/**",
- "/optimize/3.7.0/**",
"/optimize/3.8.0/**",
"/optimize/3.9.0/**",
"/optimize/next/**",
diff --git a/hacks/isolateVersion/8-configureOptimizeDocs.sh b/hacks/isolateVersion/8-configureOptimizeDocs.sh
index b1a7e38ce4a..efc4aa5f0c0 100644
--- a/hacks/isolateVersion/8-configureOptimizeDocs.sh
+++ b/hacks/isolateVersion/8-configureOptimizeDocs.sh
@@ -24,7 +24,7 @@ sed -i '' "/^const versionMappings = \[$/,/\];/c\\
const versionMappings = [\\
{ docsVersion: \"$ARCHIVED_VERSION\", optimizeVersion: \"$ARCHIVED_OPTIMIZE_VERSION\" },\\
];\\
-" src/mdx/expandVersionedUrl.js
+" src/versions.js
# remove hard-coded versions from main docs sidebar configuration
sed -i '' "s/optimize\/$ARCHIVED_OPTIMIZE_VERSION\//optimize\//g" versioned_sidebars/version-$ARCHIVED_VERSION-sidebars.json
diff --git a/howtos/release-procedure.md b/howtos/release-procedure.md
index 4c2cceabab6..acab6af42e7 100644
--- a/howtos/release-procedure.md
+++ b/howtos/release-procedure.md
@@ -48,7 +48,7 @@ To create the new versions:
> ./hacks/cutNewVersions.sh
```
-4. Add a record correlating the two versions to [`src/mdx/expandVersionedUrl.js`](../src/mdx/expandVersionedUrl.js#L20-L27).
+4. Add a record correlating the two versions to [`src/versions.js`](../src/versions.js#L16-L30).
- The `versionMappings` variable maps Optimize versions to main docs versions:
@@ -63,7 +63,7 @@ To create the new versions:
];
```
- - Add the new mapping in the first position of the array.
+ - Order of the items in the array is important. Add the new mapping in the first position of the array, because the first item is treated as the "current" version mapping.
5. Ensure the "unmaintained" banner does not appear for supported versions. We currently support all versions of Camunda Platform 8 since none are older than 18 months.
diff --git a/optimize_versions.json b/optimize_versions.json
index 2cee4356410..53b3d05e641 100644
--- a/optimize_versions.json
+++ b/optimize_versions.json
@@ -1 +1 @@
-["3.10.0", "3.9.0", "3.8.0", "3.7.0"]
+["3.10.0", "3.9.0", "3.8.0"]
diff --git a/src/mdx/expandVersionedUrl.js b/src/mdx/expandVersionedUrl.js
index 2e9c532dd35..4c0b5fee6b8 100644
--- a/src/mdx/expandVersionedUrl.js
+++ b/src/mdx/expandVersionedUrl.js
@@ -3,10 +3,6 @@
// Note: these type definitions are only checked within an editor. We aren't set up
// for type-checking in the build (yet!) but having these types defined helped me write this code.
/**
- * @typedef {object} VersionMapping
- * @property {string} docsVersion
- * @property {string} optimizeVersion
- *
* @typedef {object} Token
* @property {string} token
* @property {Array} rules
@@ -16,24 +12,7 @@
* @property {string} expandTo
*/
-/** @type {Array} */
-const versionMappings = [
- // 👋 When cutting a new version, add a new mapping here!
- {
- docsVersion: "8.2",
- optimizeVersion: "3.10.0",
- },
- {
- docsVersion: "8.1",
- optimizeVersion: "3.9.0",
- },
- {
- docsVersion: "8.0",
- optimizeVersion: "3.8.0",
- },
- { docsVersion: "1.3", optimizeVersion: "3.7.0" },
-];
-
+const { versionMappings } = require("../versions.js");
const [currentVersions, ...remainingVersions] = versionMappings;
/** @type {Token} */
diff --git a/src/versions.js b/src/versions.js
new file mode 100644
index 00000000000..92aac802a33
--- /dev/null
+++ b/src/versions.js
@@ -0,0 +1,46 @@
+// @ts-check
+
+// Note: these type definitions are only checked within an editor. We aren't set up
+// for type-checking in the build (yet!) but having these types defined helped me write this code.
+/**
+ * @typedef {object} VersionMapping
+ * @property {string} docsVersion
+ * @property {string} optimizeVersion
+ *
+ * @typedef {object} UnsupportedVersion
+ * @property {string} label
+ * @property {string} urlSuffix
+ */
+
+/** @type {Array} */
+const versionMappings = [
+ // 👋 When cutting a new version, add a new mapping here!
+ {
+ docsVersion: "8.2",
+ optimizeVersion: "3.10.0",
+ },
+ {
+ docsVersion: "8.1",
+ optimizeVersion: "3.9.0",
+ },
+ {
+ docsVersion: "8.0",
+ optimizeVersion: "3.8.0",
+ },
+];
+
+/** @type {Array} */
+const unsupportedVersions = [
+ // 👋 When archiving a version, move it from the above array into here, and edit it!
+ { label: "1.3 / 3.7.0", urlSuffix: "1.3" },
+ { label: "1.2", urlSuffix: "1.2" },
+ { label: "1.1", urlSuffix: "1.1" },
+ { label: "1.0", urlSuffix: "1.0" },
+ { label: "0.26", urlSuffix: "0.26" },
+ { label: "0.25", urlSuffix: "0.25" },
+];
+
+module.exports = {
+ versionMappings,
+ unsupportedVersions,
+};
diff --git a/static/.htaccess b/static/.htaccess
index caca7d97f60..3689431ab63 100644
--- a/static/.htaccess
+++ b/static/.htaccess
@@ -150,7 +150,6 @@ RewriteRule ^docs/apis-clients(.*)$ /docs/apis-tools$1 [R=301,L]
RewriteRule ^optimize/apis-clients(.*)$ /optimize/apis-tools$1 [R=301,L]
RewriteRule ^docs/8.0/apis-clients(.*)$ /docs/8.0/apis-tools$1 [R=301,L]
RewriteRule ^optimize/3.8.0/apis-clients(.*)$ /optimize/3.8.0/apis-tools$1 [R=301,L]
-RewriteRule ^docs/1.3/apis-clients(.*)$ /docs/1.3/apis-tools$1 [R=301,L]
# Identity Authorizations
RewriteRule ^docs/next/self-managed/identity/user-guide/groups/creating-authorizations-for-a-group/(.*)$ /docs/next/self-managed/identity/user-guide/authorizations/managing-resource-authorizations/ [R=301,L]
@@ -223,8 +222,6 @@ RewriteRule ^docs/guides/implementing-connectors$ /docs/guides/configuring-out-o
RewriteRule ^docs/8.0/guides/implementing-connectors/(.*)$ /docs/8.0/guides/configuring-out-of-the-box-connectors/$1 [R=301,L]
RewriteRule ^docs/8.0/guides/implementing-connectors$ /docs/8.0/guides/configuring-out-of-the-box-connectors/ [R=301,L]
-RewriteRule ^docs/1.3/self-managed/overview/(.*)$ /docs/1.3/self-managed/about-self-managed/$1 [R=301,L]
-RewriteRule ^docs/1.3/self-managed/overview$ /docs/1.3/self-managed/about-self-managed/ [R=301,L]
RewriteRule ^docs/self-managed/overview/(.*)$ /docs/self-managed/about-self-managed/$1 [R=301,L]
RewriteRule ^docs/self-managed/overview$ /docs/self-managed/about-self-managed/ [R=301,L]
@@ -244,8 +241,6 @@ RewriteRule ^docs/self-managed/operate-deployment/authentication/(.*)$ /docs/sel
RewriteRule ^docs/self-managed/identity/troubleshooting/?$ /docs/self-managed/identity/troubleshooting/troubleshoot-identity/ [R=301,L]
RewriteRule ^docs/self-managed/identity/getting-started/?$ /docs/self-managed/identity/getting-started/install-identity/ [R=301,L]
-RewriteRule ^docs/1.3/components/overview/(.*)$ /docs/1.3/components/components-overview/$1 [R=301,L]
-RewriteRule ^docs/1.3/components/overview$ /docs/1.3/components/components-overview/ [R=301,L]
RewriteRule ^docs/components/overview/(.*)$ /docs/components/components-overview/$1 [R=301,L]
RewriteRule ^docs/components/overview$ /docs/components/components-overview/ [R=301,L]
@@ -269,8 +264,6 @@ RewriteRule ^docs/components/console/troubleshooting$ /docs/components/console/c
RewriteRule ^docs/components/best-practices/overview/(.*)$ /docs/components/best-practices/best-practices-overview/$1 [R=301,L]
RewriteRule ^docs/components/best-practices/overview$ /docs/components/best-practices/best-practices-overview [R=301,L]
-RewriteRule ^docs/1.3/apis-clients/overview/(.*)$ /docs/1.3/apis-tools/working-with-apis-tools/$1 [R=301,L]
-RewriteRule ^docs/1.3/apis-clients/overview$ /docs/1.3/apis-tools/working-with-apis-tools [R=301,L]
RewriteRule ^docs/apis-clients/overview/(.*)$ /docs/apis-tools/working-with-apis-tools/$1 [R=301,L]
RewriteRule ^docs/apis-clients/overview$ /docs/apis-tools/working-with-apis-tools [R=301,L]
RewriteRule ^docs/apis-clients/tasklist-api/tutorial/(.*)$ /docs/apis-clients/tasklist-api/tasklist-api-tutorial/$1 [R=301,L]
@@ -516,17 +509,14 @@ RewriteRule ^docs/self-managed/optimize-deployment/(.*)$ /optimize/self-managed/
RewriteRule ^docs/next/apis-clients/optimize-api/(.*)$ /optimize/next/apis-clients/optimize-api/$1 [R=301,L]
RewriteRule ^docs/apis-clients/optimize-api/(.*)$ /optimize/apis-clients/optimize-api/$1 [R=301,L]
-## optimize extraction for version 3.7.0:
-RewriteRule ^docs/1.3/components/optimize/what-is-optimize(\/?)$ /optimize/3.7.0/components/what-is-optimize/ [R=301,L]
-RewriteRule ^docs/1.3/components/optimize/userguide/(.*)$ /optimize/3.7.0/components/userguide/$1 [R=301,L]
-RewriteRule ^docs/1.3/self-managed/optimize-deployment/(.*)$ /optimize/3.7.0/self-managed/optimize-deployment/$1 [R=301,L]
-
## Archived versions. Note that the URL is adjusted to staging in the publish-stage workflow.
RewriteRule ^docs/0.25/(.*)$ https://unsupported.docs.camunda.io/0.25/docs/$1 [R=301,L]
RewriteRule ^docs/0.26/(.*)$ https://unsupported.docs.camunda.io/0.26/docs/$1 [R=301,L]
RewriteRule ^docs/1.0/(.*)$ https://unsupported.docs.camunda.io/1.0/docs/$1 [R=301,L]
RewriteRule ^docs/1.1/(.*)$ https://unsupported.docs.camunda.io/1.1/docs/$1 [R=301,L]
RewriteRule ^docs/1.2/(.*)$ https://unsupported.docs.camunda.io/1.2/docs/$1 [R=301,L]
+RewriteRule ^docs/1.3/(.*)$ https://unsupported.docs.camunda.io/1.3/docs/$1 [R=301,L]
+RewriteRule ^optimize/3.7.0/(.*)$ https://unsupported.docs.camunda.io/1.3/optimize/$1 [R=301,L]
# Add yaml mime type
AddType text/vnd.yaml yaml
diff --git a/versions.json b/versions.json
index 7fca91661fb..663aa80c9c3 100644
--- a/versions.json
+++ b/versions.json
@@ -1 +1 @@
-["8.2", "8.1", "8.0", "1.3"]
+["8.2", "8.1", "8.0"]