Skip to content

Commit adecc83

Browse files
committed
feat: extend ShellDocsOptions with logo properties and methods for enhanced branding support
1 parent 0425b48 commit adecc83

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

src/ShellDocs.Components/ShellDocsOptions.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ public class ShellDocsOptions
1010
public string SiteName { get; set; } = "";
1111
public string? SiteTagline { get; set; }
1212
public string? GitHubRepo { get; set; }
13+
14+
public string? LogoLight { get; set; }
15+
public string? LogoDark { get; set; }
16+
public string? LogoAlt { get; set; }
17+
public double LogoHeight { get; set; } = 1.375;
18+
// Rendered as MarkupString — must be trusted content the consumer authored, not user input.
19+
public string? LogoSvg { get; set; }
1320
public ShellDocsTheme Theme { get; set; } = ShellDocsTheme.Shadcn;
1421
public DocsLayoutVariant LayoutVariant { get; set; } = DocsLayoutVariant.TopNav;
1522

@@ -117,6 +124,22 @@ public ShellDocsOptions AddPackage(string id, string title, string description,
117124
return this;
118125
}
119126

127+
public ShellDocsOptions SetLogo(string url, string? alt = null)
128+
{
129+
LogoLight = url;
130+
LogoDark = url;
131+
if (alt is not null) LogoAlt = alt;
132+
return this;
133+
}
134+
135+
public ShellDocsOptions SetLogo(string lightUrl, string darkUrl, string? alt = null)
136+
{
137+
LogoLight = lightUrl;
138+
LogoDark = darkUrl;
139+
if (alt is not null) LogoAlt = alt;
140+
return this;
141+
}
142+
120143
internal TypeRegistry BuildTypeRegistry()
121144
{
122145
var registry = new TypeRegistry();

0 commit comments

Comments
 (0)