Types/OpenPackage/get_Config.json.ps1

<#
.SYNOPSIS
    Gets a package's config json
.DESCRIPTION
    Gets the objects stored in any config.json files in the package.
.NOTES
    config.json files are used by several static site generators.
#>

[OutputType([PSObject])]
param()

$partPattern = '[/\+_]config\.json$'

foreach ($part in $this.GetParts()) {
    if ($part.Uri -notmatch $partPattern) { continue }
    if ($part.Reader) {
        $part.Read()
    } else {
        $part
    }
}