psturtle.com/SECURITY.html.ps1

<#
.SYNOPSIS
    Project Security
.DESCRIPTION
    Security notice for the Project
.NOTES
    The security notice for the Project
#>

param(
# We can provide the repository url by hard-coding it,
# or it can be provided in site or page metadata.
# If we do not provide either, we can also look at the `$gitHubEvent`
[uri]
$RepositoryUrl,

# We can provide the path by hard-coding it, or it can provided in site or page metadata.
[string]
$SecurityPath = '../SECURITY.md'
)

# Push into this location, in case we are building this file interactively.
if ($PSScriptRoot) { Push-Location $PSScriptRoot}

if (-not $RepositoryUrl) {
    if ($gitHubEvent.repository.html_url) {
        $repositoryUrl = $gitHubEvent.repository.html_url -as [uri]
    } else {
        return
    }
}

# Get my own help
$myHelp = Get-Help $MyInvocation.MyCommand.ScriptBlock.File
if ($myHelp) {
    # If we have page metadata
    if ($page -is [Collections.IDictionary]) {
        # Replace 'Project' in the title with the url, to make the title and description more helpful
        $page.Title = $myHelp.SYNOPSIS -replace 'Project', { 
            $RepositoryUrl.Segments[-1] -replace '/'
        }
        $page.Description = $myHelp.Description.text -join [Environment]::NewLine -replace 'The Project', {
            $RepositoryUrl.Segments[-1] -replace '/'
        }
    }

    # If we have notes, replace the project with our name
    $myNotes = $myHelp.alertSet.alert.text -join [Environment]::NewLine -replace 'The Project', {
        $RepositoryUrl.Segments[-1] -replace '/'
    }
    if ($myNotes) {
        # and convert our notes from markdown.
        (ConvertFrom-Markdown -InputObject $myNotes).Html
    }
}

if (Test-Path $SecurityPath) {
    ConvertFrom-Markdown -Path $SecurityPath | 
        Select-Object -ExpandProperty HTML
}

if ($PSScriptRoot) { Pop-Location }