✨ feat: enhance medialib image handling and add asset URL resolution
- Implemented `resolveApiAssetUrl` function to normalize asset URLs based on API base. - Updated `MedialibImage` component to utilize new asset URL resolution and added support for alt text and class properties. - Enhanced image loading behavior with improved width measurement and focal point handling. - Added placeholder image handling and improved accessibility with alt text. - Introduced new test script for auditing broken links in skill documentation. - Expanded seeded test content to include medialib entries and updated related tests for pagebuilder previews. - Improved global setup and teardown logging for clarity on seeded content management.
This commit is contained in:
@@ -165,7 +165,8 @@
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
{ lookup: NAVIGATION_CONTENT_LOOKUP }
|
||||
undefined,
|
||||
NAVIGATION_CONTENT_LOOKUP
|
||||
),
|
||||
getCachedEntries<"navigation">(
|
||||
"navigation",
|
||||
@@ -174,13 +175,14 @@
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
{ lookup: NAVIGATION_CONTENT_LOOKUP }
|
||||
undefined,
|
||||
NAVIGATION_CONTENT_LOOKUP
|
||||
),
|
||||
])
|
||||
headerNav = headerEntries[0] || null
|
||||
footerNav = footerEntries[0] || null
|
||||
|
||||
// Load content for current path
|
||||
// Load content for current path. Limit 1 so SSR tracks content:<id> instead of content:*.
|
||||
const contentEntries = await getCachedEntries<"content">(
|
||||
"content",
|
||||
{
|
||||
@@ -189,10 +191,11 @@
|
||||
active: true,
|
||||
},
|
||||
"sort",
|
||||
1,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
{ lookup: CONTENT_MEDIA_LOOKUP }
|
||||
CONTENT_MEDIA_LOOKUP
|
||||
)
|
||||
|
||||
if (contentEntries.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user