luoyunchong / IGeekFan.AspNetCore.RapiDoc

RapiDoc Custom Element for Open-API spec viewing +asp.net core
MIT License
33 stars 2 forks source link

How to replace the logo? #21

Open johnholliday opened 4 months ago

johnholliday commented 4 months ago

There does not seem to be a way to replace the logo with a custom image. Can you provide an example?

luoyunchong commented 4 months ago

upgrade version 0.0.8

          app.UseRapiDocUI(c =>
            {
                c.RoutePrefix = ""; // serve the UI at root
                c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");
                //https://mrin9.github.io/RapiDoc/api.html
                //This Config Higher priority
                c.GenericRapiConfig = new GenericRapiConfig()
                {
                    ShowHeader = true,
                    RenderStyle = "read",
                    Theme = "light",//light | dark
                    SchemaStyle = "table",////tree | table
                };
                c.SlotsOptions = new SlotOptions()
                {
                    Logo = "https://rapidocweb.com/images/dog.png"
                }
     }
johnholliday commented 4 months ago

Perfect! Thank you for your prompt response. Worked like a charm.

John F. Holliday President and CEO +1 (404) 542-4637 Holliday & Associates www.holliday.associateshttps://www.holliday.associates/ Book time with John @.***?anonymous&ep=pcard>

From: IGeekFan @.> Sent: Friday, May 3, 2024 2:25 AM To: luoyunchong/IGeekFan.AspNetCore.RapiDoc @.> Cc: John Holliday @.>; Author @.> Subject: Re: [luoyunchong/IGeekFan.AspNetCore.RapiDoc] How to replace the logo? (Issue #21)

upgrade version 0.0.8

      app.UseRapiDocUI(c =>

        {

            c.RoutePrefix = ""; // serve the UI at root

            c.SwaggerEndpoint("/v1/api-docs", "V1 Docs");

            //https://mrin9.github.io/RapiDoc/api.html

            //This Config Higher priority

            c.GenericRapiConfig = new GenericRapiConfig()

            {

                ShowHeader = true,

                RenderStyle = "read",

                Theme = "light",//light | dark

                SchemaStyle = "table",////tree | table

            };

            c.SlotsOptions = new SlotOptions()

            {

                Logo = "https://rapidocweb.com/images/dog.png"

            }

 }

— Reply to this email directly, view it on GitHubhttps://github.com/luoyunchong/IGeekFan.AspNetCore.RapiDoc/issues/21#issuecomment-2092380028, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABIMPXDWJS4HU446OS4RX6LZAMUSNAVCNFSM6AAAAABHDVD6B6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSGM4DAMBSHA. You are receiving this because you authored the thread.Message ID: @.**@.>>