Skip to content
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

docs: add HeroDevs support banners to specific pages. Add new menu item. #252

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
docs: remove unused LatestVersionSuggetinLabel function
AndreAngelantoni authored and Eomm committed Dec 21, 2024

Verified

This commit was signed with the committer’s verified signature.
Eomm Manuel Spigolon
commit 04585bbe914eb759c2679f99f226ef79d646d6a5
32 changes: 0 additions & 32 deletions src/theme/DocPage/index.js
Original file line number Diff line number Diff line change
@@ -10,8 +10,6 @@ import {
import DocPageLayout from '@theme/DocPage/Layout'
import NotFound from '@theme/NotFound'
import SearchMetadata from '@theme/SearchMetadata'
import Link from '@docusaurus/Link'
import Translate from '@docusaurus/Translate'
import { useLocation } from '@docusaurus/router'

function DocPageMetadata(props) {
@@ -57,13 +55,6 @@ export default function DocPage(props) {
{isMigrationGuide && (isNaN(versionNumber) || versionNumber === 5) && (
<div className="alert alert--warning margin-top--md margin-bottom--md" role="alert">
<p>Version 3 and before of Fastify are no longer maintained.</p>
{/* <p>
<LatestVersionSuggestionLabel
versionLabel={latestVersionSuggestion.label}
to={latestVersionSuggestedDoc.path}
onClick={() => savePreferredVersionName(latestVersionSuggestion.name)}
/>
</p> */}
For information about support options for end-of-life versions, see the{' '}
<a href="/docs/latest/Reference/LTS">Long Term Support</a> page.
</div>
@@ -76,29 +67,6 @@ export default function DocPage(props) {
</>
)
}
function LatestVersionSuggestionLabel({ versionLabel, to, onClick }) {
return (
<Translate
id="theme.docs.versions.latestVersionSuggestionLabel"
description="The label used to tell the user to check the latest version"
values={{
versionLabel,
latestVersionLink: (
<b>
<Link to={to} onClick={onClick}>
<Translate
id="theme.docs.versions.latestVersionLinkLabel"
description="The label used for the latest version suggestion link label">
latest version
</Translate>
</Link>
</b>
),
}}>
{'For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).'}
</Translate>
)
}

const parseVersion = (versionString) => {
// Remove 'v' prefix if present