Migration and upgrades
Move a site onto Foundry or between compatible Foundry releases safely.
- Owner
- Foundry product documentation
- Source
docs/docs/MIGRATION.md- Ref
v0.1.4- Policy
- release-bound
Component pins for v0.2.2
| Component | Role | Version |
|---|---|---|
| core | runtime | v0.1.16 |
| theme-shield | theme | v0.1.15 |
| restricted-component-1 | brand-theme | v0.1.5 |
| dark-mode | runtime-addon | v0.1.0 |
| i18n | runtime-addon | v0.1.0 |
| starter | reference | v0.1.3 |
| docs | reference | v0.1.4 |
| distribution | tooling | v0.3.1 |
| restricted-component-2 | consumer-reference | v0.1.5 |
| restricted-component-3 | consumer-reference | v1.1.21 |
Use this guide to migrate older Foundry sites that built their own layout/CSS before theme-shield became full-featured.
What Moved to Theme-Provided
Older sites often implemented these locally. Theme-shield now provides them by default:
- Base layout shell (
_default/baseof.html) - Header navigation (desktop + mobile + submenu behavior)
- Footer layout and menu rendering
- Typography hierarchy and body copy defaults
- Form input states and focus styling
- Button interaction states
- Card interaction states (hover/focus-within)
- Utility-to-token mappings
- Skip link accessibility styling
Migration goal: delete duplicated local implementations and keep only site-specific deltas.
Step 1: Choose a Compatible Bundle
Before changing site dependencies, choose the target release bundle in
likestyle-foundry-distribution.
Use that bundle as the source of truth for:
- the compatible core version
- the compatible theme version
- the matching starter/docs references
- the required verification commands
Step 2: Pin Module Versions
In site go.mod, pin explicit versions for both modules and upgrade
intentionally:
require (
github.com/jerrybroughton/likestyle-foundry-core v0.1.9
github.com/jerrybroughton/likestyle-foundry-theme-shield v0.1.9
)
Step 3: Remove Local Base Layout Overrides
If your site has layouts/_default/baseof.html only to load CSS or render header/footer:
- delete it, or
- keep a minimal override only if structure truly differs.
Theme base layout already includes:
- theme CSS loading
- hook partials (
head-start,head-end,body-start,body-end) - skip link
- header/footer
Step 4: Switch to Theme Header/Footer
Remove local copies of:
layouts/partials/header/site-header.htmllayouts/partials/footer/site-footer.html
Then configure via params and menus:
site.Params.logosite.Params.header.ctasite.Params.footer.taglinesite.Params.footer.socialsite.Menus.mainand optionalsite.Menus.footer
Only reintroduce local header/footer partials if your information architecture requires custom markup.
Step 5: Remove Redundant CSS
Audit your site CSS by category.
Safe to remove when duplicated
- global typography defaults (
h1-h6,p, list styles) - generic button styles
- generic form field styles
- shared card hover/focus styles
- header nav surfaces/toggles/dropdown defaults
- footer multi-column layout defaults
- utility remaps already handled by theme
Keep as site-specific
- brand-only effects (custom gradients, hero visuals)
- unique campaign/page treatments
- business-specific interaction behavior
- content blocks not covered by core/theme yet
Practical cleanup loop
- Temporarily disable one local CSS file.
- Build and inspect critical pages (home, top service pages, contact, blog/list).
- Restore only rules that are truly site-specific.
- Repeat until local CSS is mostly brand-specific.
Step 6: Validate Feature Flags
Use params.foundry.features to control rollout:
newNavuiCardsanimationsexperimentalHero(if used)
This lets older sites adopt behavior in stages.
Step 7: Regression Checklist
- Header works on mobile and desktop
- Submenus open/close correctly
- Footer links and social links render correctly
- CTA buttons have proper contrast in light/dark
- Forms have visible focus states
- Block spacing and section rhythm are consistent
- Reduced motion behavior is respected
Version Bump Checklist
When upgrading core/theme versions on a site:
- Choose the target distribution bundle.
- Update
go.modmodule versions. - Run
hugo mod tidy. - Run the bundle verification steps where applicable.
- Rebuild and test locally (
hugo server --disableFastRender). - Verify all pages using custom blocks.
- Run accessibility sanity checks (focus, contrast, keyboard nav).
- Review visual diffs for top conversion pages.
- Commit with explicit upgrade message.
- Tag/release only after QA pass.
Optional: Migration Tracking Table
For larger sites, track progress by file:
- CSS file
- removed lines
- retained lines
- reason retained
- pages verified
This keeps migration repeatable and auditable.