Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

PoshWeb/PSJekyll

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

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.

About

PowerShell Tools for Jekyll

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.