From ec63a69a1aa9ca4ecf1bd7b44fec472f2f4985ad Mon Sep 17 00:00:00 2001 From: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> Date: Wed, 9 Nov 2022 09:31:19 -0500 Subject: [PATCH] DX-2968 Update Previous Versions (#815) * DX-2968 Update Previous Versions * fix component name * move versions link to bottom of sidebar * fix test --- site/cypress/e2e/tests/docs.cy.js | 4 +- site/docs/versions.mdx | 75 +++---------------- site/sidebar.js | 10 +-- .../{LTSVersions.js => VersionsTable.js} | 4 +- 4 files changed, 18 insertions(+), 75 deletions(-) rename site/src/components/{LTSVersions.js => VersionsTable.js} (93%) diff --git a/site/cypress/e2e/tests/docs.cy.js b/site/cypress/e2e/tests/docs.cy.js index fc7afaa9c..ba756398e 100644 --- a/site/cypress/e2e/tests/docs.cy.js +++ b/site/cypress/e2e/tests/docs.cy.js @@ -28,8 +28,8 @@ context('Emergency Services Link', () => { testTextLink('/docs','Emergency Services', 'docs/emergency' ,'.docs-intro-grid-item') }) -context('Next - Versions Link', () => { - testTextLink('/docs','Versions', 'docs/versions' ,'a.pagination-nav__link') +context('Next - About Link', () => { + testTextLink('/docs','About', 'docs/account' ,'a.pagination-nav__link') }) context('Edit This Page Link', () => { diff --git a/site/docs/versions.mdx b/site/docs/versions.mdx index 85938c9ea..8f0d9804b 100644 --- a/site/docs/versions.mdx +++ b/site/docs/versions.mdx @@ -16,80 +16,23 @@ hide_title: false image: '@site/static/img/bw-icon.svg' --- -import LTSVersions from '@site/src/components/LTSVersions.js'; +import VersionsTable from '@site/src/components/VersionsTable.js'; export const versions = [ - 'v2022.10.17' + 'v2022.10.17', + 'v2022.10.20' ] # Bandwidth Documentation Versions -Bandwidth maintains both current and LTS versions of our docsite and all of its contents. +Bandwidth maintains both current and previous versions of our docsite and all of its contents. What you will find here (dev.bandwidth.com), will always be the most up-to-date version of our docsite. -If you need to access an old version of our site, you can check the [LTS Versions](#lts-versions) table below. +If you need to access an old version of our site, you can check the [Previous Versions](#previous-versions) table below. Our versions use date-based versioning in the format `vYYYY.MM.DD`. -### LTS Versions +### Previous Versions -This table contains all of our current LTS versions of the doc site, which are snapshots of the site and its contents taken on the 1st and 16th of each month. -We maintain up to 12 LTS versions, or 6 months of old content. After 6 months, the LTS versions can still be accessed via Github, but will not be hosted online. +This table contains all of our publicly available previous versions of the doc site, which are snapshots of the site and its contents taken on the 1st and 16th of each month. +We maintain up to 12 previous versions, or 6 months of old content. After 6 months, the previous versions can still be accessed via Github, but will not be hosted online. - - -:::info -If you need to access a version of the site not listed as an LTS Version, either because the version was not published as an LTS release, -or because the LTS version is outside of our 6 month support window, please see the [Other Versions](#other-versions) sections below. -::: - -### Other Versions - -Even though we only release an LTS version of the site twice a month, the site can have changes published as frequently as once a day. This is possible during periods when multiple domain teams are making documentation changes. -These releases also follow our date-based versioning schema, and contain changes to the site that were made over the course of a few days at most. -If you are in need of changes that will only be contained in one of these versions, all of our releases can be found on our [Github Releases Page](https://github.com/Bandwidth/api-docs/releases). -Instructions for how to use these releases can be found below. - -#### Using Github Release Versions - -Since versions found in our Github Releases are not hosted online, they will need to be downloaded and accessed locally. -You can follow these steps to access and run the site locally. - -1. **Choose Your Release.** - * Find the release that contains the content you want to view. All of our releases can be found [here](https://github.com/Bandwidth/api-docs/releases). - -2. **Download and Extract the Release.** - * In the `Assests` section on the release page, there will be links to both a `.zip`, and `tar.gz` file that contain the contents of that release. - Choose one of the two, download, and extract it to a folder on your PC. - -3. **Open Terminal in the `/site` Directory of the Project.** - * Navigate to the `/site` directory inside the newly extracted folder and open the terminal of your choice. - :::info - A lot of our documentation is written in Markdown; therefore, if you are comfortable naviagting the file structure of the project, - this documentation can be found in the `/docs` directory, and does not necessarily need to be viewed with the whole site running locally. - You may forgo opening a ternimal and following the succeeding steps if you wish to to do this. - These files can be viewed in the text editor of your choice, or copy and pasted into a markdown renderer such as [Dillinger](https://dillinger.io/). - If you choose to go with this method of viewing the files, note that some formatting may not be supported. - ::: - -4. **Install Packages and Run the Site** - * This step requires you to have either [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) installed. - - From the terminal run the following commands for npm. - ```bash - npm i # installs packages - npm run start # builds and serves the site locally - ``` - - **_OR_** - - From the terminal run the following commands for yarn. - ```bash - yarn # installs packages - yarn start # builds and serves the site locally - ``` - -5. **Access the Locally Running Site** - * The site can now be accessed via `localhost:3000` and navigated around normally. - -:::caution -Since these versions are running locally, the Algolia search at the top right of our site will not work properly for these sites. -::: + diff --git a/site/sidebar.js b/site/sidebar.js index 1e6afe0fe..b31076863 100644 --- a/site/sidebar.js +++ b/site/sidebar.js @@ -4,11 +4,6 @@ module.exports = { id: "intro", label: "Introduction", }, - { - type: "doc", - id: "versions", - label: "Versions" - }, { type: "category", label: "Account Management", @@ -325,5 +320,10 @@ module.exports = { "emergency/emergencyCallingApi", ], }, + { + type: "doc", + id: "versions", + label: "Versions" + } ], }; diff --git a/site/src/components/LTSVersions.js b/site/src/components/VersionsTable.js similarity index 93% rename from site/src/components/LTSVersions.js rename to site/src/components/VersionsTable.js index 169f72ec2..09428fefe 100644 --- a/site/src/components/LTSVersions.js +++ b/site/src/components/VersionsTable.js @@ -1,11 +1,11 @@ import React from 'react'; -export default function LTSVersions({versions}) { +export default function VersionsTable({versions}) { return ( - +
LTS VersionPrevious Version Release Date Sunset Date Hosted Link