Customize the title of your Hangfire Dashboard.
Install the Hangfire.Dashboard.Customize package from NuGet:
Install-Package Hangfire.Dashboard.Customize
Call the method UseHangfireDashboardCustomOptions
just before calling Hangfire's UseHangfireDashboard
, in the configuration of your app:
public class Startup
{
// ...
public void Configure(IApplicationBuilder app)
{
// ...
app.UseHangfireDashboardCustomOptions(new HangfireDashboardCustomOptions
{
DashboardTitle = () => "My Dashboard Title :)",
});
// ...
app.UseHangfireDashboard();
// ...
}
}
In your HangfireDashboardCustomOptions
instance, you can define a function that returns the title you would like to display in your Hangfire Dashboard.
The string
defined in the DashboardTitle
will be written to the page as a raw string, allowing the use of images and other HTML elements.
app.UseHangfireDashboardCustomOptions(new HangfireDashboardCustomOptions
{
DashboardTitle = () => "<img src=\"logo.png\" /> <b>Scheduled Jobs</b>",
});
Copyright © 2019 Caio Proiete & Contributors - Provided under the Apache License, Version 2.0.