HtmlForgeX

API Reference

Class

TablerMultiPageBuilder

Namespace HtmlForgeX
Assembly HtmlForgeX

Builder for creating multi-page applications with shared navigation.

Inheritance

  • Object
  • TablerMultiPageBuilder

Constructors

public TablerMultiPageBuilder() #

Initializes a new instance of the TablerMultiPageBuilder class.

Methods

public TablerMultiPageBuilder AddPage(String id, String title, String fileName, Action<TablerPageBuilder> config) #
Returns: TablerMultiPageBuilder

Adds a page to the multi-page application.

Parameters

id System.String requiredposition: 0
title System.String requiredposition: 1
fileName System.String requiredposition: 2
config System.Action{HtmlForgeX.TablerPageBuilder} requiredposition: 3
public TablerMultiPageBuilder ConfigureDocument(Action<Document> configure) #
Returns: TablerMultiPageBuilder

Applies additional configuration to each generated Document. Use this to set global lazy-init defaults, custom head content, or other document-level behavior without duplicating the same setup for multi-page and single-file outputs.

Parameters

configure System.Action{HtmlForgeX.Document} requiredposition: 0
public TablerMultiPageBuilder EnableCanonicalUrls(Boolean enable = true) #
Returns: TablerMultiPageBuilder

Enables emitting a canonical link tag for each generated page (requires String)).

Parameters

enable System.Boolean = true optionalposition: 0
public TablerMultiPageBuilder EnableParallelGeneration(Boolean parallel = true) #
Returns: TablerMultiPageBuilder

Enables parallel page generation for better performance.

Parameters

parallel System.Boolean = true optionalposition: 0
public TablerMultiPageBuilder EnableRobotsTxt(String fileName = "robots.txt") #
Returns: TablerMultiPageBuilder

Enables generating a robots.txt file in the output root. When sitemap generation is enabled and a base URL is set, a Sitemap: line is included.

Parameters

fileName System.String = "robots.txt" optionalposition: 0
public TablerMultiPageBuilder EnableSitemap(String fileName = "sitemap.xml", Boolean includeLastModified = false) #
Returns: TablerMultiPageBuilder

Enables generating a sitemap.xml file in the output root (requires String)).

Parameters

fileName System.String = "sitemap.xml" optionalposition: 0
includeLastModified System.Boolean = false optionalposition: 1
public List<String> Generate(String outputDirectory, Boolean openInBrowser = false) #
Returns: List<String>

Generates all pages synchronously.

Parameters

outputDirectory System.String requiredposition: 0
openInBrowser System.Boolean = false optionalposition: 1
public async Task<List<String>> GenerateAsync(String outputDirectory, Boolean openInBrowser = false) #
Returns: Task<List<String>>

Generates all pages.

Parameters

outputDirectory System.String requiredposition: 0
openInBrowser System.Boolean = false optionalposition: 1
public String GenerateSingleFile(String outputFile, Boolean openInBrowser = false) #
Returns: String

Generates a single HTML document synchronously.

Parameters

outputFile System.String requiredposition: 0
openInBrowser System.Boolean = false optionalposition: 1
public async Task<String> GenerateSingleFileAsync(String outputFile, Boolean openInBrowser = false) #
Returns: Task<String>

Generates a single HTML document that keeps the shared navigation shell but swaps between registered pages inside the same file.

Parameters

outputFile System.String requiredposition: 0
openInBrowser System.Boolean = false optionalposition: 1
public TablerMultiPageBuilder WithBackgroundColor(String color) #
Returns: TablerMultiPageBuilder

Sets the background color for all pages.

Parameters

color System.String requiredposition: 0
public TablerMultiPageBuilder WithBackgroundGradient(String gradient) #
Returns: TablerMultiPageBuilder

Sets the background gradient for all pages.

Parameters

gradient System.String requiredposition: 0
public TablerMultiPageBuilder WithBackgroundPattern(String pattern) #
Returns: TablerMultiPageBuilder

Sets the background pattern for all pages.

Parameters

pattern System.String requiredposition: 0
public TablerMultiPageBuilder WithBaseUrl(String baseUrl) #
Returns: TablerMultiPageBuilder

Sets the base URL used for absolute URL generation (canonical links, sitemap, robots sitemap pointer). Example: https://example.com/ or https://example.com/app/.

Parameters

baseUrl System.String requiredposition: 0
public TablerMultiPageBuilder WithBrand(String brandText, String brandSubtitle = null) #
Returns: TablerMultiPageBuilder

Sets the brand text for the navigation.

Parameters

brandText System.String requiredposition: 0
brandSubtitle System.String = null optionalposition: 1
public TablerMultiPageBuilder WithFooter(String footerContent) #
Returns: TablerMultiPageBuilder

Sets the footer content for all pages.

Parameters

footerContent System.String requiredposition: 0
public TablerMultiPageBuilder WithHomePageId(String pageId) #
Returns: TablerMultiPageBuilder

Sets which page should be treated as the "home" page (brand link target). If not set, the builder will prefer a page with file name index.html, otherwise the first page added.

Parameters

pageId System.String requiredposition: 0
public TablerMultiPageBuilder WithLayout(TablerLayout layout) #
Returns: TablerMultiPageBuilder

Sets the layout type for all pages.

Parameters

layout HtmlForgeX.TablerLayout requiredposition: 0
public TablerMultiPageBuilder WithLibraryMode(LibraryMode mode) #
Returns: TablerMultiPageBuilder

Sets the library mode for all pages.

Parameters

mode HtmlForgeX.LibraryMode requiredposition: 0
public TablerMultiPageBuilder WithLogo(String logoPath, TablerLogoSize size = Default) #
Returns: TablerMultiPageBuilder

Configures the logo for the navigation.

Parameters

logoPath System.String requiredposition: 0
size HtmlForgeX.TablerLogoSize = Default optionalposition: 1
public TablerMultiPageBuilder WithNavigation(Action<TablerNavigationBuilder> config) #
Returns: TablerMultiPageBuilder

Configures the navigation structure.

Parameters

config System.Action{HtmlForgeX.TablerNavigationBuilder} requiredposition: 0
WithOfflineAssetPaths 2 overloads
public TablerMultiPageBuilder WithOfflineAssetPaths(String scriptPath, String stylePath) #
Returns: TablerMultiPageBuilder

Sets where embedded JS/CSS files are written when using OfflineWithFiles. Paths are relative to the output root directory (e.g. assets/js, assets/css).

Parameters

scriptPath System.String requiredposition: 0
stylePath System.String requiredposition: 1
public TablerMultiPageBuilder WithOfflineAssetPaths(String scriptPath, String stylePath, String imagePath) #
Returns: TablerMultiPageBuilder

Sets where embedded JS/CSS/image files are written when using OfflineWithFiles. Paths are relative to the output root directory (e.g. assets/js, assets/css, assets/img).

Parameters

scriptPath System.String requiredposition: 0
stylePath System.String requiredposition: 1
imagePath System.String requiredposition: 2
public TablerMultiPageBuilder WithSecondaryNavigation(Action<TablerNavigationBuilder> config) #
Returns: TablerMultiPageBuilder

Configures the secondary navigation structure (for combo layouts).

Parameters

config System.Action{HtmlForgeX.TablerNavigationBuilder} requiredposition: 0
public TablerMultiPageBuilder WithThemeAccessibility(HfxThemeAccessibility accessibility) #
Returns: TablerMultiPageBuilder

Enables accessibility overrides for contrast/palette adjustments.

Parameters

accessibility HtmlForgeX.HfxThemeAccessibility requiredposition: 0
public TablerMultiPageBuilder WithThemeMode(ThemeMode mode) #
Returns: TablerMultiPageBuilder

Sets the theme mode for all pages.

Parameters

mode HtmlForgeX.ThemeMode requiredposition: 0
public TablerMultiPageBuilder WithThemeVariants(HfxThemeVariant light = Default, HfxThemeVariant dark = Default) #
Returns: TablerMultiPageBuilder

Sets the default theme variants used by documents when the resolved mode is light/dark. For example, you can enable a deeper dark mode via DarkBlack or DarkCarbon.

Parameters

light HtmlForgeX.HfxThemeVariant = Default optionalposition: 0
dark HtmlForgeX.HfxThemeVariant = Default optionalposition: 1
public TablerMultiPageBuilder WithTwoStageNavigation(Action<TablerTwoStageNavigationBuilder> config) #
Returns: TablerMultiPageBuilder

Configures two-stage navigation with header navbar and sidebar.

Parameters

config System.Action{HtmlForgeX.TablerTwoStageNavigationBuilder} requiredposition: 0