In one paragraph
A marketing site is a design system, a content model and a build pipeline. None of them requires a proprietary page builder. This guide builds the stack that gives you the most control per hour spent: a token-driven design system, a CMS you can query, and a delivery path where every change is reviewable.
What you end up with
- A token file that is the single source of truth for colour, type, spacing and radius
- Components built from those tokens, so a brand change is one edit and not 200
- A content model that survives a redesign without rewriting the copy
- A build that fails on broken links, missing alt text and accessibility regressions
The reference stack
Every project below is open source and self-hostable. Licences are the ones the project publishes today; check them against your own distribution model before you ship, because a licence can change and an AGPL project has obligations a MIT project does not.
| Layer | Open-source project | Licence | What it does for you |
|---|---|---|---|
| CMS | WordPress (classic or hybrid theme) | GPL-2.0 | Editorial workflow, revisions, roles, REST API, and the largest plugin surface of any CMS. |
| Static / headless | Astro or Eleventy | MIT | When the site is mostly content, a static build is faster, cheaper and harder to break. Pair with any headless source. |
| Design tokens | Style Dictionary | Apache-2.0 | One JSON token file generates CSS variables, a JSON theme and any future platform output. |
| Accessibility + links | axe-core + lychee | MPL-2.0 / Apache-2.0 | Automated a11y violations and dead links, failing the build instead of being noted in a report. |
| Performance budget | Lighthouse CI | Apache-2.0 | Budgets on JS bytes, LCP and CLS per template, asserted on every commit. |
| Images | Sharp or ImageMagick + AVIF/WebP pipeline | Apache-2.0 / ImageMagick licence | Responsive variants with correct dimensions, generated at build so the page never ships a 4000px hero to a phone. |
| Hosting | Caddy or nginx + your own VPS | Apache-2.0 / BSD-2 | Automatic TLS, HTTP/2, and a config file you can read in a minute. |
Build it
1. Write the tokens before the first component
Colour, type scale, spacing scale, radii, shadows, and the two or three semantic pairs that carry meaning (surface, border, brand). Then generate CSS variables from the JSON so the design file and the code cannot drift.
// tokens.json
{ "color": { "brand": { "value": "#f56300" },
"surface": { "value": "#111418" } },
"radius": { "md": { "value": "8px" } } }
$ style-dictionary build
# -> build/css/variables.css (--color-brand: #f56300;)
2. Build components, not pages
A hero, a card, a section header, a CTA block. Each takes content as parameters and renders the same markup everywhere. Page-level CSS is the beginning of the end: after ten pages nobody can safely delete anything.
3. Model content for reuse
Put the durable fields in the CMS (claim, evidence, source, next action, audience) and let templates decide layout. This is what makes a redesign a theme change instead of a content migration.
4. Make the build the quality gate
One command that lints HTML and CSS, runs axe-core, checks links, generates images and enforces budgets. If a change breaks a budget, the build fails. A quality gate that can be skipped is not a gate.
5. Ship images correctly
Generate AVIF and WebP at the sizes your breakpoints use, set width and height on every img, and lazy-load everything below the fold. Most ‘slow site’ problems are image problems wearing a performance costume.
6. Treat accessibility as a build artefact
axe-core in CI catches roughly a third of real issues automatically: contrast, labels, landmarks, heading order. The rest needs a keyboard pass and a screen-reader spot-check on the three most important pages. Do both, and write down what you did not fix.
7. Keep a rollback for every deploy
Deploys are directory swaps or image tags, not in-place edits. If a bad deploy reaches production, the rollback is one command and the previous state is byte-identical.
Acceptance checks
If you cannot verify a claim, it is not a finding. These are the checks that close the work; each one can be run by somebody who did not build it.
| Acceptance check | How to verify it |
|---|---|
| Every colour and size in the CSS comes from a token | grep the stylesheet for hex literals and px values outside the token file; the count should trend to zero. |
| axe-core reports zero critical violations on all templates | CI job per template; failures block merge. |
| No dead internal or external links | lychee over the built output. |
| JS payload and LCP are within budget per template | Lighthouse CI assertions with the numbers committed in the repo. |
| Every image has width, height, alt and a modern format | Build-time check over the generated HTML. |
| A keyboard user can reach and operate every interactive element | Manual pass, recorded once per template and repeated after any component change. |
Effort and cost
| Estimate | |
|---|---|
| Skill needed | Intermediate for a theme; advanced for a headless build with a content pipeline |
| Build time | 3–5 days for tokens + components + build gate; one week for a full marketing site |
| Running cost | Near zero; static hosting is cheaper than a CMS, and a CMS needs patching and backups |
| What you must host | Static: a few dollars a month. WordPress: a 2–4 GB VPS plus backups. |
What open source does not give you
The honest half of the comparison. Each of these is a reason somebody buys the service instead of building it, and pretending otherwise would make the rest of this page worthless.
- This guide does not make design decisions. A token system makes a bad design consistent, which is not the same as good.
- Automated accessibility tools find a minority of issues. Without a manual keyboard and screen-reader pass you will ship a site that fails real users while passing CI.
- Static builds need a rebuild on content change. If editors publish hourly, that constraint matters and a hybrid or ISR approach is the honest choice.
- WordPress’s plugin ecosystem is also its risk surface: every plugin is an update, a licence and a potential vulnerability. Budget for patching, or keep the plugin count near zero.
- Core Web Vitals field data depends on users’ devices and networks. A perfect lab score can coexist with poor field data.
What the service adds
Scope only, stated so you can compare it with the build above.
- Information architecture and page-level narrative, which is a positioning decision
- Implementation inside an existing CMS or platform where a custom stack is not an option
- Ongoing performance and accessibility regression monitoring with fixes
Sources and further reading
- Style Dictionary docs
- Astro documentation
- axe-core rules
- WCAG 2.2 quick reference
- web.dev — image optimisation
Related guides
What this page does not include. This guide documents an open-source implementation of the same outcome. It deliberately leaves out 5 Kings’ internal playbooks, client data, vendor terms and unpublished method: we publish what any competent team can reproduce, and we do not publish what belongs to a client or to a contract. Where a step depends on a decision only your business can make, the guide says so instead of guessing.
Take it with you
Design and build a marketing site on open source
The full guide as an A4 PDF: the reference stack with licences, the build steps, the acceptance checks and the honest limits — in one file you can hand to an engineer or print for a planning session.