Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/advanced-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class CustomBlockPreviewService : BlockPreviewService
}

// Override to provide dynamic stylesheet paths
public override Task<IEnumerable<string>?> GetStylesheetPaths(BlockType blockType, IPublishedContent content, ControllerContext controllerContext)
public override Task<IReadOnlyList<string>> GetStylesheetPaths(BlockType blockType, IPublishedContent content, ControllerContext controllerContext)
{
// Check if a theme is set in the request context
if (controllerContext.HttpContext.Items.TryGetValue("theme", out var themeObj) && themeObj is string theme)
Expand All @@ -61,7 +61,7 @@ public class CustomBlockPreviewService : BlockPreviewService
"/css/block-base.css",
$"/css/themes/{theme}.css"
};
return Task.FromResult<IEnumerable<string>?>(stylesheets);
return Task.FromResult<IReadOnlyList<string>>(stylesheets);
}

// Fall back to the default configured stylesheets
Expand Down Expand Up @@ -463,4 +463,4 @@ builder.CreateUmbracoBuilder()
builder.Services.AddScoped<IBlockModelFactory, CustomBlockModelFactory>();
builder.Services.AddScoped<IBlockViewRenderer, CustomBlockViewRenderer>();
builder.Services.AddScoped<IBlockDataConverter, CustomBlockDataConverter>();
```
```