Do we really need this trick to call the script itself? Could we just use a simple main()?
We could add ../ at _dirname as we add it on every part of the code on this page
Also here we don't need a custom parser, we could use https://www.npmjs.com/package/gray-matter
The OG images are placed in /public/og, but after that no ones read them or interact with them. They are also not present in the build files after pnpm run build, so they don't work :)
What's the point of this? The exclusion should be server-side with the python script, not client side
All the logic in this file is a bit meh. But maybe with markdown render generation at compile time could be better
We can fall back to English, I think it's better. But we could also check the browser language (with navigator.language i think) and use that if it falls in the [it, en] set.
We don't need a custom parser. There are already made parsers for the frontmatter, like: https://www.npmjs.com/package/gray-matter