Javascript – Accessing Astro global object in MDX pages or in an Astro component
I have a TypeScript library that, under given conditions, should redirect to an error page. One way would be using the internal Astro global object, like with Astro.redirect('/404'). Unfortunately, Astro seems not accessible when rendering MDX pages. Here is a…