Skip to content

New-HTML -FavIcon #99

@xlrod

Description

@xlrod

Hello,

I've added the -FavIcon parameter to New-HTML to allow for favicons for the dashboards.

image

image

$Table = Get-Process | Select-Object -First 5

New-HTML -TitleText "Test-Dashboard" -FavIcon "$PSScriptRoot\138544-interaction-assets\png\file-2.png" -FilePath "$PSScriptRoot\Test-Dashboard.html" {
    New-HTMLTable -DataTable $Table
}

Is there any type of validation I should add aside from an if statement with a Test-Path?

if(Test-Path -Path $FavIcon){
    New-HTMLTag -Tag 'link' -Attributes @{rel = 'icon'; href = "$FavIcon"; type = 'image/x-icon'}
}

I was thinking of doing the Test-Path with -Filter for allowed favicon formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions