Skip to content

PowerShellWeb/PSJekyll

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

James BrundageJames Brundage
James Brundage
and
James Brundage
Nov 18, 2024
b0b70af · Nov 18, 2024
Oct 17, 2024
Oct 1, 2024
Oct 18, 2024
Oct 9, 2024
Oct 18, 2024
Oct 10, 2024
Nov 18, 2024
Oct 5, 2024
Oct 9, 2024
Oct 9, 2024
Oct 9, 2024
Sep 30, 2024
Oct 10, 2024
Oct 4, 2024
Oct 9, 2024
Oct 10, 2024
Oct 9, 2024
Oct 9, 2024
Oct 10, 2024
Oct 10, 2024
Oct 18, 2024

Repository files navigation

PSJekyll Logo (Animated)

PSJekyll

Scarily Simple Static Sites with Jekyll and PowerShell

Jekyll is a static site generator and server.

PowerShell is a dynamic scripting language that works with everything.

PSJekyll is a PowerShell module for managing Jekyll websites.

PSJekyll Basics

You can install PSJekyll from the Gallery:

Install-Module PSJekyll -Force -Scope CurrentUser

Then you can import it by name:

Import-Module PSJekyll

$psJekyll.Site will have any sites beneath the current directory:

# Push into the PSJekyll module, which will have a site
Get-Module PSJekyll | Split-Path | Push-Location
$psJekyll.Site # output the site

Setting configuration

You can set a new configuration file by using:

# Ideally, pass all values in within `[Ordered]` hashtables.
# otherwise the file may change more often than expected.
$psJekyll.Site.Config = [Ordered]@{}

Setting data

You can set site data in almost the same way as you set configuration:

$psJekyll.Site.Data = @{"MyFavoriteNumber"=42}

Setting pages

# This will create a page that will contain a repository list (in a GitHub page)
$psJekyll.Site.Page = "MyPage", "My Content", @{MyMetadata=$true}

PSJekyll GitHub Action

You can easily use PSJekyll as a GitHub Action.

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

- name: UsePSJekyll
- uses: PowerShellWeb/PSJekyll@main

Using this action will run any *.PSJekyll.ps1 files in your repository.

Any files outputted from this will be checked into the current branch.

PSJekyll Container

PSJekyll ships every build in a container.

To pull down PSJekyll and start your own server, use something like:

# Pull down the latest image
docker pull ghcr.io/powershellweb/psjekyll

# Start the image in an interactive terminal on port 8069.
docker run --interactive --tty --publish 8069:4000 ghcr.io/powershellweb/psjekyll

PSJekyll Commands

  • New-PSJekyll creates Jekyll sites.
  • Start-PSJekyll starts Jekyll servers in a job.
  • Stop-PSJekyll stops running Jekyll jobs.