Types/OpenPackage/get_Eleventy.ps1
|
<# .SYNOPSIS Gets a package's eleventy files .DESCRIPTION Gets the content of any elevent config files in the package. This includes any files named: * `.eleventy.js` * `eleventy.config.js` * `eleventy.config.mjs` * `eleventy.config.cjs` .LINK https://www.11ty.dev/docs/config/ #> param() $partPattern = '/(?>\.eleventy.js|elventy\.config\.[mc]?js$)' foreach ($part in $this.GetParts()) { if ($part.Uri -match $partPattern) { if ($part.Reader) { $part.Read() } else { $part } } } |