Skip to content

Commit 587502e

Browse files
author
James Brundage
committed
docs: PSJekyll Sponsorship ( Fixes #88 )
2 parents f228497 + 6ae8184 commit 587502e

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

docs/README.md

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,70 @@
44

55
# PSJekyll
66

7-
Scary Simple Static Sites with PowerShell and Jekyll
7+
Scarily Simple Static Sites with Jekyll and PowerShell
88

99
[Jekyll](https://jekyllrb.com) is a static site generator and server.
1010

1111
PowerShell is a dynamic scripting language that works with everything.
1212

1313
PSJekyll is a PowerShell module for managing Jekyll websites.
1414

15+
## PSJekyll Basics
16+
17+
You can install PSJekyll from the Gallery:
18+
19+
~~~PowerShell
20+
Install-Module PSJekyll -Force -Scope CurrentUser
21+
~~~
22+
23+
Then you can import it by name:
24+
25+
~~~PowerShell
26+
Import-Module PSJekyll
27+
~~~
28+
29+
`$psJekyll.Site` will have any sites beneath the current directory:
30+
31+
~~~PowerShell
32+
# Push into the PSJekyll module, which will have a site
33+
Get-Module PSJekyll | Split-Path | Push-Location
34+
$psJekyll.Site # output the site
35+
~~~
36+
37+
### Setting configuration
38+
39+
You can set a new configuration file by using:
40+
41+
~~~PowerShell
42+
# Ideally, pass all values in within `[Ordered]` hashtables.
43+
# otherwise the file may change more often than expected.
44+
$psJekyll.Site.Config = [Ordered]@{}
45+
~~~
46+
47+
### Setting data
48+
49+
You can set site data in almost the same way as you set configuration:
50+
51+
~~~PowerShell
52+
$psJekyll.Site.Data = @{"MyFavoriteNumber"=42}
53+
~~~
54+
55+
56+
### Setting pages
57+
58+
~~~PowerShell
59+
# This will create a page that will contain a repository list (in a GitHub page)
60+
$psJekyll.Site.Page = "MyPage", "My Content", @{MyMetadata=$true}
61+
~~~
62+
1563
## PSJekyll GitHub Action
1664

1765
You can easily use PSJekyll as a GitHub Action.
1866

1967
This helps you automate updating content and data within a Jekyll site or GitHub Page.
2068

2169
~~~yaml
22-
- name: UseEZOut
70+
- name: UsePSJekyll
2371
- uses: PowerShellWeb/PSJekyll@main
2472
~~~
2573

0 commit comments

Comments
 (0)