Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collab summit followups #1

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
roll back changes to next-data/providers/blogData.ts
dario-piotrowicz committed Nov 15, 2024
commit 702a884724d2c3ed625c0229c356698e04e50e7c
2 changes: 1 addition & 1 deletion apps/site/CLOUDFLARE.md
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ The following is an incomplete list of tasks and problems that still need to be
- [x] reimplement `getMarkdownFiles` in `next.helpers.mjs` to be generated at build time
- this can be accomplished either via a npm/turbo prebuild task, or possibly as part of next.js SSG/staticProps but
- [ ] we need to ensure that we don't end up accidentally downloading this big file to the client as part of hydration
- [ ] once we have easy access to the list of files, we should roll back changes to `next-data/providers/blogData.ts`
- [x] once we have easy access to the list of files, we should roll back changes to `next-data/providers/blogData.ts`
- [ ] back out most changes from `next.dynamic.mjs`
- [ ] 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
- [ ] could we reimplement the `existsAsync` call as sync `exists` which consults `getMarkdownFiles` from the task above? alternatively
4 changes: 2 additions & 2 deletions apps/site/next-data/providers/blogData.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { cache } from 'react';

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

const { categories, posts } = { categories: [], posts: [] };
const { categories, posts } = await generateBlogData();

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