Skip to content

Commit

Permalink
Copy tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
amyleadem authored Feb 14, 2025
1 parent 379540f commit 82fabbe
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions _posts_short/README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# Short posts
Short posts are one of two types of content that generate the [What's new feed](#whats-new-feed).

This document provides instructions for [creating a new short post](#creating-a-new-short-post) and [customizing a short post's metadata](#customizing-post-metadata).
This document provides instructions for [creating a new short post](#creating-a-new-short-post) and [customizing a short post's metadata](#customizing-short-post-metadata).

# Creating short posts for the What's new feed
## What's new feed

The [What's new page](https://designsystem.digital.gov/about/whats-new/) feed is generated from the files in two directories:
- `/_posts` (this directory): Long format posts generated by [Jekyll posts](https://jekyllrb.com/docs/posts/). These files will automatically generate:
- `/_posts`: Long format posts generated by [Jekyll posts](https://jekyllrb.com/docs/posts/). These files will automatically generate:
- A preview for the news feed
- A separate page for the post content
See the [./_posts/README.md](../_posts/README.md) for instructions on creating a post.
- `/_posts_short`: Short format previews for the news feed. These files generate only a preview and do _not_ generate a full post page. Use short posts to link to different pages of the site or other locations.
- `/_posts_short` (this directory): Short format previews for the news feed. These files generate only a preview and do _not_ generate a full post page. Use short posts to link to different pages of the site or other locations.

## Creating a new short post

1. To create a new short post, create a new branch then add a new file to this directory (`/_posts_short`) with a filename in the form:

```
YYYY-MM-DD-title.md
```
where:
- `YYYY` is the 4-digit year (`2025`) of the publish date
- `MM` is the 2-digit month, with a leading zero (`01` for January, `02` for February, etc.)
- `DD` is the 2-digit day of the month, also with a leading zero
- `title` is the so-called "slug" used in the post URL, and should be all lowercase with no spaces (e.g. `my-post-title`)

The YYYY-MM-DD date set in the file name will:
- Display as the "date" in the post
- Sort the post in reverse chronological order (newest items first) in the news feed.

2. Next, in the file's contents, copy and paste the following blank template:=
```
---
title:
author:
tags:
excerpt:
preview_url:
---
```

The content inside the triple-dashed lines (`---`) is the post's [front matter](https://jekyllrb.com/docs/front-matter/). You will need to customize the the front matter to define the post's title, author, and more. See the table and code example in the [customizing post metadata](#customizing-post-metadata) section to see the available customization options.

Note that no other content is needed outside of the page's front matter.
```
YYYY-MM-DD-title.md
```
where:
- `YYYY` is the 4-digit year (`2025`) of the publish date
- `MM` is the 2-digit month, with a leading zero (`01` for January, `02` for February, etc.)
- `DD` is the 2-digit day of the month, also with a leading zero
- `title` is the so-called "slug" used in the post URL, and should be all lowercase replace spaces with dashes (e.g. `my-post-title`)
The YYYY-MM-DD date set in the file name will:
- Display as the "date" in the post
- Sort the post in reverse chronological order (newest items first) in the news feed.
2. Next, in the file's contents, copy and paste the following blank template:
```
---
title:
author:
tags:
excerpt:
preview_url:
---
```
The content inside the triple-dashed lines (`---`) is the post's [front matter](https://jekyllrb.com/docs/front-matter/). You will need to customize the the front matter to define the post's title, author, and more. See the table and code example in the [customizing short post metadata](#customizing-short-post-metadata) section to see the available customization options.
Note that for short posts, no other content is needed outside of the page's front matter.
## Customizing short post metadata
Expand Down

0 comments on commit 82fabbe

Please sign in to comment.