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

Add Steps component to decap-cms.mdx #8080

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
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
16 changes: 10 additions & 6 deletions src/content/docs/en/guides/cms/decap-cms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ stub: true
service: Decap CMS
i18nReady: true
---
import Grid from '~/components/FluidGrid.astro'
import Card from '~/components/ShowcaseCard.astro'
import { FileTree } from '@astrojs/starlight/components'
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 { FileTree } from '@astrojs/starlight/components';
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';

[Decap CMS](https://www.decapcms.org/) (formerly Netlify CMS) is an open-source, Git-based content management system.

Expand Down Expand Up @@ -55,13 +56,16 @@ There are two options for adding Decap to Astro:

## Configuration

<Steps>
1. Create a static admin folder at `public/admin/`
2. Add `config.yml` to `public/admin/`:

2. Add `config.yml` to `public/admin/`:
<FileTree>
- public
- admin
- config.yml
</FileTree>

3. To add support for content collections, configure each schema in `config.yml`. The following example configures a `blog` collection, defining a `label` for each entry's frontmatter property:
```yml title="/public/admin/config.yml"
collections:
Expand All @@ -79,7 +83,6 @@ There are two options for adding Decap to Astro:
```

4. Add the `admin` route for your React app. This file can be either `public/admin/index.html` alongside your `config.yml` or, if you prefer to use an Astro route, `src/pages/admin.astro`.

<FileTree>
- public
- admin
Expand Down Expand Up @@ -107,6 +110,7 @@ There are two options for adding Decap to Astro:
media_folder: "src/assets/images" # Location where files will be stored in the repo
public_folder: "src/assets/images" # The src attribute for uploaded media
```
</Steps>

See the [the Decap CMS configuration documentation](https://decapcms.org/docs/configure-decap-cms/) for full instructions and options.

Expand Down
Loading