~/talk

How to properly handle URL slug changes in Next.js

Talkat TS Congress 2022 · on Friday, 2022-04-29· [react, typescript]
slides:none on file

Claims a concrete recipe: track slug history in Kontent items, enumerate all historic and current slugs, serialize that list to a cached file, and feed it into Next.js so getStaticPaths includes historic routes while getStaticProps issues a permanent redirect to the current path. Implementation uses TypeScript and a kontent-boilerplate example, writes path objects with {path, redirectTo}, and works around Next.js limitations by reading the serialized paths at build time so historic URLs 301/308 to the live page.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.