"vscode:/vscode.git/clone" did not exist on "0e0d6c164d9a2928a083f08260d6e10431487a2b"
README.md 2.68 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
# Adding a Blog Post

Follow these steps to publish a new blog post on the Dynamo docs site.

## Step 1: Write the Blog Post

Create a new Markdown file in this folder (`docs/blogs/`):

```text
docs/blogs/my-post-slug.md
```

Use kebab-case for the filename. The filename becomes the URL slug
14
(e.g., `my-post-slug.md` serves at `/dynamo/dev/blog/my-post-slug`).
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

Add frontmatter at the top of the file:

```yaml
---
title: Your Blog Post Title
description: A one-sentence summary shown in search results and social previews.
---
```

## Step 2: Add the Post to Navigation

Open `docs/versions/dev.yml` and add a page entry under the **Blog** section:

```yaml
  - section: Blog
31
32
    path: ../blogs/index.mdx
    slug: blog
33
34
35
36
37
    contents:
      - page: Your Blog Post Title
        path: ../blogs/my-post-slug.md
```

38
Each new post gets a `- page:` entry in the `contents` list. The `page`
39
40
41
42
43
44
45
46
47
48
value is the display name in the sidebar; the `path` points to your file.

## Step 3: Add a Card to the Landing Page

Open `docs/blogs/index.mdx` and add a `<Card>` inside the existing `<CardGroup>`:

```mdx
<Card
  title="Your Blog Post Title"
  icon="regular newspaper"
49
  href="/dynamo/dev/blog/my-post-slug"
50
51
52
53
54
55
56
57
58
59
60
>
  A brief summary of what this post covers (1-2 sentences).
</Card>
```

### Card Fields

| Field  | Required | Description                                              |
|--------|----------|----------------------------------------------------------|
| title  | Yes      | Post title displayed on the card                         |
| icon   | No       | Font Awesome icon class (e.g., `regular bolt`)           |
61
| href   | Yes      | URL path starting with `/dynamo/dev/blog/`               |
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
| (body) | Yes      | Short summary text inside the Card tags                  |

The `<CardGroup cols={2}>` wrapper is already in `index.mdx`. Just add your
`<Card>` inside it.

Browse icons at https://fontawesome.com/icons (Free tier).

## Step 4 (Optional): Add the Post to the Navbar Dropdown

Open `docs/docs.yml` and add a link under the Blog dropdown in `navbar-links`:

```yaml
navbar-links:
  - type: dropdown
    text: Blog
    links:
      - text: All Posts
79
        href: /dynamo/dev/blog
80
      - text: Your Blog Post Title
81
        href: /dynamo/dev/blog/my-post-slug
82
83
84
85
86
87
88
89
90
91
92
93
```

Only add featured/recent posts here. The dropdown should stay short (5 items max).
Posts that are no longer featured can be removed from the dropdown while remaining
accessible from the landing page and sidebar.

## Quick Checklist

- [ ] Blog post `.md` file created in `docs/blogs/`
- [ ] Page entry added to `docs/versions/dev.yml` under the Blog section
- [ ] Card added to `docs/blogs/index.mdx`
- [ ] (Optional) Link added to the Blog dropdown in `docs/docs.yml`