blog_post_redirect.ts view source
(feed: { atom: { feed_url: string; }; items: { tags: string[]; title: string; date_published: string; date_modified: string; summary: string; id: string; url: string; pathname: string; blog_post_id: number; slug: string; }[]; ... 6 more ...; author: { ...; }; }, param: string): never import {blog_post_redirect} from '@fuzdev/fuz_blog/blog_post_redirect.js'; The load of the generated [post=blog_post_id] route: redirects a bare post id to the
post's canonical path, or 404s. Prerendering writes the redirect as a page
with a meta refresh.
feed
the blog's generated feed
param
the post route param
stringreturns
never throws
Redirect- 308 to the post's `pathname` under the base pathHttpError- 404 when no post has the id