chore: add deprecation notice to netlify large media docs (#948)

This commit is contained in:
Daniel Lautzenheiser 2023-10-23 16:19:43 -04:00 committed by GitHub
parent c1ccc150fd
commit f6c5110603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 5 deletions

View File

@ -2,9 +2,14 @@
group: Media group: Media
title: Netlify Large Media title: Netlify Large Media
weight: 20 weight: 20
deprecated: true
--- ---
## <img src="https://img.shields.io/badge/-Beta%20Feature-blue" alt="Beta Feature. Use at your own risk" title="Beta Feature. Use at your own risk" /> <Alert severity="warning">
Netlify Large Media is deprecated as of September 1, 2023. Please refer to the deprecation notice
in [Netlify's Support Forums](https://docs.netlify.com/large-media/overview/) (see deprecation
notice).
</Alert>
[Netlify Large Media](https://www.netlify.com/features/large-media/) is a [Git LFS](https://git-lfs.github.com/) implementation for repositories connected to Netlify sites. This means that you can use Git to work with large asset files like images, audio, and video, without bloating your repository. It does this by replacing the asset files in your repository with text pointer files, then uploading the assets to the Netlify Large Media storage service. [Netlify Large Media](https://www.netlify.com/features/large-media/) is a [Git LFS](https://git-lfs.github.com/) implementation for repositories connected to Netlify sites. This means that you can use Git to work with large asset files like images, audio, and video, without bloating your repository. It does this by replacing the asset files in your repository with text pointer files, then uploading the assets to the Netlify Large Media storage service.

View File

@ -0,0 +1,35 @@
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
const DeprecatedImage = () => {
return (
<Box
title="Beta Feature. Use at your own risk"
sx={{
width: 81,
height: 20,
background: '#ffa726',
borderRadius: 1,
display: 'inline-flex',
alignItems: 'center',
justifyContent: 'center',
}}
>
<Typography
variant="caption"
sx={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontWeight: 'bold',
lineHeight: '20px',
color: 'white',
}}
>
Deprecated
</Typography>
</Box>
);
};
export default DeprecatedImage;

View File

@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
import { useState } from 'react'; import { useState } from 'react';
import BetaImage from './BetaImage'; import BetaImage from './BetaImage';
import DeprecatedImage from './DeprecatedImage';
import type { DocsGroupLink } from '../../interface'; import type { DocsGroupLink } from '../../interface';
@ -66,7 +67,7 @@ const DocsLeftNavGroup = ({ name, links }: DocsLeftNavGroupProps) => {
primary={ primary={
<StyledListItemPrimary> <StyledListItemPrimary>
{link.title} {link.title}
{link.beta ? <BetaImage /> : null} {link.deprecated ? <DeprecatedImage /> : link.beta ? <BetaImage /> : null}
</StyledListItemPrimary> </StyledListItemPrimary>
} }
/> />

View File

@ -134,6 +134,7 @@ const Header = ({ mode, docsGroups, searchablePages, toggleColorMode }: HeaderPr
title: link.title, title: link.title,
url: `/docs/${link.slug}`, url: `/docs/${link.slug}`,
beta: link.beta, beta: link.beta,
deprecated: link.deprecated,
})), })),
})), })),
}, },

View File

@ -5,6 +5,7 @@ import { useRouter } from 'next/router';
import { useMemo } from 'react'; import { useMemo } from 'react';
import BetaImage from '../../docs/BetaImage'; import BetaImage from '../../docs/BetaImage';
import DeprecatedImage from '../../docs/DeprecatedImage';
import type { MouseEvent } from 'react'; import type { MouseEvent } from 'react';
import type { MenuLink } from '../../../interface'; import type { MenuLink } from '../../../interface';
@ -15,7 +16,7 @@ interface MobileNavLinkProps {
} }
const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => { const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
const { title, url, beta = false } = link; const { title, url, beta = false, deprecated = false } = link;
const { asPath } = useRouter(); const { asPath } = useRouter();
const selected = useMemo(() => { const selected = useMemo(() => {
@ -35,7 +36,7 @@ const MobileNavLink = ({ link, onClick }: MobileNavLinkProps) => {
primary={ primary={
<> <>
{title} {title}
{beta ? <BetaImage /> : null} {deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
</> </>
} }
primaryTypographyProps={{ primaryTypographyProps={{

View File

@ -76,6 +76,7 @@ export interface DocsData {
readonly weight: number; readonly weight: number;
readonly slug: string; readonly slug: string;
readonly beta?: boolean; readonly beta?: boolean;
readonly deprecated?: boolean;
} }
export interface DocsPageHeading { export interface DocsPageHeading {
@ -95,6 +96,7 @@ export interface DocsGroupLink {
readonly title: string; readonly title: string;
readonly slug: string; readonly slug: string;
readonly beta: boolean; readonly beta: boolean;
readonly deprecated: boolean;
} }
export interface DocsGroup { export interface DocsGroup {
@ -133,6 +135,7 @@ export interface MenuLink {
readonly title: string; readonly title: string;
readonly url: string; readonly url: string;
readonly beta?: boolean; readonly beta?: boolean;
readonly deprecated?: boolean;
} }
export interface MenuLinkSubGroup { export interface MenuLinkSubGroup {

View File

@ -137,6 +137,7 @@ export function fetchDocsContent(): [DocsPage[], DocsGroup[]] {
title: doc.data.title, title: doc.data.title,
slug: doc.data.slug, slug: doc.data.slug,
beta: doc.data.beta ?? false, beta: doc.data.beta ?? false,
deprecated: doc.data.deprecated ?? false,
}); });
return acc; return acc;
}, {} as Record<string, DocsGroupLink[]>); }, {} as Record<string, DocsGroupLink[]>);

View File

@ -4,6 +4,7 @@ import { serialize } from 'next-mdx-remote/serialize';
import remarkGfm from 'remark-gfm'; import remarkGfm from 'remark-gfm';
import BetaImage from '../../components/docs/BetaImage'; import BetaImage from '../../components/docs/BetaImage';
import DeprecatedImage from '../../components/docs/DeprecatedImage';
import DocsContent from '../../components/docs/DocsContent'; import DocsContent from '../../components/docs/DocsContent';
import DocsLeftNav from '../../components/docs/DocsLeftNav'; import DocsLeftNav from '../../components/docs/DocsLeftNav';
import DocsRightNav from '../../components/docs/DocsRightNav'; import DocsRightNav from '../../components/docs/DocsRightNav';
@ -81,6 +82,7 @@ interface DocsProps {
title: string; title: string;
slug: string; slug: string;
beta: boolean; beta: boolean;
deprecated: boolean;
description: string; description: string;
source: MDXRemoteSerializeResult; source: MDXRemoteSerializeResult;
} }
@ -93,6 +95,7 @@ const Docs = ({
description, description,
source, source,
beta, beta,
deprecated,
}: DocsProps) => { }: DocsProps) => {
const theme = useTheme(); const theme = useTheme();
@ -111,7 +114,7 @@ const Docs = ({
<DocsContent> <DocsContent>
<Header1> <Header1>
{title} {title}
{beta ? <BetaImage /> : null} {deprecated ? <DeprecatedImage /> : beta ? <BetaImage /> : null}
</Header1> </Header1>
<MDXRemote <MDXRemote
{...source} {...source}
@ -134,6 +137,7 @@ const Docs = ({
Template, Template,
Templates, Templates,
BetaImage, BetaImage,
DeprecatedImage,
Deprecated, Deprecated,
}} }}
/> />
@ -186,6 +190,7 @@ export const getStaticProps: GetStaticProps = async ({ params }): Promise<{ prop
title: data.title, title: data.title,
slug: data.slug, slug: data.slug,
beta: data.beta ?? false, beta: data.beta ?? false,
deprecated: data.deprecated ?? false,
description: '', description: '',
source, source,
}, },