Skip to content

Commit 702a884

Browse files
roll back changes to next-data/providers/blogData.ts
1 parent 6386af0 commit 702a884

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/site/CLOUDFLARE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The following is an incomplete list of tasks and problems that still need to be
7575
- [x] reimplement `getMarkdownFiles` in `next.helpers.mjs` to be generated at build time
7676
- this can be accomplished either via a npm/turbo prebuild task, or possibly as part of next.js SSG/staticProps but
7777
- [ ] we need to ensure that we don't end up accidentally downloading this big file to the client as part of hydration
78-
- [ ] once we have easy access to the list of files, we should roll back changes to `next-data/providers/blogData.ts`
78+
- [x] once we have easy access to the list of files, we should roll back changes to `next-data/providers/blogData.ts`
7979
- [ ] back out most changes from `next.dynamic.mjs`
8080
- [ ] instead of using runtime detection via `globalThis.navigator?.userAgent`, we should instead use `alias` feature in `wrangler.toml` to override the implementation of `node:fs` calls but only when running in workerd as we need the build to keep on running in node.js for SSG to work
8181
- [ ] could we reimplement the `existsAsync` call as sync `exists` which consults `getMarkdownFiles` from the task above? alternatively

apps/site/next-data/providers/blogData.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { cache } from 'react';
22

3-
// import generateBlogData from '@/next-data/generators/blogData.mjs';
3+
import generateBlogData from '@/next-data/generators/blogData.mjs';
44
import { BLOG_POSTS_PER_PAGE } from '@/next.constants.mjs';
55
import type { BlogPostsRSC } from '@/types';
66

7-
const { categories, posts } = { categories: [], posts: [] };
7+
const { categories, posts } = await generateBlogData();
88

99
export const provideBlogCategories = cache(() => categories);
1010

0 commit comments

Comments
 (0)