|
1 | 1 | --- |
2 | 2 | title: Get Started |
| 3 | +description: Learn how to get started with Cloudinary & Svelte! |
3 | 4 | --- |
4 | 5 |
|
5 | | -Svelte Cloudinary works with both Svelte and SvelteKit, you can get started by installing the package: |
| 6 | +import { |
| 7 | + Tabs, |
| 8 | + TabItem, |
| 9 | + Steps, |
| 10 | + LinkCard, |
| 11 | + CardGrid, |
| 12 | +} from '@astrojs/starlight/components'; |
6 | 13 |
|
7 | | -```bash title="Install dependencies..." |
8 | | -npm install svelte-cloudinary -D |
9 | | -``` |
| 14 | +<Steps> |
| 15 | + 1. Install Svelte Cloudinary. We support Svelte v3, v4, v5 (compatibility mode), and SvelteKit! |
10 | 16 |
|
11 | | -Then you'll need to set your [cloud name](https://cloudinary.com/documentation/finding_your_credentials_tutorial), which can be set wih the `VITE_CLOUDINARY_CLOUD_NAME` environment variable if you're using Vite or SvelteKit. You can read more about [configuring svelte-cloudinary here](/config), including how to use other bundlers. |
| 17 | + <Tabs> |
| 18 | + <TabItem label="npm"> |
| 19 | + ```bash |
| 20 | + npm install svelte-cloudinary -D |
| 21 | + ``` |
| 22 | + </TabItem> |
| 23 | + <TabItem label="pnpm"> |
| 24 | + ```bash |
| 25 | + pnpm add svelte-cloudinary -D |
| 26 | + ``` |
| 27 | + </TabItem> |
| 28 | + <TabItem label="yarn"> |
| 29 | + ```bash |
| 30 | + yarn add svelte-cloudinary |
| 31 | + ``` |
| 32 | + </TabItem> |
| 33 | + </Tabs> |
| 34 | + |
| 35 | + 2. Configure svelte-cloudinary |
| 36 | + |
| 37 | + When using Vite/SvelteKit all you need to do is set the `VITE_CLOUDINARY_CLOUD_NAME` environment variable to your [cloud name](https://cloudinary.com/documentation/finding_your_credentials_tutorial). If you don't have a Cloudinary account you can [create one for free here](https://cloudinary.com/users/register_free?utm_campaign=devx_sveltecloudinary&utm_medium=referral&utm_source=sveltecloudinary)! If you're not using Vite/SvelteKit, or want to learn more about configuration, you can [read the guide here](/config). |
| 38 | + |
| 39 | + ```bash title=".env" |
| 40 | + # https://cloudinary.com/documentation/finding_your_credentials_tutorial |
| 41 | + VITE_CLOUDINARY_CLOUD_NAME="<Your Cloud Name>" |
| 42 | + ``` |
| 43 | + |
| 44 | + 3. Start using Cloudinary! |
| 45 | + |
| 46 | + <CardGrid> |
| 47 | + <LinkCard |
| 48 | + title="Images" |
| 49 | + description="Use Cloudinary to power your images, includes powerful options for resizing, transformations, generative AI, and more." |
| 50 | + href="/components/image" /> |
| 51 | + <LinkCard |
| 52 | + title="Open Graph tags" |
| 53 | + description="Svelte Cloudinary makes it easy to create your open graph tags and images with Cloudinary." |
| 54 | + href="/components/og-image" /> |
| 55 | + <LinkCard |
| 56 | + title="Upload Widget" |
| 57 | + description="Allow users to easily upload images and then serve them in your app with Cloudinary." |
| 58 | + href="/components/upload-widget" /> |
| 59 | + <LinkCard |
| 60 | + title="Video Player" |
| 61 | + description="Play videos uploaded to your Cloudinary account with our built-in video player." |
| 62 | + href="/components/video-player" /> |
| 63 | + </CardGrid> |
| 64 | + |
| 65 | +</Steps> |
0 commit comments