Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Provisionally update the docs for v17 #504

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "content/14.x"]
path = content/14.x
url = https://github.com/gravitational/teleport
branch = branch/v14
[submodule "content/15.x"]
path = content/15.x
url = https://github.com/gravitational/teleport
Expand All @@ -13,4 +9,8 @@
[submodule "content/17.x"]
path = content/17.x
url = https://github.com/gravitational/teleport
branch = master
branch = branch/v17

[submodule "content/edge"]
path = content/edge
url = https://github.com/gravitational/teleport
7 changes: 6 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
},
{
"name": "14.x",
"branch": "branch/v14"
"branch": "branch/v14",
"deprecated": true
},
{
"name": "15.x",
Expand All @@ -75,6 +76,10 @@
},
{
"name": "17.x",
"branch": "branch/v17"
},
{
"name": "edge",
"branch": "master"
}
]
Expand Down
1 change: 0 additions & 1 deletion content/14.x
Submodule 14.x deleted from 473214
2 changes: 1 addition & 1 deletion content/15.x
Submodule 15.x updated 8558 files
2 changes: 1 addition & 1 deletion content/16.x
Submodule 16.x updated 6940 files
2 changes: 1 addition & 1 deletion content/17.x
Submodule 17.x updated 5593 files
1 change: 1 addition & 0 deletions content/edge
Submodule edge added at f3e36e
10 changes: 1 addition & 9 deletions layouts/DocsPage/DocsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const DocsPage = ({
const icon = navigation[categoryId]?.icon || "book";

const isOldVersion = available.indexOf(current) < available.indexOf(latest);
const isBetaVersion = available.indexOf(current) > available.indexOf(latest);

let path = getPath(latest);

Expand Down Expand Up @@ -104,7 +103,7 @@ const DocsPage = ({
)}
<div className={cn(styles["main-wrapper"], styles[layout])}>
<div className={styles.main}>
{(isOldVersion || isBetaVersion) && (
{isOldVersion && (
<Notice type="danger" className={styles.notice}>
{isOldVersion && (
<>
Expand All @@ -113,13 +112,6 @@ const DocsPage = ({
version instead.
</>
)}
{isBetaVersion && (
<>
This chapter covers an upcoming release: {current}. We
recommend the <Link href={`${urlCurrent}`}>latest</Link>{" "}
version instead.
</>
)}
</Notice>
)}
<VarsProvider>
Expand Down
7 changes: 7 additions & 0 deletions layouts/DocsPage/Versions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import styles from "./Versions.module.css";

// renders strikethrough for deprecated versions
const renderVersion = (version: VersionsDropdown) => {
if (version.value === "edge") {
return "Edge version";
}
if (version.deprecated) return <s>Version {version.value}</s>;

if (version.value === "Older Versions") return version.value;
Expand All @@ -25,6 +28,10 @@ const validVersion = (thisVersion: string, latestVersion: string) => {
const currentMajorVersion = majorVersionRe.exec(thisVersion);
const latestMajorVersion = majorVersionRe.exec(latestVersion);

if (thisVersion === "edge") {
return true;
}

// Can't calculate validity, so the version is invalid. This happens, e.g.,
// if we're dealing with a dropdown option like "Older Versions".
if (currentMajorVersion == null || latestMajorVersion == null) {
Expand Down
Loading