diff --git a/_about/index.md b/_about/index.md index a05387a15a..3fc350eb31 100644 --- a/_about/index.md +++ b/_about/index.md @@ -14,6 +14,8 @@ redirect_from: {%- comment -%}The `/docs/opensearch/` redirect is specifically to support the UI links in OpenSearch Dashboards 1.0.0.{%- endcomment -%} # OpenSearch and OpenSearch Dashboards +**Version {{site.opensearch_major_minor_version}}** +{: .label .label-blue } This section contains documentation for OpenSearch and OpenSearch Dashboards. diff --git a/assets/js/_version-selector.js b/assets/js/_version-selector.js index dc438e04fa..1f46c9c0cc 100644 --- a/assets/js/_version-selector.js +++ b/assets/js/_version-selector.js @@ -155,11 +155,19 @@ class VersionSelector extends HTMLElement { const {shadowRoot} = this; const frag = this._makeFragment(tpl); - frag.querySelector('#selected').textContent = `${PREFIX}${this.getAttribute('selected')}.x`; + frag.querySelector('#selected').textContent = `${PREFIX}${this.getAttribute('selected')}`; const pathName = location.pathname.replace(/\/docs(\/((latest|\d+\.\d+)\/?)?)?/, ''); - const versionsDOMText = DOC_VERSIONS.map((v, idx) => `${PREFIX}${v}.x`) - .join(''); + const versionsDOMNodes = DOC_VERSIONS.map((v, idx) => `${PREFIX}${v}`); + if (Array.isArray(DOC_VERSIONS_ARCHIVED) && DOC_VERSIONS_ARCHIVED.length) { + versionsDOMNodes.push( + `Show archived`, + `Archived`, + ...DOC_VERSIONS_ARCHIVED.map((v, idx) => `${PREFIX}${v}`) + ); + } + + const versionsDOMText = versionsDOMNodes.join(''); frag.querySelector('#dropdown').appendChild(this._makeFragment(versionsDOMText)); frag.querySelector('#spacer').appendChild(this._makeFragment(versionsDOMText));