Sisk

Class

HtmlDocumentationExporter

Namespace
Sisk.Documenting.Html
Assembly
Sisk.Documenting.Html.dll

Represents a class for exporting API documentation to HTML format.

C#
public class HtmlDocumentationExporter : IApiDocumentationExporter

Inheritance #

object ← HtmlDocumentationExporter

Implements #

IApiDocumentationExporter

Inherited Members #

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors #

NameDescription
HtmlDocumentationExporter()Creates an new instance of the HtmlDocumentationExporter class.

Properties #

NameDescription
FooterGets or sets an optional object to append after the generated contents, right at the end of the <main> tag of the generated page.
FormatBackToEndpointsGets or sets the format string for the link that returns from an endpoint page to the endpoint listing.
FormatEndpointHeadersGets or sets the format string for endpoint headers.
FormatEndpointParametersGets or sets the format string for endpoint request parameters.
FormatEndpointPathParametersGets or sets the format string for endpoint path parameters.
FormatEndpointQueryParametersGets or sets the format string for endpoint query parameters.
FormatEndpointRequestExamplesGets or sets the format string for endpoint request examples.
FormatEndpointResponsesGets or sets the format string for endpoint responses.
FormatMainTitleServiceVersionGets or sets the format string for the main title service version.
FormatNavApiReferenceGets or sets the format string for the navigation section title for API Reference.
FormatParameterExamplesGets or sets the heading displayed above the situational examples for a request parameter.
FormatRequiredTextGets or sets the format string for required text.
FormatShowLessGets or sets the label of the button that collapses an expanded request or response example description.
FormatShowMoreGets or sets the label of the button that expands a long request or response example description.
FormatTabExampleGets or sets the format string for the “Example” tab label.
FormatTabSchemaGets or sets the format string for the “Schema” tab label.
HeadGets or sets an optional object to append inside the <head> tag of the generated page.
HeaderGets or sets an optional object to append after the main title, at the beginning of the <main> tag of the generated page.
IncludeSidebarGets or sets whether to include the sidebar navigation. Default is true.
PageTitleGets or sets the title of the HTML page.
ScriptGets or sets the JavaScript script to be included in the HTML page.
StyleGets or sets the CSS styles of the HTML page.

Methods #

NameDescription
CreateCodeBlock(string, string?)Creates an HTML code block element from the provided code and language.
CreateEndpointBadge(RouteMethod, string?)Creates an HTML badge element for an API endpoint.
CreateExampleSchemaTabControl(string?, string?, string?, string)Creates a tab control with Example and Schema tabs when both are available. If only one is available, it renders just that content without tabs.
CreateParagraphs(string?)Creates one or more HTML paragraph elements from the provided text.
Ellipsis(string?, int)Truncates a string to the specified size, appending an ellipsis if necessary.
ExportDocumentationContent(ApiDocumentation)Exports the API documentation as HTTP content.
ExportHtml(ApiDocumentation)Exports the API documentation as an HTML string.
GetEndpointId(ApiEndpoint)Gets the unique HTML ID of an API endpoint, derived from its method and route path.
GetRouteMethodHexColor(RouteMethod)Gets the hex color code associated with the specified route method.
IncludePrismJs()Includes the Prism.js syntax-highlighter library by appending its JavaScript and CSS to the current Script and Style properties.
TransformId(string)Transforms an unsafe ID into a safe and valid HTML ID.
WriteEndpointDescription(ApiEndpoint)Writes the description of an API endpoint.
WriteMainTitle(ApiDocumentation)Writes the main title of the API documentation.
WriteSidebarNavigation(ApiDocumentation)Writes the sidebar navigation for the API documentation.
WriteThemeSwitcher()Writes the color theme switcher, which lets the reader choose between the system, light and dark themes.

Type to search the documentation and the API reference.