v0.5.0
What's Changed
Added
- Asset paths resolve against
twig_context.templateUrl. Every consumer-supplied asset path the package emits —iframe.css/iframe.js/iframe.fonts[],project.favicon(the<link rel="icon">, the standalone-bar<img>, and the SPA sidebar#sg-favicon), andstyleguide.logo[*].src(the foundations overview) — is now rebased onto the bootstrap'stemplateUrlat render time via the newRenderer::resolveAssetUrl(). This letsstyleguide.yamlkeep one short, docroot-agnostic path (/dist/css/style.css) that resolves correctly in every layout: standalone (emptytemplateUrl→ unchanged), WordPress (/wp-content/themes/<theme>/static/…), and Drupal (/themes/custom/<theme>/static/…) — no per-CMS hardcoding, noSTYLEGUIDE_ASSET_PREFIX-style docroot guessing. Backward compatible: an empty base is a no-op (byte-for-byte the old output); already-absolute-under-base paths are left untouched (no double prefix); external (https://…,//cdn…,data:) and anchors (#…) are never rebased. Fixes blank / CSS-less page renders (and the slow/dist/...302-redirect loop) when the styleguide is served from a theme rather than from the static dir as docroot. (#46, #49)
Fixed
- Standalone-bar favicon fallback. The "← back to styleguide" bar (shown when a render is opened in its own tab) now swaps a generic glyph in via
onerrorwhen the configured favicon 404s, instead of painting the browser's broken-image icon next to the page title — mirroring the SPA sidebar's favicon fallback. (#47)
Documentation
- README gains an "iframe asset paths — resolved against
templateUrl" section: a per-layout resolution table (standalone / WordPress / Drupal) and theresolveAssetUrl()rules. (#48)
Pull Requests
- #46 — fix(renderer): rebase relative iframe asset URLs onto templateUrl
- #47 — fix(render-cell): generic-glyph fallback for standalone-bar favicon
- #48 — docs(readme): document iframe asset-path resolution against templateUrl
- #49 — feat(renderer): rebase overview/chrome asset paths onto templateUrl
- #50 — chore(release): 0.5.0
Full Changelog: v0.4.5...v0.5.0