From 7a38c72c163457bb8fe03bd76fc45a76326d0610 Mon Sep 17 00:00:00 2001 From: Colby Fayock Date: Thu, 6 Jul 2023 17:14:06 -0400 Subject: [PATCH 01/10] docs reorganization --- docs/pages/_meta.json | 37 ++++++++++++++++--- .../{use-cases => }/background-removal.mdx | 4 +- .../{components => }/cldimage/_meta.json | 0 .../{components => }/cldimage/basic-usage.mdx | 8 ++-- .../cldimage/configuration.mdx | 2 +- .../{components => }/cldimage/examples.mdx | 6 +-- .../{components => }/cldogimage/_meta.json | 0 .../cldogimage/basic-usage.mdx | 6 +-- .../cldogimage/configuration.mdx | 2 +- .../{components => }/cldogimage/examples.mdx | 8 ++-- .../clduploadbutton/_meta.json | 0 .../clduploadbutton/basic-usage.mdx | 10 ++--- .../clduploadbutton/configuration.mdx | 2 +- .../clduploadbutton/examples.mdx | 8 ++-- .../clduploadwidget/_meta.json | 0 .../clduploadwidget/basic-usage.mdx | 14 +++---- .../clduploadwidget/configuration.mdx | 2 +- .../clduploadwidget/examples.mdx | 8 ++-- .../cldvideoplayer/_meta.json | 0 .../cldvideoplayer/basic-usage.mdx | 6 +-- .../cldvideoplayer/configuration.mdx | 2 +- .../cldvideoplayer/examples.mdx | 6 +-- .../cldvideoplayer/transformations.mdx | 4 +- docs/pages/components/_meta.json | 7 ---- .../{helpers => }/getcldimageurl/_meta.json | 0 .../getcldimageurl/basic-usage.mdx | 6 +-- .../getcldimageurl/configuration.mdx | 2 +- .../{helpers => }/getcldimageurl/examples.mdx | 6 +-- .../{helpers => }/getcldogimageurl/_meta.json | 0 .../getcldogimageurl/basic-usage.mdx | 6 +-- .../getcldogimageurl/configuration.mdx | 2 +- .../getcldogimageurl/examples.mdx | 8 ++-- docs/pages/guides/_meta.json | 4 -- docs/pages/helpers/_meta.json | 4 -- docs/pages/{use-cases => }/image-overlays.mdx | 4 +- .../pages/{use-cases => }/image-underlays.mdx | 4 +- docs/pages/{guides => }/nextjs-13.mdx | 4 +- docs/pages/{guides => }/responsive-images.mdx | 4 +- .../{use-cases => }/social-media-card.mdx | 4 +- docs/pages/{use-cases => }/text-overlays.mdx | 4 +- docs/pages/{resources.mdx => tutorials.mdx} | 12 +++--- .../uploading-images-and-videos.mdx | 6 +-- docs/pages/use-cases/_meta.json | 8 ---- docs/theme.config.js | 5 ++- 44 files changed, 121 insertions(+), 114 deletions(-) rename docs/pages/{use-cases => }/background-removal.mdx (91%) rename docs/pages/{components => }/cldimage/_meta.json (100%) rename docs/pages/{components => }/cldimage/basic-usage.mdx (93%) rename docs/pages/{components => }/cldimage/configuration.mdx (99%) rename docs/pages/{components => }/cldimage/examples.mdx (98%) rename docs/pages/{components => }/cldogimage/_meta.json (100%) rename docs/pages/{components => }/cldogimage/basic-usage.mdx (96%) rename docs/pages/{components => }/cldogimage/configuration.mdx (98%) rename docs/pages/{components => }/cldogimage/examples.mdx (88%) rename docs/pages/{components => }/clduploadbutton/_meta.json (100%) rename docs/pages/{components => }/clduploadbutton/basic-usage.mdx (90%) rename docs/pages/{components => }/clduploadbutton/configuration.mdx (96%) rename docs/pages/{components => }/clduploadbutton/examples.mdx (87%) rename docs/pages/{components => }/clduploadwidget/_meta.json (100%) rename docs/pages/{components => }/clduploadwidget/basic-usage.mdx (95%) rename docs/pages/{components => }/clduploadwidget/configuration.mdx (96%) rename docs/pages/{components => }/clduploadwidget/examples.mdx (93%) rename docs/pages/{components => }/cldvideoplayer/_meta.json (100%) rename docs/pages/{components => }/cldvideoplayer/basic-usage.mdx (92%) rename docs/pages/{components => }/cldvideoplayer/configuration.mdx (99%) rename docs/pages/{components => }/cldvideoplayer/examples.mdx (96%) rename docs/pages/{components => }/cldvideoplayer/transformations.mdx (96%) delete mode 100644 docs/pages/components/_meta.json rename docs/pages/{helpers => }/getcldimageurl/_meta.json (100%) rename docs/pages/{helpers => }/getcldimageurl/basic-usage.mdx (93%) rename docs/pages/{helpers => }/getcldimageurl/configuration.mdx (99%) rename docs/pages/{helpers => }/getcldimageurl/examples.mdx (89%) rename docs/pages/{helpers => }/getcldogimageurl/_meta.json (100%) rename docs/pages/{helpers => }/getcldogimageurl/basic-usage.mdx (95%) rename docs/pages/{helpers => }/getcldogimageurl/configuration.mdx (96%) rename docs/pages/{helpers => }/getcldogimageurl/examples.mdx (87%) delete mode 100644 docs/pages/guides/_meta.json delete mode 100644 docs/pages/helpers/_meta.json rename docs/pages/{use-cases => }/image-overlays.mdx (92%) rename docs/pages/{use-cases => }/image-underlays.mdx (91%) rename docs/pages/{guides => }/nextjs-13.mdx (93%) rename docs/pages/{guides => }/responsive-images.mdx (97%) rename docs/pages/{use-cases => }/social-media-card.mdx (96%) rename docs/pages/{use-cases => }/text-overlays.mdx (94%) rename docs/pages/{resources.mdx => tutorials.mdx} (83%) rename docs/pages/{use-cases => }/uploading-images-and-videos.mdx (92%) delete mode 100644 docs/pages/use-cases/_meta.json diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json index 295db29b..668c0f30 100644 --- a/docs/pages/_meta.json +++ b/docs/pages/_meta.json @@ -1,9 +1,36 @@ { "index": "Getting Started", "installation": "Installation", - "components": "Components", - "helpers": "Helpers", - "use-cases": "Use Cases", - "guides": "Guides", - "resources": "Resources" + "nextjs-13": "Next.js 13", + "Components": { + "type": "separator", + "title": "Components" + }, + "cldimage": "", + "cldogimage": "", + "clduploadbutton": "", + "clduploadwidget": "", + "cldvideoplayer": "", + "Helpers": { + "type": "separator", + "title": "Helpers" + }, + "getcldimageurl": "getCldImageUrl", + "getcldogimageurl": "getCldOgImageUrl", + "Guides": { + "type": "separator", + "title": "Guides" + }, + "background-removal": "Background Removal", + "image-overlays": "Image Overlays", + "image-underlays": "Image Underlays", + "responsive-images": "Responsive Images", + "social-media-card": "Social Media Card", + "text-overlays": "Text Overlays", + "uploading-images-and-videos": "Uploading Images & Videos", + "Resources": { + "type": "separator", + "title": "Resources" + }, + "tutorials": "Tutorials" } \ No newline at end of file diff --git a/docs/pages/use-cases/background-removal.mdx b/docs/pages/background-removal.mdx similarity index 91% rename from docs/pages/use-cases/background-removal.mdx rename to docs/pages/background-removal.mdx index 98664bc1..26447472 100644 --- a/docs/pages/use-cases/background-removal.mdx +++ b/docs/pages/background-removal.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Background Removal - Next Cloudinary diff --git a/docs/pages/components/cldimage/_meta.json b/docs/pages/cldimage/_meta.json similarity index 100% rename from docs/pages/components/cldimage/_meta.json rename to docs/pages/cldimage/_meta.json diff --git a/docs/pages/components/cldimage/basic-usage.mdx b/docs/pages/cldimage/basic-usage.mdx similarity index 93% rename from docs/pages/components/cldimage/basic-usage.mdx rename to docs/pages/cldimage/basic-usage.mdx index 687a7628..0f723486 100644 --- a/docs/pages/components/cldimage/basic-usage.mdx +++ b/docs/pages/cldimage/basic-usage.mdx @@ -1,11 +1,11 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage } from '../../../../next-cloudinary'; +import { CldImage } from '../../../next-cloudinary'; -import ImageGrid from '../../../components/ImageGrid'; -import OgImage from '../../../components/OgImage'; -import Video from '../../../components/Video'; +import ImageGrid from '../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; CldImage - Next Cloudinary diff --git a/docs/pages/components/cldimage/configuration.mdx b/docs/pages/cldimage/configuration.mdx similarity index 99% rename from docs/pages/components/cldimage/configuration.mdx rename to docs/pages/cldimage/configuration.mdx index 7f288c77..283b4373 100644 --- a/docs/pages/components/cldimage/configuration.mdx +++ b/docs/pages/cldimage/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldImage Configuration - Next Cloudinary diff --git a/docs/pages/components/cldimage/examples.mdx b/docs/pages/cldimage/examples.mdx similarity index 98% rename from docs/pages/components/cldimage/examples.mdx rename to docs/pages/cldimage/examples.mdx index a85c2ac5..1c0e10c9 100644 --- a/docs/pages/components/cldimage/examples.mdx +++ b/docs/pages/cldimage/examples.mdx @@ -1,10 +1,10 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage } from '../../../../next-cloudinary'; +import { CldImage } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; CldImage Examples - Next Cloudinary diff --git a/docs/pages/components/cldogimage/_meta.json b/docs/pages/cldogimage/_meta.json similarity index 100% rename from docs/pages/components/cldogimage/_meta.json rename to docs/pages/cldogimage/_meta.json diff --git a/docs/pages/components/cldogimage/basic-usage.mdx b/docs/pages/cldogimage/basic-usage.mdx similarity index 96% rename from docs/pages/components/cldogimage/basic-usage.mdx rename to docs/pages/cldogimage/basic-usage.mdx index 7dd7c667..7c502c87 100644 --- a/docs/pages/components/cldogimage/basic-usage.mdx +++ b/docs/pages/cldogimage/basic-usage.mdx @@ -1,10 +1,10 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage } from '../../../../next-cloudinary'; +import { CldImage } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import Video from '../../../components/Video'; +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; CldOgImage - Next Cloudinary diff --git a/docs/pages/components/cldogimage/configuration.mdx b/docs/pages/cldogimage/configuration.mdx similarity index 98% rename from docs/pages/components/cldogimage/configuration.mdx rename to docs/pages/cldogimage/configuration.mdx index 9a9dfd28..74a99c82 100644 --- a/docs/pages/components/cldogimage/configuration.mdx +++ b/docs/pages/cldogimage/configuration.mdx @@ -1,7 +1,7 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldOgImage Configuration - Next Cloudinary diff --git a/docs/pages/components/cldogimage/examples.mdx b/docs/pages/cldogimage/examples.mdx similarity index 88% rename from docs/pages/components/cldogimage/examples.mdx rename to docs/pages/cldogimage/examples.mdx index b2575110..99bf4d9a 100644 --- a/docs/pages/components/cldogimage/examples.mdx +++ b/docs/pages/cldogimage/examples.mdx @@ -1,11 +1,11 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage } from '../../../../next-cloudinary'; -import { OG_IMAGE_WIDTH, OG_IMAGE_HEIGHT } from '../../../../next-cloudinary/src/constants/sizes'; +import { CldImage } from '../../../next-cloudinary'; +import { OG_IMAGE_WIDTH, OG_IMAGE_HEIGHT } from '../../../next-cloudinary/src/constants/sizes'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; CldOgImage Examples - Next Cloudinary diff --git a/docs/pages/components/clduploadbutton/_meta.json b/docs/pages/clduploadbutton/_meta.json similarity index 100% rename from docs/pages/components/clduploadbutton/_meta.json rename to docs/pages/clduploadbutton/_meta.json diff --git a/docs/pages/components/clduploadbutton/basic-usage.mdx b/docs/pages/clduploadbutton/basic-usage.mdx similarity index 90% rename from docs/pages/components/clduploadbutton/basic-usage.mdx rename to docs/pages/clduploadbutton/basic-usage.mdx index 3fed08d5..2fcc2c31 100644 --- a/docs/pages/components/clduploadbutton/basic-usage.mdx +++ b/docs/pages/clduploadbutton/basic-usage.mdx @@ -2,11 +2,11 @@ import { useState } from 'react'; import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldUploadButton } from '../../../../next-cloudinary'; +import { CldUploadButton } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; -import styles from '../../../styles/Docs.module.scss'; +import styles from '../../styles/Docs.module.scss'; CldUploadButton - Next Cloudinary @@ -54,9 +54,9 @@ export const UnsignedUpload = () => { ) } -

+

-

+
## Learn More about CldUploadButton * [Configuration](/components/clduploadbutton/configuration) diff --git a/docs/pages/components/clduploadbutton/configuration.mdx b/docs/pages/clduploadbutton/configuration.mdx similarity index 96% rename from docs/pages/components/clduploadbutton/configuration.mdx rename to docs/pages/clduploadbutton/configuration.mdx index 1570c7b4..9ce7f017 100644 --- a/docs/pages/components/clduploadbutton/configuration.mdx +++ b/docs/pages/clduploadbutton/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldUploadButton Configuration - Next Cloudinary diff --git a/docs/pages/components/clduploadbutton/examples.mdx b/docs/pages/clduploadbutton/examples.mdx similarity index 87% rename from docs/pages/components/clduploadbutton/examples.mdx rename to docs/pages/clduploadbutton/examples.mdx index 5fe475d7..6b8301bd 100644 --- a/docs/pages/components/clduploadbutton/examples.mdx +++ b/docs/pages/clduploadbutton/examples.mdx @@ -2,12 +2,12 @@ import { useState } from 'react'; import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldUploadButton } from '../../../../next-cloudinary'; +import { CldUploadButton } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; -import styles from '../../../styles/Docs.module.scss'; +import styles from '../../styles/Docs.module.scss'; CldUploadButton Examples - Next Cloudinary diff --git a/docs/pages/components/clduploadwidget/_meta.json b/docs/pages/clduploadwidget/_meta.json similarity index 100% rename from docs/pages/components/clduploadwidget/_meta.json rename to docs/pages/clduploadwidget/_meta.json diff --git a/docs/pages/components/clduploadwidget/basic-usage.mdx b/docs/pages/clduploadwidget/basic-usage.mdx similarity index 95% rename from docs/pages/components/clduploadwidget/basic-usage.mdx rename to docs/pages/clduploadwidget/basic-usage.mdx index a28fd1e7..fb2f5292 100644 --- a/docs/pages/components/clduploadwidget/basic-usage.mdx +++ b/docs/pages/clduploadwidget/basic-usage.mdx @@ -2,11 +2,11 @@ import { useState } from 'react'; import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldUploadWidget } from '../../../../next-cloudinary'; +import { CldUploadWidget } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; -import styles from '../../../styles/Docs.module.scss'; +import styles from '../../styles/Docs.module.scss'; CldUploadWidget - Next Cloudinary @@ -94,9 +94,9 @@ export const UnsignedUpload = ({ options }) => { ) } -

+

-

+
### Signed @@ -174,9 +174,9 @@ export const SignedUpload = () => { ) } -

+

-

+
diff --git a/docs/pages/components/clduploadwidget/configuration.mdx b/docs/pages/clduploadwidget/configuration.mdx similarity index 96% rename from docs/pages/components/clduploadwidget/configuration.mdx rename to docs/pages/clduploadwidget/configuration.mdx index 933750b0..4e71c384 100644 --- a/docs/pages/components/clduploadwidget/configuration.mdx +++ b/docs/pages/clduploadwidget/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldUploadWidget Configuration - Next Cloudinary diff --git a/docs/pages/components/clduploadwidget/examples.mdx b/docs/pages/clduploadwidget/examples.mdx similarity index 93% rename from docs/pages/components/clduploadwidget/examples.mdx rename to docs/pages/clduploadwidget/examples.mdx index 5ad3a446..f76e71c9 100644 --- a/docs/pages/components/clduploadwidget/examples.mdx +++ b/docs/pages/clduploadwidget/examples.mdx @@ -2,12 +2,12 @@ import { useState } from 'react'; import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldUploadWidget } from '../../../../next-cloudinary'; +import { CldUploadWidget } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; -import styles from '../../../styles/Docs.module.scss'; +import styles from '../../styles/Docs.module.scss'; CldUploadWidget Examples - Next Cloudinary diff --git a/docs/pages/components/cldvideoplayer/_meta.json b/docs/pages/cldvideoplayer/_meta.json similarity index 100% rename from docs/pages/components/cldvideoplayer/_meta.json rename to docs/pages/cldvideoplayer/_meta.json diff --git a/docs/pages/components/cldvideoplayer/basic-usage.mdx b/docs/pages/cldvideoplayer/basic-usage.mdx similarity index 92% rename from docs/pages/components/cldvideoplayer/basic-usage.mdx rename to docs/pages/cldvideoplayer/basic-usage.mdx index 534befec..9b10ba40 100644 --- a/docs/pages/components/cldvideoplayer/basic-usage.mdx +++ b/docs/pages/cldvideoplayer/basic-usage.mdx @@ -1,9 +1,9 @@ import Head from 'next/head'; -import { CldVideoPlayer } from '../../../../next-cloudinary'; +import { CldVideoPlayer } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import Video from '../../../components/Video'; +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; CldVideoPlayer - Next Cloudinary diff --git a/docs/pages/components/cldvideoplayer/configuration.mdx b/docs/pages/cldvideoplayer/configuration.mdx similarity index 99% rename from docs/pages/components/cldvideoplayer/configuration.mdx rename to docs/pages/cldvideoplayer/configuration.mdx index 96447384..cefced70 100644 --- a/docs/pages/components/cldvideoplayer/configuration.mdx +++ b/docs/pages/cldvideoplayer/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldVideoPlayer Configuration - Next Cloudinary diff --git a/docs/pages/components/cldvideoplayer/examples.mdx b/docs/pages/cldvideoplayer/examples.mdx similarity index 96% rename from docs/pages/components/cldvideoplayer/examples.mdx rename to docs/pages/cldvideoplayer/examples.mdx index 6aa40033..f65dd83c 100644 --- a/docs/pages/components/cldvideoplayer/examples.mdx +++ b/docs/pages/cldvideoplayer/examples.mdx @@ -2,10 +2,10 @@ import { useRef } from 'react'; import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldVideoPlayer } from '../../../../next-cloudinary'; +import { CldVideoPlayer } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; export const VideoPlayerWithRef = (props) => { const myPlayerRef = useRef(); diff --git a/docs/pages/components/cldvideoplayer/transformations.mdx b/docs/pages/cldvideoplayer/transformations.mdx similarity index 96% rename from docs/pages/components/cldvideoplayer/transformations.mdx rename to docs/pages/cldvideoplayer/transformations.mdx index e6e06d78..563563bf 100644 --- a/docs/pages/components/cldvideoplayer/transformations.mdx +++ b/docs/pages/cldvideoplayer/transformations.mdx @@ -1,9 +1,9 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldVideoPlayer } from '../../../../next-cloudinary'; +import { CldVideoPlayer } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; CldVideoPlayer Transformations - Next Cloudinary diff --git a/docs/pages/components/_meta.json b/docs/pages/components/_meta.json deleted file mode 100644 index f9d240d6..00000000 --- a/docs/pages/components/_meta.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "cldimage": "", - "cldogimage": "", - "clduploadbutton": "", - "clduploadwidget": "", - "cldvideoplayer": "" -} \ No newline at end of file diff --git a/docs/pages/helpers/getcldimageurl/_meta.json b/docs/pages/getcldimageurl/_meta.json similarity index 100% rename from docs/pages/helpers/getcldimageurl/_meta.json rename to docs/pages/getcldimageurl/_meta.json diff --git a/docs/pages/helpers/getcldimageurl/basic-usage.mdx b/docs/pages/getcldimageurl/basic-usage.mdx similarity index 93% rename from docs/pages/helpers/getcldimageurl/basic-usage.mdx rename to docs/pages/getcldimageurl/basic-usage.mdx index 3282875b..c7300f26 100644 --- a/docs/pages/helpers/getcldimageurl/basic-usage.mdx +++ b/docs/pages/getcldimageurl/basic-usage.mdx @@ -1,10 +1,10 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage, getCldImageUrl } from '../../../../next-cloudinary'; +import { CldImage, getCldImageUrl } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import Video from '../../../components/Video'; +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; getCldImageUrl - Next Cloudinary diff --git a/docs/pages/helpers/getcldimageurl/configuration.mdx b/docs/pages/getcldimageurl/configuration.mdx similarity index 99% rename from docs/pages/helpers/getcldimageurl/configuration.mdx rename to docs/pages/getcldimageurl/configuration.mdx index 7f5592dc..bc88f8c3 100644 --- a/docs/pages/helpers/getcldimageurl/configuration.mdx +++ b/docs/pages/getcldimageurl/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; getCldImageUrl Configuration - Next Cloudinary diff --git a/docs/pages/helpers/getcldimageurl/examples.mdx b/docs/pages/getcldimageurl/examples.mdx similarity index 89% rename from docs/pages/helpers/getcldimageurl/examples.mdx rename to docs/pages/getcldimageurl/examples.mdx index 9465dda5..2f4ed9a8 100644 --- a/docs/pages/helpers/getcldimageurl/examples.mdx +++ b/docs/pages/getcldimageurl/examples.mdx @@ -1,10 +1,10 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage, getCldImageUrl } from '../../../../next-cloudinary'; +import { CldImage, getCldImageUrl } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; getCldImageUrl Examples - Next Cloudinary diff --git a/docs/pages/helpers/getcldogimageurl/_meta.json b/docs/pages/getcldogimageurl/_meta.json similarity index 100% rename from docs/pages/helpers/getcldogimageurl/_meta.json rename to docs/pages/getcldogimageurl/_meta.json diff --git a/docs/pages/helpers/getcldogimageurl/basic-usage.mdx b/docs/pages/getcldogimageurl/basic-usage.mdx similarity index 95% rename from docs/pages/helpers/getcldogimageurl/basic-usage.mdx rename to docs/pages/getcldogimageurl/basic-usage.mdx index 7f5d1fae..cb8b9cdb 100644 --- a/docs/pages/helpers/getcldogimageurl/basic-usage.mdx +++ b/docs/pages/getcldogimageurl/basic-usage.mdx @@ -1,10 +1,10 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage, getCldImageUrl } from '../../../../next-cloudinary'; +import { CldImage, getCldImageUrl } from '../../../next-cloudinary'; -import OgImage from '../../../components/OgImage'; -import Video from '../../../components/Video'; +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; getCldOgImageUrl - Next Cloudinary diff --git a/docs/pages/helpers/getcldogimageurl/configuration.mdx b/docs/pages/getcldogimageurl/configuration.mdx similarity index 96% rename from docs/pages/helpers/getcldogimageurl/configuration.mdx rename to docs/pages/getcldogimageurl/configuration.mdx index 15269d80..2847313a 100644 --- a/docs/pages/helpers/getcldogimageurl/configuration.mdx +++ b/docs/pages/getcldogimageurl/configuration.mdx @@ -1,6 +1,6 @@ import Head from 'next/head'; -import OgImage from '../../../components/OgImage'; +import OgImage from '../../components/OgImage'; getCldOgImageUrl Configuration - Next Cloudinary diff --git a/docs/pages/helpers/getcldogimageurl/examples.mdx b/docs/pages/getcldogimageurl/examples.mdx similarity index 87% rename from docs/pages/helpers/getcldogimageurl/examples.mdx rename to docs/pages/getcldogimageurl/examples.mdx index a3626198..e46a6cfd 100644 --- a/docs/pages/helpers/getcldogimageurl/examples.mdx +++ b/docs/pages/getcldogimageurl/examples.mdx @@ -1,11 +1,11 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import { CldImage, getCldOgImageUrl } from '../../../../next-cloudinary'; -import { OG_IMAGE_WIDTH, OG_IMAGE_HEIGHT } from '../../../../next-cloudinary/src/constants/sizes'; +import { CldImage, getCldOgImageUrl } from '../../../next-cloudinary'; +import { OG_IMAGE_WIDTH, OG_IMAGE_HEIGHT } from '../../../next-cloudinary/src/constants/sizes'; -import OgImage from '../../../components/OgImage'; -import ImageGrid from '../../../components/ImageGrid'; +import OgImage from '../../components/OgImage'; +import ImageGrid from '../../components/ImageGrid'; getCldOgImageUrl Examples - Next Cloudinary diff --git a/docs/pages/guides/_meta.json b/docs/pages/guides/_meta.json deleted file mode 100644 index 47c1e414..00000000 --- a/docs/pages/guides/_meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "nextjs-13": "Next.js 13", - "responsive-images": "Responsive Images" -} \ No newline at end of file diff --git a/docs/pages/helpers/_meta.json b/docs/pages/helpers/_meta.json deleted file mode 100644 index 7592973d..00000000 --- a/docs/pages/helpers/_meta.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "getcldimageurl": "getCldImageUrl", - "getcldogimageurl": "getCldOgImageUrl" -} \ No newline at end of file diff --git a/docs/pages/use-cases/image-overlays.mdx b/docs/pages/image-overlays.mdx similarity index 92% rename from docs/pages/use-cases/image-overlays.mdx rename to docs/pages/image-overlays.mdx index 4076373a..171bdc55 100644 --- a/docs/pages/use-cases/image-overlays.mdx +++ b/docs/pages/image-overlays.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Image Overlays - Next Cloudinary diff --git a/docs/pages/use-cases/image-underlays.mdx b/docs/pages/image-underlays.mdx similarity index 91% rename from docs/pages/use-cases/image-underlays.mdx rename to docs/pages/image-underlays.mdx index 4215bbef..dff4856f 100644 --- a/docs/pages/use-cases/image-underlays.mdx +++ b/docs/pages/image-underlays.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Image Underlays - Next Cloudinary diff --git a/docs/pages/guides/nextjs-13.mdx b/docs/pages/nextjs-13.mdx similarity index 93% rename from docs/pages/guides/nextjs-13.mdx rename to docs/pages/nextjs-13.mdx index 5ee2f0fe..3658abea 100644 --- a/docs/pages/guides/nextjs-13.mdx +++ b/docs/pages/nextjs-13.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Next.js 13 - Next Cloudinary diff --git a/docs/pages/guides/responsive-images.mdx b/docs/pages/responsive-images.mdx similarity index 97% rename from docs/pages/guides/responsive-images.mdx rename to docs/pages/responsive-images.mdx index 52d5668e..dedd9f7d 100644 --- a/docs/pages/guides/responsive-images.mdx +++ b/docs/pages/responsive-images.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Responsive Images - Next Cloudinary diff --git a/docs/pages/use-cases/social-media-card.mdx b/docs/pages/social-media-card.mdx similarity index 96% rename from docs/pages/use-cases/social-media-card.mdx rename to docs/pages/social-media-card.mdx index 40cb8809..6a80ca10 100644 --- a/docs/pages/use-cases/social-media-card.mdx +++ b/docs/pages/social-media-card.mdx @@ -1,9 +1,9 @@ import Head from 'next/head'; import { Callout } from 'nextra-theme-docs'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage, CldOgImage } from '../../../next-cloudinary'; +import { CldImage, CldOgImage } from '../../next-cloudinary'; Social Media Cards - Next Cloudinary diff --git a/docs/pages/use-cases/text-overlays.mdx b/docs/pages/text-overlays.mdx similarity index 94% rename from docs/pages/use-cases/text-overlays.mdx rename to docs/pages/text-overlays.mdx index 7dd300a0..2501c6a6 100644 --- a/docs/pages/use-cases/text-overlays.mdx +++ b/docs/pages/text-overlays.mdx @@ -1,8 +1,8 @@ import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage } from '../../../next-cloudinary'; +import { CldImage } from '../../next-cloudinary'; Text Overlays - Next Cloudinary diff --git a/docs/pages/resources.mdx b/docs/pages/tutorials.mdx similarity index 83% rename from docs/pages/resources.mdx rename to docs/pages/tutorials.mdx index bd3fdd51..a847a2f9 100644 --- a/docs/pages/resources.mdx +++ b/docs/pages/tutorials.mdx @@ -7,17 +7,17 @@ import Video from '../components/Video'; import { CldImage } from '../../next-cloudinary'; - Resources - Next Cloudinary - - + Tutorials - Next Cloudinary + + -# Resources +# Tutorials ## Optimize Images, Responsive Sizing, & AI Cropping in Next.js with Next Cloudinary diff --git a/docs/pages/use-cases/uploading-images-and-videos.mdx b/docs/pages/uploading-images-and-videos.mdx similarity index 92% rename from docs/pages/use-cases/uploading-images-and-videos.mdx rename to docs/pages/uploading-images-and-videos.mdx index cac7afe9..d36b4802 100644 --- a/docs/pages/use-cases/uploading-images-and-videos.mdx +++ b/docs/pages/uploading-images-and-videos.mdx @@ -1,11 +1,11 @@ import { useState } from 'react'; import Head from 'next/head'; -import OgImage from '../../components/OgImage'; +import OgImage from '../components/OgImage'; -import { CldImage, CldUploadButton } from '../../../next-cloudinary'; +import { CldImage, CldUploadButton } from '../../next-cloudinary'; -import styles from '../../styles/Docs.module.scss'; +import styles from '../styles/Docs.module.scss'; Background Removal - Next Cloudinary diff --git a/docs/pages/use-cases/_meta.json b/docs/pages/use-cases/_meta.json deleted file mode 100644 index 1bc51295..00000000 --- a/docs/pages/use-cases/_meta.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "background-removal": "Background Removal", - "image-overlays": "Image Overlays", - "image-underlays": "Image Underlays", - "social-media-card": "Social Media Card", - "text-overlays": "Text Overlays", - "uploading-images-and-videos": "Uploading Images & Videos" -} \ No newline at end of file diff --git a/docs/theme.config.js b/docs/theme.config.js index 2392210a..6935d93f 100644 --- a/docs/theme.config.js +++ b/docs/theme.config.js @@ -36,5 +36,8 @@ export default { - ) + ), + sidebar: { + defaultMenuCollapseLevel: 1 + } } \ No newline at end of file From ef568a791e90ca3d9d012f0a31fc4bc1c146082b Mon Sep 17 00:00:00 2001 From: Colby Fayock Date: Thu, 6 Jul 2023 17:19:28 -0400 Subject: [PATCH 02/10] fixing links --- README.md | 14 +++++++------- docs/pages/background-removal.mdx | 4 ++-- docs/pages/cldimage/basic-usage.mdx | 10 +++++----- docs/pages/cldimage/configuration.mdx | 4 ++-- docs/pages/cldimage/examples.mdx | 2 +- docs/pages/cldogimage/basic-usage.mdx | 10 +++++----- docs/pages/cldogimage/configuration.mdx | 4 ++-- docs/pages/cldogimage/examples.mdx | 2 +- docs/pages/clduploadbutton/basic-usage.mdx | 8 ++++---- docs/pages/clduploadbutton/configuration.mdx | 2 +- docs/pages/clduploadbutton/examples.mdx | 2 +- docs/pages/clduploadwidget/basic-usage.mdx | 6 +++--- docs/pages/clduploadwidget/configuration.mdx | 2 +- docs/pages/clduploadwidget/examples.mdx | 2 +- docs/pages/cldvideoplayer/basic-usage.mdx | 6 +++--- docs/pages/cldvideoplayer/configuration.mdx | 2 +- docs/pages/cldvideoplayer/examples.mdx | 2 +- docs/pages/cldvideoplayer/transformations.mdx | 2 +- docs/pages/getcldimageurl/basic-usage.mdx | 8 ++++---- docs/pages/getcldimageurl/configuration.mdx | 4 ++-- docs/pages/getcldimageurl/examples.mdx | 2 +- docs/pages/getcldogimageurl/basic-usage.mdx | 8 ++++---- docs/pages/getcldogimageurl/configuration.mdx | 6 +++--- docs/pages/getcldogimageurl/examples.mdx | 2 +- docs/pages/image-overlays.mdx | 4 ++-- docs/pages/image-underlays.mdx | 4 ++-- docs/pages/installation.mdx | 14 +++++++------- docs/pages/nextjs-13.mdx | 6 +++--- docs/pages/responsive-images.mdx | 4 ++-- docs/pages/social-media-card.mdx | 4 ++-- docs/pages/text-overlays.mdx | 4 ++-- docs/pages/tutorials.mdx | 4 ++-- docs/pages/uploading-images-and-videos.mdx | 6 +++--- 33 files changed, 82 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 2a03037f..3e5e3fb6 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ import { CldImage } from 'next-cloudinary'; ``` -[Learn more about CldImage on the Next Cloudinary Docs](https://next-cloudinary.spacejelly.dev/components/cldimage/basic-usage) +[Learn more about CldImage on the Next Cloudinary Docs](https://next-cloudinary.spacejelly.dev/cldimage/basic-usage) ### Generating an Social Media Card (Open Graph) @@ -68,15 +68,15 @@ import { CldImage } from 'next-cloudinary'; > Note: The width and height is not required (or recommended) to comply with standardized social media card sizing of a 2:1 aspect ratio. -[Learn more about CldOgImage on the Next Cloudinary Docs](https://next-cloudinary.spacejelly.dev/components/cldogimage/basic-usage) +[Learn more about CldOgImage on the Next Cloudinary Docs](https://next-cloudinary.spacejelly.dev/cldogimage/basic-usage) ### Other Use Cases -* [Background Removal](https://next-cloudinary.spacejelly.dev/use-cases/background-removal) -* [Image Overlays](https://next-cloudinary.spacejelly.dev/use-cases/image-overlays) -* [Image Underlays](https://next-cloudinary.spacejelly.dev/use-cases/image-underlays) -* [Social Media Card](https://next-cloudinary.spacejelly.dev/use-cases/social-media-card) -* [Text Overlays](https://next-cloudinary.spacejelly.dev/use-cases/text-overlays) +* [Background Removal](https://next-cloudinary.spacejelly.dev/background-removal) +* [Image Overlays](https://next-cloudinary.spacejelly.dev/image-overlays) +* [Image Underlays](https://next-cloudinary.spacejelly.dev/image-underlays) +* [Social Media Card](https://next-cloudinary.spacejelly.dev/social-media-card) +* [Text Overlays](https://next-cloudinary.spacejelly.dev/text-overlays) ## ❤️ Community & Support diff --git a/docs/pages/background-removal.mdx b/docs/pages/background-removal.mdx index 26447472..5fe4765c 100644 --- a/docs/pages/background-removal.mdx +++ b/docs/pages/background-removal.mdx @@ -7,7 +7,7 @@ import { CldImage } from '../../next-cloudinary'; Background Removal - Next Cloudinary - + CldImage - Next Cloudinary - + ``` -The `sizes` prop is optional, but recommended for [Responsive Sizing](/guides/responsive-images). +The `sizes` prop is optional, but recommended for [Responsive Sizing](/responsive-images). Using the Next.js 13 App Router? Add the `use client;` directive at the top of your file. @@ -116,5 +116,5 @@ To preserve those transformations, you can apply the `preserveTransformations` p /> ## Learn More about CldImage -* [Configuration](/components/cldimage/configuration) -* [Examples](/components/cldimage/examples) +* [Configuration](/cldimage/configuration) +* [Examples](/cldimage/examples) diff --git a/docs/pages/cldimage/configuration.mdx b/docs/pages/cldimage/configuration.mdx index 283b4373..5626cd8c 100644 --- a/docs/pages/cldimage/configuration.mdx +++ b/docs/pages/cldimage/configuration.mdx @@ -5,7 +5,7 @@ import OgImage from '../../components/OgImage'; CldImage Configuration - Next Cloudinary - + CldImage Examples - Next Cloudinary - + CldOgImage - Next Cloudinary - + - Using the Next.js 13 App Router? This component is only supported in the Pages directory. Try the [getCldOgImageUrl](/helpers/getcldogimageurl/basic-usage) helper inside of your metadata configuration. + Using the Next.js 13 App Router? This component is only supported in the Pages directory. Try the [getCldOgImageUrl](/getcldogimageurl/basic-usage) helper inside of your metadata configuration. ## Basic Usage @@ -74,7 +74,7 @@ The resulting HTML will be applied to the Head of the document: You can further take advantage of Cloudinary features like background removal and overlays by adding additional props. -The CldOgImage component uses the same API as [CldImage](/components/cldimage/configuration), meaning you can use the same transformations and effects. +The CldOgImage component uses the same API as [CldImage](/cldimage/configuration), meaning you can use the same transformations and effects. ```jsx ## Learn More about CldOgImage -* [Configuration](/components/cldogimage/configuration) -* [Examples](/components/cldogimage/examples) \ No newline at end of file +* [Configuration](/cldogimage/configuration) +* [Examples](/cldogimage/examples) \ No newline at end of file diff --git a/docs/pages/cldogimage/configuration.mdx b/docs/pages/cldogimage/configuration.mdx index 74a99c82..f01f3a18 100644 --- a/docs/pages/cldogimage/configuration.mdx +++ b/docs/pages/cldogimage/configuration.mdx @@ -6,7 +6,7 @@ import OgImage from '../../components/OgImage'; CldOgImage Configuration - Next Cloudinary - + CldOgImage Examples - Next Cloudinary - + CldUploadButton - Next Cloudinary - + { ## Learn More about CldUploadButton -* [Configuration](/components/clduploadbutton/configuration) -* [Examples](/components/clduploadbutton/examples) \ No newline at end of file +* [Configuration](/clduploadbutton/configuration) +* [Examples](/clduploadbutton/examples) \ No newline at end of file diff --git a/docs/pages/clduploadbutton/configuration.mdx b/docs/pages/clduploadbutton/configuration.mdx index 9ce7f017..527bef7e 100644 --- a/docs/pages/clduploadbutton/configuration.mdx +++ b/docs/pages/clduploadbutton/configuration.mdx @@ -5,7 +5,7 @@ import OgImage from '../../components/OgImage'; CldUploadButton Configuration - Next Cloudinary - + CldUploadButton Examples - Next Cloudinary - + CldUploadWidget - Next Cloudinary - + { ## Learn More about CldUploadWidget -* [Configuration](/components/clduploadwidget/configuration) -* [Examples](/components/clduploadwidget/examples) \ No newline at end of file +* [Configuration](/clduploadwidget/configuration) +* [Examples](/clduploadwidget/examples) \ No newline at end of file diff --git a/docs/pages/clduploadwidget/configuration.mdx b/docs/pages/clduploadwidget/configuration.mdx index 4e71c384..13ae1521 100644 --- a/docs/pages/clduploadwidget/configuration.mdx +++ b/docs/pages/clduploadwidget/configuration.mdx @@ -5,7 +5,7 @@ import OgImage from '../../components/OgImage'; CldUploadWidget Configuration - Next Cloudinary - + CldUploadWidget Examples - Next Cloudinary - + CldVideoPlayer - Next Cloudinary - + CldVideoPlayer Configuration - Next Cloudinary - + { CldVideoPlayer Examples - Next Cloudinary - + CldVideoPlayer Transformations - Next Cloudinary - + getCldImageUrl - Next Cloudinary - + - getCldImageUrl uses the same API as [CldImage](/components/cldimage/basic-usage). They're both wrappers around [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader) which provide a simpler way to generate images and Cloudinary URLs. + getCldImageUrl uses the same API as [CldImage](/cldimage/basic-usage). They're both wrappers around [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader) which provide a simpler way to generate images and Cloudinary URLs. ## Transformations @@ -84,5 +84,5 @@ const url = getCldImageUrl({ /> ## Learn More about getCldImageUrl -* [Configuration](/helpers/getcldimageurl/configuration) -* [Examples](/helpers/getcldimageurl/examples) \ No newline at end of file +* [Configuration](/getcldimageurl/configuration) +* [Examples](/getcldimageurl/examples) \ No newline at end of file diff --git a/docs/pages/getcldimageurl/configuration.mdx b/docs/pages/getcldimageurl/configuration.mdx index bc88f8c3..133533f6 100644 --- a/docs/pages/getcldimageurl/configuration.mdx +++ b/docs/pages/getcldimageurl/configuration.mdx @@ -5,7 +5,7 @@ import OgImage from '../../components/OgImage'; getCldImageUrl Configuration - Next Cloudinary - + getCldImageUrl Examples - Next Cloudinary - + getCldOgImageUrl - Next Cloudinary - + getCldOgImageUrl Configuration - Next Cloudinary - + getCldOgImageUrl Examples - Next Cloudinary - + Image Overlays - Next Cloudinary - + Image Underlays - Next Cloudinary - + - + Responsive Images - Next Cloudinary - + Social Media Cards - Next Cloudinary - + Text Overlays - Next Cloudinary - + -Follow along with [Colby Fayock](https://twitter.com/colbyfayock) as he walkts through using the [CldImage](/components/cldimage/basic-usage) with Next Cloudinary. +Follow along with [Colby Fayock](https://twitter.com/colbyfayock) as he walkts through using the [CldImage](/cldimage/basic-usage) with Next Cloudinary. ## Getting Started with Next Cloudinary @@ -35,4 +35,4 @@ Follow along with [Colby Fayock](https://twitter.com/colbyfayock) as he walkts t url="https://www.youtube.com/watch?v=vQ2MeJgJ1-8" /> -Follow along with [Jason Lengstorf](https://twitter.com/jlengstorf) and [Colby Fayock](https://twitter.com/colbyfayock) as they get started using the [CldImage](/components/cldimage/basic-usage) with Next Cloudinary. \ No newline at end of file +Follow along with [Jason Lengstorf](https://twitter.com/jlengstorf) and [Colby Fayock](https://twitter.com/colbyfayock) as they get started using the [CldImage](/cldimage/basic-usage) with Next Cloudinary. \ No newline at end of file diff --git a/docs/pages/uploading-images-and-videos.mdx b/docs/pages/uploading-images-and-videos.mdx index d36b4802..d6fb0174 100644 --- a/docs/pages/uploading-images-and-videos.mdx +++ b/docs/pages/uploading-images-and-videos.mdx @@ -10,7 +10,7 @@ import styles from '../styles/Docs.module.scss'; Background Removal - Next Cloudinary - + Date: Thu, 6 Jul 2023 21:53:34 -0400 Subject: [PATCH 03/10] re-adding guides as a nested directory, structure, link fixes --- docs/next.config.js | 24 +++++++++ docs/package.json | 2 +- docs/pages/_meta.json | 13 +---- docs/pages/cldimage/basic-usage.mdx | 8 +-- docs/pages/cldogimage/basic-usage.mdx | 6 +-- docs/pages/cldogimage/configuration.mdx | 8 +-- docs/pages/clduploadbutton/basic-usage.mdx | 6 +-- docs/pages/clduploadwidget/basic-usage.mdx | 4 +- docs/pages/cldvideoplayer/basic-usage.mdx | 4 +- docs/pages/getcldimageurl/basic-usage.mdx | 2 +- docs/pages/getcldimageurl/configuration.mdx | 2 +- docs/pages/guides/_meta.json | 10 ++++ .../pages/{ => guides}/background-removal.mdx | 15 +++--- docs/pages/guides/image-optimization.mdx | 54 +++++++++++++++++++ docs/pages/{ => guides}/image-overlays.mdx | 8 +-- docs/pages/{ => guides}/image-underlays.mdx | 8 +-- docs/pages/{ => guides}/responsive-images.mdx | 8 +-- docs/pages/{ => guides}/social-media-card.mdx | 8 +-- docs/pages/{ => guides}/text-overlays.mdx | 8 +-- .../uploading-images-and-videos.mdx | 12 ++--- docs/pages/installation.mdx | 10 ++-- docs/pages/nextjs-13.mdx | 2 +- docs/pages/tutorials.mdx | 38 ------------- 23 files changed, 149 insertions(+), 111 deletions(-) create mode 100644 docs/pages/guides/_meta.json rename docs/pages/{ => guides}/background-removal.mdx (54%) create mode 100644 docs/pages/guides/image-optimization.mdx rename docs/pages/{ => guides}/image-overlays.mdx (86%) rename docs/pages/{ => guides}/image-underlays.mdx (83%) rename docs/pages/{ => guides}/responsive-images.mdx (92%) rename docs/pages/{ => guides}/social-media-card.mdx (92%) rename docs/pages/{ => guides}/text-overlays.mdx (88%) rename docs/pages/{ => guides}/uploading-images-and-videos.mdx (80%) delete mode 100644 docs/pages/tutorials.mdx diff --git a/docs/next.config.js b/docs/next.config.js index d9db0147..3a96153b 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -8,5 +8,29 @@ module.exports = withNextra({ ASSETS_DIRECTORY: process.env.NEXT_PUBLIC_CLOUDINARY_ASSETS_DIRECTORY || 'assets', IMAGES_DIRECTORY: process.env.NEXT_PUBLIC_CLOUDINARY_IMAGES_DIRECTORY || 'images', VIDEOS_DIRECTORY: process.env.NEXT_PUBLIC_CLOUDINARY_VIDEOS_DIRECTORY || 'videos' + }, + async redirects() { + return [ + { + source: '/components/:path(.*)', + destination: '/:path*', + permanent: false, + }, + { + source: '/helpers/:path(.*)', + destination: '/:path*', + permanent: false, + }, + { + source: '/use-cases/:path(.*)', + destination: '/guides/:path*', + permanent: false, + }, + { + source: '/resources', + destination: '/', + permanent: false, + }, + ]; } }); \ No newline at end of file diff --git a/docs/package.json b/docs/package.json index 6defd6e7..94351b88 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "@vercel/analytics": "^1.0.1", "cloudinary": "^1.36.4", "next": "^13.4.1", - "nextra": "^2.5.0", + "nextra": "^2.8.0", "nextra-theme-docs": "^2.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json index 668c0f30..f028e03d 100644 --- a/docs/pages/_meta.json +++ b/docs/pages/_meta.json @@ -17,20 +17,9 @@ }, "getcldimageurl": "getCldImageUrl", "getcldogimageurl": "getCldOgImageUrl", - "Guides": { - "type": "separator", - "title": "Guides" - }, - "background-removal": "Background Removal", - "image-overlays": "Image Overlays", - "image-underlays": "Image Underlays", - "responsive-images": "Responsive Images", - "social-media-card": "Social Media Card", - "text-overlays": "Text Overlays", - "uploading-images-and-videos": "Uploading Images & Videos", "Resources": { "type": "separator", "title": "Resources" }, - "tutorials": "Tutorials" + "guides": "Guides" } \ No newline at end of file diff --git a/docs/pages/cldimage/basic-usage.mdx b/docs/pages/cldimage/basic-usage.mdx index 3f4b3c34..93190ef6 100644 --- a/docs/pages/cldimage/basic-usage.mdx +++ b/docs/pages/cldimage/basic-usage.mdx @@ -24,7 +24,7 @@ The CldImage component provides an easy way to deliver images from Cloudinary wi With it comes access to more advanced features like dynamic cropping, background removal, overlays, and other Cloudinary transformations. -As CldImage is a wrapper around the Next.js Image component, you also gain access to all built-in Image component features will work out-of-the-box like [Responsive Sizing](/responsive-images). +As CldImage is a wrapper around the Next.js Image component, you also gain access to all built-in Image component features will work out-of-the-box like [Responsive Sizing](/guides/responsive-images). ## Basic Usage @@ -42,7 +42,7 @@ import { CldImage } from 'next-cloudinary'; /> ``` -The `sizes` prop is optional, but recommended for [Responsive Sizing](/responsive-images). +The `sizes` prop is optional, but recommended for [Responsive Sizing](/guides/responsive-images). Using the Next.js 13 App Router? Add the `use client;` directive at the top of your file. @@ -116,5 +116,5 @@ To preserve those transformations, you can apply the `preserveTransformations` p /> ## Learn More about CldImage -* [Configuration](/cldimage/configuration) -* [Examples](/cldimage/examples) +* [Configuration](/components/cldimage/configuration) +* [Examples](/components/cldimage/examples) diff --git a/docs/pages/cldogimage/basic-usage.mdx b/docs/pages/cldogimage/basic-usage.mdx index 72bc514c..98f8bddf 100644 --- a/docs/pages/cldogimage/basic-usage.mdx +++ b/docs/pages/cldogimage/basic-usage.mdx @@ -74,7 +74,7 @@ The resulting HTML will be applied to the Head of the document: You can further take advantage of Cloudinary features like background removal and overlays by adding additional props. -The CldOgImage component uses the same API as [CldImage](/cldimage/configuration), meaning you can use the same transformations and effects. +The CldOgImage component uses the same API as [CldImage](/components/cldimage/configuration), meaning you can use the same transformations and effects. ```jsx ## Learn More about CldOgImage -* [Configuration](/cldogimage/configuration) -* [Examples](/cldogimage/examples) \ No newline at end of file +* [Configuration](/components/cldogimage/configuration) +* [Examples](/components/cldogimage/examples) \ No newline at end of file diff --git a/docs/pages/cldogimage/configuration.mdx b/docs/pages/cldogimage/configuration.mdx index f01f3a18..4992a204 100644 --- a/docs/pages/cldogimage/configuration.mdx +++ b/docs/pages/cldogimage/configuration.mdx @@ -18,7 +18,7 @@ import OgImage from '../../components/OgImage'; The CldOgImage component is built on top of the same APIs used for CldImage, giving you the ability to apply the same transformations to your social cards as you can any image. -See [CldImage](/cldimage/configuration) for all image transformations. +See [CldImage](/components/cldimage/configuration) for all image transformations. ## General Props @@ -53,11 +53,7 @@ However, Twitter does support webp, so we're able to customize the format using ## Excluding Tags -The `summary_large_image` Twitter card type requires the inclusion of a `twitter:title` card. Because of this, the component includes it by default for simplified use along with a prop to change the value. - - - [Learn more about summary_large_image](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image) - +The [Summary Card with Large Image](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image) (`summary_large_image`) Twitter card type requires the inclusion of a `twitter:title` card. Because of this, the component includes it by default for simplified use along with a prop to change the value. To exclude this tag to manage it on your own, use the `excludeTags` prop: diff --git a/docs/pages/clduploadbutton/basic-usage.mdx b/docs/pages/clduploadbutton/basic-usage.mdx index 435770c2..c2d7bece 100644 --- a/docs/pages/clduploadbutton/basic-usage.mdx +++ b/docs/pages/clduploadbutton/basic-usage.mdx @@ -23,7 +23,7 @@ import styles from '../../styles/Docs.module.scss'; The CldUploadButton creates a button element that uses an instance of the [Cloudinary Upload Widget](https://cloudinary.com/documentation/upload_widget) to give you an easy way to add upload capabilities to your Next.js app. -The CldUploadButton component wraps the [CldUploadWidget](/clduploadwidget/basic-usage) component providing a pre-defined UI (a button). The same concepts apply, including having the option of using Signed or Unsigned uploads. +The CldUploadButton component wraps the [CldUploadWidget](/components/clduploadwidget/basic-usage) component providing a pre-defined UI (a button). The same concepts apply, including having the option of using Signed or Unsigned uploads. ## Basic Usage @@ -59,5 +59,5 @@ export const UnsignedUpload = () => { ## Learn More about CldUploadButton -* [Configuration](/clduploadbutton/configuration) -* [Examples](/clduploadbutton/examples) \ No newline at end of file +* [Configuration](/components/clduploadbutton/configuration) +* [Examples](/components/clduploadbutton/examples) \ No newline at end of file diff --git a/docs/pages/clduploadwidget/basic-usage.mdx b/docs/pages/clduploadwidget/basic-usage.mdx index f877d1d4..07ee9ef8 100644 --- a/docs/pages/clduploadwidget/basic-usage.mdx +++ b/docs/pages/clduploadwidget/basic-usage.mdx @@ -181,5 +181,5 @@ export const SignedUpload = () => { ## Learn More about CldUploadWidget -* [Configuration](/clduploadwidget/configuration) -* [Examples](/clduploadwidget/examples) \ No newline at end of file +* [Configuration](/components/clduploadwidget/configuration) +* [Examples](/components/clduploadwidget/examples) \ No newline at end of file diff --git a/docs/pages/cldvideoplayer/basic-usage.mdx b/docs/pages/cldvideoplayer/basic-usage.mdx index 7fe4cf82..04bd39da 100644 --- a/docs/pages/cldvideoplayer/basic-usage.mdx +++ b/docs/pages/cldvideoplayer/basic-usage.mdx @@ -89,5 +89,5 @@ Or listening to player events for advanced interactions with: ``` ## Learn More about CldVideoPlayer -* [Configuration](/cldvideoplayer/configuration) -* [Examples](/cldvideoplayer/examples) \ No newline at end of file +* [Configuration](/components/cldvideoplayer/configuration) +* [Examples](/components/cldvideoplayer/examples) \ No newline at end of file diff --git a/docs/pages/getcldimageurl/basic-usage.mdx b/docs/pages/getcldimageurl/basic-usage.mdx index 6a049457..2bbdd4b3 100644 --- a/docs/pages/getcldimageurl/basic-usage.mdx +++ b/docs/pages/getcldimageurl/basic-usage.mdx @@ -49,7 +49,7 @@ const url = getCldImageUrl({ /> - getCldImageUrl uses the same API as [CldImage](/cldimage/basic-usage). They're both wrappers around [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader) which provide a simpler way to generate images and Cloudinary URLs. + getCldImageUrl uses the same API as [CldImage](/components/cldimage/basic-usage). They're both wrappers around [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader) which provide a simpler way to generate images and Cloudinary URLs. ## Transformations diff --git a/docs/pages/getcldimageurl/configuration.mdx b/docs/pages/getcldimageurl/configuration.mdx index 133533f6..f7557f7b 100644 --- a/docs/pages/getcldimageurl/configuration.mdx +++ b/docs/pages/getcldimageurl/configuration.mdx @@ -15,7 +15,7 @@ import OgImage from '../../components/OgImage'; # getCldImageUrl Configuration -Configuration for getCldImageUrl is the same as [CldImage](/cldimage/configuration), which both use the same underlying API [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader). +Configuration for getCldImageUrl is the same as [CldImage](/components/cldimage/configuration), which both use the same underlying API [@cloudinary-util/url-loader](https://github.com/colbyfayock/cloudinary-util/tree/main/packages/url-loader). ## General Options diff --git a/docs/pages/guides/_meta.json b/docs/pages/guides/_meta.json new file mode 100644 index 00000000..787fd9c6 --- /dev/null +++ b/docs/pages/guides/_meta.json @@ -0,0 +1,10 @@ +{ + "background-removal": "Background Removal", + "image-optimization": "Image Optimization", + "image-overlays": "Image Overlays", + "image-underlays": "Image Underlays", + "responsive-images": "Responsive Images", + "social-media-card": "Social Media Card", + "text-overlays": "Text Overlays", + "uploading-images-and-videos": "Uploading Images & Videos" +} \ No newline at end of file diff --git a/docs/pages/background-removal.mdx b/docs/pages/guides/background-removal.mdx similarity index 54% rename from docs/pages/background-removal.mdx rename to docs/pages/guides/background-removal.mdx index 5fe4765c..3721289a 100644 --- a/docs/pages/background-removal.mdx +++ b/docs/pages/guides/background-removal.mdx @@ -1,13 +1,14 @@ import Head from 'next/head'; +import { Callout } from 'nextra-theme-docs'; -import OgImage from '../components/OgImage'; +import OgImage from '../../components/OgImage'; -import { CldImage } from '../../next-cloudinary'; +import { CldImage } from '../../../next-cloudinary'; Background Removal - Next Cloudinary - + + Removing backgrounds require enabling the [Cloudinary AI Background Removal Add-On](https://cloudinary.com/documentation/cloudinary_ai_background_removal_addon) which includes a free tier for getting started. + ## Example @@ -46,4 +49,4 @@ import { CldImage } from 'next-cloudinary'; ``` ## Learn More -* [CldImage Configuration](/cldimage/configuration) \ No newline at end of file +* [CldImage Configuration](/components/cldimage/configuration) \ No newline at end of file diff --git a/docs/pages/guides/image-optimization.mdx b/docs/pages/guides/image-optimization.mdx new file mode 100644 index 00000000..b441b018 --- /dev/null +++ b/docs/pages/guides/image-optimization.mdx @@ -0,0 +1,54 @@ +import Head from 'next/head'; +import { Callout } from 'nextra-theme-docs'; + +import OgImage from '../../components/OgImage'; +import Video from '../../components/Video'; + +import { CldImage } from '../../../next-cloudinary'; + + + Image Optimization - Next Cloudinary + + + + + + +# Optimizing Images in Next.js + +Automatically optimize images using the CldImage component. By default, CldImage opts you in to automatic optimization including delivering the most optimal format for the browser (WebP, AVIF). + +You can further optimize delivery by using [responsive sizing](/guides/responsive-images) by using the `sizes` prop. + +