Skip to content

augustoproiete/hangfire-dashboard-customize

 
 

Repository files navigation

README.md

Hangfire.Dashboard.Customize

Customize the title of your Hangfire Dashboard.

NuGet Version Stack Overflow

Hangfire.Dashboard.Customize screenshot

Give a Star! ⭐

If you like or are using this project please give it a star. Thanks!

Getting started 🚀

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>",
});

Release History

Click on the Releases tab on GitHub.


Copyright © 2019-2020 C. Augusto Proiete & Contributors - Provided under the Apache License, Version 2.0.