swyxio / swyxkit

An opinionated blog starter for SvelteKit + Tailwind + Netlify. Refreshed for SvelteKit 1.0!

Home Page:https://swyxkit.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with blog posts showing 404 messages

georgeoffley opened this issue · comments

I am still investigating, but I would like to know if anyone has seen the below error when going to one of the GitHub issues' pages.

image

This results in the page throwing a 404 error and displaying the 404 page. I encountered this a couple of times before merging in all the new changes to the repo a couple of days ago, but I saw it start again after merging the updated main branch.

I've confirmed that the API is pulling issues from GitHub, but that is as far as I've gotten.

Narrowed down the issue to this code block here. Something to do with the mdsvex.compile() function throwing an error. Continuing my investigation.

OK, figured out the issue.

I typed up the issues in GitHub using triple backticks for a couple of the code snippets. In them I was using something like below:

image

It looks like mdsvex did not like that and threw an error, resulting in a 404 and the console telling me it couldn't find the slug.

While I'm not in favor of editing a code base because I don't seem to understand what is and is not valid markup, I'm wondering if we can be more explicit in logging those functions.

@georgeoffley would happily take PR for errors to fail properly when these things happen, this is one i havent been able to track down yet but yeah it does happen sometimes and is scary.

shoudl also set up external monitoring eg ahrefs so you are notified of sudden spikes in 404s

@sw-yx I started a branch to implement logging so we can start there. Just trying to make that as useful as possible.

ok!