Merge pull request #2173 from slumbering/docs-warning-banner
website: hardcode version banner for 0.1 docs
This commit is contained in:
@@ -10,71 +10,7 @@
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
preEuropa: [
|
||||
{
|
||||
type: "category",
|
||||
label: "Introduction",
|
||||
collapsible: true,
|
||||
items: ["introduction/what_is", "introduction/vs"],
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "install",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Learn Dagger",
|
||||
collapsible: true,
|
||||
collapsed: false,
|
||||
items: [
|
||||
"learn/what_is_cue",
|
||||
"learn/get-started",
|
||||
"learn/google-cloud-run",
|
||||
"learn/kubernetes",
|
||||
"learn/aws-cloudformation",
|
||||
"learn/github-actions",
|
||||
"learn/dev-cue-package",
|
||||
"learn/package-manager",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Use Cases",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: ["use-cases/ci"],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Universe - API Reference",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
// generate the sidebar for reference doc automatically
|
||||
items: [
|
||||
{
|
||||
type: "autogenerated",
|
||||
dirName: "reference",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Administrator Manual",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: ["administrator/operator-manual"],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
label: "Dagger 0.2 ➡️",
|
||||
href: "/",
|
||||
},
|
||||
],
|
||||
europa: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "migrate-from-dagger-0.1",
|
||||
},
|
||||
"0.2": [
|
||||
{
|
||||
type: "category",
|
||||
label: "Getting Started",
|
||||
@@ -143,10 +79,74 @@ module.exports = {
|
||||
"use-cases/go-docker-swarm",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "migrate-from-dagger-0.1",
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
label: "⬅️ Dagger 0.1",
|
||||
href: "/1200/what/",
|
||||
href: "/0.1",
|
||||
},
|
||||
],
|
||||
"0.1": [
|
||||
{
|
||||
type: "category",
|
||||
label: "Introduction",
|
||||
collapsible: true,
|
||||
items: ["introduction/what_is", "introduction/vs"],
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "install",
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Learn Dagger",
|
||||
collapsible: true,
|
||||
collapsed: false,
|
||||
items: [
|
||||
"learn/what_is_cue",
|
||||
"learn/get-started",
|
||||
"learn/google-cloud-run",
|
||||
"learn/kubernetes",
|
||||
"learn/aws-cloudformation",
|
||||
"learn/github-actions",
|
||||
"learn/dev-cue-package",
|
||||
"learn/package-manager",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Use Cases",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: ["use-cases/ci"],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Universe - API Reference",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
// generate the sidebar for reference doc automatically
|
||||
items: [
|
||||
{
|
||||
type: "autogenerated",
|
||||
dirName: "reference",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Administrator Manual",
|
||||
collapsible: true,
|
||||
collapsed: true,
|
||||
items: ["administrator/operator-manual"],
|
||||
},
|
||||
{
|
||||
type: "link",
|
||||
label: "Dagger 0.2 ➡️",
|
||||
href: "/",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
12
website/src/components/DeprecatedVersionBanner.js
Normal file
12
website/src/components/DeprecatedVersionBanner.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react'
|
||||
|
||||
function DeprecatedVersionBanner() {
|
||||
return (
|
||||
<div class="theme-doc-version-banner alert alert--warning margin-bottom--md" role="alert">
|
||||
<div>This is documentation for Dagger <b>0.1</b>, which is no longer actively maintained.</div>
|
||||
<div class="margin-top--md">For up-to-date documentation, see the <b><a href="/">latest version</a></b> (0.2).</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default DeprecatedVersionBanner
|
@@ -27,6 +27,7 @@ import {
|
||||
} from '@docusaurus/theme-common';
|
||||
import Head from '@docusaurus/Head';
|
||||
import amplitude from 'amplitude-js';
|
||||
import DeprecatedVersionBanner from '../../components/DeprecatedVersionBanner';
|
||||
|
||||
function DocPageContent({
|
||||
currentDocRoute,
|
||||
@@ -171,6 +172,9 @@ function DocPage(props) {
|
||||
currentDocRoute={currentDocRoute}
|
||||
versionMetadata={versionMetadata}
|
||||
sidebarName={sidebarName}>
|
||||
{currentDocRoute.sidebar === '0.1' && (
|
||||
<DeprecatedVersionBanner />
|
||||
)}
|
||||
<div data-cy="cy-doc-content">
|
||||
{renderRoutes(docRoutes, {
|
||||
versionMetadata,
|
||||
|
Reference in New Issue
Block a user