This is not a test (for real)
Task: Deploy this blog with Sanity, Next.js, and Vercel. No problem.
There is a Problem: Vercel keeps returning 404 errors despite the blog working fine locally. I am at my wit's end.
Solution: Keep separate repositories for the front-end and CMS instead of one common repository. You live and learn.
It was an embarrassingly simple solution and the last thing I tried after feeding Vercel and Sanity tokens from each other, going over Typescript errors, and changing the root directory in Vercel. Repeatedly, of course, as it should be done. It might work the third time if my struggles have sufficiently appeased the computer gods.
Another solution might be the root directory in Vercel, even if I didn't get it to work. I might've made a mistake with the path.
Anyway - success! Hello world.
This is my current laundry list for the blog, in no particular order:
- * Time published: Add 24-hour format or AM/PM indicator to post times, and remove seconds from "messages". For now it defaults to :00. Also have the posts appear descending. The display is living its own life for some reason.
- * Buttons: Make the whole area on the navigation buttons clickable, instead of text only.
- * Index: "See all messages" should show an index of all messages posted. General post index is to be added as well.
- * Post design: Align title, time published and post body to the same side. The blog post design is confusing right now.
- * Post display: Posts aren't formatted correctly (line-breaks and lists, AFAIK).
- * Functioning "Portfolio" button; even if it's just a redirect to GitHub until the portfolio is up and running.
- * Tags: Posts are currently indexed to specific projects. These should be visible and searchable, as well as framework and language related to the post.
- * Search field: Find specific posts by keywords, tags, etc.
- * Dark mode: Not something I've tried to implement in any projects yet, so why not try it here?
- * General clean up: Add a divider to separate messages and posts better, look at fonts for consistency, those kinds of things.
- * Update the blog: The ultimate challenge for me.
Maybe I should keep a pinned post with the current laundry list in a sidebar or something? Something to think about.
-HJ