Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
DX-2968 Update Previous Versions (#815)
Browse files Browse the repository at this point in the history
* DX-2968 Update Previous Versions

* fix component name

* move versions link to bottom of sidebar

* fix test
  • Loading branch information
ckoegel authored Nov 9, 2022
1 parent 629a581 commit ec63a69
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 75 deletions.
4 changes: 2 additions & 2 deletions site/cypress/e2e/tests/docs.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
75 changes: 9 additions & 66 deletions site/docs/versions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<LTSVersions versions={versions}/>

:::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.
:::
<VersionsTable versions={versions}/>
10 changes: 5 additions & 5 deletions site/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ module.exports = {
id: "intro",
label: "Introduction",
},
{
type: "doc",
id: "versions",
label: "Versions"
},
{
type: "category",
label: "Account Management",
Expand Down Expand Up @@ -325,5 +320,10 @@ module.exports = {
"emergency/emergencyCallingApi",
],
},
{
type: "doc",
id: "versions",
label: "Versions"
}
],
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';

export default function LTSVersions({versions}) {
export default function VersionsTable({versions}) {
return (
<table>
<thead>
<tr>
<th>LTS Version</th>
<th>Previous Version</th>
<th>Release Date</th>
<th>Sunset Date</th>
<th>Hosted Link</th>
Expand Down

0 comments on commit ec63a69

Please sign in to comment.