---
name: add-feed-post
description: Add a new Feed post (short announcement / social-style update) to the Data Controller marketing site. Use when the user wants to publish a Feed post, add a /feed/ entry, or create a short announcement that also goes out via RSS.
---

# Add a Feed post

The **Feed** section (`/feed/`) is for short announcements and social-media style updates - things that don't warrant a full `content/blog/` article but are still worth publishing and syndicating via RSS. Feed posts work exactly like blog posts (one markdown file per post, in its own directory) but live under `content/feed/` and publish under `/feed/`.

Both Blog and Feed share a single combined RSS feed at `/rss.xml` (via `gatsby-plugin-feed` in `gatsby-config.js`), so a new Feed post appears in RSS automatically on the next build - no extra config.

## Steps

### 1. Create the post directory

Create a folder under `content/feed/`, named after the post slug (this becomes the URL):

```
content/feed/my-new-announcement/index.md
```

Pick a short, hyphenated, lowercase slug.

### 2. Write the front matter + content

```md
---
title: 'My New Announcement'
description: A one or two sentence summary used for SEO and RSS.
date: '2024-06-01 09:00:00'
author: 'Your Name'
authorLink: https://www.linkedin.com/in/yourprofile/
tags:
  - Announcements
---

Your announcement content goes here, written in regular Markdown.
```

Front matter fields:

| Field         | Required | Notes                                                                 |
| ------------- | -------- | --------------------------------------------------------------------- |
| `title`       | Yes      | Used on the page, in the sidebar and in the RSS item.                 |
| `description` | Yes      | Short summary for SEO meta tags and the RSS item description.         |
| `date`        | Yes      | Format `'YYYY-MM-DD HH:MM:SS'`. Controls sort order and the archive.  |
| `author`      | Yes      | Displayed under the post title.                                       |
| `authorLink`  | No       | If set, the author name links out (e.g. to a LinkedIn profile).       |
| `tags`        | Yes      | One or more tags. Drives the sidebar category list and RSS category.  |
| `previewImg`  | No       | Relative path to an image in the same folder (e.g. `'./cover.png'`). The template renders this image on the post page automatically - do NOT also embed the same image in the markdown body. |

Use regular dashes (`-`) in content, not em-dashes.

If the post is adapted from source copy the user provided (e.g. a LinkedIn post), paste the original text into an HTML comment (verbatim, except strip the literal `hashtag` prefix that LinkedIn sometimes adds before `#tags`, e.g. `hashtag#sas` -> `#sas`) (`<!-- ... -->`) at the bottom of the markdown file, labelled (e.g. `Source LinkedIn post:`). This preserves the original - including hashtags and checkmarks that get dropped/adapted in the site version - for future reuse.

**Important:** when editing an existing feed post that has a `Source LinkedIn post:` comment, ALWAYS update the LinkedIn version too, so the overall message stays consistent (same points, same claims, same ordering of any lists). Wording does not need to be identical, and formatting will differ: the article uses Markdown, while LinkedIn is plain text with `✓`-style bullets, hashtags, and a comment-based CTA (see `.agents/docs/linkedin.md`).

Every new feed post should include an image (a `previewImg` cover) - and its full image-generation prompt must be recorded in the same HTML comment block, labelled (e.g. `Image prompt:`), so it can be tweaked and regenerated later. If the user has not provided or asked for an image, propose one (theme, style and a draft prompt) and add the `Image prompt:` comment even if the image itself is not yet generated.

### 3. Add images (optional)

If you set `previewImg` or reference images in the body, place the image files in the same post directory and reference them with a relative path.

### 4. Build / preview

```shell
npm run develop
```

The post will be available at `/my-new-announcement/` and will appear on the `/feed/` listing page, in the site search index, and in `/rss.xml` alongside blog posts.

## How Feed differs from Blog

| Aspect            | Blog                          | Feed                              |
| ----------------- | ----------------------------- | --------------------------------- |
| Content directory | `content/blog/`               | `content/feed/`                   |
| Listing page      | `/blog/`                      | `/feed/`                          |
| Year archive      | `/{year}/`                    | `/feed/{year}/`                   |
| Category page     | `/category/{tag}/`            | `/feed/category/{tag}/`           |
| Template          | `src/templates/blog-post.tsx`, `src/templates/blog-list.tsx` | `src/templates/feed-post.tsx`, `src/templates/feed-list.tsx` |
| RSS               | Included in `/rss.xml`        | Included in `/rss.xml`            |

Feed archive/category routes are prefixed with `/feed/` to avoid colliding with the equivalent Blog routes, since both are rendered by the shared `src/templates/sidebar.tsx` component (via its `basePath` prop).

## Notes

- To add a **blog** post instead, follow the same steps but use `content/blog/` and the `/blog/` routes.
- The canonical human-readable version of this guide is `docs/adding-feed-posts.md`.
