Skip to content

Commit

Permalink
Revert "Add Steps component to cosmic.mdx (#8082)"
Browse files Browse the repository at this point in the history
This reverts commit d42c225.
  • Loading branch information
yanthomasdev authored May 2, 2024
1 parent d42c225 commit a522315
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/content/docs/en/guides/cms/cosmic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ type: cms
service: Cosmic
i18nReady: true
---
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
import Grid from '~/components/FluidGrid.astro';
import Card from '~/components/ShowcaseCard.astro';
import { Steps } from '@astrojs/starlight/components';
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'
import Grid from '~/components/FluidGrid.astro'
import Card from '~/components/ShowcaseCard.astro'


[Cosmic](https://www.cosmicjs.com/) is a [headless CMS](https://www.cosmicjs.com/headless-cms) that provides an admin dashboard to manage content and an API that can integrate with a diverse range of frontend tools.

Expand All @@ -20,6 +20,7 @@ import { Steps } from '@astrojs/starlight/components';

## Integrating Cosmic with Astro


### Installing Necessary Dependencies

Add the [Cosmic JavaScript SDK](https://www.npmjs.com/package/@cosmicjs/sdk) to fetch data from your Cosmic Bucket.
Expand Down Expand Up @@ -53,7 +54,6 @@ PUBLIC_COSMIC_READ_KEY=YOUR_READ_KEY

## Fetching Data from Cosmic

<Steps>
1. Create a new file called `cosmic.js`. Place this file inside of the `src/lib` folder in your project.

2. Add the following code to fetch data from Cosmic using the SDK and your environment variables.
Expand Down Expand Up @@ -111,7 +111,6 @@ PUBLIC_COSMIC_READ_KEY=YOUR_READ_KEY
```

[View source code for the Card component](https://github.com/cosmicjs/simple-astro-blog/blob/main/src/components/Card.astro)
</Steps>

## Building a Blog with Astro and Cosmic

Expand Down Expand Up @@ -231,25 +230,17 @@ Under "Settings" > "webhooks", add the URL endpoint from Vercel and select the O

To set up a webhook in Netlify:

<Steps>
1. Go to your site dashboard and click on **Build & deploy**.

2. Under the **Continuous Deployment** tab, find the **Build hooks** section and click on **Add build hook**.

3. Provide a name for your webhook and select the branch you want to trigger the build on. Click on **Save** and copy the generated URL.
</Steps>

##### Vercel

To set up a webhook in Vercel:

<Steps>
1. Go to your project dashboard and click on **Settings**.

2. Under the **Git** tab, find the **Deploy Hooks** section.

3. Provide a name for your webhook and the branch you want to trigger the build on. Click **Add** and copy the generated URL.
</Steps>

## Themes

Expand Down

0 comments on commit a522315

Please sign in to comment.