Skip to content

Commit 8363914

Browse files
feat: Dynamic preview image ( Fixes #151 )
1 parent f0fbca7 commit 8363914

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

psturtle.com/config.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,13 @@ $site.Background = . $siteBackground|
300300
Set-Turtle PatternAnimation $backgroundPatternAnimations |
301301
Set-Turtle PathAttribute @{opacity=.2} |
302302
Select-Object -ExpandProperty Pattern
303+
304+
$pngPreviewFile = 'Preview.png'
305+
$siteBackground |
306+
Set-Turtle Stroke '#4488ff' |
307+
Save-Turtle -FilePath "./$pngPreviewFile"
308+
309+
$site.Image = "$($site.RootUrl)$pngPreviewFile"
310+
311+
303312
#endregion Site Background

0 commit comments

Comments
 (0)