website: hardcode version banner for 0.1 docs
O.1 docs is deprecated. Let's inform user to switch the the latest version Signed-off-by: user.email <jf@dagger.io>
This commit is contained in:
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