-
Notifications
You must be signed in to change notification settings - Fork 474
Add archived documentation page with v19.2 support #20229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,4 +73,12 @@ | |
"urls": [ | ||
"/releases/unsupported-versions.html" | ||
] | ||
}, | ||
{ | ||
"title": "Archived Documentation", | ||
"tag": "NEW", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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, '') | ||
|
@@ -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) { | ||
|
@@ -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) { | ||
|
@@ -136,8 +128,19 @@ | |
.attr("href", urls[0] || "#") | ||
.html(item.title); | ||
|
||
// ── **INJECT TAG BADGE HERE** ───────────────────────── | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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>") | ||
|
@@ -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 }} -%} | ||
}; | ||
|
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest update to the following:
|
||
{{ site.data.alerts.end }} | ||
|
||
## All Archived Versions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest changing the header and first line of text as follows:
|
||
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> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
There was a problem hiding this comment.
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