API Reference
Command
New-HtmlX
Creates a new HtmlForgeX document and executes the nested DSL scriptblock.
Examples
Example 1
New-HtmlX -Title "Health Report" -FilePath .\report.html -Show {
New-HtmlXSection -Title "Overview" {
New-HtmlXText -Text "Generated: $(Get-Date)"
}
}
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
New-HtmlX [-Content <ScriptBlock>] [-Author <string>] [-AutoRefresh <int>] [-FilePath <string>] [-Language <string>] [-Offline] [-Online] [-PassThru] [-Show] [-ThemeMode <System|Light|Dark>] [-Title <string>] [<CommonParameters>]#Parameters
- Content ScriptBlock
- Scriptblock that emits child DSL elements.
- Author string
- Author metadata to place in the HTML head.
- AutoRefresh int
- Auto refresh interval in seconds; set to 0 to disable.
- FilePath string
- When provided, saves the HTML to the given file path.
- Language string
- Language tag for the HTML document (e.g. en-US).
- Offline SwitchParameter
- Force offline library mode for embedded assets.
- Online SwitchParameter
- Force online library mode for external assets.
- PassThru SwitchParameter
- Return the Document instead of a string path/HTML.
- Show SwitchParameter
- Open the output file in the default browser after save.
- ThemeMode ThemeMode
- Sets the theme mode for Tabler-based components. Possible values: System, Light, Dark
- Possible values:
System,Light,Dark - Title string
- Document title to place in the HTML head.
Outputs
System.String