Skip to content

Commit

Permalink
docs: update legacy drivers section and fix drop down (#4130)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Jun 7, 2024
1 parent fd002c1 commit 0655c73
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 26 deletions.
9 changes: 4 additions & 5 deletions etc/docs/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import {
confirm,
customSemverCompare,
getCommandLineArguments,
JsonVersionSchema,
type JsonVersionSchema,
LATEST_TAG,
log,
TomlVersionSchema,
VersionSchema
type TomlVersionSchema,
type VersionSchema
} from './utils';

const exec = promisify(execCb);
Expand Down Expand Up @@ -94,8 +94,7 @@ async function main() {

if (!skipPrompts) {
await confirm(`
Generating docs for the following configuration.
${JSON.stringify(newVersion, null, 2)}
Generating docs for the following configuration.\n${JSON.stringify(newVersion, null, 2)}
Does this look right? [y/n] `);
}

Expand Down
40 changes: 20 additions & 20 deletions etc/docs/template/data/releases.toml
Original file line number Diff line number Diff line change
Expand Up @@ -136,140 +136,140 @@ tag = "5.0"

[[versions]]
version = "4.17 Driver"
status = "supported"
status = "not-supported"
api = "./4.17"
usesMongoDBManual = true
tag = "4.17"

[[versions]]
version = "4.16 Driver"
status = "supported"
status = "not-supported"
api = "./4.16"
usesMongoDBManual = true
tag = "4.16"

[[versions]]
version = "4.15 Driver"
status = "supported"
status = "not-supported"
api = "./4.15"
usesMongoDBManual = true
tag = "4.15"

[[versions]]
version = "4.14 Driver"
status = "supported"
status = "not-supported"
api = "./4.14"
usesMongoDBManual = true
tag = "4.14"

[[versions]]
version = "4.13 Driver"
status = "supported"
status = "not-supported"
api = "./4.13"
usesMongoDBManual = true
tag = "4.13"

[[versions]]
version = "4.12 Driver"
status = "supported"
status = "not-supported"
api = "./4.12"
usesMongoDBManual = true
tag = "4.12"

[[versions]]
version = "4.11 Driver"
status = "supported"
status = "not-supported"
api = "./4.11"
usesMongoDBManual = true
tag = "4.11"

[[versions]]
version = "4.10 Driver"
status = "supported"
status = "not-supported"
api = "./4.10"
usesMongoDBManual = true
tag = "4.10"

[[versions]]
version = "4.9 Driver"
status = "supported"
status = "not-supported"
api = "./4.9"
usesMongoDBManual = true
tag = "4.9"

[[versions]]
version = "4.8 Driver"
status = "supported"
status = "not-supported"
api = "./4.8"
usesMongoDBManual = true
tag = "4.8"

[[versions]]
version = "4.7 Driver"
status = "supported"
status = "not-supported"
api = "./4.7"
usesMongoDBManual = true
tag = "4.7"

[[versions]]
version = "4.6 Driver"
status = "supported"
status = "not-supported"
api = "./4.6"
usesMongoDBManual = true
tag = "4.6"

[[versions]]
version = "4.5 Driver"
status = "supported"
status = "not-supported"
api = "./4.5"
usesMongoDBManual = true
tag = "4.5"

[[versions]]
version = "4.4 Driver"
status = "supported"
status = "not-supported"
api = "./4.4"
usesMongoDBManual = true
tag = "4.4"

[[versions]]
version = "4.3 Driver"
status = "supported"
status = "not-supported"
api = "./4.3"
usesMongoDBManual = true
tag = "4.3"

[[versions]]
version = "4.2 Driver"
status = "supported"
status = "not-supported"
api = "./4.2"
usesMongoDBManual = true
tag = "4.2"

[[versions]]
version = "4.1 Driver"
status = "supported"
status = "not-supported"
api = "./4.1"
usesMongoDBManual = true
tag = "4.1"

[[versions]]
version = "4.0 Driver"
status = "supported"
status = "not-supported"
api = "./4.0"
usesMongoDBManual = true
tag = "4.0"

[[versions]]
version = "3.7 Driver"
status = "supported"
status = "not-supported"
docs = "./3.7"
api = "./3.7/api"
tag = "3.7"

[[versions]]
version = "3.6 Driver"
status = "supported"
status = "not-supported"
docs = "./3.6"
api = "./3.6/api"
tag = "3.6"
Expand Down
3 changes: 2 additions & 1 deletion etc/docs/template/layouts/partials/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ <h2>Releases</h2>
</table>

<details>
<summary><h2>Legacy Versions</h2></summary>
<summary class="legacy-summary">Legacy Versions</summary>
<p>⚠️ The following versions are no longer maintained. For the latest bug fixes and features, please upgrade to a version listed above.</p>
<table class="table table-striped">
<thead><tr><th>Release</th><th>Documentation</th></tr></thead>
<tbody>
Expand Down
12 changes: 12 additions & 0 deletions etc/docs/template/static/s/css/frontpage.css
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,15 @@ code {
background-color: #ddd;
color: #494747;
}

.legacy-summary {
font-family: "PT Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
color: #313030;
font-size: 30px;
margin-top: 20px;
margin-bottom: 10px;
line-height: 1.1;
box-sizing: border-box;
display: list-item;
}
3 changes: 3 additions & 0 deletions etc/docs/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createInterface } from 'readline';
import * as util from 'util';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';

Expand Down Expand Up @@ -26,6 +27,8 @@ export interface TomlVersionSchema {
const capitalize = (s: string) =>
s.length === 0 ? s : s[0].toUpperCase() + s.slice(1).toLowerCase();

util.inspect.defaultOptions.breakLength = 1000;
util.inspect.defaultOptions.depth = 1000;
// eslint-disable-next-line no-console
export const log = (...args: any[]) => console.error(args);

Expand Down

0 comments on commit 0655c73

Please sign in to comment.