Skip to content
Open
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
11 changes: 11 additions & 0 deletions src/current/_includes/corestyle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,16 @@ div#feature-highlights .feature-description {
}
}


.sidebar__tag--new {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think this PR is the place for us to add a "new" tag, we need to discuss with the team since it's a style decision. if we want to add a new sidebar callout tag, we should do that in a different PR

although it is important for us to make the archived documentation available, i don't think we should be highlighting or calling it out as something users need to pay special attention to vs. other things in the docs

background: #6933ff;
color: #fff;
font-size: 10px;
padding: 2px 6px;
border-radius: 4px;
margin-left: 8px;
}

.roles-table {
table {
width: 100%; // Let the table stretch to the full container width
Expand Down Expand Up @@ -1104,3 +1114,4 @@ div#feature-highlights .feature-description {
width: 1%; // Hint browser to minimize these columns if possible
}
}

8 changes: 8 additions & 0 deletions src/current/_includes/sidebar-all-releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,12 @@
"urls": [
"/releases/unsupported-versions.html"
]
},
{
"title": "Archived Documentation",
"tag": "NEW",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see other comment re: adding this "new" tag

"urls": [

"/releases/archived-documentation.html"
]
}
35 changes: 19 additions & 16 deletions src/current/_includes/sidebar.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
// source for the underlying version, like v1.0 or v1.1.
// Otherwise, the sidebar for a `stable` page would
// inappropriately link to the underlying `v1.0` page instead
// of the `stable` alias.
const pageVersion = (function () {
const pathComponents = location.pathname
.replace(sidebar.baseUrl, '')
Expand Down Expand Up @@ -89,7 +88,7 @@
// entry, if any, into the `.collapsed-header` element above.
function renderItems(items, paths) {
if (!items || items.length == 0)
return $();
return $();

const lis = items.map(function (item) {
const urls = (item.urls || []).map(function (url) {
Expand All @@ -103,20 +102,13 @@
});

// this ensures page will be highlighted in sidebar if URL is accessed with or without `.html` appended
var activePathname
if (!/^https?:/.test(location.pathname)) {
activePathname = location.pathname
var activePathname = location.pathname;
if (activePathname.includes("/index.html")) {
activePathname = activePathname.replace("/index.html", "/");
}
else {
activePathname = location.pathname
if (activePathname.includes(".html")) {
activePathname = activePathname.replace(".html", "");
}
if (location.pathname.includes("/index.html")) {
activePathname = activePathname.replace("/index.html", "/")
}
if (location.pathname.includes(".html")) {
activePathname = activePathname.replace(".html", "")
}
// console.log(urls);

const active = (urls.indexOf(activePathname) !== -1);
if (active) {
Expand All @@ -136,8 +128,19 @@
.attr("href", urls[0] || "#")
.html(item.title);

// ── **INJECT TAG BADGE HERE** ─────────────────────────
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see my other comment re: the "new" tag

if (item.tag) {
a.append(" ")
.append(
$("<span>")
.addClass("sidebar__tag sidebar__tag--new")
.text(item.tag)
);
}
// ──────────────────────────────────────────────────────

if (subitems.length > 0 && !item.is_top_level) {
a.append(" ").append($("<div>").addClass("nav-expand"));
a.append(" ").append($("<div>").addClass("nav-expand"));
}

return $("<li>")
Expand Down Expand Up @@ -165,7 +168,7 @@
// Version directories either are one of the named version
// aliases specified in _config.yml or have the form "vX.X",
// like "v1.0" or "v1.10".
return {{ site.versions | jsonify }}[d] || /^v\d+.\d+$/.test(d);
return {{ site.versions | jsonify }}[d] || /^v\d+\.\d+$/.test(d);
},
items: {%- include_cached {{ include.sidebar_data }} -%}
};
Expand Down
34 changes: 34 additions & 0 deletions src/current/releases/archived-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Archived Documentation
summary: Documentation for CockroachDB versions that are no longer actively maintained
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest updating this to match the language on our Release support policy page as follows:

"Documentation for CockroachDB versions that are no longer supported"


toc: false # hide “On this page” nav
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment in the YAML header is unnecessary

docs_area: releases
---


Access documentation for previous versions of CockroachDB that are no longer actively maintained.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest update to "This page contains downloads of archived documentation for CockroachDB versions that are no longer supported"


{{ site.data.alerts.callout_info }}
CockroachDB recommends using the most recent version for the best experience and most up-to-date documentation. Archived documentation is provided **as-is** and is no longer actively maintained.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest update to the following:

Cockroach Labs recommends using a [supported version]({% link {{ page.version.version }}/releases/release-support-policy.md %}) of CockroachDB for which documentation is actively maintained. The archived documentation on this page is provided **as-is** and is no longer maintained.

{{ site.data.alerts.end }}

## All Archived Versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest changing the header and first line of text as follows:

## Archived versions

The table below contains links to archived documentation for versions of CockroachDB that are [no longer supported]({% link {{ page.version.version }}/releases/release-support-policy.md %}#unsupported-versions).

Browse the full list of archived CockroachDB versions:

<div class="wide-overflow" markdown="1">

<table>
<thead>
<tr><th>Version</th><th>Downloads</th></tr>
</thead>
<tbody>
<tr><td><strong>v19.2</strong></td>
<td><a href="https://storage.googleapis.com/crdbdocs-archive/archive_19.2.zip" class="download-link">ZIP</a></td></tr>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this link doesn't work due to object storage permissions denied (see screenshot in another comment)

</tbody>
</table>

</div>

## Looking for current documentation?
Visit our [current documentation](/docs/stable/) for the latest CockroachDB versions.
Loading