File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8201,6 +8201,42 @@ filter at.markpub.markdown {
82018201}
82028202 </Script >
82038203 </ScriptMethod >
8204+ <ScriptMethod >
8205+ <Name >FeatherIcon.svg</Name >
8206+ <Script >
8207+ < #
8208+ .SYNOPSIS
8209+ Views Feather Icons
8210+ .DESCRIPTION
8211+ Shows a feather icon.
8212+ .NOTES
8213+ Icons will be cached in memory to avoid repeated CDN requests.
8214+ .EXAMPLE
8215+ $site.Includes.Feather "clipboard"
8216+ .LINK
8217+ https://feathericons.com/
8218+ #>
8219+ param(
8220+ [string]
8221+ $Icon = 'chevron-right',
8222+
8223+ [uri]
8224+ $FeatherCDN = "https://cdn.jsdelivr.net/gh/feathericons/feather@latest/icons/"
8225+ )
8226+
8227+ if (-not $script:FeatherIconCache) {
8228+ $script:FeatherIconCache = [Ordered]@{}
8229+ }
8230+ $icon = $icon.ToLower() -replace '\.svg$'
8231+
8232+ if (-not $script:FeatherIconCache[$icon]) {
8233+ $script:FeatherIconCache[$icon] = Invoke-RestMethod "$FeatherCDN/$Icon.svg"
8234+ }
8235+
8236+ $script:FeatherIconCache[$icon].OuterXml
8237+
8238+ </Script >
8239+ </ScriptMethod >
82048240 <ScriptMethod >
82058241 <Name >Markdown.html</Name >
82068242 <Script >
You can’t perform that action at this time.
0 commit comments