MDX & Content Systems
Why location pages are content models, not city-name swaps
Dynamic location routes are easy to build. Good location pages are not. A developer can create /locations/[slug], feed it a list of cities, and generate fifty URLs in an afternoon. That does not mean those pages should exist. Our location systems are built around a stricter idea: the route can be shared, but the page has to earn its own content.
The template and the page are different things
A template is a presentation system. It decides how the hero renders, where the about section appears, how services are displayed, how FAQs are structured, how related locations are linked, and how metadata is generated. The location file supplies the actual place-specific information.
In one of our local-service builds, the location model contains a slug, location name, title, description, excerpt, display order, card image, hero image and alt text, about-section title and paragraphs, another image, service summaries, FAQs, and optional SEO fields. That is a real content model.
It gives the page many places to be different without forking the layout.
Why city-name replacement is weak
Thin location pages usually start from a master paragraph: "Looking for SERVICE in CITY? We proudly serve CITY and surrounding areas..." Then the city variable changes thirty times. That creates URLs, but it does not create thirty useful documents. The page does not answer anything specific about the market, project conditions, service patterns, travel area, proof, customer questions, or the business's actual relationship to the place.
Search engines can see that repetition. More importantly, people can feel it.
A shared model makes quality easier to review
When every location file follows the same content model, we can review the content dimension by dimension. Does this location have a real introduction? Does the image actually fit the area or project type? Are the FAQs relevant? Are the service summaries specific enough? Does the page link naturally to nearby areas? Does the metadata describe the page instead of merely repeating the city and service name?
The model gives us a checklist without forcing identical prose.
The route becomes technically boring
That is a compliment. The route does not contain a giant switch statement for every city. It gets the slug, asks the content library for the corresponding location, generates metadata from that object, and renders a common location component. The complexity belongs in the content quality and the shared component system, not in repeated routing code.
Static generation is a good fit
Location pages usually do not need request-time data. If the content is known during the build, generateStaticParams() can enumerate the valid slugs and build each page ahead of time. That means the visitor gets a finished document without waiting on a content API or database.
It also means an invalid city slug can cleanly return a not-found state rather than producing an empty template.
Images are part of the content distinction
We often give locations explicit image fields or image keys rather than reusing the same hero everywhere. That is not because every city requires a postcard skyline. It is because repeated visual assets are another signal that the pages were mass-produced without thought. When we have real project or service imagery that fits a location, the model gives us a place to use it deliberately.
SEO fields are overrides, not an excuse
A location model may allow a custom meta title and description. That does not mean every file needs a hand-written SEO field if the default title and description are already strong. Overrides exist for cases where the local context warrants something more precise.
We prefer sensible derivation with the ability to be specific, rather than requiring editors to rewrite every field for no reason.
Related locations help people navigate the service area
A person on one city page may reasonably want to see neighboring service areas. The application can derive those links from the same location registry. That keeps the navigation current as the service area changes. Again, the important part is that the relationship is useful to a visitor, not that we are trying to manufacture internal links.
When we should not create the page
If we have nothing meaningful to say about a location, there are better options. A service-area index may be enough. A county-level page may fit the actual business better. Or the site may simply mention the area in a broader service page.
We do not treat every city name as an entitlement to an indexed route.
Why this matters as the library grows
A location system can eventually hold dozens of pages without becoming a maintenance disaster because the route behavior is shared. But that only works if the content model is strong enough to preserve quality. The architecture gives us scale. The editorial standard decides whether that scale is useful or spammy.
We want both.
From explanation to proof
Where this connects to the work
These guides show how our publishing architecture supports large indexed libraries without requiring a database-backed page builder.