Code — how this page is built
Under the hood
The actual source of the components on this page, read straight from the repo. Copy it, read it, or open it on GitHub.
Article readerview on GitHub ↗
The split-layout reader: text left (Courier field-note, H1, dek, TL;DR box, MDX body, FAQ, prev/next), placeholder images right; stacks to one column under 760px. MDX is compiled server-side with remark-gfm so tables render. Emits Article + FAQPage JSON-LD.
import type { Metadata } from 'next';
import type { ComponentProps } from 'react';
import Link from 'next/link';
import { notFound } from 'next/navigation';
import { MDXRemote } from 'next-mdx-remote/rsc';
import remarkGfm from 'remark-gfm';
import { Jsonld } from '@/components/Jsonld';
import { UpdatedStamp } from '@/components/UpdatedStamp';
import { ArticleReaderShell, Fig } from '@/components/articles/figure-sync';
import { PageFrame } from '@/components/shell/PageFrame';
import { getAllArticles, getArticle, type Article } from '@/lib/content';
import type { CodeRef, TaggingData } from '@/lib/lens';
import { normalizeView } from '@/lib/lens';
import { absoluteUrl, articleJsonLd, faqJsonLd, pageMetadata, type JsonLd } from '@/lib/seo';
import styles from './reader.module.css';
const mdxOptions = { mdxOptions: { remarkPlugins: [remarkGfm] } } as const;
/** External links open in a new tab; internal ones don't. */
function MdxLink({ href = '', ...props }: ComponentProps<'a'>) {
const external = /^https?:\/\//.test(href);
return <a href={href} {...(external ? { target: '_blank', rel: 'noreferrer' } : {})} {...props} />;
}
const mdxComponents = { Fig, a: MdxLink };
export function generateStaticParams() {
return getAllArticles().map((a) => ({ slug: a.slug }));
}
export async function generateMetadata({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const { slug } = await params;
const article = getArticle(slug);
if (!article) return {};
return pageMetadata({
title: article.title,
description: article.dek || article.tldr || article.title,
path: `/articles/${article.slug}`,
type: 'article',
publishedTime: article.date,
modifiedTime: article.updated ?? article.date,
});
}
/** Neighbouring articles (newest-first list) for the prev/next pager. */
function neighbours(slug: string) {
const all = getAllArticles();
const idx = all.findIndex((a) => a.slug === slug);
return {
index: idx,
total: all.length,
prev: idx > 0 ? all[idx - 1] : null,
next: idx >= 0 && idx < all.length - 1 ? all[idx + 1] : null,
};
}
function Reader({ article }: { article: Article }) {
const { index, total, prev, next } = neighbours(article.slug);
const fieldNo = String(total - index).padStart(2, '0');
const year = article.date.slice(0, 4);
const left = (
<>
<div className={styles.fieldnote}>
Field note {fieldNo} — {year}
</div>
<h1 className={styles.h1}>{article.title}</h1>
{article.dek ? <div className={styles.dek}>{article.dek}</div> : null}
{article.tldr ? (
<div className={styles.tldr}>
<div className={styles.tldrLabel}>TL;DR</div>
<p className={styles.tldrText}>{article.tldr}</p>
</div>
) : null}
<div className={styles.prose}>
{/* @ts-expect-error Async Server Component */}
<MDXRemote source={article.content} options={mdxOptions} components={mdxComponents} />
{article.faq && article.faq.length > 0 ? (
<>
<h2>FAQ</h2>
{article.faq.map((f, i) => (
<div key={i}>
<h3>{f.question}</h3>
<p>{f.answer}</p>
</div>
))}
</>
) : null}
</div>
<div className={styles.pager}>
{prev ? (
<Link href={`/articles/${prev.slug}`}>← {prev.title}</Link>
) : (
<span className={styles.pagerSpacer}>—</span>
)}
<Link href="/articles">index</Link>
{next ? (
<Link href={`/articles/${next.slug}`}>{next.title} →</Link>
) : (
<span className={styles.pagerSpacer}>—</span>
)}
</div>
<div style={{ marginTop: 18 }} className={styles.fieldnote}>
{article.updated ? <UpdatedStamp date={article.updated} /> : null}
</div>
</>
);
return (
<div className={styles.root}>
<ArticleReaderShell left={left} />
</div>
);
}
export default async function ArticleReaderPage({
params,
searchParams,
}: {
params: Promise<{ slug: string }>;
searchParams: Promise<{ view?: string }>;
}) {
const { slug } = await params;
const { view: rawView } = await searchParams;
const view = normalizeView(rawView);
const article = getArticle(slug);
if (!article) notFound();
const path = `/articles/${article.slug}`;
const jsonLd: JsonLd[] = [
articleJsonLd({
title: article.title,
description: article.dek || article.tldr || article.title,
path,
datePublished: article.date,
dateModified: article.updated,
techArticle: article.techArticle,
}),
];
if (article.faq && article.faq.length > 0) {
jsonLd.push(faqJsonLd(article.faq));
}
const headings: TaggingData['headings'] = [{ level: 1, text: article.title }];
for (const line of article.content.split('\n')) {
if (line.startsWith('## ')) headings.push({ level: 2, text: line.slice(3).trim() });
else if (line.startsWith('### ')) headings.push({ level: 3, text: line.slice(4).trim() });
}
if (article.faq?.length) headings.push({ level: 2, text: 'FAQ' });
const tagging: TaggingData = {
title: article.title,
description: article.dek || article.tldr || article.title,
canonical: absoluteUrl(path),
updated: article.updated ?? article.date,
headings,
jsonLd,
};
const code: CodeRef[] = [
{
title: 'Article reader',
file: 'app/articles/[slug]/page.tsx',
explanation:
'The split-layout reader: text left (Courier field-note, H1, dek, TL;DR box, MDX body, FAQ, prev/next), placeholder images right; stacks to one column under 760px. MDX is compiled server-side with remark-gfm so tables render. Emits Article + FAQPage JSON-LD.',
},
{
title: `${article.slug}.mdx`,
file: `content/articles/${article.slug}.mdx`,
explanation:
'The article itself — frontmatter (title, dek, tldr, dates, tags, faq) plus the MDX body. This file is the whole article; the reader is just its frame.',
},
];
return (
<>
<Jsonld data={jsonLd} />
<PageFrame
view={view}
basePath={path}
content={<Reader article={article} />}
tagging={tagging}
code={code}
/>
</>
);
}
airport-layover.mdxview on GitHub ↗
The article itself — frontmatter (title, dek, tldr, dates, tags, faq) plus the MDX body. This file is the whole article; the reader is just its frame.
---
title: "The failure of the airport layover"
slug: airport-layover
dek: "I dangle an extension cord precariously over the frame of my bed so I can cuddle with it to sleep."
date: 2026-06-20
updated: 2026-06-20
author: kaspirius
tags: [travel, airports, rant, essay]
hero: /articles/airport-layover/hero.jpg
---
This title is a bit more literal than some of my other pieces will be. At least in terms of title to content comparison. A matter so serious to me that I cannot with good faith hide behind a easy joke of circumventing expectations but in fact I must highlight and amplify the importance of this topic as it would be the only way to make this right.
In a future episode of my insatiable ramblings will I discuss some misconceptions and stereotypes of my childhood past. But this rant in particular will be about one singular topic, one I presume you could guess purely from my prior introduction.
<Fig src="/articles/airport-layover/hero.jpg" cover alt="A traveller asleep across airport seats" caption="the airport layover" />
The airport layover. Infamous, differing in drastic degrees from trip to trip; cancellation, planned, short, long, overnight, really short layover. It’s a fucking nightmare. Now I am not here to talk about the nightmare (although I already have two anecdotes and will likely bring it up regardless of this disclaimer), I’m here to talk about a fuck up of society on such biblical levels it disappoints me.
Now I’ll start with a preamble.
<Fig src="/articles/airport-layover/child-window.jpg" alt="A child looking out a window at an airplane in a bright blue sky" caption="here:" />
Here:
I remember as a child being so jealous of my parents going on business trips. It’s weird because I think the usual stereotype here is that the kid either doesn’t care (or realize) or they are super upset their parents are going to be gone for a couple days. But for me it was this jealousy, something that they were always quick to push back on. “Its just work in a different place and its actually worse because I cant be home, do x, do y, etc etc”. I don’t know why I put that into quotes when it’s clearly not a quote. Anywho
I used to associate all plane travel with flying somewhere for vacation so obviously it was good in my mind. But even as I got older, the explanations of going somewhere was cool purely as a bucket list tick off exercise in my head. At this point, I have had all of the types of layovers I mentioned above and I can tell you, they all fucking suck (Although I do not doubt some good ones exist, please continue reading before thinking of counterpoints in your own head.)
I provide this preamble because I am here to talk about a childhood vision for a concept (airport layovers) and to explain that a) I was already a bit obsessed with the idea of the travel and b) I was not the brightest fucking tool in the shed.
As I discuss the layover options, I will talk about some of the different scenarios mentioned above before finalising my vision of what a layover truly could be.
## Really short layover
<Fig src="/articles/airport-layover/security-cartoon.jpg" alt="A cartoon of airport security causing a passenger to panic" caption="the math begins" />
There is nothing more gut wrenching than a really short airport layover. You are constantly fucking checking the time and doing math in your head. Wait so if my first flight boards at 9:10 and take off is 9:45, are we meant to be taxing at 9:45 or in the air? Wait we are we late?
Dont even get me started if you are flying into an airport like heathrow whats the fucking point, you’ll be circling in the sky for ages or spending a good 30 minutes just shuttling about. Do not get me started.
You land at the airport and finally get to the gate, and you hesitate. Fuck, do I care enough to ask other people past? Are these stewardesses the savours of my life and will announce to please remain seated unless you have a connection? Will this plane deboard fast enough for me to make it anyway? Okay, if Im not off this plane in 20 minutes Im fucked.
The monster math has only gotten more intense. As you approach the gate, all theses questions go to your head. Should I have mentioned something to the stewardess before we landed? No surely they know? Wait am I entitled to think they are going to solve my problem for me? Or wait, would it have been more entitled to ask them something? Fuck wait I dont actually know which is the social faux pas.
you are now at the gate, still debating time and social expectations for such a scenario. As you deboard, all the math and questioning goes out the window. You have learnt nothing.
it is a rite of passage each human must take atleast once in their life. A humiliation ritual. Worse than someone repeating your joke louder. Worse than been squeezed out of your friend group while walking down the street. Worse than having to swallow after coming to conclude that the grocery bill you just received at whole foods is far more expensive than you thought. You now need to run in an airport.
Holy fuck.
The real problem with billionaires and private jets is actually not the emissions. It’s not the huge amount of wealth hoarding and waste. It’s not the political lobbying or ruining the very fabric of the societal promise (article coming soon). It’s the fact that they can pay to opt out of this humiliation ritual. Either private jets, first class treatment or greed at hellish levels, warned by the bible itself, pay for a new flight willynilly. These fuckers have lost their civic duty due to missing out on a core and key humiliation ritual everyone must go through. The type of ritual that creates ego death and provides you with a sense of belonging with your fellow man.
Running in the airport is the dumbest thing in the world. It just sucks. There is no coming back from the shame. There is no undoing being a sweaty pig in an airport. There just isn’t. And the worst part is that it’s most likely not even your fault. The airline fucked you and you had nothing to do with it.
There is two specific scenarios I will provide to give an even deeper level of: Once I was in Frankfurt airport, arriving in from North America and transferring further into Europe. Holy shit, all these thoughts, the flight was an hour late on an hour and 20 minute layover. I was fucked. Frankfurt is a huge beast of an airport. I did not ask the stewardess whether there was any assistance or help. I was in the back rows and it took me 10-15 minutes to get off the fucking plane. It was all over.
I get off the bridge into the airport and what do I see before me? A fucking sign and a wonderful German woman who was driving me to my plane on the cart. Holy shit, it was a real blessing from god. Fuck the second coming, this was a bigger bliss. God bless Hilde.
<Fig src="/articles/airport-layover/timbs.jpg" alt="A giant Timberland boot mounted on a trailer" caption="fucking timbs" />
And the other scenario? I had to run through Munich airport in fucking timbs. Fucking timbs. Enough said.
## Long Layover
<Fig src="/articles/airport-layover/long-layover.jpg" alt="A crowded airport terminal during a long wait" caption="the long wait" />
The long layover falls into two categories. The planned and unplanned long layover. Both suck, but for entirely different reasons. Plus I can use the trauma of my brother and mother to provide a fantastic anecdote that I will explain in a high level way so that when you get down to that section, you may have forgotten this disclaimer and there for build sympathy for me and I can feed off that. Emotionally of course. Anywho
The planned long layover sucks. Now when I say long layover, Im not gonna talk about the overnight. Thats entirely different. Im talking about the awkwardly long. Land at 9am and takeoff at 4pm. Like what the fuck are we doing here. What am I doing in this airport. And there is phases and stages to this.
now you may be so lucky to get lounge access.
<Fig src="/articles/airport-layover/lounge.jpg" alt="A comfortable airport lounge with chargers in the chairs" caption="lounge access — look at that" />
Like look at that. How sweet is that? If you are at home, chilling on your couch, that may not look like much but goddamn if that aint a sight for sore eyes after sitting in economy class for 7 hours and needing to fart around for another 7. Jesus Christ, it has chargers in the chairs. I dont even have that a home. I dangle an extension cord precariously over the frame of my bed so I can cuddle with it to sleep as it emits a warm feeling and a soothing humming. Wait ok nvm.
But you dont always have lounge access. Wrong airport, wrong day, wrong everything. So you are stuck wandering the halls of the airport thinking to yourself, maybe they will call my name and suddenly I am on the earlier flight. You may take your chance and ask if there is an earlier flight in which the easyJet employee at the Barcelona airport will look at you with contempt. And you deserve it you filthy filthy cow, all sweaty and gross looking. Ok what the fuck is going on here
There are stages to this wait though. You may stop somewhere. You are going to treat yourself to an airport beer. Because of course you are, it’s travel season. It’s time to pass the time by getting fucked up. But after hogging a table at a busy airport restaurant for 2 hours you feel bad, you feel bored and you head out only to discover the only thing that got fucked is you after tapping your card for a 45 dollar bill for a single person. Jesus.
you sit at a random gate. Yours hasn’t been called yet. You start to look around at the strangers around you. Or are they strangers? After a while of sharing an empty gate you begin to wonder. How did they get here? Where are they from? I wonder if their plane is here? OH FUCK ME ANOTHER PERSON IS COMING SHIT THIS IS A USED GATE ITS GONNA GET BUSY oh never mind they turned around.
You start to make stories up for the people around you. Are they here on business? I wonder if he has a long layover. Maybe his flight is cancelled? That would suck. Boy am I glad Im not in that situation. You wonder where they are from, you give them a name. And suddenly, they pick up the phone and by the volume of their voice, you know. They are American. You pack your shit and continue your adventure in the twilight zone.
the gate is finally called. You head there. Nobody else is there yet. A couple other eager beavers. An old couple who may be a part of the furniture. That one guy. You know the type im talking about, that guy is there already.
You board your plane and look back at the terminal as you taxi away. Thinking to yourself, is my time not worth more than this? How did I voluntarily sign up for this? You smile to yourself knowing that you will never do this again as your plane takes off and hits the sky. You are wrong. You fell asleep and forgot all your lessons learned. Fucking pathetic.
## The overnight
<Fig src="/articles/airport-layover/airport-hotel.jpg" alt="A barebones airport hotel room" caption="the airport hotel" />
god was I fucking obsessed with airport hotels growing up. I do not know why. Why the fuck would I care. They are barebones, they are small. They always have the funniest clientele. It genuinely feels like an extension of the airport. Even after a 5 minute walk and a 10 minute shuttle bus, the aura, the vibe, the feel and smell in the air. You are still in airport mode.
And I havent been to one of those fancy IN terminal hotels. I have tried the ones outside security but inside the terminal? Go up and read my billionaire rant. Fuck you (I do not know how to handle feelings of jealousy and therefore take them out on you. I apologize for that but stand by what I said.)
Now here comes a part of the overnight layover that is a bit of a perspective juxtaposition for me. As a kid, I loved the idea of fucking overnight layover, thats sick. Lemme take an opportunity to explore a city I wasn’t planning on. It’s like two fucking trips in one, hell yeah brother.
Except no. Its not. It’s defo not. Aint no fucking way I am going to be bothered with all that. YOU WANT ME TO UNPACK MY BACK AND REPACK IT? HELL NO. I AINT GOING THROUGH ALL THAT EFFORT. I NEED SLEEP. I BEEN TRAVELLING AND I AM EEPY.
But it’s funny cause you’ll look around at some of these Middle Eastern airport advertisements and they are like “unlock a day in Abu Dhabi”. Bitch are you fucking kidding me? Imma land at 12, fly next morning at 6am so I gotta be asleep atleast by 10. I got 10 hours here. Fuck when I say it out loud it makes sense, wait lemme make it worse.
Ok so I actually gotta sleep by 8/9 cause I gotta recheck in. So like I gotta be out the hotel door and to the shuttle like 430 LATEST. And I need to check in and drop my bags off. thats like another hour, so I got from like 1-8pm. But I gotta get back from my adventure and TO my adventure so like 2-7pm. Im having dinner either way so like 1 hour of that is accounted for MINIMUM.
YOU WANT ME TO SPEND LIKE 3-4 HOURS IN ABU DHABI GETTING FUCKING BLASTED BY THE HEAT? AND I GOTTA REPACK A BAG TO DO SO? HELL NO, I AM TOO PASTEY FOR SUCH THINGS.
you wake up the morning of your flight. Its early. Somehow, it’s the same guy at the hotel reception. You notice it. He barely acknowledges that he has seen you before. You wait for the shuttle bus to arrive, ofc course it’s only every 23 minutes for some reason. You question where the number comes from but as you do, you realize the lobby is getting more and more filled. Wait a fucking minute, this is gonna be a fight to the death. I can’t fucking miss this shuttle. I bet that family over there thinks the same thing. And wait a minute, is that the same guy from earlier? You know the guy.
You arrive at your gate. Coffee in hand. Your body is rested but your mental is shot. What the fuck.
## The cancelled into overnight
this is hell. Pure hell. Infact Imma go back on my word and give my brother and mother credit for this because I do not know how they survived. They were stuck in heathrow (yuck p2) during a snow storm that lead to every single flight cancelled. And they were on their way to fucking Australia so it’s not an easy fix up. They spent days in the airport, literal days, with nothing but blankets and water passed out by staff. It was hell. I can’t even do it justice so I shan’t.
## The concept
We have now arrived at my favourite part. The conclusion. The concept. The wrap up. But you know whats crazy? Im actually going to less effort into this than I expected to. Writing about the airport experiences above have made me sick to my stomach.
<Fig src="/articles/airport-layover/concept.jpg" alt="An airport hotel pool / leisure space" caption="the promised lands" />
I do not see why the layover can not be an on airport experience. I know Singapore airport is making moves here but like my ticket with the layover should include this. When I get picked up by a bus on my plane, I want to see a second bus that says waterpark. They will take care of my bags, my suitcase and it willl show up on the next flight. But I? I will be in the promised lands. And indoor waterpark. Nice warm air, fun rides. A hotdog stand. A no-kids section for the extra gnarly rides. Cool kids only club, calling all passengers.
It doesnt need to literally be a waterpark but the point here is that there is an activity AND it’s linked to my fucking ticket. None of this book your own excursion, figure out your own hotel, raw dog the elements of the streets and find your own bag locker. Fuck you. The airport is a big old machine anyway, tell me with a straight face they cant deal with passenger logistics at this level. I shan’t believe if even with statistics to back your point.
And thats where we are. The airport layover has failed. I have also gotten bored writing about it. I have this itch on my right arm that is driving me mad but unless you couldn’t tell from my prior articles, I genuinely write these in one rant filled session just spamming away at my keyboard. Oh sweet ok I took a lil break between that sentence and man that itch was itching for a scratching iykwim.
Cool, have a good one. Leave your favourite airport in the comments and I will respond with a reason you should be ashamed.