Skip to content

Commit 2eacdc2

Browse files
[LAUNCH CLEANUP] Restore Labs RSS feed (#739)
Builds complete OK & `rss.xml` exists and parses as a valid feed for Labs. Commits: * check for featuredImg src * remove type check for build * remove src from featureImg to check build * remove featuredImg * remove comments from generateRSS * remove comments from generateRSS * remove linting * update README to show required fields of post * fix linting README * update README required fields * Add/reformat "(required)" annotations * Add "(required)" to `hero` metadata --------- Co-authored-by: Brian Skinn <[email protected]>
1 parent 58baa57 commit 2eacdc2

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -534,26 +534,26 @@ The `content` section is the body of the post added in Markdown format.
534534
The `meta` section is a `YAML` like structure and should be wrapped with `---`
535535
signs. The meta section contains post-related information like:
536536

537-
- `title` - Title of the blog post. Used also as the title of the page inside
537+
- `title` (required) - Title of the blog post. Used also as the title of the page inside
538538
`<title></title>` tag
539-
- `description` - Description of the blog post. Used inside `<meta name="description" />` tag
540-
- `published` - Publishing date of the blog post. Used also for sorting posts by
539+
- `description` (required) - Description of the blog post. Used inside `<meta name="description" />` tag
540+
- `published` (required) - Publishing date of the blog post. Used also for sorting posts by
541541
date (the format should be `Month d, yyyy` for example `January 1, 2023`)
542-
- `author` - Unique slug of the author (from Storyblok) usually looks like `jon-doe`.
542+
- `author` (required) - Unique slug of the author (from Storyblok) usually looks like `jon-doe`.
543543
Based on this property blog post page will display proper info about the author
544544
(and their avatar). The author must be present in Storyblok in order for the
545545
post to build without error.
546-
- `category` - Array of categories for example `[Machine Learning]`. All
546+
- `category` (required) - Array of categories for example `[Machine Learning]`. All
547547
categories should be the same as in the previously mentioned
548548
[`categories.json`](./apps/labs/posts/categories.json) file.
549549
**Important note:** categories are case-sensitive.
550-
- `featuredImage` - Object with properties: `src` and `alt`. The `src` property
550+
- `featuredImage` (required) - Object with two required properties: `src` and `alt`. The `src` property
551551
is a path to the featured image which is displayed on the posts list on the`/blog`
552552
page. The `alt` property is alternative text for the image. The image should
553553
be added to the `apps/labs/public/posts/<post-name>` directory, for example,
554554
`apps/labs/public/posts/hello-world-post`. There is no need to provide a full image path,
555555
so the path name should start with `/posts/`.
556-
- `hero` - the object for the Hero section of the post. This can have two different structures:
556+
- `hero` (required) - the object for the Hero section of the post. This can have two different structures:
557557
- The first structure is an object with `imageSrc` and `imageAlt`. The `imageSrc` property is a path to
558558
the hero image, which is displayed on the blog post page between the nav bar and the
559559
blog heading title. The `imageAlt` property is alternative text for the image.

apps/labs/pages/blog/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,7 @@ export const getStaticProps: GetStaticProps = async ({ preview = false }) => {
212212
const { items } = await getAllPosts(preview);
213213
const data = await getPage({ slug: 'blog', relations: '' }, preview);
214214

215-
216-
/* TODO: RSS build is broken and needs fixing */
217-
// await generateRSS(items);
215+
await generateRSS(items);
218216

219217
return {
220218
props: {

0 commit comments

Comments
 (0)