Skip to content

Commit

Permalink
Merge pull request #1527 from wallrj/fix-release-next-link
Browse files Browse the repository at this point in the history
Fix release next link
  • Loading branch information
cert-manager-prow[bot] authored Jul 25, 2024
2 parents db76926 + 60560bd commit 67982ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions components/docs/VersionSelect.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import { Listbox } from '@headlessui/react'
import { useState } from 'react'
import SidebarLink from './Sidebar/SidebarLink'

import { compareVersions } from 'compare-versions';
import { compareVersions } from 'compare-versions'

function labelFromVersion(version) {
return version === 'docs'
? 'latest'
: version.replace(/-docs$/, '').replace(/^v/, '');
return version === 'docs'
? 'latest'
: version.replace(/-docs$/, '').replace(/^v/, '')
}

export default function VersionSelect({
Expand All @@ -25,7 +25,7 @@ export default function VersionSelect({
.reverse()

return (
<div className="bg-gray-1 rounded-md border-2 border-gray-2/50">
<div className="bg-gray-1 rounded-md border-2 border-gray-2/50">
<Listbox value={selectedVersion} onChange={setSelectedVersion}>
<Listbox.Button className="w-full">
version: {labelFromVersion(version)}
Expand Down Expand Up @@ -55,7 +55,7 @@ export default function VersionSelect({
))}
<div className="block px-2">
<SidebarLink
href="https://release-next--cert-manager-website.netlify.app/docs/"
href="https://release-next--cert-manager.netlify.app/docs/"
caption="next release"
setSidebarCollapsed={setSidebarCollapsed}
setParentOpen={setParentOpen}
Expand All @@ -64,5 +64,5 @@ export default function VersionSelect({
</Listbox.Options>
</Listbox>
</div>
);
)
}
2 changes: 1 addition & 1 deletion public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ https://trust-manager.io/* https://cert-manager.io/:splat 301!
https://trust-manager.dev/* https://cert-manager.io/:splat 301!

# Redirect all next-docs on the main site to the release-next preview
https://cert-manager.io/next-docs/* https://release-next--cert-manager-website.netlify.app/docs/:splat 301!
https://cert-manager.io/next-docs/* https://release-next--cert-manager.netlify.app/docs/:splat 301!

# Various older renamed pages
/docs/configuration/externalloadbalancer/ /docs/configuration/acme/http01/externalloadbalancer/ 301!
Expand Down

0 comments on commit 67982ce

Please sign in to comment.