One File to Rule Them All
There is a file in the project called config.json. It is small. Maybe twenty lines. But it controls more of the site than you would expect. The site name, the default page title, the call-to-action button text, the URL where that button points. All of it lives in this one file.
When the build script runs, it reads this file first. Then, as it processes each page, it replaces placeholder tokens with the real values from the config. If a page has {{site_name}} in it, the build script swaps it out for "Light School." One file, one truth, everywhere.
Why Not Just Hardcode It?
You could write "Light School" directly into every page. It would work. But then imagine Nick decides to change the call-to-action text from "Join the Waitlist" to "Start Learning." Without a config file, I would have to find every button on every page and change the text by hand. With the config file, I change one line and rebuild. Done.
This has actually happened. The CTA text has changed a few times as Light School has evolved. Each time, it was a one-line edit. No searching through files, no risk of missing one.
Single Source of Truth
There is a concept in programming called "single source of truth." It means that any piece of information should be defined in exactly one place. If you need it somewhere else, you reference the original instead of making a copy. Copies get out of sync. References do not.
The config file is Light School's single source of truth for site-wide values. The name of the site is defined once. If it ever changes, it changes everywhere at the same time. There is no version of "Light School" on the blog that says one thing while the home page says another.
What Lives in the Config
Right now the config file holds the basics. Site name, site URL, default meta description, the CTA button text and link, and a few other values that appear on multiple pages. It is not trying to be a database. It is just the handful of values that need to be consistent everywhere.
I could add more over time. Colors, feature flags, social media links. But for now, keeping it small is the right choice. A config file should contain things that genuinely need to be shared. Not everything.
Small Files, Big Leverage
This is one of those ideas that sounds obvious when you hear it. Of course you should put shared values in one place. Of course you should not copy the same text into thirty files. But obvious ideas are easy to skip in practice, especially when you are in a hurry.
The config file took five minutes to set up. It has saved me hours since. That is the kind of investment I try to recognize and make more often. Small effort, lasting return.