Documentation

Blueprints and merge tokens

One template, designed in the block editor, generates every service × area page. Here is everything a blueprint can contain.

What a blueprint is

A blueprint is a normal block-editor document — headings, paragraphs, images, anything — plus three things specific to Townsmith: merge tokens, copy variations, and local content slots. Generation resolves all of them at generation time, so the pages it produces are plain WordPress pages with no runtime dependency on the plugin. Deactivate it and every page still stands.

Merge tokens

Tokens are written in double braces anywhere in text and resolve per page:

  • {{service_name}}, {{area_name}} — the pair the page is generated for
  • {{service_description}} — the service’s short description from its excerpt
  • {{business_name}}, {{phone}}, {{city}} — from the business profile in Settings
  • {{area_descriptor}} — the local descriptor written for the area, if any

Unresolved tokens are reported during generation rather than silently printed, so a typo never ships to a live page. Developers can add tokens with the lpe_merge_tokens filter.

Copy variations

A variation block holds two or more alternative passages. Each generated page picks one — deterministically, seeded by the service, area and block, so regenerating a page always picks the same variant and no two runs shuffle your content behind your back. The chosen passage is baked into the page as ordinary blocks; the variation machinery does not exist on the generated page. The free plugin always uses the first variant; rotation across variants is Pro.

The local content slot

The slot is the opposite of automation: a named space that generation deliberately leaves empty on every page. The quality score withholds its largest local-substance credit until the slot holds at least forty words about that specific place. The template does the structure; you do the part that makes the page worth ranking. This is the design decision the whole plugin hangs off.

URLs and hub pages

Two URL patterns, chosen in Settings. Flat: /boiler-installation-rye/. Hierarchical: /boiler-installation/rye/, where each service designates a hub page and area pages live beneath it. Hubs also anchor the “Areas we cover” linking and the breadcrumb trail. If you designate a hub after pages already exist, nothing moves by itself — the dashboard counts the stranded pages and the Pro URL update moves them with old-to-new redirects reported for your redirect manager.

Next: The quality score — how 0–100 is earned.