PoSh.FluidTemplateEngine.dll-Help.xml
|
<?xml version="1.0" encoding="utf-8"?> <helpItems schema="maml" xmlns="http://msh"> <!-- Cmdlet: Invoke-FluidFile --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Invoke-FluidFile</command:name> <command:verb>Invoke</command:verb> <command:noun>FluidFile</command:noun> <maml:description> <maml:para>Renders a Liquid template from a file.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>By default, -TemplateRoot is deduced from the file's folder (useful for {% include %}).</maml:para> </maml:description> <command:syntax> <!-- Parameter set: Default --> <command:syntaxItem> <maml:name>Invoke-FluidFile</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="FullName"> <maml:name>Path</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: HtmlEncoded --> <command:syntaxItem> <maml:name>Invoke-FluidFile</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="FullName"> <maml:name>Path</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: NoEncoding --> <command:syntaxItem> <maml:name>Invoke-FluidFile</maml:name> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="FullName"> <maml:name>Path</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Path --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0" aliases="FullName"> <maml:name>Path</maml:name> <maml:description> <maml:para>Path to the template file to render.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <maml:description> <maml:para>The model (hashtable, PSCustomObject, or object) exposed to the template.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <maml:description> <maml:para>Enables HTML encoding (HtmlEncoder.Default) during rendering.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <maml:description> <maml:para>Backward compatibility with old PowerShell wrapper. Has no effect as encoding is disabled by default.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <maml:description> <maml:para>Root directory for templates for include/render tags.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: String --> <command:returnValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- Example 1: Render a .liquid file ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Invoke-FluidFile -Path './templates/main.liquid' -Model @{ value = 'X' }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Render with an explicit include root ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Invoke-FluidFile -Path './templates/main.liquid' -TemplateRoot './templates' -Model @{ value = 'X' }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Get-FluidModuleConfig --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Get-FluidModuleConfig</command:name> <command:verb>Get</command:verb> <command:noun>FluidModuleConfig</command:noun> <maml:description> <maml:para>Displays the global configuration of the PoSh.FluidTemplateEngine module.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The configuration is stored in the current PowerShell session and is used by default by other cmdlets.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Get-FluidModuleConfig</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <!-- OutputType: FluidModuleConfiguration --> <command:returnValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.FluidModuleConfiguration</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- Example 1: Display the current configuration ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Get-FluidModuleConfig</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Set-FluidModuleConfig --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Set-FluidModuleConfig</command:name> <command:verb>Set</command:verb> <command:noun>FluidModuleConfig</command:noun> <maml:description> <maml:para>Configures the global configuration of the PoSh.FluidTemplateEngine module.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>These options influence parsing/rendering (includes, strict modes, execution limits, etc.).</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Set-FluidModuleConfig</maml:name> <!-- Parameter: AllowFunctions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowFunctions</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: AllowParentheses --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowParentheses</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Culture --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Culture</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Greedy --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Greedy</maml:name> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: IgnoreMemberCasing --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreMemberCasing</maml:name> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: JsonIndented --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>JsonIndented</maml:name> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: JsonRelaxedEscaping --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>JsonRelaxedEscaping</maml:name> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: MaxRecursion --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MaxRecursion</maml:name> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>int</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: MaxSteps --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MaxSteps</maml:name> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>int</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ModelNamesComparer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ModelNamesComparer</maml:name> <command:parameterValue required="true">ModelNamesComparerMode</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.ModelNamesComparerMode</maml:name> <maml:uri /> <maml:description> <maml:para>Defines which StringComparer is used to compare variable/property names exposed to the Liquid context (Fluid TemplateOptions.ModelNamesComparer).</maml:para> </maml:description> </dev:type> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">OrdinalIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">Ordinal</command:parameterValue> <command:parameterValue required="false" variableLength="false">InvariantCultureIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">InvariantCulture</command:parameterValue> <command:parameterValue required="false" variableLength="false">CurrentCultureIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">CurrentCulture</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Reset --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Reset</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: StrictFilters --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StrictFilters</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: StrictVariables --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StrictVariables</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TimeZoneId --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeZone"> <maml:name>TimeZoneId</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Trimming --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Trimming</maml:name> <command:parameterValue required="true">TrimmingFlags</command:parameterValue> <dev:type> <maml:name>Fluid.TrimmingFlags</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> <command:parameterValue required="false" variableLength="false">TagLeft</command:parameterValue> <command:parameterValue required="false" variableLength="false">TagRight</command:parameterValue> <command:parameterValue required="false" variableLength="false">OutputLeft</command:parameterValue> <command:parameterValue required="false" variableLength="false">OutputRight</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: UndefinedFormat --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UndefinedFormat</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <maml:description> <maml:para>Root directory for templates for include/render tags.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: StrictVariables --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StrictVariables</maml:name> <maml:description> <maml:para>Enables strict mode: access to an unknown variable fails.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: StrictFilters --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>StrictFilters</maml:name> <maml:description> <maml:para>Enables strict mode: use of an unknown filter fails.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: MaxSteps --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MaxSteps</maml:name> <maml:description> <maml:para>Maximum number of execution steps of a template (0 = unlimited).</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>int</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: MaxRecursion --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>MaxRecursion</maml:name> <maml:description> <maml:para>Max recursion depth (includes/renders) (null = Fluid default).</maml:para> </maml:description> <command:parameterValue required="true">int</command:parameterValue> <dev:type> <maml:name>int</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: AllowFunctions --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowFunctions</maml:name> <maml:description> <maml:para>Allows functions (FluidParserOptions.AllowFunctions) during parsing.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: AllowParentheses --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>AllowParentheses</maml:name> <maml:description> <maml:para>Allows parentheses (FluidParserOptions.AllowParentheses) during parsing.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: UndefinedFormat --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>UndefinedFormat</maml:name> <maml:description> <maml:para>Fallback value when a variable is undefined (if -StrictVariables is disabled). Use the placeholder {name} to include the path. Example: [{name} not found]</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Culture --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Culture</maml:name> <maml:description> <maml:para>Culture used for rendering (e.g.: "fr-FR", "en-US").</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TimeZoneId --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named" aliases="TimeZone"> <maml:name>TimeZoneId</maml:name> <maml:description> <maml:para>System time zone used to parse dates without an explicit time zone (e.g.: "Europe/Paris").</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Trimming --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Trimming</maml:name> <maml:description> <maml:para>Default trimming rules (Fluid TemplateOptions.Trimming).</maml:para> <maml:para>Possible values: None, TagLeft, TagRight, OutputLeft, OutputRight</maml:para> </maml:description> <command:parameterValue required="true">TrimmingFlags</command:parameterValue> <dev:type> <maml:name>Fluid.TrimmingFlags</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">None</command:parameterValue> <command:parameterValue required="false" variableLength="false">TagLeft</command:parameterValue> <command:parameterValue required="false" variableLength="false">TagRight</command:parameterValue> <command:parameterValue required="false" variableLength="false">OutputLeft</command:parameterValue> <command:parameterValue required="false" variableLength="false">OutputRight</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: Greedy --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Greedy</maml:name> <maml:description> <maml:para>Enables/disables greedy mode for trimming (default: true).</maml:para> </maml:description> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ModelNamesComparer --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>ModelNamesComparer</maml:name> <maml:description> <maml:para>Comparer used for property names (ModelNamesComparer).</maml:para> <maml:para>Possible values: OrdinalIgnoreCase, Ordinal, InvariantCultureIgnoreCase, InvariantCulture, CurrentCultureIgnoreCase, CurrentCulture</maml:para> </maml:description> <command:parameterValue required="true">ModelNamesComparerMode</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.ModelNamesComparerMode</maml:name> <maml:uri /> <maml:description> <maml:para>Defines which StringComparer is used to compare variable/property names exposed to the Liquid context (Fluid TemplateOptions.ModelNamesComparer).</maml:para> </maml:description> </dev:type> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">OrdinalIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">Ordinal</command:parameterValue> <command:parameterValue required="false" variableLength="false">InvariantCultureIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">InvariantCulture</command:parameterValue> <command:parameterValue required="false" variableLength="false">CurrentCultureIgnoreCase</command:parameterValue> <command:parameterValue required="false" variableLength="false">CurrentCulture</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: IgnoreMemberCasing --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>IgnoreMemberCasing</maml:name> <maml:description> <maml:para>Ignores casing when accessing members on registered .NET types.</maml:para> </maml:description> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: JsonIndented --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>JsonIndented</maml:name> <maml:description> <maml:para>Enables/disables indented JSON for the json filter.</maml:para> </maml:description> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: JsonRelaxedEscaping --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>JsonRelaxedEscaping</maml:name> <maml:description> <maml:para>Enables/disables relaxed JSON encoding (UnsafeRelaxedJsonEscaping) for the json filter.</maml:para> </maml:description> <command:parameterValue required="true">bool</command:parameterValue> <dev:type> <maml:name>bool</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Reset --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Reset</maml:name> <maml:description> <maml:para>Resets the configuration to default values.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Set a root for includes ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Set-FluidModuleConfig -TemplateRoot './templates'</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Enable strict modes ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Set-FluidModuleConfig -StrictVariables -StrictFilters</dev:code> </command:example> <command:example> <maml:title>---------- Example 3: Limit execution ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Set-FluidModuleConfig -MaxSteps 100000 -MaxRecursion 20</dev:code> </command:example> <command:example> <maml:title>---------- Example 4: Reset ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Set-FluidModuleConfig -Reset</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Invoke-FluidTemplate --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Invoke-FluidTemplate</command:name> <command:verb>Invoke</command:verb> <command:noun>FluidTemplate</command:noun> <maml:description> <maml:para>Renders a compiled Liquid template with a model.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Accepts as input a template from New-FluidTemplate (pipeline) or a Fluid IFluidTemplate instance.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: Default --> <command:syntaxItem> <maml:name>Invoke-FluidTemplate</maml:name> <!-- Parameter: Template --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Template</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: HtmlEncoded --> <command:syntaxItem> <maml:name>Invoke-FluidTemplate</maml:name> <!-- Parameter: Template --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Template</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: NoEncoding --> <command:syntaxItem> <maml:name>Invoke-FluidTemplate</maml:name> <!-- Parameter: Template --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Template</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Template --> <command:parameter required="true" globbing="false" pipelineInput="true (ByValue)" position="0"> <maml:name>Template</maml:name> <maml:description> <maml:para>The compiled template (or an IFluidTemplate).</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <maml:description> <maml:para>The model (hashtable, PSCustomObject, or object) exposed to the template.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <maml:description> <maml:para>Enables HTML encoding (HtmlEncoder.Default) during rendering.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <maml:description> <maml:para>Backward compatibility with old PowerShell wrapper. Has no effect as encoding is disabled by default.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <maml:description> <maml:para>Root directory for templates for include/render tags.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:inputType> </command:inputTypes> <command:returnValues> <!-- OutputType: String --> <command:returnValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- Example 1: Render a compiled template ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>New-FluidTemplate -Source 'Hi {{ name }}' | Invoke-FluidTemplate -Model @{ name = 'Bob' }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Rendering with HTML encoding ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>New-FluidTemplate -Source '{{ value }}' | Invoke-FluidTemplate -Model @{ value = '<tag>' } -HtmlEncode</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: New-FluidTemplate --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>New-FluidTemplate</command:name> <command:verb>New</command:verb> <command:noun>FluidTemplate</command:noun> <maml:description> <maml:para>Compiles a Liquid template into a reusable template.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The result can be passed to Invoke-FluidTemplate, including via the pipeline.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>New-FluidTemplate</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Name --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <maml:description> <maml:para>The source code of the Liquid template.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Name --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Name</maml:name> <maml:description> <maml:para>Optional name (metadata) associated with the compiled template.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <maml:description> <maml:para>Root directory for templates for include/render tags.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: CompiledFluidTemplate --> <command:returnValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.CompiledFluidTemplate</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- Example 1: Compile a template ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$tpl = New-FluidTemplate -Source 'Hi {{ name }}'</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Compile then render ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>New-FluidTemplate -Source 'Hi {{ name }}' | Invoke-FluidTemplate -Model @{ name = 'Bob' }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Register-FluidType --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-FluidType</command:name> <command:verb>Register</command:verb> <command:noun>FluidType</command:noun> <maml:description> <maml:para>Allow-lists a .NET type for property access in templates.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Fluid is secure by default and only allows access to CLR members for registered types. This cmdlet registers a type in the member access strategy (TemplateOptions.MemberAccessStrategy).</maml:para> </maml:description> <command:syntax> <!-- Parameter set: ByType --> <command:syntaxItem> <maml:name>Register-FluidType</maml:name> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Type</maml:name> <command:parameterValue required="true">Type</command:parameterValue> <dev:type> <maml:name>System.Type</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Member --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Member</maml:name> <command:parameterValue required="true">string[]</command:parameterValue> <dev:type> <maml:name>string[]</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: ByName --> <command:syntaxItem> <maml:name>Register-FluidType</maml:name> <!-- Parameter: TypeName --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>TypeName</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Member --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Member</maml:name> <command:parameterValue required="true">string[]</command:parameterValue> <dev:type> <maml:name>string[]</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Type</maml:name> <maml:description> <maml:para>.NET type to register (e.g. [MyType]).</maml:para> </maml:description> <command:parameterValue required="true">Type</command:parameterValue> <dev:type> <maml:name>System.Type</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TypeName --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>TypeName</maml:name> <maml:description> <maml:para>Name of the .NET type to register (e.g. System.Version).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Member --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>Member</maml:name> <maml:description> <maml:para>List of allowed properties. If omitted, all public properties are registered.</maml:para> </maml:description> <command:parameterValue required="true">string[]</command:parameterValue> <dev:type> <maml:name>string[]</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Register all public properties of a type ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-FluidType -Type ([System.Diagnostics.Process])</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Register only some properties ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-FluidType -TypeName 'System.Diagnostics.Process' -Member Id, ProcessName</dev:code> </command:example> <command:example> <maml:title>---------- Example 3: Render a CLR object directly after registration ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-FluidType -TypeName 'System.Version' -Member Major, Minor Format-LiquidString -Source '{{ v.Major }}.{{ v.Minor }}' -Model @{ v = [Version]'1.2.3' }</dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Register-LiquidBlock --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-LiquidBlock</command:name> <command:verb>Register</command:verb> <command:noun>LiquidBlock</command:noun> <maml:description> <maml:para>Registers a custom Liquid block (with closing block).</maml:para> </maml:description> </command:details> <maml:description> <maml:para>A block is a Liquid element with internal content delimited by {%% name %%}...{%% endname %%}. The ScriptBlock receives the rendered body content and returns the final text.</maml:para> <maml:para>Three block types are supported : Empty Block with no parameter. ScriptBlock receives $body. E.g.: {%% wrap %%}...{%% endwrap %%} Identifier Block with an identifier. ScriptBlock receives $identifier and $body. E.g.: {%% tag div %%}...{%% endtag %%} Expression Block with an evaluated expression. ScriptBlock receives $value and $body. E.g.: {%% repeat 3 %%}...{%% endrepeat %%}</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-LiquidBlock</maml:name> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>Type</maml:name> <command:parameterValue required="true">LiquidTagType</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.LiquidTagType</maml:name> <maml:uri /> <maml:description> <maml:para>Determines the parameter style of a custom Liquid tag or block.</maml:para> </maml:description> </dev:type> <dev:defaultValue>Empty</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Empty</command:parameterValue> <command:parameterValue required="false" variableLength="false">Identifier</command:parameterValue> <command:parameterValue required="false" variableLength="false">Expression</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="2"> <maml:name>ScriptBlock</maml:name> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>Name of the block (e.g. repeat, card). The closing tag will be end<name>.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>Type</maml:name> <maml:description> <maml:para>Type of block parameter: Empty, Identifier, or Expression.</maml:para> <maml:para>Possible values: Empty, Identifier, Expression</maml:para> </maml:description> <command:parameterValue required="true">LiquidTagType</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.LiquidTagType</maml:name> <maml:uri /> <maml:description> <maml:para>Determines the parameter style of a custom Liquid tag or block.</maml:para> </maml:description> </dev:type> <dev:defaultValue>Empty</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Empty</command:parameterValue> <command:parameterValue required="false" variableLength="false">Identifier</command:parameterValue> <command:parameterValue required="false" variableLength="false">Expression</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="2"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>Block implementation as ScriptBlock.\§ The ScriptBlock receives the rendered content and must return the final text. - Empty: param($body) - Identifier: param($identifier, $body) - Expression: param($value, $body) (evaluated expression)</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Empty block: HTML wrapper ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidBlock -Name 'card' -Type Empty -ScriptBlock { param($body) "<div class='card'>$body</div>" }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Block with identifier: named wrapper ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidBlock -Name 'tag' -Type Identifier -ScriptBlock { param($identifier, $body) "<$identifier>$body</$identifier>" }</dev:code> </command:example> <command:example> <maml:title>---------- Example 3: Block with expression: repeat the content N times ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidBlock -Name 'repeat' -Type Expression -ScriptBlock { param($value, $body) $body * [int]$value }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Register-LiquidFilter --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-LiquidFilter</command:name> <command:verb>Register</command:verb> <command:noun>LiquidFilter</command:noun> <maml:description> <maml:para>Registers a custom Liquid filter (ScriptBlock).</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The ScriptBlock receives as first argument the input value, then the positional arguments of the filter.</maml:para> <maml:para>Liquid example: {{ name | shout }}</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-LiquidFilter</maml:name> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>ScriptBlock</maml:name> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>Name of the filter (e.g. shout, prefix).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>Filter implementation as ScriptBlock.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Create a shout filter ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidFilter -Name 'shout' -ScriptBlock { param($input) $input.ToString().ToUpperInvariant() }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Filter with arguments ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidFilter -Name 'prefix' -ScriptBlock { param($input, $p) "$p$input" }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Register-LiquidOperator --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-LiquidOperator</command:name> <command:verb>Register</command:verb> <command:noun>LiquidOperator</command:noun> <maml:description> <maml:para>Registers a custom Liquid binary operator.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Operators are used in Liquid conditions to compare values (e.g.: ==, contains). The ScriptBlock receives the two operands and must return a boolean.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-LiquidOperator</maml:name> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>ScriptBlock</maml:name> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>Operator keyword (e.g. xor, matches).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>Comparison implementation as ScriptBlock.\§ The ScriptBlock receives param($left, $right) and must return a boolean.</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Custom XOR operator ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidOperator -Name 'xor' -ScriptBlock { param($left, $right) [bool]$left -xor [bool]$right } Format-LiquidString -Source "{% if true xor false %}Yes{% endif %}" -Model @{}</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Custom "matches" operator (regex) ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidOperator -Name 'matches' -ScriptBlock { param($left, $right) $left -match $right } Format-LiquidString -Source "{% if name matches '^A' %}Starts with A{% endif %}" -Model @{ name = 'Alice' }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <!-- Cmdlet: Format-LiquidString --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Format-LiquidString</command:name> <command:verb>Format</command:verb> <command:noun>LiquidString</command:noun> <maml:description> <maml:para>Parses and renders a Liquid template (in one step).</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This cmdlet parses then renders a Liquid template via Fluid.</maml:para> <maml:para>By default, the output is not encoded. Use -HtmlEncode to enable HTML encoding.</maml:para> </maml:description> <command:syntax> <!-- Parameter set: Default --> <command:syntaxItem> <maml:name>Format-LiquidString</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: HtmlEncoded --> <command:syntaxItem> <maml:name>Format-LiquidString</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> <!-- Parameter set: NoEncoding --> <command:syntaxItem> <maml:name>Format-LiquidString</maml:name> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Source --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Source</maml:name> <maml:description> <maml:para>The source code of the Liquid template.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Model --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>Model</maml:name> <maml:description> <maml:para>The model (hashtable, PSCustomObject, or object) exposed to the template.</maml:para> </maml:description> <command:parameterValue required="true">object</command:parameterValue> <dev:type> <maml:name>object</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: HtmlEncode --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>HtmlEncode</maml:name> <maml:description> <maml:para>Enables HTML encoding (HtmlEncoder.Default) during rendering.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: NoEncoding --> <command:parameter required="true" globbing="false" pipelineInput="false" position="named"> <maml:name>NoEncoding</maml:name> <maml:description> <maml:para>Backward compatibility with old PowerShell wrapper. Has no effect as encoding is disabled by default.</maml:para> </maml:description> <command:parameterValue required="true">SwitchParameter</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <!-- Parameter: TemplateRoot --> <command:parameter required="false" globbing="false" pipelineInput="false" position="named"> <maml:name>TemplateRoot</maml:name> <maml:description> <maml:para>Root directory for templates for include/render tags.</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <!-- OutputType: String --> <command:returnValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>---------- Example 1: Render a Liquid string ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Format-LiquidString -Source 'Hello {{ name }}' -Model @{ name = 'Alice' }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Enable HTML encoding ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Format-LiquidString -Source '{{ value }}' -Model @{ value = '<tag>' } -HtmlEncode</dev:code> </command:example> </command:examples> </command:command> <!-- Cmdlet: Register-LiquidTag --> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10"> <command:details> <command:name>Register-LiquidTag</command:name> <command:verb>Register</command:verb> <command:noun>LiquidTag</command:noun> <maml:description> <maml:para>Registers a custom Liquid tag (without closing block).</maml:para> </maml:description> </command:details> <maml:description> <maml:para>A tag is a Liquid element without internal content (no {%% end... %%}). The ScriptBlock returns the text to write in the rendering.</maml:para> <maml:para>Three tag types are supported : Empty Tag with no parameter. ScriptBlock receives no argument. E.g.: {%% mytag %%} Identifier Tag with an identifier. ScriptBlock receives $identifier. E.g.: {%% hello world %%} Expression Tag with an evaluated expression. ScriptBlock receives $value. E.g.: {%% echo 'text' | upcase %%}</maml:para> </maml:description> <command:syntax> <!-- Parameter set: __AllParameterSets --> <command:syntaxItem> <maml:name>Register-LiquidTag</maml:name> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>Type</maml:name> <command:parameterValue required="true">LiquidTagType</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.LiquidTagType</maml:name> <maml:uri /> <maml:description> <maml:para>Determines the parameter style of a custom Liquid tag or block.</maml:para> </maml:description> </dev:type> <dev:defaultValue>Empty</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Empty</command:parameterValue> <command:parameterValue required="false" variableLength="false">Identifier</command:parameterValue> <command:parameterValue required="false" variableLength="false">Expression</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="2"> <maml:name>ScriptBlock</maml:name> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <!-- Parameter: Name --> <command:parameter required="true" globbing="false" pipelineInput="false" position="0"> <maml:name>Name</maml:name> <maml:description> <maml:para>Name of the tag (e.g. hello, timestamp).</maml:para> </maml:description> <command:parameterValue required="true">string</command:parameterValue> <dev:type> <maml:name>string</maml:name> <maml:uri /> </dev:type> </command:parameter> <!-- Parameter: Type --> <command:parameter required="true" globbing="false" pipelineInput="false" position="1"> <maml:name>Type</maml:name> <maml:description> <maml:para>Type of tag parameter: Empty, Identifier, or Expression.</maml:para> <maml:para>Possible values: Empty, Identifier, Expression</maml:para> </maml:description> <command:parameterValue required="true">LiquidTagType</command:parameterValue> <dev:type> <maml:name>PoSh.FluidTemplateEngine.Core.LiquidTagType</maml:name> <maml:uri /> <maml:description> <maml:para>Determines the parameter style of a custom Liquid tag or block.</maml:para> </maml:description> </dev:type> <dev:defaultValue>Empty</dev:defaultValue> <command:parameterValueGroup> <command:parameterValue required="false" variableLength="false">Empty</command:parameterValue> <command:parameterValue required="false" variableLength="false">Identifier</command:parameterValue> <command:parameterValue required="false" variableLength="false">Expression</command:parameterValue> </command:parameterValueGroup> </command:parameter> <!-- Parameter: ScriptBlock --> <command:parameter required="true" globbing="false" pipelineInput="false" position="2"> <maml:name>ScriptBlock</maml:name> <maml:description> <maml:para>Tag implementation as ScriptBlock.\§ The ScriptBlock must return the text to write. - Empty: no argument - Identifier: param($identifier) - Expression: param($value) (evaluated expression)</maml:para> </maml:description> <command:parameterValue required="true">ScriptBlock</command:parameterValue> <dev:type> <maml:name>System.Management.Automation.ScriptBlock</maml:name> <maml:uri /> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues /> <command:examples> <command:example> <maml:title>---------- Example 1: Empty tag ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidTag -Name 'timestamp' -Type Empty -ScriptBlock { (Get-Date).ToString('o') }</dev:code> </command:example> <command:example> <maml:title>---------- Example 2: Tag with identifier ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidTag -Name 'hello' -Type Identifier -ScriptBlock { param($identifier) "Hello $identifier!" }</dev:code> </command:example> <command:example> <maml:title>---------- Example 3: Tag with expression ----------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Register-LiquidTag -Name 'echo' -Type Expression -ScriptBlock { param($value) "[$value]" }</dev:code> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> <maml:navigationLink> <maml:linkText></maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> </helpItems> |