From 9a5de0ea07992ee2d2295b0e6a316e5edc48fbfe Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:48:43 -0700 Subject: [PATCH 001/769] feat: New-PSJekyll ( Fixes #4 ) --- Commands/New-PSJekyll.ps1 | 76 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Commands/New-PSJekyll.ps1 diff --git a/Commands/New-PSJekyll.ps1 b/Commands/New-PSJekyll.ps1 new file mode 100644 index 0000000..5529f81 --- /dev/null +++ b/Commands/New-PSJekyll.ps1 @@ -0,0 +1,76 @@ +function New-PSJekyll +{ + <# + .SYNOPSIS + Creates a new Jekyll site. + .DESCRIPTION + Creates a new Jekyll site, using PowerShell. + .LINK + https://jekyllrb.com/ + #> + [Alias('New-Jekyll')] + param( + # The name of the Jekyll site + [string] + $Name, + + # Creates scaffolding but with empty files + [switch] + $Blank, + + # Force creation even if PATH already exists + [switch] + $Force, + + # Safe mode + [switch] + $Safe, + + # Skip the bundle install + [switch] + $SkipBundle, + + # The path to the source files + [string] + $SourcePath, + + # The path to the destination files + [string] + $DestinationPath, + + # The path to the layout files + [string] + $LayoutPath, + + # The path to the plugin files + [string[]] + $PluginPath, + + # If set, will generate a liquid profile + [switch] + $LiquidProfile, + + # If set, will trace the execution + [switch] + $Trace + ) + + $jekyllSplat = @( + $name + if ($blank) { '--blank' } + if ($force) { '--force' } + if ($safe) { '--safe' } + if ($skipBundle) { '--skip-bundle' } + if ($sourcePath) {"--source $sourcePath"} + if ($destinationPath) {"--destination $destinationPath"} + if ($layoutPath) {"--layouts $layoutPath"} + if ($pluginPath) {"--plugins $($pluginPath -join ',')"} + if ($liquidProfile) {'--profile'} + if ($trace) {'--trace'} + ) + + $newJekyllJob = jekyll new @jekyllSplat & + $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job') + $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job.New-PSJekyll') + $newJekyllJob +} From 7287e41b1362c78d63395eaa84f6f7e70a1baa79 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:49:44 -0700 Subject: [PATCH 002/769] feat: PSJekyll Module Scaffolding ( Fixes #1 ) --- PSJekyll.ps.psm1 | 30 ++++++++++++++++++++++++++++++ PSJekyll.psd1 | 7 +++++++ 2 files changed, 37 insertions(+) create mode 100644 PSJekyll.ps.psm1 create mode 100644 PSJekyll.psd1 diff --git a/PSJekyll.ps.psm1 b/PSJekyll.ps.psm1 new file mode 100644 index 0000000..ccd3154 --- /dev/null +++ b/PSJekyll.ps.psm1 @@ -0,0 +1,30 @@ +$commandsPath = Join-Path $PSScriptRoot .\Commands +[include('*-*')]$commandsPath + +$myModule = $MyInvocation.MyCommand.ScriptBlock.Module +$ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule) +$myModule.pstypenames.insert(0, $myModule.Name) + +New-PSDrive -Name $MyModule.Name -PSProvider FileSystem -Scope Global -Root $PSScriptRoot -ErrorAction Ignore + +if ($home) { + $MyModuleProfileDirectory = Join-Path ([Environment]::GetFolderPath("LocalApplicationData")) $MyModule.Name + if (-not (Test-Path $MyModuleProfileDirectory)) { + $null = New-Item -ItemType Directory -Path $MyModuleProfileDirectory -Force + } + New-PSDrive -Name "My$($MyModule.Name)" -PSProvider FileSystem -Scope Global -Root $MyModuleProfileDirectory -ErrorAction Ignore +} + +$KnownVerbs = Get-Verb | Select-Object -ExpandProperty Verb + +# Set a script variable of this, set to the module +# (so all scripts in this scope default to the correct `$this`) +$script:this = $myModule + +Export-ModuleMember -Alias * -Function * -Variable $myModule.Name + +$script:ModuleApp = $ExecutionContext.SessionState.InvokeCommand.GetCommand('jekyll','Application') +if (-not $script:ModuleApp) { + Write-Warning "jekyll is not installed, or not in the path. Please install" + return +} diff --git a/PSJekyll.psd1 b/PSJekyll.psd1 new file mode 100644 index 0000000..f312b3c --- /dev/null +++ b/PSJekyll.psd1 @@ -0,0 +1,7 @@ +@{ + ModuleVersion ='0.1' + Description = 'PSJekyll is a PowerShell module that provides cmdlets to manage Jekyll sites' + Guid = '793784c4-0e1f-4928-b874-1e601f9a3d29' + RootModule = 'PSJekyll.psm1' + # TypesToProcess = @('PSJekyll.types.ps1xml') +} From 662d2287aa11a2b36eab56ff0c54b03eb54707b1 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:50:35 -0700 Subject: [PATCH 003/769] feat: PSJekyll Module Scaffolding ( Fixes #1 ) Initial compiled .psm1 --- PSJekyll.psm1 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 PSJekyll.psm1 diff --git a/PSJekyll.psm1 b/PSJekyll.psm1 new file mode 100644 index 0000000..1e9d7a1 --- /dev/null +++ b/PSJekyll.psm1 @@ -0,0 +1,40 @@ +$commandsPath = Join-Path $PSScriptRoot .\Commands +:ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { + if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 + foreach ($exclusion in '\.[^\.]+\.ps1$') { + if (-not $exclusion) { continue } + if ($file.Name -match $exclusion) { + continue ToIncludeFiles # Skip excluded files + } + } + . $file.FullName +} + +$myModule = $MyInvocation.MyCommand.ScriptBlock.Module +$ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule) +$myModule.pstypenames.insert(0, $myModule.Name) + +New-PSDrive -Name $MyModule.Name -PSProvider FileSystem -Scope Global -Root $PSScriptRoot -ErrorAction Ignore + +if ($home) { + $MyModuleProfileDirectory = Join-Path ([Environment]::GetFolderPath("LocalApplicationData")) $MyModule.Name + if (-not (Test-Path $MyModuleProfileDirectory)) { + $null = New-Item -ItemType Directory -Path $MyModuleProfileDirectory -Force + } + New-PSDrive -Name "My$($MyModule.Name)" -PSProvider FileSystem -Scope Global -Root $MyModuleProfileDirectory -ErrorAction Ignore +} + +$KnownVerbs = Get-Verb | Select-Object -ExpandProperty Verb + +# Set a script variable of this, set to the module +# (so all scripts in this scope default to the correct `$this`) +$script:this = $myModule + +Export-ModuleMember -Alias * -Function * -Variable $myModule.Name + +$script:ModuleApp = $ExecutionContext.SessionState.InvokeCommand.GetCommand('jekyll','Application') +if (-not $script:ModuleApp) { + Write-Warning "jekyll is not installed, or not in the path. Please install" + return +} + From 9b976ed8a3caf9d1373fefeba8f9ff2bdc36ffef Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:51:32 -0700 Subject: [PATCH 004/769] feat: PSJekyll Action ( Fixes #16 ) --- Build/GitHub/Actions/PSJekyllAction.ps1 | 241 ++++++++++++++++++ Build/PSJekyll.GitHubAction.PSDevOps.ps1 | 10 + action.yml | 299 +++++++++++++++++++++++ 3 files changed, 550 insertions(+) create mode 100644 Build/GitHub/Actions/PSJekyllAction.ps1 create mode 100644 Build/PSJekyll.GitHubAction.PSDevOps.ps1 create mode 100644 action.yml diff --git a/Build/GitHub/Actions/PSJekyllAction.ps1 b/Build/GitHub/Actions/PSJekyllAction.ps1 new file mode 100644 index 0000000..6d8d271 --- /dev/null +++ b/Build/GitHub/Actions/PSJekyllAction.ps1 @@ -0,0 +1,241 @@ +<# +.Synopsis + GitHub Action for PSJekyll +.Description + GitHub Action for PSJekyll. This will: + + * Import PSJekyll + * Run all *.PSJekyll.ps1 files beneath the workflow directory + * Run a .PSJekyllScript parameter. + + If you will be making changes using the GitHubAPI, you should provide a -GitHubToken + If none is provided, and ENV:GITHUB_TOKEN is set, this will be used instead. + Any files changed can be outputted by the script, and those changes can be checked back into the repo. + Make sure to use the "persistCredentials" option with checkout. + +#> + +param( +# A PowerShell Script that uses PSJekyll. +# Any files outputted from the script will be added to the repository. +# If those files have a .Message attached to them, they will be committed with that message. +[string] +$PSJekyllScript, + +# If set, will not process any files named *.PSJekyll.ps1 +[switch] +$SkipPSJekyllPS1, + +# A list of modules to be installed from the PowerShell gallery before scripts run. +[string[]] +$InstallModule, + +# If provided, will commit any remaining changes made to the workspace with this commit message. +[string] +$CommitMessage, + +# The user email associated with a git commit. If this is not provided, it will be set to the username@noreply.github.com. +[string] +$UserEmail, + +# The user name associated with a git commit. +[string] +$UserName +) + +$ErrorActionPreference = 'continue' +"::group::Parameters" | Out-Host +[PSCustomObject]$PSBoundParameters | Format-List | Out-Host +"::endgroup::" | Out-Host + +$gitHubEvent = + if ($env:GITHUB_EVENT_PATH) { + [IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json + } else { $null } + +$anyFilesChanged = $false +$moduleName = 'PSJekyll' +$actorInfo = $null + +"::group::Parameters" | Out-Host +[PSCustomObject]$PSBoundParameters | Format-List | Out-Host +"::endgroup::" | Out-Host + +function InstallActionModule { + param([string]$ModuleToInstall) + $moduleInWorkspace = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -File | + Where-Object Name -eq "$($moduleToInstall).psd1" | + Where-Object { + $(Get-Content $_.FullName -Raw) -match 'ModuleVersion' + } + if (-not $moduleInWorkspace) { + Install-Module $moduleToInstall -Scope CurrentUser -Force + Import-Module $moduleToInstall -Force -PassThru | Out-Host + } +} +function ImportActionModule { + #region -InstallModule + if ($InstallModule) { + "::group::Installing Modules" | Out-Host + foreach ($moduleToInstall in $InstallModule) { + InstallActionModule -ModuleToInstall $moduleToInstall + } + "::endgroup::" | Out-Host + } + #endregion -InstallModule + + if ($env:GITHUB_ACTION_PATH) { + $LocalModulePath = Join-Path $env:GITHUB_ACTION_PATH "$moduleName.psd1" + if (Test-path $LocalModulePath) { + Import-Module $LocalModulePath -Force -PassThru | Out-String + } else { + throw "Module '$moduleName' not found" + } + } elseif (-not (Get-Module $moduleName)) { + throw "Module '$ModuleName' not found" + } + + "::notice title=ModuleLoaded::$ModuleName Loaded from Path - $($LocalModulePath)" | Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + "# $($moduleName)" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } +} +function InitializeAction { + #region Custom + #endregion Custom + + # Configure git based on the $env:GITHUB_ACTOR + if (-not $UserName) { $UserName = $env:GITHUB_ACTOR } + if (-not $actorID) { $actorID = $env:GITHUB_ACTOR_ID } + $actorInfo = Invoke-RestMethod -Uri "https://api.github.com/user/$actorID" + if (-not $UserEmail) { $UserEmail = "$UserName@noreply.github.com" } + git config --global user.email $UserEmail + git config --global user.name $actorInfo.name + + # Pull down any changes + git pull | Out-Host +} + +function InvokeActionModule { + $myScriptStart = [DateTime]::Now + $myScript = $ExecutionContext.SessionState.PSVariable.Get("${ModuleName}Script").Value + if ($myScript) { + Invoke-Expression -Command $myScript | + . ProcessOutput | + Out-Host + } + $myScriptTook = [Datetime]::Now - $myScriptStart + $MyScriptFilesStart = [DateTime]::Now + + $myScriptList = @() + $shouldSkip = $ExecutionContext.SessionState.PSVariable.Get("Skip${ModuleName}PS1").Value + if (-not $shouldSkip) { + Get-ChildItem -Recurse -Path $env:GITHUB_WORKSPACE | + Where-Object Name -Match "\.$($moduleName)\.ps1$" | + ForEach-Object -Begin { + if ($env:GITHUB_STEP_SUMMARY) { + "## $ModuleName Scripts" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + } -Process { + $myScriptList += $_.FullName.Replace($env:GITHUB_WORKSPACE, '').TrimStart('/') + $myScriptCount++ + $scriptFile = $_ + if ($env:GITHUB_STEP_SUMMARY) { + "### $($scriptFile.Fullname -replace [Regex]::Escape($env:GITHUB_WORKSPACE))" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + $scriptCmd = $ExecutionContext.SessionState.InvokeCommand.GetCommand($scriptFile.FullName, 'ExternalScript') + foreach ($requiredModule in $CommandInfo.ScriptBlock.Ast.ScriptRequirements.RequiredModules) { + if ($requiredModule.Name -and + (-not $requiredModule.MaximumVersion) -and + (-not $requiredModule.RequiredVersion) + ) { + InstallActionModule $requiredModule.Name + } + } + $scriptFileOutputs = . $scriptCmd + $scriptFileOutputs | + . ProcessOutput | + Out-Host + } + } + + $MyScriptFilesTook = [Datetime]::Now - $MyScriptFilesStart + $SummaryOfMyScripts = "$myScriptCount $moduleName scripts took $($MyScriptFilesTook.TotalSeconds) seconds" + $SummaryOfMyScripts | + Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + $SummaryOfMyScripts | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + #region Custom + #endregion Custom +} + +function PushActionOutput { + if ($anyFilesChanged) { + "::notice::$($anyFilesChanged) Files Changed" | Out-Host + } + if ($CommitMessage -or $anyFilesChanged) { + if ($CommitMessage) { + Get-ChildItem $env:GITHUB_WORKSPACE -Recurse | + ForEach-Object { + $gitStatusOutput = git status $_.Fullname -s + if ($gitStatusOutput) { + git add $_.Fullname + } + } + + git commit -m $ExecutionContext.SessionState.InvokeCommand.ExpandString($CommitMessage) + } + + $checkDetached = git symbolic-ref -q HEAD + if (-not $LASTEXITCODE) { + "::notice::Pushing Changes" | Out-Host + git push + "Git Push Output: $($gitPushed | Out-String)" + } else { + "::notice::Not pushing changes (on detached head)" | Out-Host + $LASTEXITCODE = 0 + exit 0 + } + } +} + +filter ProcessOutput { + $out = $_ + $outItem = Get-Item -Path $out -ErrorAction Ignore + if (-not $outItem -and $out -is [string]) { + $out | Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + "> $out" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + return + } + $fullName, $shouldCommit = + if ($out -is [IO.FileInfo]) { + $out.FullName, (git status $out.Fullname -s) + } elseif ($outItem) { + $outItem.FullName, (git status $outItem.Fullname -s) + } + if ($shouldCommit) { + "$fullName has changed, and should be committed" | Out-Host + git add $fullName + if ($out.Message) { + git commit -m "$($out.Message)" | Out-Host + } elseif ($out.CommitMessage) { + git commit -m "$($out.CommitMessage)" | Out-Host + } elseif ($gitHubEvent.head_commit.message) { + git commit -m "$($gitHubEvent.head_commit.message)" | Out-Host + } + $anyFilesChanged = $true + } + $out +} + +. ImportActionModule +. InitializeAction +. InvokeActionModule +. PushActionOutput \ No newline at end of file diff --git a/Build/PSJekyll.GitHubAction.PSDevOps.ps1 b/Build/PSJekyll.GitHubAction.PSDevOps.ps1 new file mode 100644 index 0000000..fb7784e --- /dev/null +++ b/Build/PSJekyll.GitHubAction.PSDevOps.ps1 @@ -0,0 +1,10 @@ +#requires -Module PSDevOps +Import-BuildStep -SourcePath ( + Join-Path $PSScriptRoot 'GitHub' +) -BuildSystem GitHubAction + +$PSScriptRoot | Split-Path | Push-Location + +New-GitHubAction -Name "PublishPSJekyll" -Description 'Publish with PSJekyll' -Action PSJekyllAction -Icon chevron-right -OutputPath .\action.yml + +Pop-Location \ No newline at end of file diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..f0c878d --- /dev/null +++ b/action.yml @@ -0,0 +1,299 @@ + +name: PublishPSJekyll +description: Publish with PSJekyll +inputs: + PSJekyllScript: + required: false + description: | + A PowerShell Script that uses PSJekyll. + Any files outputted from the script will be added to the repository. + If those files have a .Message attached to them, they will be committed with that message. + SkipPSJekyllPS1: + required: false + description: 'If set, will not process any files named *.PSJekyll.ps1' + InstallModule: + required: false + description: A list of modules to be installed from the PowerShell gallery before scripts run. + CommitMessage: + required: false + description: If provided, will commit any remaining changes made to the workspace with this commit message. + UserEmail: + required: false + description: The user email associated with a git commit. If this is not provided, it will be set to the username@noreply.github.com. + UserName: + required: false + description: The user name associated with a git commit. +branding: + icon: chevron-right + color: blue +runs: + using: composite + steps: + - name: PSJekyllAction + id: PSJekyllAction + shell: pwsh + env: + PSJekyllScript: ${{inputs.PSJekyllScript}} + UserName: ${{inputs.UserName}} + CommitMessage: ${{inputs.CommitMessage}} + InstallModule: ${{inputs.InstallModule}} + SkipPSJekyllPS1: ${{inputs.SkipPSJekyllPS1}} + UserEmail: ${{inputs.UserEmail}} + run: | + $Parameters = @{} + $Parameters.PSJekyllScript = ${env:PSJekyllScript} + $Parameters.SkipPSJekyllPS1 = ${env:SkipPSJekyllPS1} + $Parameters.SkipPSJekyllPS1 = $parameters.SkipPSJekyllPS1 -match 'true'; + $Parameters.InstallModule = ${env:InstallModule} + $Parameters.InstallModule = $parameters.InstallModule -split ';' -replace '^[''"]' -replace '[''"]$' + $Parameters.CommitMessage = ${env:CommitMessage} + $Parameters.UserEmail = ${env:UserEmail} + $Parameters.UserName = ${env:UserName} + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: PSJekyllAction $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {<# + .Synopsis + GitHub Action for PSJekyll + .Description + GitHub Action for PSJekyll. This will: + + * Import PSJekyll + * Run all *.PSJekyll.ps1 files beneath the workflow directory + * Run a .PSJekyllScript parameter. + + If you will be making changes using the GitHubAPI, you should provide a -GitHubToken + If none is provided, and ENV:GITHUB_TOKEN is set, this will be used instead. + Any files changed can be outputted by the script, and those changes can be checked back into the repo. + Make sure to use the "persistCredentials" option with checkout. + + #> + + param( + # A PowerShell Script that uses PSJekyll. + # Any files outputted from the script will be added to the repository. + # If those files have a .Message attached to them, they will be committed with that message. + [string] + $PSJekyllScript, + + # If set, will not process any files named *.PSJekyll.ps1 + [switch] + $SkipPSJekyllPS1, + + # A list of modules to be installed from the PowerShell gallery before scripts run. + [string[]] + $InstallModule, + + # If provided, will commit any remaining changes made to the workspace with this commit message. + [string] + $CommitMessage, + + # The user email associated with a git commit. If this is not provided, it will be set to the username@noreply.github.com. + [string] + $UserEmail, + + # The user name associated with a git commit. + [string] + $UserName + ) + + $ErrorActionPreference = 'continue' + "::group::Parameters" | Out-Host + [PSCustomObject]$PSBoundParameters | Format-List | Out-Host + "::endgroup::" | Out-Host + + $gitHubEvent = + if ($env:GITHUB_EVENT_PATH) { + [IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json + } else { $null } + + $anyFilesChanged = $false + $moduleName = 'PSJekyll' + $actorInfo = $null + + "::group::Parameters" | Out-Host + [PSCustomObject]$PSBoundParameters | Format-List | Out-Host + "::endgroup::" | Out-Host + + function InstallActionModule { + param([string]$ModuleToInstall) + $moduleInWorkspace = Get-ChildItem -Path $env:GITHUB_WORKSPACE -Recurse -File | + Where-Object Name -eq "$($moduleToInstall).psd1" | + Where-Object { + $(Get-Content $_.FullName -Raw) -match 'ModuleVersion' + } + if (-not $moduleInWorkspace) { + Install-Module $moduleToInstall -Scope CurrentUser -Force + Import-Module $moduleToInstall -Force -PassThru | Out-Host + } + } + function ImportActionModule { + #region -InstallModule + if ($InstallModule) { + "::group::Installing Modules" | Out-Host + foreach ($moduleToInstall in $InstallModule) { + InstallActionModule -ModuleToInstall $moduleToInstall + } + "::endgroup::" | Out-Host + } + #endregion -InstallModule + + if ($env:GITHUB_ACTION_PATH) { + $LocalModulePath = Join-Path $env:GITHUB_ACTION_PATH "$moduleName.psd1" + if (Test-path $LocalModulePath) { + Import-Module $LocalModulePath -Force -PassThru | Out-String + } else { + throw "Module '$moduleName' not found" + } + } elseif (-not (Get-Module $moduleName)) { + throw "Module '$ModuleName' not found" + } + + "::notice title=ModuleLoaded::$ModuleName Loaded from Path - $($LocalModulePath)" | Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + "# $($moduleName)" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + } + function InitializeAction { + #region Custom + #endregion Custom + + # Configure git based on the $env:GITHUB_ACTOR + if (-not $UserName) { $UserName = $env:GITHUB_ACTOR } + if (-not $actorID) { $actorID = $env:GITHUB_ACTOR_ID } + $actorInfo = Invoke-RestMethod -Uri "https://api.github.com/user/$actorID" + if (-not $UserEmail) { $UserEmail = "$UserName@noreply.github.com" } + git config --global user.email $UserEmail + git config --global user.name $actorInfo.name + + # Pull down any changes + git pull | Out-Host + } + + function InvokeActionModule { + $myScriptStart = [DateTime]::Now + $myScript = $ExecutionContext.SessionState.PSVariable.Get("${ModuleName}Script").Value + if ($myScript) { + Invoke-Expression -Command $myScript | + . ProcessOutput | + Out-Host + } + $myScriptTook = [Datetime]::Now - $myScriptStart + $MyScriptFilesStart = [DateTime]::Now + + $myScriptList = @() + $shouldSkip = $ExecutionContext.SessionState.PSVariable.Get("Skip${ModuleName}PS1").Value + if (-not $shouldSkip) { + Get-ChildItem -Recurse -Path $env:GITHUB_WORKSPACE | + Where-Object Name -Match "\.$($moduleName)\.ps1$" | + ForEach-Object -Begin { + if ($env:GITHUB_STEP_SUMMARY) { + "## $ModuleName Scripts" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + } -Process { + $myScriptList += $_.FullName.Replace($env:GITHUB_WORKSPACE, '').TrimStart('/') + $myScriptCount++ + $scriptFile = $_ + if ($env:GITHUB_STEP_SUMMARY) { + "### $($scriptFile.Fullname -replace [Regex]::Escape($env:GITHUB_WORKSPACE))" | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + $scriptCmd = $ExecutionContext.SessionState.InvokeCommand.GetCommand($scriptFile.FullName, 'ExternalScript') + foreach ($requiredModule in $CommandInfo.ScriptBlock.Ast.ScriptRequirements.RequiredModules) { + if ($requiredModule.Name -and + (-not $requiredModule.MaximumVersion) -and + (-not $requiredModule.RequiredVersion) + ) { + InstallActionModule $requiredModule.Name + } + } + $scriptFileOutputs = . $scriptCmd + $scriptFileOutputs | + . ProcessOutput | + Out-Host + } + } + + $MyScriptFilesTook = [Datetime]::Now - $MyScriptFilesStart + $SummaryOfMyScripts = "$myScriptCount $moduleName scripts took $($MyScriptFilesTook.TotalSeconds) seconds" + $SummaryOfMyScripts | + Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + $SummaryOfMyScripts | + Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + #region Custom + #endregion Custom + } + + function PushActionOutput { + if ($anyFilesChanged) { + "::notice::$($anyFilesChanged) Files Changed" | Out-Host + } + if ($CommitMessage -or $anyFilesChanged) { + if ($CommitMessage) { + Get-ChildItem $env:GITHUB_WORKSPACE -Recurse | + ForEach-Object { + $gitStatusOutput = git status $_.Fullname -s + if ($gitStatusOutput) { + git add $_.Fullname + } + } + + git commit -m $ExecutionContext.SessionState.InvokeCommand.ExpandString($CommitMessage) + } + + $checkDetached = git symbolic-ref -q HEAD + if (-not $LASTEXITCODE) { + "::notice::Pushing Changes" | Out-Host + git push + "Git Push Output: $($gitPushed | Out-String)" + } else { + "::notice::Not pushing changes (on detached head)" | Out-Host + $LASTEXITCODE = 0 + exit 0 + } + } + } + + filter ProcessOutput { + $out = $_ + $outItem = Get-Item -Path $out -ErrorAction Ignore + if (-not $outItem -and $out -is [string]) { + $out | Out-Host + if ($env:GITHUB_STEP_SUMMARY) { + "> $out" | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY + } + return + } + $fullName, $shouldCommit = + if ($out -is [IO.FileInfo]) { + $out.FullName, (git status $out.Fullname -s) + } elseif ($outItem) { + $outItem.FullName, (git status $outItem.Fullname -s) + } + if ($shouldCommit) { + "$fullName has changed, and should be committed" | Out-Host + git add $fullName + if ($out.Message) { + git commit -m "$($out.Message)" | Out-Host + } elseif ($out.CommitMessage) { + git commit -m "$($out.CommitMessage)" | Out-Host + } elseif ($gitHubEvent.head_commit.message) { + git commit -m "$($gitHubEvent.head_commit.message)" | Out-Host + } + $anyFilesChanged = $true + } + $out + } + + . ImportActionModule + . InitializeAction + . InvokeActionModule + . PushActionOutput} @Parameters + From 6048d602cc97eefabfe3625579daa1930fcb666b Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:52:07 -0700 Subject: [PATCH 005/769] feat: PSJekyll Dockerfile ( Fixes #11 ) --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d623f7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Thank you Microsoft! Thank you PowerShell! Thank you Docker! +FROM mcr.microsoft.com/powershell AS powershell + +FROM ruby:3.3.5-slim-bullseye AS jekyllrb + +# Copy the module into the container +# Copy essentially everything from the PowerShell image into the final image +COPY --from=powershell /usr /usr +COPY --from=powershell /lib /lib +COPY --from=powershell /lib64 /lib64 +COPY --from=powershell /bin /bin +COPY --from=powershell /opt /opt + +# Set the module name to the name of the module we are building +ENV ModuleName=PSJekyll +ENV InstallPackages="build-essential","git" + +# Copy the module into the container +RUN --mount=type=bind,src=./,target=/Initialize /bin/pwsh -nologo -command /Initialize/Container.init.ps1 +# Set the entrypoint to the script we just created. +ENTRYPOINT [ "/bin/pwsh","-nologo","-noexit","-file","/Container.start.ps1" ] \ No newline at end of file From c15e58c6c4cbd3eef9440b57c746a718ffba4074 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:52:35 -0700 Subject: [PATCH 006/769] feat: PSJekyll Container.init.ps1 ( Fixes #12 ) --- Container.init.ps1 | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 Container.init.ps1 diff --git a/Container.init.ps1 b/Container.init.ps1 new file mode 100644 index 0000000..c894dc9 --- /dev/null +++ b/Container.init.ps1 @@ -0,0 +1,96 @@ +<# +.SYNOPSIS + Initializes a container during build. +.DESCRIPTION + Initializes the container image with the necessary modules and packages. + + This script should be called from the Dockerfile, during the creation of the container image. + + ~~~Dockerfile + # Thank you Microsoft! Thank you PowerShell! Thank you Docker! + FROM mcr.microsoft.com/powershell + # Set the shell to PowerShell (thanks again, Docker!) + SHELL ["/bin/pwsh", "-nologo", "-command"] + # Run the initialization script. This will do all remaining initialization in a single layer. + RUN --mount=type=bind,src=./,target=/Initialize ./Initialize/Container.init.ps1 + ~~~ + + The scripts arguments can be provided with either an `ARG` or `ENV` instruction in the Dockerfile. +.NOTES + Did you know that in PowerShell you can 'use' namespaces that do not really exist? + This seems like a nice way to describe a relationship to a container image. + That is why this file is using the namespace 'mcr.microsoft.com/powershell'. + (this does nothing, but most likely will be used in the future) +#> +using namespace 'mcr.microsoft.com/powershell AS powerShell' +using namespace 'ruby:3.3.5-slim-bullseye AS jekyllrb' + +param( +# The name of the module to be installed. +[string]$ModuleName = $( + if ($env:ModuleName) { $env:ModuleName } + else { + (Get-ChildItem -Path $PSScriptRoot | + Where-Object Extension -eq '.psd1' | + Select-String 'ModuleVersion\s=' | + Select-Object -ExpandProperty Path -First 1) -replace '\.psd1$' + } +), +# The packages to be installed. +[string[]]$InstallPackages = @( + if ($env:InstallPackages) { $env:InstallPackages -split ',' } +), +# The modules to be installed. +[string[]]$InstallModules = @( + if ($env:InstallModules) { $env:InstallModules -split ',' } + else { } +) +) + + +# Get the root module directory +$rootModuleDirectory = @($env:PSModulePath -split '[;:]')[0] + +# Determine the path to the module destination. +$moduleDestination = "$rootModuleDirectory/$ModuleName" +# Copy the module to the destination +# (this is being used instead of the COPY statement in Docker, to avoid additional layers). +Copy-Item -Path "$psScriptRoot" -Destination $moduleDestination -Recurse -Force + +# Copy all container-related scripts to the root of the container. +Get-ChildItem -Path $PSScriptRoot | + Where-Object Name -Match '^Container\..+?\.ps1$' | + Copy-Item -Destination / + +# If we have packages to install +if ($InstallPackages) { + # install the packages + apt-get update && apt-get install -y @InstallPackages '--no-install-recommends' && apt-get clean | Out-Host +} + +# Create a new profile +New-Item -Path $Profile -ItemType File -Force | + # and import this module in the profile + Add-Content -Value "Import-Module $ModuleName" -Force +# If we have modules to install +if ($InstallModules) { + # Install the modules + Install-Module -Name $InstallModules -Force -AcceptLicense -Scope CurrentUser + # and import them in the profile + Add-Content -Path $Profile -Value "Import-Module '$($InstallModules -join "','")'" -Force +} +# In our profile, push into the module's directory +Add-Content -Path $Profile -Value "Get-Module $ModuleName | Split-Path | Push-Location" -Force + +# Remove the .git directories from any modules +Get-ChildItem -Path $rootModuleDirectory -Directory -Force -Recurse | + Where-Object Name -eq '.git' | + Remove-Item -Recurse -Force + +# Congratulations! You have successfully initialized the container image. +# This script should work in about any module, with minor adjustments. +# If you have any adjustments, please put them below here, in the `#region Custom` + +#region Custom +gem install jekyll +#endregion Custom \ No newline at end of file From a7491df2674a452aed58a94a72793a972f67e814 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:54:52 -0700 Subject: [PATCH 007/769] feat: PSJekyll Workflow Definitions ( Fixes #15 ) --- .github/workflows/BuildPSJekyll.yml | 553 ++++++++++++++++++ Build/GitHub/Jobs/BuildPSJekyll.psd1 | 34 ++ .../Steps/BuildAndPublishContainer.psd1 | 57 ++ Build/GitHub/Steps/PublishTestResults.psd1 | 10 + Build/PSJekyll.GitHubWorkflow.PSDevOps.ps1 | 15 + 5 files changed, 669 insertions(+) create mode 100644 .github/workflows/BuildPSJekyll.yml create mode 100644 Build/GitHub/Jobs/BuildPSJekyll.psd1 create mode 100644 Build/GitHub/Steps/BuildAndPublishContainer.psd1 create mode 100644 Build/GitHub/Steps/PublishTestResults.psd1 create mode 100644 Build/PSJekyll.GitHubWorkflow.PSDevOps.ps1 diff --git a/.github/workflows/BuildPSJekyll.yml b/.github/workflows/BuildPSJekyll.yml new file mode 100644 index 0000000..0149a4b --- /dev/null +++ b/.github/workflows/BuildPSJekyll.yml @@ -0,0 +1,553 @@ + +name: Build PSJekyll +on: + push: + pull_request: + workflow_dispatch: +jobs: + TestPowerShellOnLinux: + runs-on: ubuntu-latest + steps: + - name: InstallPester + id: InstallPester + shell: pwsh + run: | + $Parameters = @{} + $Parameters.PesterMaxVersion = ${env:PesterMaxVersion} + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: InstallPester $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {<# + .Synopsis + Installs Pester + .Description + Installs Pester + #> + param( + # The maximum pester version. Defaults to 4.99.99. + [string] + $PesterMaxVersion = '4.99.99' + ) + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + Install-Module -Name Pester -Repository PSGallery -Force -Scope CurrentUser -MaximumVersion $PesterMaxVersion -SkipPublisherCheck -AllowClobber + Import-Module Pester -Force -PassThru -MaximumVersion $PesterMaxVersion} @Parameters + - name: Check out repository + uses: actions/checkout@v4 + - name: RunPester + id: RunPester + shell: pwsh + run: | + $Parameters = @{} + $Parameters.ModulePath = ${env:ModulePath} + $Parameters.PesterMaxVersion = ${env:PesterMaxVersion} + $Parameters.NoCoverage = ${env:NoCoverage} + $Parameters.NoCoverage = $parameters.NoCoverage -match 'true'; + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: RunPester $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {<# + .Synopsis + Runs Pester + .Description + Runs Pester tests after importing a PowerShell module + #> + param( + # The module path. If not provided, will default to the second half of the repository ID. + [string] + $ModulePath, + # The Pester max version. By default, this is pinned to 4.99.99. + [string] + $PesterMaxVersion = '4.99.99', + + # If set, will not collect code coverage. + [switch] + $NoCoverage + ) + + $global:ErrorActionPreference = 'continue' + $global:ProgressPreference = 'silentlycontinue' + + $orgName, $moduleName = $env:GITHUB_REPOSITORY -split "/" + if (-not $ModulePath) { $ModulePath = ".\$moduleName.psd1" } + $importedPester = Import-Module Pester -Force -PassThru -MaximumVersion $PesterMaxVersion + $importedModule = Import-Module $ModulePath -Force -PassThru + $importedPester, $importedModule | Out-Host + + $codeCoverageParameters = @{ + CodeCoverage = "$($importedModule | Split-Path)\*-*.ps1" + CodeCoverageOutputFile = ".\$moduleName.Coverage.xml" + } + + if ($NoCoverage) { + $codeCoverageParameters = @{} + } + + + $result = + Invoke-Pester -PassThru -Verbose -OutputFile ".\$moduleName.TestResults.xml" -OutputFormat NUnitXml @codeCoverageParameters + + if ($result.FailedCount -gt 0) { + "::debug:: $($result.FailedCount) tests failed" + foreach ($r in $result.TestResult) { + if (-not $r.Passed) { + "::error::$($r.describe, $r.context, $r.name -join ' ') $($r.FailureMessage)" + } + } + throw "::error:: $($result.FailedCount) tests failed" + } + } @Parameters + - name: PublishTestResults + uses: actions/upload-artifact@v3 + with: + name: PesterResults + path: '**.TestResults.xml' + if: ${{always()}} + TagReleaseAndPublish: + runs-on: ubuntu-latest + if: ${{ success() }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: TagModuleVersion + id: TagModuleVersion + shell: pwsh + run: | + $Parameters = @{} + $Parameters.ModulePath = ${env:ModulePath} + $Parameters.UserEmail = ${env:UserEmail} + $Parameters.UserName = ${env:UserName} + $Parameters.TagVersionFormat = ${env:TagVersionFormat} + $Parameters.TagAnnotationFormat = ${env:TagAnnotationFormat} + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: TagModuleVersion $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {param( + [string] + $ModulePath, + + # The user email associated with a git commit. + [string] + $UserEmail, + + # The user name associated with a git commit. + [string] + $UserName, + + # The tag version format (default value: 'v$(imported.Version)') + # This can expand variables. $imported will contain the imported module. + [string] + $TagVersionFormat = 'v$($imported.Version)', + + # The tag version format (default value: '$($imported.Name) $(imported.Version)') + # This can expand variables. $imported will contain the imported module. + [string] + $TagAnnotationFormat = '$($imported.Name) $($imported.Version)' + ) + + + $gitHubEvent = if ($env:GITHUB_EVENT_PATH) { + [IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json + } else { $null } + + + @" + ::group::GitHubEvent + $($gitHubEvent | ConvertTo-Json -Depth 100) + ::endgroup:: + "@ | Out-Host + + if (-not ($gitHubEvent.head_commit.message -match "Merge Pull Request #(?\d+)") -and + (-not $gitHubEvent.psobject.properties['inputs'])) { + "::warning::Pull Request has not merged, skipping Tagging" | Out-Host + return + } + + + + $imported = + if (-not $ModulePath) { + $orgName, $moduleName = $env:GITHUB_REPOSITORY -split "/" + Import-Module ".\$moduleName.psd1" -Force -PassThru -Global + } else { + Import-Module $modulePath -Force -PassThru -Global + } + + if (-not $imported) { return } + + $targetVersion =$ExecutionContext.InvokeCommand.ExpandString($TagVersionFormat) + $existingTags = git tag --list + + @" + Target Version: $targetVersion + + Existing Tags: + $($existingTags -join [Environment]::NewLine) + "@ | Out-Host + + $versionTagExists = $existingTags | Where-Object { $_ -match $targetVersion } + + if ($versionTagExists) { + "::warning::Version $($versionTagExists)" + return + } + + if (-not $UserName) { $UserName = $env:GITHUB_ACTOR } + if (-not $UserEmail) { $UserEmail = "$UserName@github.com" } + git config --global user.email $UserEmail + git config --global user.name $UserName + + git tag -a $targetVersion -m $ExecutionContext.InvokeCommand.ExpandString($TagAnnotationFormat) + git push origin --tags + + if ($env:GITHUB_ACTOR) { + exit 0 + }} @Parameters + - name: ReleaseModule + id: ReleaseModule + shell: pwsh + run: | + $Parameters = @{} + $Parameters.ModulePath = ${env:ModulePath} + $Parameters.UserEmail = ${env:UserEmail} + $Parameters.UserName = ${env:UserName} + $Parameters.TagVersionFormat = ${env:TagVersionFormat} + $Parameters.ReleaseNameFormat = ${env:ReleaseNameFormat} + $Parameters.ReleaseAsset = ${env:ReleaseAsset} + $Parameters.ReleaseAsset = $parameters.ReleaseAsset -split ';' -replace '^[''"]' -replace '[''"]$' + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: ReleaseModule $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {param( + [string] + $ModulePath, + + # The user email associated with a git commit. + [string] + $UserEmail, + + # The user name associated with a git commit. + [string] + $UserName, + + # The tag version format (default value: 'v$(imported.Version)') + # This can expand variables. $imported will contain the imported module. + [string] + $TagVersionFormat = 'v$($imported.Version)', + + # The release name format (default value: '$($imported.Name) $($imported.Version)') + [string] + $ReleaseNameFormat = '$($imported.Name) $($imported.Version)', + + # Any assets to attach to the release. Can be a wildcard or file name. + [string[]] + $ReleaseAsset + ) + + + $gitHubEvent = if ($env:GITHUB_EVENT_PATH) { + [IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json + } else { $null } + + + @" + ::group::GitHubEvent + $($gitHubEvent | ConvertTo-Json -Depth 100) + ::endgroup:: + "@ | Out-Host + + if (-not ($gitHubEvent.head_commit.message -match "Merge Pull Request #(?\d+)") -and + (-not $gitHubEvent.psobject.properties['inputs'])) { + "::warning::Pull Request has not merged, skipping GitHub release" | Out-Host + return + } + + + + $imported = + if (-not $ModulePath) { + $orgName, $moduleName = $env:GITHUB_REPOSITORY -split "/" + Import-Module ".\$moduleName.psd1" -Force -PassThru -Global + } else { + Import-Module $modulePath -Force -PassThru -Global + } + + if (-not $imported) { return } + + $targetVersion =$ExecutionContext.InvokeCommand.ExpandString($TagVersionFormat) + $targetReleaseName = $targetVersion + $releasesURL = 'https://api.github.com/repos/${{github.repository}}/releases' + "Release URL: $releasesURL" | Out-Host + $listOfReleases = Invoke-RestMethod -Uri $releasesURL -Method Get -Headers @{ + "Accept" = "application/vnd.github.v3+json" + "Authorization" = 'Bearer ${{ secrets.GITHUB_TOKEN }}' + } + + $releaseExists = $listOfReleases | Where-Object tag_name -eq $targetVersion + + if ($releaseExists) { + "::warning::Release '$($releaseExists.Name )' Already Exists" | Out-Host + $releasedIt = $releaseExists + } else { + $releasedIt = Invoke-RestMethod -Uri $releasesURL -Method Post -Body ( + [Ordered]@{ + owner = '${{github.owner}}' + repo = '${{github.repository}}' + tag_name = $targetVersion + name = $ExecutionContext.InvokeCommand.ExpandString($ReleaseNameFormat) + body = + if ($env:RELEASENOTES) { + $env:RELEASENOTES + } elseif ($imported.PrivateData.PSData.ReleaseNotes) { + $imported.PrivateData.PSData.ReleaseNotes + } else { + "$($imported.Name) $targetVersion" + } + draft = if ($env:RELEASEISDRAFT) { [bool]::Parse($env:RELEASEISDRAFT) } else { $false } + prerelease = if ($env:PRERELEASE) { [bool]::Parse($env:PRERELEASE) } else { $false } + } | ConvertTo-Json + ) -Headers @{ + "Accept" = "application/vnd.github.v3+json" + "Content-type" = "application/json" + "Authorization" = 'Bearer ${{ secrets.GITHUB_TOKEN }}' + } + } + + + + + + if (-not $releasedIt) { + throw "Release failed" + } else { + $releasedIt | Out-Host + } + + $releaseUploadUrl = $releasedIt.upload_url -replace '\{.+$' + + if ($ReleaseAsset) { + $fileList = Get-ChildItem -Recurse + $filesToRelease = + @(:nextFile foreach ($file in $fileList) { + foreach ($relAsset in $ReleaseAsset) { + if ($relAsset -match '[\*\?]') { + if ($file.Name -like $relAsset) { + $file; continue nextFile + } + } elseif ($file.Name -eq $relAsset -or $file.FullName -eq $relAsset) { + $file; continue nextFile + } + } + }) + + $releasedFiles = @{} + foreach ($file in $filesToRelease) { + if ($releasedFiles[$file.Name]) { + Write-Warning "Already attached file $($file.Name)" + continue + } else { + $fileBytes = [IO.File]::ReadAllBytes($file.FullName) + $releasedFiles[$file.Name] = + Invoke-RestMethod -Uri "${releaseUploadUrl}?name=$($file.Name)" -Headers @{ + "Accept" = "application/vnd.github+json" + "Authorization" = 'Bearer ${{ secrets.GITHUB_TOKEN }}' + } -Body $fileBytes -ContentType Application/octet-stream + $releasedFiles[$file.Name] + } + } + + "Attached $($releasedFiles.Count) file(s) to release" | Out-Host + } + + + + } @Parameters + - name: PublishPowerShellGallery + id: PublishPowerShellGallery + shell: pwsh + run: | + $Parameters = @{} + $Parameters.ModulePath = ${env:ModulePath} + $Parameters.Exclude = ${env:Exclude} + $Parameters.Exclude = $parameters.Exclude -split ';' -replace '^[''"]' -replace '[''"]$' + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: PublishPowerShellGallery $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {param( + [string] + $ModulePath, + + [string[]] + $Exclude = @('*.png', '*.mp4', '*.jpg','*.jpeg', '*.gif', 'docs[/\]*') + ) + + $gitHubEvent = if ($env:GITHUB_EVENT_PATH) { + [IO.File]::ReadAllText($env:GITHUB_EVENT_PATH) | ConvertFrom-Json + } else { $null } + + if (-not $Exclude) { + $Exclude = @('*.png', '*.mp4', '*.jpg','*.jpeg', '*.gif','docs[/\]*') + } + + + @" + ::group::GitHubEvent + $($gitHubEvent | ConvertTo-Json -Depth 100) + ::endgroup:: + "@ | Out-Host + + @" + ::group::PSBoundParameters + $($PSBoundParameters | ConvertTo-Json -Depth 100) + ::endgroup:: + "@ | Out-Host + + if (-not ($gitHubEvent.head_commit.message -match "Merge Pull Request #(?\d+)") -and + (-not $gitHubEvent.psobject.properties['inputs'])) { + "::warning::Pull Request has not merged, skipping Gallery Publish" | Out-Host + return + } + + + $imported = + if (-not $ModulePath) { + $orgName, $moduleName = $env:GITHUB_REPOSITORY -split "/" + Import-Module ".\$moduleName.psd1" -Force -PassThru -Global + } else { + Import-Module $modulePath -Force -PassThru -Global + } + + if (-not $imported) { return } + + $foundModule = try { Find-Module -Name $imported.Name -ErrorAction SilentlyContinue} catch {} + + if ($foundModule -and (([Version]$foundModule.Version) -ge ([Version]$imported.Version))) { + "::warning::Gallery Version of $moduleName is more recent ($($foundModule.Version) >= $($imported.Version))" | Out-Host + } else { + + $gk = '${{secrets.GALLERYKEY}}' + + $rn = Get-Random + $moduleTempFolder = Join-Path $pwd "$rn" + $moduleTempPath = Join-Path $moduleTempFolder $moduleName + New-Item -ItemType Directory -Path $moduleTempPath -Force | Out-Host + + Write-Host "Staging Directory: $ModuleTempPath" + + $imported | Split-Path | + Get-ChildItem -Force | + Where-Object Name -NE $rn | + Copy-Item -Destination $moduleTempPath -Recurse + + $moduleGitPath = Join-Path $moduleTempPath '.git' + Write-Host "Removing .git directory" + if (Test-Path $moduleGitPath) { + Remove-Item -Recurse -Force $moduleGitPath + } + + if ($Exclude) { + "::notice::Attempting to Exlcude $exclude" | Out-Host + Get-ChildItem $moduleTempPath -Recurse | + Where-Object { + foreach ($ex in $exclude) { + if ($_.FullName -like $ex) { + "::notice::Excluding $($_.FullName)" | Out-Host + return $true + } + } + } | + Remove-Item + } + + Write-Host "Module Files:" + Get-ChildItem $moduleTempPath -Recurse + Write-Host "Publishing $moduleName [$($imported.Version)] to Gallery" + Publish-Module -Path $moduleTempPath -NuGetApiKey $gk + if ($?) { + Write-Host "Published to Gallery" + } else { + Write-Host "Gallery Publish Failed" + exit 1 + } + } + } @Parameters + BuildPSJekyll: + runs-on: ubuntu-latest + if: ${{ success() }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: GitLogger + uses: GitLogging/GitLoggerAction@main + id: GitLogger + - name: Use PSSVG Action + uses: StartAutomating/PSSVG@main + id: PSSVG + - name: Use PipeScript Action + uses: StartAutomating/PipeScript@main + id: PipeScript + - name: Run PSJekyll (on branch) + if: ${{github.ref_name != 'main'}} + uses: ./ + id: PSJekyllBranch + - name: UseEZOut + uses: StartAutomating/EZOut@master + - name: UseHelpOut + uses: StartAutomating/HelpOut@master + - name: Log in to ghcr.io + uses: docker/login-action@master + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + env: + REGISTRY: ghcr.io + - name: Extract Docker Metadata (for branch) + if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}} + id: meta + uses: docker/metadata-action@master + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + - name: Extract Docker Metadata (for main) + if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}} + id: metaMain + uses: docker/metadata-action@master + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: latest=true + - name: Build and push Docker image (from main) + if: ${{github.ref_name == 'main' || github.ref_name == 'master' || github.ref_name == 'latest'}} + uses: docker/build-push-action@master + with: + context: . + push: true + tags: ${{ steps.metaMain.outputs.tags }} + labels: ${{ steps.metaMain.outputs.labels }} + - name: Build and push Docker image (from branch) + if: ${{github.ref_name != 'main' && github.ref_name != 'master' && github.ref_name != 'latest'}} + uses: docker/build-push-action@master + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} diff --git a/Build/GitHub/Jobs/BuildPSJekyll.psd1 b/Build/GitHub/Jobs/BuildPSJekyll.psd1 new file mode 100644 index 0000000..26652b2 --- /dev/null +++ b/Build/GitHub/Jobs/BuildPSJekyll.psd1 @@ -0,0 +1,34 @@ +@{ + "runs-on" = "ubuntu-latest" + if = '${{ success() }}' + steps = @( + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + }, + @{ + name = 'GitLogger' + uses = 'GitLogging/GitLoggerAction@main' + id = 'GitLogger' + }, + @{ + name = 'Use PSSVG Action' + uses = 'StartAutomating/PSSVG@main' + id = 'PSSVG' + }, + @{ + name = 'Use PipeScript Action' + uses = 'StartAutomating/PipeScript@main' + id = 'PipeScript' + }, + @{ + name = 'Run PSJekyll (on branch)' + if = '${{github.ref_name != ''main''}}' + uses = './' + id = 'PSJekyllBranch' + }, + 'RunEZOut', + 'RunHelpOut', + 'BuildAndPublishContainer' + ) +} \ No newline at end of file diff --git a/Build/GitHub/Steps/BuildAndPublishContainer.psd1 b/Build/GitHub/Steps/BuildAndPublishContainer.psd1 new file mode 100644 index 0000000..4145af3 --- /dev/null +++ b/Build/GitHub/Steps/BuildAndPublishContainer.psd1 @@ -0,0 +1,57 @@ +@{ + 'name'='Log in to ghcr.io' + 'uses'='docker/login-action@master' + 'with'=@{ + 'registry'='${{ env.REGISTRY }}' + 'username'='${{ github.actor }}' + 'password'='${{ secrets.GITHUB_TOKEN }}' + } + env = @{ + 'REGISTRY'='ghcr.io' + } +} +@{ + name = 'Extract Docker Metadata (for branch)' + if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}' + id = 'meta' + uses = 'docker/metadata-action@master' + with = @{ + 'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}' + } + env = @{ + REGISTRY = 'ghcr.io' + IMAGE_NAME = '${{ github.repository }}' + } +} +@{ + name = 'Extract Docker Metadata (for main)' + if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}' + id = 'metaMain' + uses = 'docker/metadata-action@master' + with = @{ + 'images'='${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}' + 'flavor'='latest=true' + } +} +@{ + name = 'Build and push Docker image (from main)' + if = '${{github.ref_name == ''main'' || github.ref_name == ''master'' || github.ref_name == ''latest''}}' + uses = 'docker/build-push-action@master' + with = @{ + 'context'='.' + 'push'='true' + 'tags'='${{ steps.metaMain.outputs.tags }}' + 'labels'='${{ steps.metaMain.outputs.labels }}' + } +} +@{ + name = 'Build and push Docker image (from branch)' + if = '${{github.ref_name != ''main'' && github.ref_name != ''master'' && github.ref_name != ''latest''}}' + uses = 'docker/build-push-action@master' + with = @{ + 'context'='.' + 'push'='true' + 'tags'='${{ steps.meta.outputs.tags }}' + 'labels'='${{ steps.meta.outputs.labels }}' + } +} \ No newline at end of file diff --git a/Build/GitHub/Steps/PublishTestResults.psd1 b/Build/GitHub/Steps/PublishTestResults.psd1 new file mode 100644 index 0000000..5b169ed --- /dev/null +++ b/Build/GitHub/Steps/PublishTestResults.psd1 @@ -0,0 +1,10 @@ +@{ + name = 'PublishTestResults' + uses = 'actions/upload-artifact@v3' + with = @{ + name = 'PesterResults' + path = '**.TestResults.xml' + } + if = '${{always()}}' +} + diff --git a/Build/PSJekyll.GitHubWorkflow.PSDevOps.ps1 b/Build/PSJekyll.GitHubWorkflow.PSDevOps.ps1 new file mode 100644 index 0000000..19061a0 --- /dev/null +++ b/Build/PSJekyll.GitHubWorkflow.PSDevOps.ps1 @@ -0,0 +1,15 @@ +#requires -Module PSDevOps +Import-BuildStep -SourcePath ( + Join-Path $PSScriptRoot 'GitHub' +) -BuildSystem GitHubWorkflow + +Push-Location ($PSScriptRoot | Split-Path) +New-GitHubWorkflow -Name "Build PSJekyll" -On Push, + PullRequest, + Demand -Job TestPowerShellOnLinux, + TagReleaseAndPublish, BuildPSJekyll -Environment ([Ordered]@{ + REGISTRY = 'ghcr.io' + IMAGE_NAME = '${{ github.repository }}' + }) -OutputPath .\.github\workflows\BuildPSJekyll.yml + +Pop-Location \ No newline at end of file From 40c0c4fab31631826dfe5bee2ba38dbbd9211439 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:55:26 -0700 Subject: [PATCH 008/769] feat: PSJekyll ezout ( Fixes #17 ) --- Build/PSJekyll.ezout.ps1 | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Build/PSJekyll.ezout.ps1 diff --git a/Build/PSJekyll.ezout.ps1 b/Build/PSJekyll.ezout.ps1 new file mode 100644 index 0000000..ff692b0 --- /dev/null +++ b/Build/PSJekyll.ezout.ps1 @@ -0,0 +1,40 @@ +#requires -Module EZOut +# Install-Module EZOut or https://github.com/StartAutomating/EZOut +$myFile = $MyInvocation.MyCommand.ScriptBlock.File +$myModuleName = 'PSJekyll' +$myRoot = $myFile | Split-Path | Split-Path +Push-Location $myRoot +$formatting = @( + # Add your own Write-FormatView here, + # or put them in a Formatting or Views directory + foreach ($potentialDirectory in 'Formatting','Views','Types') { + Join-Path $myRoot $potentialDirectory | + Get-ChildItem -ea ignore | + Import-FormatView -FilePath {$_.Fullname} + } +) + +$destinationRoot = $myRoot + +if ($formatting) { + $myFormatFilePath = Join-Path $destinationRoot "$myModuleName.format.ps1xml" + # You can also output to multiple paths by passing a hashtable to -OutputPath. + $formatting | Out-FormatData -Module $MyModuleName -OutputPath $myFormatFilePath +} + +$types = @( + # Add your own Write-TypeView statements here + # or declare them in the 'Types' directory + Join-Path $myRoot Types | + Get-Item -ea ignore | + Import-TypeView +) + +if ($types) { + $myTypesFilePath = Join-Path $destinationRoot "$myModuleName.types.ps1xml" + # You can also output to multiple paths by passing a hashtable to -OutputPath. + $types | Out-TypeData -OutputPath $myTypesFilePath +} + + +Pop-Location From c114646246099fc074122d8d9af9c4cc54774107 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:57:36 -0700 Subject: [PATCH 009/769] feat: PSJekyll Container.start.ps1 ( Fixes #13 ) --- Container.start.ps1 | 77 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 Container.start.ps1 diff --git a/Container.start.ps1 b/Container.start.ps1 new file mode 100644 index 0000000..28df2f6 --- /dev/null +++ b/Container.start.ps1 @@ -0,0 +1,77 @@ +<# +.SYNOPSIS + Starts the container. +.DESCRIPTION + Starts a container. + + This script should be called from the Dockerfile as the ENTRYPOINT (or from within the ENTRYPOINT). + + It should be deployed to the root of the container image. + + ~~~Dockerfile + # Thank you Microsoft! Thank you PowerShell! Thank you Docker! + FROM mcr.microsoft.com/powershell + # Set the shell to PowerShell (thanks again, Docker!) + SHELL ["/bin/pwsh", "-nologo", "-command"] + # Run the initialization script. This will do all remaining initialization in a single layer. + RUN --mount=type=bind,src=./,target=/Initialize ./Initialize/Container.init.ps1 + + ENTRYPOINT ["pwsh", "-nologo", "-file", "/Container.start.ps1"] + ~~~ +.NOTES + Did you know that in PowerShell you can 'use' namespaces that do not really exist? + This seems like a nice way to describe a relationship to a container image. + That is why this file is using the namespace 'mcr.microsoft.com/powershell'. + (this does nothing, but most likely will be used in the future) +#> +using namespace 'ghcr.io/powershellweb/psjekyll' + +param() + +$env:IN_CONTAINER = $true +$PSStyle.OutputRendering = 'Ansi' + +$mountedDrives = @(if (Test-Path '/proc/mounts') { + (Select-String "\S+\s(?

\S+).+rw?,.+symlinkroot=/mnt/host" "/proc/mounts").Matches.Groups | + Where-Object Name -eq p | + Get-Item -path { $_.Value } | + New-PSDrive -Name { "Mount", $_.Name -join '.' } -PSProvider FileSystem -Root { $_.Value } -Scope Global -ErrorAction Ignore +}) + +if ($global:ContainerInfo.MountedPaths) { + "Mounted $($mountedPaths.Length) drives:" | Out-Host + $mountedDrives | Out-Host +} + +if ($args) { + # If there are arguments, output them (you could handle them in a more complex way). + "$args" | Out-Host +} else { + # If there are no arguments, see if there is a Microservice.ps1 + if (Test-Path './Microservice.ps1') { + # If there is a Microservice.ps1, run it. + . ./Microservice.ps1 + } + #region Custom + else + { + <#Start-ThreadJob -Name "${env:ModuleName}.Jekyll" -ScriptBlock { + jekyll serve --host "$( + if ($env:JEKYLL_HOST) { $env:JEKYLL_HOST } + else { '*' } + )" '--port' $( + if ($env:JEKYLL_PORT) { $env:JEKYLL_PORT } + else { 4000 } + ) + }#> + } + #endregion Custom +} + +# If you want to do something when the container is stopped, you can register an event. +# This can call a script that does some cleanup, or sends a message as the service is exiting. +Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action { + if (Test-Path '/Container.stop.ps1') { + & /Container.stop.ps1 + } +} | Out-Null \ No newline at end of file From 2e18c7d021a0467c930d6293dacc09d5c645054b Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 17:58:39 -0700 Subject: [PATCH 010/769] feat: PSJekyll.FormatYaml ( Fixes #21 ) --- Types/PSJekyll/FormatYAML.ps1 | 188 ++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 Types/PSJekyll/FormatYAML.ps1 diff --git a/Types/PSJekyll/FormatYAML.ps1 b/Types/PSJekyll/FormatYAML.ps1 new file mode 100644 index 0000000..1d07ee2 --- /dev/null +++ b/Types/PSJekyll/FormatYAML.ps1 @@ -0,0 +1,188 @@ +<# +.SYNOPSIS + Formats objects as YAML +.DESCRIPTION + Formats an object as YAML. +.EXAMPLE + Format-Yaml -InputObject @("a", "b", "c") +.EXAMPLE + @{a="b";c="d";e=@{f=@('g')}} | Format-Yaml +#> +param( +# The InputObject. +[Parameter(ValueFromPipeline)] +[PSObject] +$InputObject, + +# If set, will make a YAML header by adding a YAML Document tag above and below output. +[Alias('YAMLDocument')] +[switch] +$YamlHeader, + +[int] +$Indent = 0, + +# The maximum depth of objects to include. +# Beyond this depth, an empty string will be returned. +[int] +$Depth +) + +begin { + if (-not $Depth) { $depth = $FormatEnumerationLimit } + $toYaml = { + param( + [Parameter(ValueFromPipeline,Position=0)]$Object, + [Object]$Parent, + [Object]$GrandParent, + [int]$Indent = 0) + + begin { $n = 0; $mySelf = $myInvocation.MyCommand.ScriptBlock } + process { + $n++ + if ($Object -eq $null) { return } + + if ($depth) { + $myDepth = $indent / 2 + if ($myDepth -gt $depth) { + return '' + } + } + + if ($Parent -and $Parent -is [Collections.IList]) { + if ($Parent.IndexOf($Object) -gt 0) { ' ' * $Indent } + '- ' + } + + #region Primitives + if ( $Object -is [string] ) { # If it's a string + if ($object -match '\n') { # see if it's a multline string. + "|" # If it is, emit the multiline indicator + $indent +=2 + foreach ($l in $object -split '(?>\r\n|\n)') { # and emit each line indented + [Environment]::NewLine + ' ' * $indent + $l + } + $indent -=2 + } elseif ("$object".Contains('*')) { + "'$($Object -replace "'","''")'" + } else { + $object + } + + if ($Parent -is [Collections.IList]) { # If the parent object was a list + [Environment]::NewLine # emit a newline. + } + return # Once the string has been emitted, return. + } + if ( $Object.GetType().IsPrimitive ) { # If it is a primitive type + "$Object".ToLower() # Emit it in lowercase. + if ($Parent -is [Collections.IList]) { + [Environment]::NewLine + } + return + } + #endregion Primitives + + #region KVP + if ( $Object -is [Collections.DictionaryEntry] -or $object -is [Management.Automation.PSPropertyInfo]) { + if ($Parent -isnot [Collections.IList] -and + ($GrandParent -isnot [Collections.IList] -or $n -gt 1)) { + [Environment]::NewLine + (" " * $Indent) + } + if ($object.Key -and $Object.Key -is [string]) { + $Object.Key +": " + } elseif ($object.Name -and $object.Name -is [string]) { + $Object.Name +": " + } + } + + if ( $Object -is [Collections.DictionaryEntry] -or $Object -is [Management.Automation.PSPropertyInfo]) { + & $mySelf -Object $Object.Value -Parent $Object -GrandParent $parent -Indent $Indent + return + } + #endregion KVP + + + #region Nested + if ($parent -and ($Object -is [Collections.IDictionary] -or $Object -is [PSObject])) { + $Indent += 2 + } + elseif ($object -is [Collections.IList]) { + $allPrimitive = 1 + foreach ($Obj in $Object) { + $allPrimitive = $allPrimitive -band ( + $Obj -is [string] -or + $obj.GetType().IsPrimitive + ) + } + if ($parent -and -not $allPrimitive) { + $Indent += 2 + } + } + + + if ( $Object -is [Collections.IDictionary] ) { + $Object.GetEnumerator() | + & $mySelf -Parent $Object -GrandParent $Parent -Indent $Indent + } elseif ($Object -is [Collections.IList]) { + + [Environment]::NewLine + (' ' * $Indent) + + $Object | + & $mySelf -Parent $Object -GrandParent $Parent -Indent $Indent + + } + elseif ($object -is [enum]) { + $object.ToString() + } + elseif ($Object.PSObject.Properties) { + $Object.psobject.properties | + & $mySelf -Parent $Object -GrandParent $Parent -Indent $Indent + } + + if ($Object -is [Collections.IDictionary] -or $Object -is [PSCustomObject] -or $Object -is [Collections.IList]) { + if ($Parent -is [Collections.IList]) { [Environment]::NewLine } + $Indent -= 2; + } + #endregion Nested + } + } + function IndentString([string]$String,[int]$Indent) { + @(foreach ($line in @($String -split '(?>\r\n|\n)')) { + (' ' * $indent) + $line + }) -join [Environment]::NewLine + } + $inputWasNotPiped = $PSBoundParameters.InputObject -as [bool] + $allInputObjects = @() +} + +process { + if ($inputWasNotPiped) { + IndentString ('' + $(if ($YamlHeader) { '---' + [Environment]::NewLine }) + ( + (& $toYaml -object $inputObject) -join '' -replace + "$([Environment]::NewLine * 2)", [Environment]::NewLine + ) + $(if ($YamlHeader) { [Environment]::NewLine + '---'})) -Indent $Indent + } else { + $allInputObjects += $inputObject + } +} + +end { + if (-not $allInputObjects) { return } + if ($allInputObjects.Length -eq 1) { + IndentString ('' + $(if ($YamlHeader) { '---' + [Environment]::NewLine}) + ( + (& $toYaml -object $inputObject) -join '' -replace + "$([Environment]::NewLine * 2)", [Environment]::NewLine + ) + $(if ($YamlHeader) { [Environment]::NewLine + '---'})) -Indent $Indent + } else { + IndentString ('' + $(if ($YamlHeader) { '---' + [Environment]::NewLine}) + ( + (& $toYaml -object $allInputObjects) -join '' -replace + "$([Environment]::NewLine * 2)", [Environment]::NewLine + ) + $(if ($YamlHeader) { [Environment]::NewLine + '---'})) -Indent $Indent + } +} + + + From 9dc52b42dfc16f992b97870422281b57deff4de9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 1 Oct 2024 00:59:42 +0000 Subject: [PATCH 011/769] feat: PSJekyll.FormatYaml ( Fixes #21 ) --- PSJekyll.types.ps1xml | 202 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 PSJekyll.types.ps1xml diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml new file mode 100644 index 0000000..c40fc43 --- /dev/null +++ b/PSJekyll.types.ps1xml @@ -0,0 +1,202 @@ + + + + PSJekyll + + + FormatYAML + + + + + \ No newline at end of file From c6e8bc82a4218794dccf46829c2ea48950528e4e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 18:07:53 -0700 Subject: [PATCH 012/769] feat: PSJekyll.psd1 using types.ps1xml ( Fixes #1, Fixes #17 ) --- PSJekyll.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.psd1 b/PSJekyll.psd1 index f312b3c..ef4e3d6 100644 --- a/PSJekyll.psd1 +++ b/PSJekyll.psd1 @@ -3,5 +3,5 @@ Description = 'PSJekyll is a PowerShell module that provides cmdlets to manage Jekyll sites' Guid = '793784c4-0e1f-4928-b874-1e601f9a3d29' RootModule = 'PSJekyll.psm1' - # TypesToProcess = @('PSJekyll.types.ps1xml') + TypesToProcess = @('PSJekyll.types.ps1xml') } From 1fa18724053b3151300ae55e14e27e5fa94b25d1 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 18:10:12 -0700 Subject: [PATCH 013/769] feat: Start-PSJekyll ( Fixes #5 ) --- Commands/Start-PSJekyll.ps1 | 140 ++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 Commands/Start-PSJekyll.ps1 diff --git a/Commands/Start-PSJekyll.ps1 b/Commands/Start-PSJekyll.ps1 new file mode 100644 index 0000000..9f56598 --- /dev/null +++ b/Commands/Start-PSJekyll.ps1 @@ -0,0 +1,140 @@ +function Start-PSJekyll +{ + <# + .SYNOPSIS + Starts a Jekyll server + .DESCRIPTION + Starts a Jekyll server in a PowerShell job. + .LINK + https://jekyllrb.com/ + #> + [Alias('Start-Jekyll')] + [CmdletBinding()] + param( + # The name of the Jekyll site + [string] + $Name, + + # One or more config files to use + [Alias('Configuration')] + [string[]] + $Config, + + # The source directory + [string] + $SourcePath, + + # The destination directory + [string] + $DestinationPath, + + # The host header + [string] + $HostHeader, + + # The port to listen on + [uint] + $Port, + + # The path to the plugin files + [string[]] + $PluginPath, + + # If set, will show a directory list. + [switch] + $ShowDirectoryList, + + # If set, will enable live reload. + [switch] + $LiveReload, + + # If set, will generate a liquid profile + [switch] + $LiquidProfile, + + # If set, will trace the execution + [switch] + $Trace, + + # Watch for changes and rebuild + [switch] + $Watch, + + # If set, will publish posts with a future date (previewing them). + [switch] + $PreviewFuture, + + # The base URL for the site + [string] + $BaseUrl, + + # If set, will detach the process + [switch] + $Detach, + + # Enable incremental rebuilds + [switch] + $Incremental + ) + + if ($env:IN_CONTAINER -and -not $HostHeader) { + $HostHeader = '*' + } + + $jekyllSplat = @( + if ($force) { '--force' } + if ($safe) { '--safe' } + if ($Detach) { '--detach' } + if ($PreviewFuture) { '--future' } + if ($liveReload) {'--livereload'} + if ($sourcePath) {"--source";"$sourcePath"} + if ($destinationPath) {"--destination";"$destinationPath"} + if ($BaseUrl) {"--baseurl";"$BaseUrl"} + if ($Incremental) {'--incremental'} + if ($HostHeader) {"--host"; "$HostHeader"} + if ($Port) {"--port"; "$Port"} + if ($ShowDirectoryList) {'--show-dir-list'} + if ($layoutPath) {"--layouts"; "$layoutPath"} + if ($pluginPath) {"--plugins"; "$($pluginPath -join ',')"} + if ($liquidProfile) {'--profile'} + if ($trace) {'--trace'} + if ($watch) {'--watch'} + + ) + + $startedAfter = [DateTime]::Now + if ($jekyllSplat -notmatch '--watch') { + $jekyllSplat += '--watch' + } + if ($jekyllSplat -notmatch '--incremental') { + $jekyllSplat += '--incremental' + } + if ($jekyllSplat -notmatch '--trace') { + $jekyllSplat += '--trace' + } + + Write-Verbose "Starting Jekyll server $jekyllSplat" + $jobName = if ($hostHeader) { "PSJekyll.$hostHeader" } else { "Start-PSJekyll" } + $jekyllJob = + Start-ThreadJob -ScriptBlock { + bundle install + + if ($args -match '^\*$' -and $args -match '^--host$') { + $otherArgs = @($args -notmatch '^(?>--host|\*)$') + bundle exec jekyll serve --host '*' @otherArgs + } else { + $promptLongForm = @('exec','jekyll','serve') + $args + bundle @promptLongForm + } + } -ArgumentList $jekyllSplat -Name $jobName + + $jekyllProcesses = Get-Process *ruby* | Where-Object { $_.StartTime -ge $startedAfter } + + Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action { + get-process ruby | Stop-Process -Force + } | Out-Null + + $jekyllJob.pstypenames.insert(0,"PSJekyll.JekyllJob") + $jekyllJob.psobject.properties.Add([psnoteproperty]::New("Processes", $jekyllProcesses)) + $jekyllJob +} From c9be728592463881bb159271c0a885b79785bc63 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 19:48:43 -0700 Subject: [PATCH 014/769] feat: Stop-PSJekyll ( Fixes #6 ) --- Commands/Stop-PSJekyll.ps1 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Commands/Stop-PSJekyll.ps1 diff --git a/Commands/Stop-PSJekyll.ps1 b/Commands/Stop-PSJekyll.ps1 new file mode 100644 index 0000000..35d1e4f --- /dev/null +++ b/Commands/Stop-PSJekyll.ps1 @@ -0,0 +1,20 @@ +function Stop-PSJekyll { + <# + .SYNOPSIS + Stops a Jekyll server + .DESCRIPTION + Stops a Jekyll server in a PowerShell job. + .LINK + https://jekyllrb.com/ + #> + [Alias('Stop-Jekyll')] + param( + # The name of the Jekyll job + [string] + $Name = '*' + ) + + process { + Get-Job -Name "Jekyll.$Name" | Stop-Job + } +} \ No newline at end of file From ae4b97cf5894d7a9ba6490d226acf7e2bdf7a16d Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 20:00:10 -0700 Subject: [PATCH 015/769] feat: PSJekyll logo ( Fixes #19 ) --- Build/PSJekyll.PSSVG.ps1 | 93 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 Build/PSJekyll.PSSVG.ps1 diff --git a/Build/PSJekyll.PSSVG.ps1 b/Build/PSJekyll.PSSVG.ps1 new file mode 100644 index 0000000..1a79ad3 --- /dev/null +++ b/Build/PSJekyll.PSSVG.ps1 @@ -0,0 +1,93 @@ +#requires -Module PSSVG + +$AssetsPath = $PSScriptRoot | Split-Path | Join-Path -ChildPath "Assets" + +if (-not (Test-Path $AssetsPath)) { + New-Item -ItemType Directory -Path $AssetsPath | Out-Null +} +$myName = $MyInvocation.MyCommand.Name -replace '\.PSSVG\.ps1$' + +$strokeWidth = '0.5%' +foreach ($variant in '','Animated') { + $outputPath = if (-not $variant) { + Join-Path $assetsPath "$myName.svg" + } else { + Join-Path $assetsPath "$myName-$variant.svg" + } + $symbolDefinition = SVG.symbol -Id 'PowerShellWeb' @( + svg -content $( + $fillParameters = [Ordered]@{ + Fill = '#4488FF' + Class = 'foreground-fill' + } + + $strokeParameters = [Ordered]@{ + Stroke = '#4488FF' + Class = 'foreground-stroke' + StrokeWidth = $strokeWidth + } + + $transparentFill = [Ordered]@{Fill='transparent'} + $animationDuration = [Ordered]@{ + Dur = "4.2s" + RepeatCount = "indefinite" + } + + SVG.GoogleFont -FontName $fontName + + svg.symbol -Id psChevron -Content @( + svg.polygon -Points (@( + "40,20" + "45,20" + "60,50" + "35,80" + "32.5,80" + "55,50" + ) -join ' ') + ) -ViewBox 100, 100 + + + + SVG.circle -CX 50% -Cy 50% -R 42% @transparentFill @strokeParameters -Content @( + ) + SVG.ellipse -Cx 50% -Cy 50% -Rx 23% -Ry 42% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '23%;16%;23%' -AttributeName rx @animationDuration + } + ) + SVG.ellipse -Cx 50% -Cy 50% -Rx 16% -Ry 42% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '16%;23%;16%' -AttributeName rx @animationDuration + } + ) -Opacity .9 + SVG.ellipse -Cx 50% -Cy 50% -Rx 15% -Ry 42% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '15%;16%;15%' -AttributeName rx @animationDuration + } + ) -Opacity .8 + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 23% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '23%;16%;23%' -AttributeName ry @animationDuration + } + ) + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 16% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '16%;23%;16%' -AttributeName ry @animationDuration + } + ) -Opacity .9 + SVG.ellipse -Cx 50% -Cy 50% -Rx 42% -Ry 15% @transparentFill @strokeParameters -Content @( + if ($variant -match 'animate') { + svg.animate -Values '15%;16%;15%' -AttributeName ry @animationDuration + } + ) -Opacity .8 + + svg.use -Href '#psChevron' -Y 29% @fillParameters -Height 42% + ) -ViewBox 0, 0, 200, 200 -TransformOrigin 50%, 50% + ) + + svg -Content @( + $symbolDefinition + SVG.Use -Href '#PowerShellWeb' -Height 60% -Width 60% -X 20% -Y 20% + SVG.text -X 50% -Y 80% -TextAnchor middle -FontFamily $fontName -FontSize 5em -Fill '#4488FF' -Content 'PSJekyll' -DominantBaseline middle + ) -OutputPath $outputPath +} From e52cccd65e223e419583b76e3a1c2242959b357e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 1 Oct 2024 03:00:58 +0000 Subject: [PATCH 016/769] feat: PSJekyll logo ( Fixes #19 ) --- Assets/PSJekyll.svg | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Assets/PSJekyll.svg diff --git a/Assets/PSJekyll.svg b/Assets/PSJekyll.svg new file mode 100644 index 0000000..de09263 --- /dev/null +++ b/Assets/PSJekyll.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From 0a4d50de61303cc8b06444c05502c6e00d7c2a18 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 1 Oct 2024 03:00:58 +0000 Subject: [PATCH 017/769] feat: PSJekyll logo ( Fixes #19 ) --- Assets/PSJekyll-Animated.svg | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Assets/PSJekyll-Animated.svg diff --git a/Assets/PSJekyll-Animated.svg b/Assets/PSJekyll-Animated.svg new file mode 100644 index 0000000..ebef11b --- /dev/null +++ b/Assets/PSJekyll-Animated.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From 617541f1a2a5733e49d5dd168e7beb42ac3fed9a Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 20:33:57 -0700 Subject: [PATCH 018/769] docs: PSJekyll README ( Fixes #1 ) --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ba8ac08..49dc9e8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,42 @@ +

+ +
+ # PSJekyll -PowerShell Tools for Jekyll + +Scary Simple Static Sites with PowerShell and Jekyll + +[Jekyll](https://jekyllrb.com) 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 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. + +~~~yaml +- name: UseEZOut +- uses: PowerShellWeb/PSJekyll@main +~~~ + +## PSJekyll Container + +PSJekyll ships every build in a container. + +To pull down PSJekyll and start your own server, use something like: + +~~~PowerShell +docker pull ghcr.io/powershellweb/psjekyll + +docker run -interactive --tty --publish 8069:4000 ghcr.io/powershellweb/psjekyll +~~~ + +## PSJekyll Commands + +* `New-PSJekyll` creates sites with `jekyll new`. +* `Start-PSJekyll` starts Jekyll servers in a jobs. +* `Stop-PSJekyll` stops running Jekyll jobs. \ No newline at end of file From 79d3f471d1cd48a9724e8369c27099c067982d05 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 20:43:42 -0700 Subject: [PATCH 019/769] feat: Set-PSJekyll ( Fixes #7 ) --- Commands/Set-PSJekyll.ps1 | 71 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Commands/Set-PSJekyll.ps1 diff --git a/Commands/Set-PSJekyll.ps1 b/Commands/Set-PSJekyll.ps1 new file mode 100644 index 0000000..aa90b97 --- /dev/null +++ b/Commands/Set-PSJekyll.ps1 @@ -0,0 +1,71 @@ +function Set-PSJekyll { + <# + .SYNOPSIS + Sets the content of a file in Jekyll + .DESCRIPTION + Sets the content of a file in Jekyll. + + This is only slightly smarter than Set-Content. + + It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv. + + Otherwise, it will create a YAML header and then set the content. + #> + [Alias('Set-Jekyll')] + param( + # The path to the file. + [Parameter(Mandatory,Position=0)] + [ValidatePattern('^[\\/]')] + [Alias('FullName')] + [string] + $Path, + + # If set, will return the file object + [switch] + $PassThru, + + # The content to set + [Parameter(ValueFromPipeline)] + [object] + $Content, + + # Any metadata to set. + # This will create a YAML header, which is required for most files in Jekyll to be processed properly. + [Alias('YamlHeader')] + [Collections.IDictionary] + $MetaData = [Ordered]@{} + ) + + $allInput = @($input) + if ((-not $allInput) -and $Content) { + $allInput = @($Content) + } + + if ($path -match '\.json$') { + if ($allInput.Length -eq 1) { + ConvertTo-Json -InputObject $allInput[0] -Depth $FormatEnumerationLimit | + Set-Content -Path $path + } else { + ConvertTo-Json -InputObject $allInput -Depth $FormatEnumerationLimit | + Set-Content -Path $path + } + } + elseif ($path -match '\.[ct]sv$') { + $csvSplat = [Ordered]@{Path=$path} + if ($path -match '\.t') { + $csvSplat.Delimiter = "`t" + } + $content | + Export-Csv @csvSplat -NoTypeInformation + } + else { + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) | + Set-Content -Path $path + } + if ($? -and $PassThru) { + Get-Item -Path $path + } +} From f7fe38b69df537b9239a7957190cb2c4f3feaa9f Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 21:22:40 -0700 Subject: [PATCH 020/769] feat: Set-PSJekyll ( Fixes #7 ) Creating file if none exists --- Commands/Set-PSJekyll.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Commands/Set-PSJekyll.ps1 b/Commands/Set-PSJekyll.ps1 index aa90b97..d87c323 100644 --- a/Commands/Set-PSJekyll.ps1 +++ b/Commands/Set-PSJekyll.ps1 @@ -40,6 +40,12 @@ function Set-PSJekyll { if ((-not $allInput) -and $Content) { $allInput = @($Content) } + + if (-not $allInput) { return } + if (-not (Test-Path $path)) { + New-Item -Path $path -Type File -Force | Out-Null + if (-not $?) { return } + } if ($path -match '\.json$') { if ($allInput.Length -eq 1) { From 2b45b13e4a05174cee087cd60fd94c2a5d741a38 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 30 Sep 2024 21:24:31 -0700 Subject: [PATCH 021/769] feat: PSJekyll Embedding Format-Markdown ( Fixes #22 ) --- Types/PSJekyll/FormatMarkdown.ps1 | 412 ++++++++++++++++++++++++++++++ 1 file changed, 412 insertions(+) create mode 100644 Types/PSJekyll/FormatMarkdown.ps1 diff --git a/Types/PSJekyll/FormatMarkdown.ps1 b/Types/PSJekyll/FormatMarkdown.ps1 new file mode 100644 index 0000000..8ad8299 --- /dev/null +++ b/Types/PSJekyll/FormatMarkdown.ps1 @@ -0,0 +1,412 @@ +<# +.SYNOPSIS + Formats an object as Markdown +.DESCRIPTION + Formats an object as Markdown, with many options to work with +.EXAMPLE + Format-Markdown -ScriptBlock { + Get-Process + } +.EXAMPLE + 1..6 | Format-Markdown -HeadingSize { $_ } +#> +param( +[Parameter(ValueFromPipeline,ValueFromPipelineByPropertyName)] +[PSObject] +$InputObject, + +# If set, will treat the -InputObject as a paragraph. +# This is the default for strings, booleans, numbers, and other primitive types. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$MarkdownParagraph, + +# If set, will generate a markdown table. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$MarkdownTable, + +# If provided, will align columnns in a markdown table. +[Parameter(ValueFromPipelineByPropertyName)] +[ValidateSet("Left","Right","Center", "")] +[string[]] +$MarkdownTableAlignment, + +# An array of properties. Providing this implies -MarkdownTable +[Parameter(ValueFromPipelineByPropertyName)] +[PSObject[]] +$Property, + +# A heading. +# If provided without -HeadingSize, -HeadingSize will default to 2. +# If provided with -InputObject, -Heading will take priority. +[Parameter(ValueFromPipelineByPropertyName)] +[string] +$Heading, + +# The heading size (1-6) +# If provided without -Heading, the -InputObject will be considered to be a heading. +[Parameter(ValueFromPipelineByPropertyName)] +[ValidateRange(1,6)] +[int] +$HeadingSize, + +# If set, will create a link. The -InputObject will be used as the link content +[Parameter(ValueFromPipelineByPropertyName)] +[Alias('Hyperlink', 'Href')] +[string] +$Link, + +# If set, will create an image link. The -Inputobject will be used as the link content. +[Parameter(ValueFromPipelineByPropertyName)] +[string] +$ImageLink, + +# If set, will generate a bullet point list. +[Parameter(ValueFromPipelineByPropertyName)] +[Alias('BulletpointList')] +[switch] +$BulletPoint, + +# If set, bullet or numbered list items will have a checkbox. +# Each piped -InputObject will be an additional list item. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$Checkbox, + +# If set, bullet or numbered list items will be checked. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$Checked, + +# If set, will generate a numbered list. +# Each piped -InputObject will be an additional list item. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$NumberedList, + +# If set, will generate a block quote. +# Each line of the -InputObject will be block quoted. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$BlockQuote, + +# If set, will generate a block quote of a particular depth. +# Each line of the -InputObject will be block quoted. +[Parameter(ValueFromPipelineByPropertyName)] +[ValidateRange(1,3)] +[int] +$BlockQuoteDepth, + +# If provided, will create a markdown numbered list with this particular item as the number. +[Parameter(ValueFromPipelineByPropertyName)] +[int] +$Number, + +# If set, will generate a horizontal rule. +# If other parameters are provided, the horiztonal rule will be placed after. +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$HorizontalRule, + +# If set, will output the -InputObject as a Markdown code block +[Parameter(ValueFromPipelineByPropertyName)] +[switch] +$Code, + +# If set, will output the -InputObject as a Markdown code block, with a given language +# If the -InputObject is a ScriptBlock, -CodeLanguage will be set to PowerShell. +[Parameter(ValueFromPipelineByPropertyName)] +[string] +$CodeLanguage, + +# If provided, will output a script block as a Markdown code block. +[Parameter(ValueFromPipelineByPropertyName)] +[ScriptBlock] +$ScriptBlock +) + +begin { + $numberedListCounter = 0 + $IsFirst = $true + filter LinkInput { + $in = $_ + if ($ImageLink) { + "![$in]($imageLink)" + } elseif ($link) { + "[$in]($link)" + } else { + "$in" + } + } + + $markdownLines = @() +} + +process { + + if ($ScriptBlock -or $inputObject -is [scriptblock]) { # If a -ScriptBlock was provided + $CodeLanguage = 'PowerShell' # use PowerShell as a Code Language. + } + + # If a -HeadingSize or a -Heading were provided, render a heading. + if ($HeadingSize -or $Heading) + { + if (-not $HeadingSize) { $HeadingSize = 2} # If the -HeadingSize was not set, set it to 2. + $headingContent = "$(if ($Heading) { $Heading} else { $inputObject | LinkInput})" + $markdownLines += + if ($HeadingSize -eq 1) { + $headingContent + '=' * [Math]::Max($headingContent.Length, 3) + } + elseif ($HeadingSize -eq 2) { + $headingContent + '-' * [Math]::Max($headingContent.Length, 3) + } + else { + ("#"*$HeadingSize) + " $headingContent" # Output the -Heading or the -InputObject. + } + } + # If -Code or -CodeLanguage was provided, render a Markdown code block. + elseif ($Code -or $CodeLanguage) + { + # If the -InputObject was a [ScriptBlock] or there is a -ScriptBlock + if ($InputObject -is [scriptblock] -or $ScriptBlock) { + $CodeLanguage = 'PowerShell' # set the code language to PowerShell. + } + $markdownLines += ( + '```' + # Start the code fence, + $(if ($CodeLanguage) { $CodeLanguage}) + # add the language, + [Environment]::newline + # then a newline, + $( + $codeContent = $(if ($ScriptBlock) { "$scriptBlock" } else { $inputObject | LinkInput}) # then the -ScriptBlock or -InputObject + $codeContent + ) + + [Environment]::newline + # then a newline + '```' # then close the code fence. + ) + } + # If -BulletPoint was passed, render a Bullet Point list. + elseif ($BulletPoint) + { + $markdownLines += "*$(if ($Checkbox) { "[$(if ($Checked) {"x"} else {" "})]"}) $($inputObject | LinkInput)" + } + # If -NumberedList was passed, render a numbered list. + elseif ($NumberedList -or $Number) + { + $numberedListCounter++ # Increment the counter + $markdownLines += "$(if ($number) { $number } else {$numberedListCounter}).$(if ($Checkbox) {" [$(if ($Checked) {"x"} else {" "})]"}) $($inputObject | LinkInput)" + } + elseif ($BlockQuote -or $BlockQuoteDepth) { + if (-not $BlockQuoteDepth) { $BlockQuoteDepth = 1 } + $markdownLines += (">" * $BlockQuoteDepth ) + ' ' + ( + "$inputObject" -split '(?>\r\n|\n)' -join ( + [Environment]::NewLine + (">" * $BlockQuoteDepth) + ' ' + ) + ) + } + # Otherwise, we have to determine if -InputObject should be a -MarkdownTable or a -MarkdownParagraph. + else + { + # If the input is a primitive type or a string, it should be a markdown paragraph + if (($inputObject.GetType -and $inputObject.GetType().IsPrimitive) -or + $inputObject -is [string]) { + $MarkdownParagraph = $true + } + # If it is a dictionary, it should be a markdown table. + elseif ($inputObject -is [Collections.IDictionary]) + { + $MarkdownTable = $true + } + # If the input is an array, apply the same logic: + elseif ($inputObject -is [Object[]] -or $InputObject -is [PSObject[]]) { + $allPrimitives = 1 + # if the array was all primitives or strings + foreach ($in in $InputObject) { + $allPrimitives = $allPrimitives -band ( + ($in.GetType -and $in.GetType().IsPrimitive) -or $in -is [string] + ) + } + if ($allPrimitives) { # output as a paragraph. + $MarkdownParagraph = $true + } else { + $MarkdownTable = $true + } + } + # If we're still not sure, output as a table. + else { + $MarkdownTable = $true + } + } + + if ($MarkdownParagraph) { + # If we're outputting as a paragraph, add the input and link it if needed. + $markdownLines += $inputObject | LinkInput + } elseif ($MarkdownTable) { + # If we're rendering a table, we need to go row-by-row. + foreach ($in in $InputObject) { + $propertyList = @( + # we first need to get a list of properties. + # If there was a -Property parameter provided, use it. + if ($Property) { + foreach ($prop in $Property) { + if ($prop -is [string]) { # Strings in -Property should be taken as property names + $prop + } elseif ($prop.Name -and $prop.Expression -and $prop.Expression -is [scriptblock]) { + # and anything with a name and expression script block will run the expression script block. + $_ = $psItem = $in + @{name=$prop.Name;Value = . $prop.Expression} + } + } + } + # Otherwise, if the input was a dictionary + elseif ($in -is [Collections.IDictionary]) + { + foreach ($k in $in.Keys) { # take all keys from the dictionary + if ($MyInvocation.MyCommand.Parameters[$k]) { continue } # that are not parameters of this function. + $k + } + } + # Otherwise, walk over all properties on the object + else { + foreach ($psProp in $In.psobject.properties) { + # and skip any properties that are parameters of this function. + if ($psProp.Name -notin $MyInvocation.MyCommand.Parameters.Keys) { + $psProp + } + } + } + ) + + # If we're rendering the first row of a table + if ($IsFirst) { + # Create the header + $markdownLines += + '|' + (@(foreach ($prop in $propertyList) { + if ($prop -is [string]) { + $prop + } else { + $prop.Name + } + }) -replace ([Environment]::newline), '
' -replace '\|', '\|' -join '|') + '|' + # Then create the alignment row. + $markdownLines += + '|' + $( + $columnNumber =0 + @( + foreach ($prop in $propertyList) { + $colLength = + if ($prop -is [string]) { + $prop.Length + } else { + $prop.Name.Length + } + if ($MarkdownTableAlignment) { + if ($MarkdownTableAlignment[$columnNumber] -eq 'Left') { + ':' + ("-" * ([Math]::Max($colLength,2) - 1)) + } + elseif ($MarkdownTableAlignment[$columnNumber] -eq 'Right') { + ("-" * ([Math]::Max($colLength,2) - 1)) + ':' + } + elseif ($MarkdownTableAlignment[$columnNumber] -eq 'Center') { + ':' + ("-" * ([Math]::max($colLength, 3) - 2)) + ':' + } else { + "-" * $colLength + } + } else { + "-" * $colLength + } + + $columnNumber++ + } + ) -replace ([Environment]::newline), '
' -replace '\|', '\|' -join '|') + '|' + $IsFirst = $false + } + + # Now we create the row for this object. + + $markdownLine = '|' + ( + @( + foreach ($prop in $propertyList) { + if ($prop -is [string]) { + $in.$prop | LinkInput + } else { + $prop.Value | LinkInput + } + } + ) -replace ([Environment]::newline), '
' -replace '\|', '\|' -join '|') + '|' + + $markdownLines += $markdownLine + } + } + + + if ( # There are a few combinations of parameters that make us want to write the -InputObject as a paragraph: + ($ScriptBlock -and $inputObject) -or # * If -ScriptBlock and -InputObject were both provided. + ($Heading -and $inputObject) # * if -Heading and -InputObject were both provided + ) { + $markdownLines += $InputObject | LinkInput + } + + + # If we're going to render a horizontal rule (and -MarkdownTable has not been set) + if ($HorizontalRule -and -not $MarkdownTable) { + # add the horizontal rule at the end. + if ($host.UI.RawUI.BufferSize.Width) { + $markdownLines += (([string]$HorizontalRuleCharacter) * ($Host.UI.RawUI.BufferSize.Width - 1)) + } else { + $markdownLines += "---" + } + } +} + +end { + # Now we need to make one last pass to normalize tables + if ($markdownLines -match '^\|') { # (that is, if we have tables to normalize). + $maxColumnSize = @{} # To normalize the table, we need to track the maximum size per column + foreach ($ml in $markdownLines) { + if ($ml -match '\^|') { + $columnCount = 0 + foreach ($tablePart in $ml -split '(? Date: Tue, 1 Oct 2024 04:25:35 +0000 Subject: [PATCH 022/769] feat: PSJekyll Embedding Format-Markdown ( Fixes #22 ) --- PSJekyll.types.ps1xml | 418 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 418 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index c40fc43..f019c43 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -3,6 +3,424 @@ PSJekyll + + FormatMarkdown + + FormatYAML + + CurrentSite + + param( +$this = $PSJekyll +) + +$jekyllConfigFiles = Get-ChildItem -Path $pwd -Recurse -Filter _config.yml +foreach ($jekyllConfigFile in $jekyllConfigFiles) { + [PSCustomObject]@{ + PSTypeName = 'PSJekyll.Site' + Directory = $jekyllConfigFile.Directory + SiteName = $jekyllConfigFile.Directory.Name + } +} + + + + + + + \ No newline at end of file From cf337d12b90033f9384802bdd31c0baeb98bec3e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:09:11 -0700 Subject: [PATCH 046/769] feat: PSJekyll.get_File ( Fixes #40 ) --- Types/PSJekyll.Site/get_File.ps1 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Types/PSJekyll.Site/get_File.ps1 diff --git a/Types/PSJekyll.Site/get_File.ps1 b/Types/PSJekyll.Site/get_File.ps1 new file mode 100644 index 0000000..ce3b6cb --- /dev/null +++ b/Types/PSJekyll.Site/get_File.ps1 @@ -0,0 +1,4 @@ +if ($this.Directory -and -not $this.'.FileList') { + $this.psobject.properties.add([psnoteproperty]::new('.FileList', @($this.Directory.EnumerateFiles("*",'AllDirectories')))) +} +return $this.'.FileList' From bf6708d141a68165273ce89aae32977537a8ef89 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:10:09 +0000 Subject: [PATCH 047/769] feat: PSJekyll.get_File ( Fixes #40 ) --- PSJekyll.types.ps1xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 5424ea6..5eab576 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -635,6 +635,21 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { + + + + + + PSJekyll.Site + + + File + + if ($this.Directory -and -not $this.'.FileList') { + $this.psobject.properties.add([psnoteproperty]::new('.FileList', @($this.Directory.EnumerateFiles("*",'AllDirectories')))) +} +return $this.'.FileList' + From bc1beadf9b99dca0c68cff382ab48ecac18ca361 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:16:20 -0700 Subject: [PATCH 048/769] feat: PSJekyll.get_Data ( Fixes #41 ) --- Types/PSJekyll.Site/get_Data.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Types/PSJekyll.Site/get_Data.ps1 diff --git a/Types/PSJekyll.Site/get_Data.ps1 b/Types/PSJekyll.Site/get_Data.ps1 new file mode 100644 index 0000000..9fef585 --- /dev/null +++ b/Types/PSJekyll.Site/get_Data.ps1 @@ -0,0 +1,13 @@ +param() + + +[PSCustomObject]@{ + PSTypeName = 'PSJekyll.FileCollection' + Pattern = '[\\/]_data[\\/]' + TypeName = 'PSJekyll.DataFile' + Directory = $this.Directory +} +foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { + $specialFile.pstypenames.add("PSJekyll.DataFile") + $specialFile +} From 29387cbab01b40e85dce5e2e076c4a86795def4f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:17:26 +0000 Subject: [PATCH 049/769] feat: PSJekyll.get_Data ( Fixes #41 ) --- PSJekyll.types.ps1xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 5eab576..c014505 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -642,6 +642,25 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { PSJekyll.Site + + Data + + param() + + +[PSCustomObject]@{ + PSTypeName = 'PSJekyll.FileCollection' + Pattern = '[\\/]_data[\\/]' + TypeName = 'PSJekyll.DataFile' + Directory = $this.Directory +} +foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { + $specialFile.pstypenames.add("PSJekyll.DataFile") + $specialFile +} + + + File From 5dadbd398b37230745c8ff3ecf403c335e0c53ac Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:18:04 -0700 Subject: [PATCH 050/769] feat: PSJekyll.get_Draft ( Fixes #42 ) --- Types/PSJekyll.Site/Alias.psd1 | 4 ++++ Types/PSJekyll.Site/get_Draft.ps1 | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 Types/PSJekyll.Site/Alias.psd1 create mode 100644 Types/PSJekyll.Site/get_Draft.ps1 diff --git a/Types/PSJekyll.Site/Alias.psd1 b/Types/PSJekyll.Site/Alias.psd1 new file mode 100644 index 0000000..3cb2190 --- /dev/null +++ b/Types/PSJekyll.Site/Alias.psd1 @@ -0,0 +1,4 @@ +@{ + Files = 'File' + Drafts = 'Draft' +} \ No newline at end of file diff --git a/Types/PSJekyll.Site/get_Draft.ps1 b/Types/PSJekyll.Site/get_Draft.ps1 new file mode 100644 index 0000000..02b4d75 --- /dev/null +++ b/Types/PSJekyll.Site/get_Draft.ps1 @@ -0,0 +1,7 @@ +param() + +foreach ($specialFile in $this.File -match '[\\/]_drafts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.Draft.Post") + $specialFile.pstypenames.add("PSJekyll.Post") + $specialFile +} From 943aa7131f672aa0752ffb6538617c4f53c164b3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:19:08 +0000 Subject: [PATCH 051/769] feat: PSJekyll.get_Draft ( Fixes #42 ) --- PSJekyll.types.ps1xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index c014505..9b11789 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -642,6 +642,14 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { PSJekyll.Site + + Drafts + Draft + + + Files + File + Data @@ -661,6 +669,19 @@ foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { + + Draft + + param() + +foreach ($specialFile in $this.File -match '[\\/]_drafts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.Draft.Post") + $specialFile.pstypenames.add("PSJekyll.Post") + $specialFile +} + + + File From fb1ad0a80bab150d83d34db5732edf0ecb3d5954 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:20:19 -0700 Subject: [PATCH 052/769] feat: PSJekyll.Site.get_Include(s) ( Fixes #43 ) --- Types/PSJekyll.Site/Alias.psd1 | 1 + Types/PSJekyll.Site/get_Include.ps1 | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 Types/PSJekyll.Site/get_Include.ps1 diff --git a/Types/PSJekyll.Site/Alias.psd1 b/Types/PSJekyll.Site/Alias.psd1 index 3cb2190..4792f20 100644 --- a/Types/PSJekyll.Site/Alias.psd1 +++ b/Types/PSJekyll.Site/Alias.psd1 @@ -1,4 +1,5 @@ @{ Files = 'File' Drafts = 'Draft' + Includes = 'Include' } \ No newline at end of file diff --git a/Types/PSJekyll.Site/get_Include.ps1 b/Types/PSJekyll.Site/get_Include.ps1 new file mode 100644 index 0000000..d32e85e --- /dev/null +++ b/Types/PSJekyll.Site/get_Include.ps1 @@ -0,0 +1,7 @@ +param() + +foreach ($specialFile in $this.File -match '[\\/]_includes[\\/]') { + $specialFile.pstypenames.add("PSJekyll.IncludeFile") + $specialFile +} + From 8fbc3545286bbef8fb16c9f408ff900d08a23b87 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:21:22 +0000 Subject: [PATCH 053/769] feat: PSJekyll.Site.get_Include(s) ( Fixes #43 ) --- PSJekyll.types.ps1xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 9b11789..95d8ac8 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -650,6 +650,10 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { Files File + + Includes + Include + Data @@ -690,6 +694,19 @@ foreach ($specialFile in $this.File -match '[\\/]_drafts[\\/]') { } return $this.'.FileList' + + + + Include + + param() + +foreach ($specialFile in $this.File -match '[\\/]_includes[\\/]') { + $specialFile.pstypenames.add("PSJekyll.IncludeFile") + $specialFile +} + + From f887ecead9329eac4c981516c94ed8fc2d35e7b5 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:23:11 -0700 Subject: [PATCH 054/769] feat: PSJekyll.Site.get_Layout(s) ( Fixes #44 ) --- Types/PSJekyll.Site/get_Layout.ps1 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Types/PSJekyll.Site/get_Layout.ps1 diff --git a/Types/PSJekyll.Site/get_Layout.ps1 b/Types/PSJekyll.Site/get_Layout.ps1 new file mode 100644 index 0000000..531c961 --- /dev/null +++ b/Types/PSJekyll.Site/get_Layout.ps1 @@ -0,0 +1,7 @@ +param() + +foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.LayoutFile") + $specialFile +} + From f3f6aba44d7d0c6d7c192531d6bcce8054bad071 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:24:05 +0000 Subject: [PATCH 055/769] feat: PSJekyll.Site.get_Layout(s) ( Fixes #44 ) --- PSJekyll.types.ps1xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 95d8ac8..7a25723 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -707,6 +707,19 @@ foreach ($specialFile in $this.File -match '[\\/]_includes[\\/]') { } + + + + Layout + + param() + +foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.LayoutFile") + $specialFile +} + + From 1545ed3ca787c4e78b6bdcf8aeb94ff30e8ddc03 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:29:26 -0700 Subject: [PATCH 056/769] feat: PSJekyll.Site.get_Page(s) ( Fixes #45 ) --- Types/PSJekyll.Site/Alias.psd1 | 2 ++ Types/PSJekyll.Site/get_Page.ps1 | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 Types/PSJekyll.Site/get_Page.ps1 diff --git a/Types/PSJekyll.Site/Alias.psd1 b/Types/PSJekyll.Site/Alias.psd1 index 4792f20..fe62c28 100644 --- a/Types/PSJekyll.Site/Alias.psd1 +++ b/Types/PSJekyll.Site/Alias.psd1 @@ -2,4 +2,6 @@ Files = 'File' Drafts = 'Draft' Includes = 'Include' + Pages = 'Page' + Layouts = 'Layout' } \ No newline at end of file diff --git a/Types/PSJekyll.Site/get_Page.ps1 b/Types/PSJekyll.Site/get_Page.ps1 new file mode 100644 index 0000000..194aeec --- /dev/null +++ b/Types/PSJekyll.Site/get_Page.ps1 @@ -0,0 +1,4 @@ +foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '(?>\.md|\.markdown|.\html)$') { + $specialFile.pstypenames.add("PSJekyll.Page") + $specialFile +} \ No newline at end of file From ed966b357234a66f8d58fa90178dd0f332c74cc0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:30:27 +0000 Subject: [PATCH 057/769] feat: PSJekyll.Site.get_Page(s) ( Fixes #45 ) --- PSJekyll.types.ps1xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 7a25723..787dff4 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -654,6 +654,14 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { Includes Include + + Layouts + Layout + + + Pages + Page + Data @@ -720,6 +728,15 @@ foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { } + + + + Page + + foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '(?>\.md|\.markdown|.\html)$') { + $specialFile.pstypenames.add("PSJekyll.Page") + $specialFile +} From 929a2013540512e355aeb7dd56eb34c4c6ae4cc9 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:30:59 -0700 Subject: [PATCH 058/769] feat: PSJekyll.Site.get_Post(s) ( Fixes #46 ) --- Types/PSJekyll.Site/Alias.psd1 | 1 + Types/PSJekyll.Site/get_Post.ps1 | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 Types/PSJekyll.Site/get_Post.ps1 diff --git a/Types/PSJekyll.Site/Alias.psd1 b/Types/PSJekyll.Site/Alias.psd1 index fe62c28..a4171b7 100644 --- a/Types/PSJekyll.Site/Alias.psd1 +++ b/Types/PSJekyll.Site/Alias.psd1 @@ -3,5 +3,6 @@ Drafts = 'Draft' Includes = 'Include' Pages = 'Page' + Posts = 'Post' Layouts = 'Layout' } \ No newline at end of file diff --git a/Types/PSJekyll.Site/get_Post.ps1 b/Types/PSJekyll.Site/get_Post.ps1 new file mode 100644 index 0000000..7686fca --- /dev/null +++ b/Types/PSJekyll.Site/get_Post.ps1 @@ -0,0 +1,7 @@ +param() + +foreach ($specialFile in $this.File -match '[\\/]_posts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.Published.Post") + $specialFile.pstypenames.add("PSJekyll.Post") + $specialFile +} From 0008e15aa446e9c47b6926450e085966388dd7c6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:31:54 +0000 Subject: [PATCH 059/769] feat: PSJekyll.Site.get_Post(s) ( Fixes #46 ) --- PSJekyll.types.ps1xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 787dff4..2b5ab90 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -662,6 +662,10 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { Pages Page + + Posts + Post + Data @@ -739,6 +743,19 @@ foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { } + + Post + + param() + +foreach ($specialFile in $this.File -match '[\\/]_posts[\\/]') { + $specialFile.pstypenames.add("PSJekyll.Published.Post") + $specialFile.pstypenames.add("PSJekyll.Post") + $specialFile +} + + + \ No newline at end of file From 78e69021d4834ff3c125c20aebe488173149ab55 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:36:38 -0700 Subject: [PATCH 060/769] feat: PSJekyll.Site Formatting ( Fixes #47 ) --- Types/PSJekyll.Site/PSJekyll.Site.format.ps1 | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Types/PSJekyll.Site/PSJekyll.Site.format.ps1 diff --git a/Types/PSJekyll.Site/PSJekyll.Site.format.ps1 b/Types/PSJekyll.Site/PSJekyll.Site.format.ps1 new file mode 100644 index 0000000..1f88f4a --- /dev/null +++ b/Types/PSJekyll.Site/PSJekyll.Site.format.ps1 @@ -0,0 +1,4 @@ +Write-FormatView -TypeName PSJekyll.Site -Property SiteName, 'Page.Count', 'Post.Count' -VirtualProperty @{ + 'Page.Count' = { $_.Page.Count } + 'Post.Count' = { $_.Post.Count } +} \ No newline at end of file From f4aa9822184edb001d7f6ae787f2b4100eba1ca2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 02:37:48 +0000 Subject: [PATCH 061/769] feat: PSJekyll.Site Formatting ( Fixes #47 ) --- PSJekyll.format.ps1xml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 PSJekyll.format.ps1xml diff --git a/PSJekyll.format.ps1xml b/PSJekyll.format.ps1xml new file mode 100644 index 0000000..9a10f53 --- /dev/null +++ b/PSJekyll.format.ps1xml @@ -0,0 +1,38 @@ + + + + + PSJekyll.Site + + PSJekyll.Site + + + + + + + + + + + + + + + + + SiteName + + + $_.Page.Count + + + $_.Post.Count + + + + + + + + \ No newline at end of file From a4177819d6d00c03dbae82d0a47bbb7586b7c1a0 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 19:56:35 -0700 Subject: [PATCH 062/769] feat: PSJekyll formatting ( Fixes #1, Fixes #17, Fixes #47 ) --- PSJekyll.psd1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PSJekyll.psd1 b/PSJekyll.psd1 index 850b2b4..06e3864 100644 --- a/PSJekyll.psd1 +++ b/PSJekyll.psd1 @@ -4,6 +4,7 @@ Guid = '793784c4-0e1f-4928-b874-1e601f9a3d29' RootModule = 'PSJekyll.psm1' TypesToProcess = @('PSJekyll.types.ps1xml') + FormatsToProcess = @('PSJekyll.format.ps1xml') Author = 'James Brundage' CompanyName = 'PowerShellWeb' PrivateData = @{ From 560a82a4e33a5e3a638e9d0322cea1b759a0bcc7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Thu, 3 Oct 2024 20:01:30 -0700 Subject: [PATCH 063/769] feat: PSJekyll.Site.Page ( Fixes #45 ) Adjusting pattern --- Types/PSJekyll.Site/get_Page.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Site/get_Page.ps1 b/Types/PSJekyll.Site/get_Page.ps1 index 194aeec..58ad72f 100644 --- a/Types/PSJekyll.Site/get_Page.ps1 +++ b/Types/PSJekyll.Site/get_Page.ps1 @@ -1,4 +1,4 @@ -foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '(?>\.md|\.markdown|.\html)$') { +foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '\.(?>md|markdown|html?)$') { $specialFile.pstypenames.add("PSJekyll.Page") $specialFile } \ No newline at end of file From a8392431fc893204ae15dfaf24164a79ea5d0706 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Fri, 4 Oct 2024 03:02:28 +0000 Subject: [PATCH 064/769] feat: PSJekyll.Site.Page ( Fixes #45 ) Adjusting pattern --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 2b5ab90..8f61497 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -737,7 +737,7 @@ foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { Page - foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '(?>\.md|\.markdown|.\html)$') { + foreach ($specialFile in $this.File -notmatch '[\\/]_.+?[\\/]' -match '\.(?>md|markdown|html?)$') { $specialFile.pstypenames.add("PSJekyll.Page") $specialFile } From b7164360d927f50891088e051aa13e92bc34f25e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 19:46:59 -0700 Subject: [PATCH 065/769] feat: PSJekyll.Site.Data ( Fixes #41 ) Not wrapping returned object --- Types/PSJekyll.Site/get_Data.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Types/PSJekyll.Site/get_Data.ps1 b/Types/PSJekyll.Site/get_Data.ps1 index 9fef585..ede92ed 100644 --- a/Types/PSJekyll.Site/get_Data.ps1 +++ b/Types/PSJekyll.Site/get_Data.ps1 @@ -1,12 +1,5 @@ param() - -[PSCustomObject]@{ - PSTypeName = 'PSJekyll.FileCollection' - Pattern = '[\\/]_data[\\/]' - TypeName = 'PSJekyll.DataFile' - Directory = $this.Directory -} foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { $specialFile.pstypenames.add("PSJekyll.DataFile") $specialFile From 57f1766117173559755a2d63e8df20a2c0664f38 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 02:48:08 +0000 Subject: [PATCH 066/769] feat: PSJekyll.Site.Data ( Fixes #41 ) Not wrapping returned object --- PSJekyll.types.ps1xml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 8f61497..9ed129b 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -671,13 +671,6 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { param() - -[PSCustomObject]@{ - PSTypeName = 'PSJekyll.FileCollection' - Pattern = '[\\/]_data[\\/]' - TypeName = 'PSJekyll.DataFile' - Directory = $this.Directory -} foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { $specialFile.pstypenames.add("PSJekyll.DataFile") $specialFile From 6b44f57b743e7113ec95199933f50ea12d01987e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 19:54:49 -0700 Subject: [PATCH 067/769] feat: PSJekyll.Site.set_Data ( Fixes #48 ) --- Types/PSJekyll.Site/set_Data.ps1 | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Data.ps1 diff --git a/Types/PSJekyll.Site/set_Data.ps1 b/Types/PSJekyll.Site/set_Data.ps1 new file mode 100644 index 0000000..d701728 --- /dev/null +++ b/Types/PSJekyll.Site/set_Data.ps1 @@ -0,0 +1,36 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toJsonFileName { + $_ -replace '(?:\.json)?$', '.json' +} + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + + foreach ($keyValue in $arg.GetEnumerator()) { + $targetPath = $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) + if (-not (Test-Path $targetPath)) { + $null = New-Item -Path $targetPath -ItemType File -Force + } + Set-Content -Path $targetPath -Value ( + ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $($keyValue.Value) + ) + } + } + elseif ($arg -is [string]) { + $currentName = $arg + } + elseif ($currentName) { + $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) + if (-not (Test-Path $targetPath)) { + $null = New-Item -Path $targetPath -ItemType File -Force + } + Set-Content -Path $targetPath -Value ( + ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $arg + ) + + } +} From 981bc43b7db02b414230e90a7fb27a6e6a84398e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 02:55:54 +0000 Subject: [PATCH 068/769] feat: PSJekyll.Site.set_Data ( Fixes #48 ) --- PSJekyll.types.ps1xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 9ed129b..ad9c4a2 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -677,6 +677,45 @@ foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { } + + param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toJsonFileName { + $_ -replace '(?:\.json)?$', '.json' +} + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + + foreach ($keyValue in $arg.GetEnumerator()) { + $targetPath = $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) + if (-not (Test-Path $targetPath)) { + $null = New-Item -Path $targetPath -ItemType File -Force + } + Set-Content -Path $targetPath -Value ( + ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $($keyValue.Value) + ) + } + } + elseif ($arg -is [string]) { + $currentName = $arg + } + elseif ($currentName) { + $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) + if (-not (Test-Path $targetPath)) { + $null = New-Item -Path $targetPath -ItemType File -Force + } + Set-Content -Path $targetPath -Value ( + ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $arg + ) + + } +} + + Draft From 89ba10d5827950a88f46da69c6dfb84becac674b Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 22:52:53 -0700 Subject: [PATCH 069/769] feat: PSJekyll.Site.set_Draft ( Fixes #49 ) --- Types/PSJekyll.Site/set_Draft.ps1 | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Draft.ps1 diff --git a/Types/PSJekyll.Site/set_Draft.ps1 b/Types/PSJekyll.Site/set_Draft.ps1 new file mode 100644 index 0000000..c0302fc --- /dev/null +++ b/Types/PSJekyll.Site/set_Draft.ps1 @@ -0,0 +1,40 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toMarkdownFileName { + $_ -replace '(?:\.md)?$', '.md' -replace '[\s\p{P}]','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.date) { + $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") +} + + + +Set-Content -Path ( + $this.Directory,"_drafts",($Name | toMarkdownFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) \ No newline at end of file From 835937eee853c38cbaccb0bb41a398713dd8994c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 05:53:53 +0000 Subject: [PATCH 070/769] feat: PSJekyll.Site.set_Draft ( Fixes #49 ) --- PSJekyll.types.ps1xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ad9c4a2..4d1b959 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -729,6 +729,48 @@ foreach ($specialFile in $this.File -match '[\\/]_drafts[\\/]') { } + + param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toMarkdownFileName { + $_ -replace '(?:\.md)?$', '.md' -replace '[\s\p{P}]','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.date) { + $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") +} + + + +Set-Content -Path ( + $this.Directory,"_drafts",($Name | toMarkdownFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) + File From c2f3903a8cdb3939196c3eac41d795f06f919eb7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 22:56:06 -0700 Subject: [PATCH 071/769] feat: PSJekyll.Site.set_Draft ( Fixes #49 ) Automatically setting title --- Types/PSJekyll.Site/set_Draft.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Types/PSJekyll.Site/set_Draft.ps1 b/Types/PSJekyll.Site/set_Draft.ps1 index c0302fc..0e7f57a 100644 --- a/Types/PSJekyll.Site/set_Draft.ps1 +++ b/Types/PSJekyll.Site/set_Draft.ps1 @@ -27,6 +27,9 @@ if (-not $metadata) { if (-not $metadata.date) { $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") } +if (-not $metadata.title) { + $metadata.title = $Name +} From aabc7114c7bf6ef4f775e118d8ac477c8c07c573 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 22:56:39 -0700 Subject: [PATCH 072/769] feat: PSJekyll.Site.set_Post ( Fixes #53 ) --- Types/PSJekyll.Site/set_Post.ps1 | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Post.ps1 diff --git a/Types/PSJekyll.Site/set_Post.ps1 b/Types/PSJekyll.Site/set_Post.ps1 new file mode 100644 index 0000000..eec2077 --- /dev/null +++ b/Types/PSJekyll.Site/set_Post.ps1 @@ -0,0 +1,43 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toMarkdownFileName { + $_ -replace '(?:\.md)?$', '.md' -replace '[\s\p{P}]','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.date) { + $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_posts",($Name | toMarkdownFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) \ No newline at end of file From 405366b9325e70ef142b6579937e270daed18a05 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 05:57:29 +0000 Subject: [PATCH 073/769] feat: PSJekyll.Site.set_Post ( Fixes #53 ) --- PSJekyll.types.ps1xml | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 4d1b959..586f848 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -759,6 +759,9 @@ if (-not $metadata) { if (-not $metadata.date) { $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") } +if (-not $metadata.title) { + $metadata.title = $Name +} @@ -829,6 +832,51 @@ foreach ($specialFile in $this.File -match '[\\/]_posts[\\/]') { } + + param() + +$unrolledArguments = @($args | . { process { $_ } }) +$currentName = '' + +filter toMarkdownFileName { + $_ -replace '(?:\.md)?$', '.md' -replace '[\s\p{P}]','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.date) { + $metadata.date = [DateTime]::Now.ToString("yyyy-MM-dd HH:mm:ss K") +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_posts",($Name | toMarkdownFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) + From 5a5605413ac0eeace52190753234d3dc6abe699d Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:03:21 -0700 Subject: [PATCH 074/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) --- Types/PSJekyll.Site/set_Include.ps1 | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Include.ps1 diff --git a/Types/PSJekyll.Site/set_Include.ps1 b/Types/PSJekyll.Site/set_Include.ps1 new file mode 100644 index 0000000..594db54 --- /dev/null +++ b/Types/PSJekyll.Site/set_Include.ps1 @@ -0,0 +1,39 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) \ No newline at end of file From b981bbacd9824f23ef61a06b608c1901491ed371 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 06:04:07 +0000 Subject: [PATCH 075/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) --- PSJekyll.types.ps1xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 586f848..c003111 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -797,6 +797,47 @@ foreach ($specialFile in $this.File -match '[\\/]_includes[\\/]') { + + param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) + Layout From 7315b19f2319618a44493cc651c05ba265b0f103 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:05:01 -0700 Subject: [PATCH 076/769] feat: PSJekyll.Site.set_Layout ( Fixes #51 ) --- Types/PSJekyll.Site/set_Layout.ps1 | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Layout.ps1 diff --git a/Types/PSJekyll.Site/set_Layout.ps1 b/Types/PSJekyll.Site/set_Layout.ps1 new file mode 100644 index 0000000..b6c5aa9 --- /dev/null +++ b/Types/PSJekyll.Site/set_Layout.ps1 @@ -0,0 +1,39 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) \ No newline at end of file From d48103d4f9f7fb65f20aebc0d2b5c3b30f57e9db Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 06:05:52 +0000 Subject: [PATCH 077/769] feat: PSJekyll.Site.set_Layout ( Fixes #51 ) --- PSJekyll.types.ps1xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index c003111..5ba64dc 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -851,6 +851,47 @@ foreach ($specialFile in $this.File -match '[\\/]_layouts[\\/]') { + + param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) + Page From dff7b9f2746ba38000f0af053ecb955a24a0a88f Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:06:43 -0700 Subject: [PATCH 078/769] feat: PSJekyll.Site.set_Page ( Fixes #52 ) --- Types/PSJekyll.Site/set_Page.ps1 | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Types/PSJekyll.Site/set_Page.ps1 diff --git a/Types/PSJekyll.Site/set_Page.ps1 b/Types/PSJekyll.Site/set_Page.ps1 new file mode 100644 index 0000000..b40ddd7 --- /dev/null +++ b/Types/PSJekyll.Site/set_Page.ps1 @@ -0,0 +1,39 @@ +param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) \ No newline at end of file From 6be72cf75641e759d6ea7e87de3316a16aca078d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 06:07:34 +0000 Subject: [PATCH 079/769] feat: PSJekyll.Site.set_Page ( Fixes #52 ) --- PSJekyll.types.ps1xml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 5ba64dc..ee553ef 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -901,6 +901,47 @@ Set-Content -Path ( $specialFile } + + param() + +$unrolledArguments = @($args | . { process { $_ } }) + +filter toFileName { + $_ -replace '[<>\|\?\*:]', '-' -replace '\s','-' +} + +$name, $content, $metdata = $null, $null, $null + +foreach ($arg in $unrolledArguments) { + if ($arg -is [Collections.IDictionary]) { + $metadata = $arg + } + elseif ($arg -is [string] -and -not $name) { + $Name = $arg + } + elseif ($arg -is [string] -and -not $content) { + $content = $arg + } +} + +if (-not $metadata) { + $metadata = [Ordered]@{} +} +if (-not $metadata.title) { + $metadata.title = $Name +} + + + +Set-Content -Path ( + $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +) -Value $( + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) -join [Environment]::NewLine +) + Post From 8c353be679b76d8d9f12aa17cce757e4adf5241d Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:10:47 -0700 Subject: [PATCH 080/769] feat: PSJekyll tests ( Fixes #54 ) --- PSJekyll.tests.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 PSJekyll.tests.ps1 diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 new file mode 100644 index 0000000..3ed898e --- /dev/null +++ b/PSJekyll.tests.ps1 @@ -0,0 +1,12 @@ +describe PSJekyll { + context 'New-Jekyll' { + it 'Will create a jekyll site' { + $siteName = "MyRandomSite$(Get-Random)" + $creatingSite = New-PSJekyll -Name $siteName + Push-Location $siteName + $PSJekyll.CurrentSite.SiteName | Should -Be $siteName + Pop-Location + Remove-Item -Recurse -Force $siteName + } + } +} From 4ed798987738e1d53fff75b10c9878703d7466ac Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:12:36 -0700 Subject: [PATCH 081/769] feat: PSJekyll tests ( Fixes #54 ) Waiting for job --- PSJekyll.tests.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index 3ed898e..d3cf8f3 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -3,6 +3,10 @@ describe PSJekyll { it 'Will create a jekyll site' { $siteName = "MyRandomSite$(Get-Random)" $creatingSite = New-PSJekyll -Name $siteName + if ($creatingSite -is [Management.Automation.Job]) { + $creatingSite | Wait-Job + $creatingSite = $creatingSite | Receive-Job + } Push-Location $siteName $PSJekyll.CurrentSite.SiteName | Should -Be $siteName Pop-Location From 784715d8dbfd7ed0480a460cb9f28ef0ee730ac8 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:16:08 -0700 Subject: [PATCH 082/769] feat: PSJekyll tests ( Fixes #54 ) Installing ruby and jekyll in test --- PSJekyll.tests.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index d3cf8f3..ef7d874 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -1,4 +1,10 @@ describe PSJekyll { + beforeAll { + if ($PSVersionTable.OS -match 'Nix') { + sudo apt-get install ruby-full + sudo gem install jekyll + } + } context 'New-Jekyll' { it 'Will create a jekyll site' { $siteName = "MyRandomSite$(Get-Random)" From 80ef47ed91781c5e0bfe17f848ee8184fab346ea Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:19:18 -0700 Subject: [PATCH 083/769] fix: PSJekyll tests ( Fixes #54 ) Installing ruby and jekyll in test, with more tracing --- PSJekyll.tests.ps1 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index ef7d874..d55bcbe 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -1,9 +1,13 @@ describe PSJekyll { beforeAll { - if ($PSVersionTable.OS -match 'Nix') { - sudo apt-get install ruby-full - sudo gem install jekyll - } + $jekyllInPath = $ExecutionContext.SessionState.InvokeCommand.GetCommand('jekyll', 'Application') + if (-not $jekyllInPath -and $env:GITHUB_WORKFLOW) { + "::group::Installing FFMpeg" | Out-Host + sudo apt update | Out-Host + sudo apt install ruby-full -y | Out-Host + sudo gem install jekyll | Out-Host + "::endgroup::" | Out-Host + } } context 'New-Jekyll' { it 'Will create a jekyll site' { From ee7f9cfa8153be9cc0d07fd51451a9bcbada46a9 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:28:01 -0700 Subject: [PATCH 084/769] fix: PSJekyll tests ( Fixes #54 ) Start-PSJekyll test --- PSJekyll.tests.ps1 | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index d55bcbe..c65fc53 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -9,7 +9,7 @@ describe PSJekyll { "::endgroup::" | Out-Host } } - context 'New-Jekyll' { + context 'New-PSJekyll' { it 'Will create a jekyll site' { $siteName = "MyRandomSite$(Get-Random)" $creatingSite = New-PSJekyll -Name $siteName @@ -23,4 +23,27 @@ describe PSJekyll { Remove-Item -Recurse -Force $siteName } } + + context 'Start-PSJekyll' { + it 'Will start a jekyll site' { + $siteName = "MyRandomSite$(Get-Random)" + $creatingSite = New-PSJekyll -Name $siteName + if ($creatingSite -is [Management.Automation.Job]) { + $creatingSite | Wait-Job + $creatingSite = $creatingSite | Receive-Job + } + Push-Location $siteName + $randomPort = (Get-Random -Min 5000 -Maximum 8000) + $startingSite = Start-PSJekyll -Port $randomPort + if ($startingSite -is [Management.Automation.Job]) { + $startingSite | Wait-Job -Timeout 15 + $startingSite = $startingSite | Receive-Job + } + Invoke-RestMethod -Uri "http://localhost:$randomPort" | Should -Not -Be $Null + Pop-Location + Get-Job | Stop-Job + Get-Job | Remove-Job + Remove-Item -Recurse -Force $siteName + } + } } From 5a488fab23c9341f4bd1af225fb8649adf8b7688 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:38:16 -0700 Subject: [PATCH 085/769] fix: PSJekyll tests ( Fixes #54 ) Installing bundle --- PSJekyll.tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index c65fc53..017bffe 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -5,7 +5,7 @@ describe PSJekyll { "::group::Installing FFMpeg" | Out-Host sudo apt update | Out-Host sudo apt install ruby-full -y | Out-Host - sudo gem install jekyll | Out-Host + sudo gem install bundle jekyll | Out-Host "::endgroup::" | Out-Host } } From 1b5ff9a15a4ebe0e00baec59be8e6ec454826917 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Fri, 4 Oct 2024 23:57:44 -0700 Subject: [PATCH 086/769] fix: PSJekyll tests ( Fixes #54 ) Installing bundle differently --- PSJekyll.tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index 017bffe..554b97e 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -4,8 +4,8 @@ describe PSJekyll { if (-not $jekyllInPath -and $env:GITHUB_WORKFLOW) { "::group::Installing FFMpeg" | Out-Host sudo apt update | Out-Host - sudo apt install ruby-full -y | Out-Host - sudo gem install bundle jekyll | Out-Host + sudo apt install ruby-full bundler -y | Out-Host + sudo gem install jekyll | Out-Host "::endgroup::" | Out-Host } } From ff9683f671962ec16096083fd01ccd8221c2e477 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 11:06:40 -0700 Subject: [PATCH 087/769] feat: PSJekyll Dockerfile and Container.init.ps1 ( Fixes #11, Fixes #12 ) Exposing more environment variables and refactoring away ruby base image --- Container.init.ps1 | 74 ++++++++++++++++++++++++++-------------------- Dockerfile | 13 ++------ 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/Container.init.ps1 b/Container.init.ps1 index c6402bd..fef021d 100644 --- a/Container.init.ps1 +++ b/Container.init.ps1 @@ -23,7 +23,6 @@ (this does nothing, but most likely will be used in the future) #> using namespace 'mcr.microsoft.com/powershell AS powerShell' -using namespace 'ruby:3.3.5-slim-bullseye AS jekyllrb' param( # The name of the module to be installed. @@ -37,30 +36,46 @@ param( } ), # The packages to be installed. -[string[]]$InstallAptGet = @( - if ($env:InstallAptGet) { $env:InstallAptGet -split ',' } -), +[string[]]$InstallAptGet = @($env:InstallAptGet -split ','), # The modules to be installed. -[string[]]$InstallModule = @( - if ($env:InstallModule) { $env:InstallModule -split ',' } - else { } -) -) - -# Get the root module directory -$rootModuleDirectory = @($env:PSModulePath -split '[;:]')[0] +[string[]]$InstallModule = @($env:InstallModule -split ','), +# The Ruby gems to be installed. +[string[]]$InstallRubyGem = @($env:InstallRubyGem -split ','), -# Determine the path to the module destination. -$moduleDestination = "$rootModuleDirectory/$ModuleName" -# Copy the module to the destination -# (this is being used instead of the COPY statement in Docker, to avoid additional layers). -Copy-Item -Path "$psScriptRoot" -Destination $moduleDestination -Recurse -Force +# If set, will keep the .git directories. +[switch]$KeepGit = $($env:KeepGit -match $true) +) # Copy all container-related scripts to the root of the container. Get-ChildItem -Path $PSScriptRoot | Where-Object Name -Match '^Container\..+?\.ps1$' | Copy-Item -Destination / +# Create a profile +New-Item -Path $Profile -ItemType File | Out-Null + +if ($ModuleName) { + # Get the root module directory + $rootModuleDirectory = @($env:PSModulePath -split '[;:]')[0] + + # Determine the path to the module destination. + $moduleDestination = "$rootModuleDirectory/$ModuleName" + # Copy the module to the destination + # (this is being used instead of the COPY statement in Docker, to avoid additional layers). + Copy-Item -Path "$psScriptRoot" -Destination $moduleDestination -Recurse -Force + + # and import this module in the profile + Add-Content -Path $profile -Value "Import-Module $ModuleName" -Force +} + +# If we have modules to install +if ($InstallModule) { + # Install the modules + Install-Module -Name $InstallModule -Force -AcceptLicense -Scope CurrentUser + # and import them in the profile + Add-Content -Path $Profile -Value "Import-Module '$($InstallModule -join "','")'" -Force +} + # If we have packages to install if ($InstallAptGet) { # install the packages @@ -70,16 +85,9 @@ if ($InstallAptGet) { Out-Host } -# Create a new profile -New-Item -Path $Profile -ItemType File -Force | - # and import this module in the profile - Add-Content -Value "Import-Module $ModuleName" -Force -# If we have modules to install -if ($InstallModule) { - # Install the modules - Install-Module -Name $InstallModule -Force -AcceptLicense -Scope CurrentUser - # and import them in the profile - Add-Content -Path $Profile -Value "Import-Module '$($InstallModule -join "','")'" -Force +if ($InstallRubyGem) { + # Install the Ruby gems + gem install @InstallRubyGem } if ($ModuleName) { @@ -87,15 +95,17 @@ if ($ModuleName) { Add-Content -Path $Profile -Value "Get-Module $ModuleName | Split-Path | Push-Location" -Force } -# Remove the .git directories from any modules -Get-ChildItem -Path $rootModuleDirectory -Directory -Force -Recurse | - Where-Object Name -eq '.git' | - Remove-Item -Recurse -Force +if (-not $KeepGit) { + # Remove the .git directories from any modules + Get-ChildItem -Path $rootModuleDirectory -Directory -Force -Recurse | + Where-Object Name -eq '.git' | + Remove-Item -Recurse -Force +} # Congratulations! You have successfully initialized the container image. # This script should work in about any module, with minor adjustments. # If you have any adjustments, please put them below here, in the `#region Custom` #region Custom -gem install jekyll +bundle config --global silence_root_warning true #endregion Custom \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e9a56e0..2303a14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,11 @@ # Thank you Microsoft! Thank you PowerShell! Thank you Docker! FROM mcr.microsoft.com/powershell AS powershell -FROM ruby:3.3.5-slim-bullseye AS jekyllrb - -# Copy the module into the container -# Copy essentially everything from the PowerShell image into the final image -COPY --from=powershell /usr /usr -COPY --from=powershell /lib /lib -COPY --from=powershell /lib64 /lib64 -COPY --from=powershell /bin /bin -COPY --from=powershell /opt /opt - # Set the module name to the name of the module we are building ENV ModuleName=PSJekyll -ENV InstallAptGet="build-essential","git","curl","ca-certificates","libc6","libgcc1" +ENV InstallAptGet="build-essential","ruby-full","bundler","git","curl","ca-certificates","libc6","libgcc1" ENV InstallModule="ugit" +ENV InstallRubyGem="jekyll" # Copy the module into the container RUN --mount=type=bind,src=./,target=/Initialize /bin/pwsh -nologo -command /Initialize/Container.init.ps1 # Set the entrypoint to the script we just created. From 7c5f08e1c26716cd2dc3536b8f970ff7a09f0cf1 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 11:28:38 -0700 Subject: [PATCH 088/769] fix: Stop-PSJekyll ( Fixes #6 ) Enabling Piping --- Commands/Stop-PSJekyll.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Commands/Stop-PSJekyll.ps1 b/Commands/Stop-PSJekyll.ps1 index 35d1e4f..b6edc99 100644 --- a/Commands/Stop-PSJekyll.ps1 +++ b/Commands/Stop-PSJekyll.ps1 @@ -10,6 +10,7 @@ function Stop-PSJekyll { [Alias('Stop-Jekyll')] param( # The name of the Jekyll job + [Parameter(ValueFromPipelineByPropertyName)] [string] $Name = '*' ) From 31b28b7a15d4360e3c40eb578a8ab96d70746bb6 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 11:58:40 -0700 Subject: [PATCH 089/769] fix: PSJekyll.Site.set_Page ( Fixes #52 ) Defaulting to markdown, creating nested folders if needed. --- Types/PSJekyll.Site/set_Page.ps1 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/Types/PSJekyll.Site/set_Page.ps1 b/Types/PSJekyll.Site/set_Page.ps1 index b40ddd7..517df0a 100644 --- a/Types/PSJekyll.Site/set_Page.ps1 +++ b/Types/PSJekyll.Site/set_Page.ps1 @@ -27,13 +27,18 @@ if (-not $metadata.title) { $metadata.title = $Name } +if ($name -notmatch '\.(?>md|markdown|html?)$') { + $Name += '.md' +} +$destinationPath = $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content +) -join [Environment]::NewLine -Set-Content -Path ( - $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( - @( - $metadata | & $psJekyll.FormatYaml.Script -YamlHeader - $content - ) -join [Environment]::NewLine -) \ No newline at end of file +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} From 85109fc26febc5e281f2852cdb78bdc7d021a1b1 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 11:59:15 -0700 Subject: [PATCH 090/769] fix: PSJekyll.Site.set_Include ( Fixes #50 ) Creating nested folders if needed. --- Types/PSJekyll.Site/set_Include.ps1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Types/PSJekyll.Site/set_Include.ps1 b/Types/PSJekyll.Site/set_Include.ps1 index 594db54..6bc2f96 100644 --- a/Types/PSJekyll.Site/set_Include.ps1 +++ b/Types/PSJekyll.Site/set_Include.ps1 @@ -28,12 +28,16 @@ if (-not $metadata.title) { } - -Set-Content -Path ( - $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( +$destinationPath = $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = $( @( $metadata | & $psJekyll.FormatYaml.Script -YamlHeader $content ) -join [Environment]::NewLine -) \ No newline at end of file +) + +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} \ No newline at end of file From 87d31fd6160247fffd32ea4b41973aee604cb97f Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 11:59:53 -0700 Subject: [PATCH 091/769] fix: PSJekyll.Site.set_Layout ( Fixes #51 ) Defaulting to HTML, creating nested folders if needed. --- Types/PSJekyll.Site/set_Layout.ps1 | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Types/PSJekyll.Site/set_Layout.ps1 b/Types/PSJekyll.Site/set_Layout.ps1 index b6c5aa9..7951bc4 100644 --- a/Types/PSJekyll.Site/set_Layout.ps1 +++ b/Types/PSJekyll.Site/set_Layout.ps1 @@ -27,13 +27,20 @@ if (-not $metadata.title) { $metadata.title = $Name } +if ($name -notmatch '\.[^\.]+$') { + $Name += '.html' +} -Set-Content -Path ( - $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( +$destinationPath = $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = $( @( $metadata | & $psJekyll.FormatYaml.Script -YamlHeader $content ) -join [Environment]::NewLine -) \ No newline at end of file +) +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} From b17fd4173e957c7bdd4f87c7493915826761d801 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:00:59 +0000 Subject: [PATCH 092/769] fix: PSJekyll.Site.set_Layout ( Fixes #51 ) Defaulting to HTML, creating nested folders if needed. --- PSJekyll.types.ps1xml | 48 +++++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ee553ef..aef58eb 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -828,15 +828,19 @@ if (-not $metadata.title) { } - -Set-Content -Path ( - $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( +$destinationPath = $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = $( @( $metadata | & $psJekyll.FormatYaml.Script -YamlHeader $content ) -join [Environment]::NewLine ) + +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} @@ -881,16 +885,24 @@ if (-not $metadata.title) { $metadata.title = $Name } +if ($name -notmatch '\.[^\.]+$') { + $Name += '.html' +} -Set-Content -Path ( - $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( +$destinationPath = $this.Directory,"_layouts",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = $( @( $metadata | & $psJekyll.FormatYaml.Script -YamlHeader $content ) -join [Environment]::NewLine ) +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} + @@ -931,16 +943,22 @@ if (-not $metadata.title) { $metadata.title = $Name } +if ($name -notmatch '\.(?>md|markdown|html?)$') { + $Name += '.md' +} +$destinationPath = $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' +$destinationContent = @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content +) -join [Environment]::NewLine + +if (-not (Test-Path $destinationPath)) { + New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force +} else { + Set-Content -Path $destinationPath -Value $destinationContent +} -Set-Content -Path ( - $this.Directory,($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -) -Value $( - @( - $metadata | & $psJekyll.FormatYaml.Script -YamlHeader - $content - ) -join [Environment]::NewLine -) From 43a8fb68e7cdce338deb4136af0372174ac8e169 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:11:34 -0700 Subject: [PATCH 093/769] feat: PSJekyll tests ( Fixes #54 ) Testing data files --- PSJekyll.tests.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PSJekyll.tests.ps1 b/PSJekyll.tests.ps1 index 554b97e..b0728eb 100644 --- a/PSJekyll.tests.ps1 +++ b/PSJekyll.tests.ps1 @@ -34,14 +34,23 @@ describe PSJekyll { } Push-Location $siteName $randomPort = (Get-Random -Min 5000 -Maximum 8000) + Add-Content -Path "_config.yml" -Value "permalink: pretty" + $psJekyll.CurrentSite.Data = @{"StartTime"=[DateTime]::Now} + $psJekyll.CurrentSite.Layout = "contentOnly", "{{content}}" + $psJekyll.CurrentSite.Page = "aPage.md", @{"title"="My Page";layout="contentOnly"}, "This is my page. It was started at {{ site.data.StartTime }}" $startingSite = Start-PSJekyll -Port $randomPort if ($startingSite -is [Management.Automation.Job]) { $startingSite | Wait-Job -Timeout 15 $startingSite = $startingSite | Receive-Job } Invoke-RestMethod -Uri "http://localhost:$randomPort" | Should -Not -Be $Null + $aPageOutput = Invoke-RestMethod -Uri "http://localhost:$randomPort/aPage" + $aPageOutput | Should -Not -Be $null + if ($aPageOutput.OuterXml) { + $aPageOutput.OuterXml | Should -Match "$([DateTime]::now.ToString('yyyy-MM-dd'))" + } Pop-Location - Get-Job | Stop-Job + Get-Job | Stop-PSJekyll Get-Job | Remove-Job Remove-Item -Recurse -Force $siteName } From 55d3b734086a1294a6b5de8b19914837fa6de8c6 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:30:12 -0700 Subject: [PATCH 094/769] feat: Updating PSJekyll Build ( Fixes #15, Fixes #16 ) Running action just before container creation --- .github/workflows/BuildPSJekyll.yml | 8 ++++---- Build/GitHub/Jobs/BuildPSJekyll.psd1 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/BuildPSJekyll.yml b/.github/workflows/BuildPSJekyll.yml index 0149a4b..e40bbea 100644 --- a/.github/workflows/BuildPSJekyll.yml +++ b/.github/workflows/BuildPSJekyll.yml @@ -500,14 +500,14 @@ jobs: - name: Use PipeScript Action uses: StartAutomating/PipeScript@main id: PipeScript - - name: Run PSJekyll (on branch) - if: ${{github.ref_name != 'main'}} - uses: ./ - id: PSJekyllBranch - name: UseEZOut uses: StartAutomating/EZOut@master - name: UseHelpOut uses: StartAutomating/HelpOut@master + - name: Run PSJekyll (on branch) + if: ${{github.ref_name != 'main'}} + uses: ./ + id: PSJekyllBranch - name: Log in to ghcr.io uses: docker/login-action@master with: diff --git a/Build/GitHub/Jobs/BuildPSJekyll.psd1 b/Build/GitHub/Jobs/BuildPSJekyll.psd1 index 26652b2..c64de0c 100644 --- a/Build/GitHub/Jobs/BuildPSJekyll.psd1 +++ b/Build/GitHub/Jobs/BuildPSJekyll.psd1 @@ -20,15 +20,15 @@ name = 'Use PipeScript Action' uses = 'StartAutomating/PipeScript@main' id = 'PipeScript' - }, + }, + 'RunEZOut', + 'RunHelpOut', @{ name = 'Run PSJekyll (on branch)' if = '${{github.ref_name != ''main''}}' uses = './' id = 'PSJekyllBranch' - }, - 'RunEZOut', - 'RunHelpOut', + }, 'BuildAndPublishContainer' ) } \ No newline at end of file From 8659b4621f30338f6bd9dc30ab56e5519eb83bbf Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:35:09 -0700 Subject: [PATCH 095/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- Build/PSJekyll.HelpOut.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Build/PSJekyll.HelpOut.ps1 diff --git a/Build/PSJekyll.HelpOut.ps1 b/Build/PSJekyll.HelpOut.ps1 new file mode 100644 index 0000000..e9c9a6e --- /dev/null +++ b/Build/PSJekyll.HelpOut.ps1 @@ -0,0 +1,19 @@ +#requires -Module HelpOut + +$ModuleName = 'PSJekyll' +Push-Location ($PSScriptRoot | Split-Path) +if (-not (Get-Module $ModuleName)) { + Import-Module .\ -Global -PassThru | Out-Host +} +# The HelpOut action does not load your module. If you were writing your own HelpOut.ps1 file, you'd want to load the module here. + +# This will save the MarkdownHelp to the docs folder, and output all of the files created. +Save-MarkdownHelp -PassThru -Module $ModuleName # -IncludeYamlHeader + +# Outputting a file will check the change in (using the message of the current commit) +# If the file has a .CommitMessage property, that will be used instead. + +# This will generate the MAML for the module (and output the files changed). +# MAML loads faster than inline help. +Install-MAML -Module $ModuleName -PassThru -NoComment +Pop-Location \ No newline at end of file From 86ec6e22fb8b22fb3378a3a2a78e493a3e03e304 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:00 +0000 Subject: [PATCH 096/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/New-PSJekyll.md | 103 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/New-PSJekyll.md diff --git a/docs/New-PSJekyll.md b/docs/New-PSJekyll.md new file mode 100644 index 0000000..b1b5b27 --- /dev/null +++ b/docs/New-PSJekyll.md @@ -0,0 +1,103 @@ +New-PSJekyll +------------ + +### Synopsis +Creates a new Jekyll site. + +--- + +### Description + +Creates a new Jekyll site, using PowerShell. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Blank** +Creates scaffolding but with empty files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Force** +Force creation even if PATH already exists + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Safe** +Safe mode + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SkipBundle** +Skip the bundle install + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SourcePath** +The path to the source files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |2 |false | + +#### **DestinationPath** +The path to the destination files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **LayoutPath** +The path to the layout files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |5 |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +New-PSJekyll [[-Name] ] [-Blank] [-Force] [-Safe] [-SkipBundle] [[-SourcePath] ] [[-DestinationPath] ] [[-LayoutPath] ] [[-PluginPath] ] [-LiquidProfile] [-Trace] [] +``` From 8b712e3b86fac1877c527af96a493d39db8ea803 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:00 +0000 Subject: [PATCH 097/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Remove-PSJekyll.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/Remove-PSJekyll.md diff --git a/docs/Remove-PSJekyll.md b/docs/Remove-PSJekyll.md new file mode 100644 index 0000000..65e6471 --- /dev/null +++ b/docs/Remove-PSJekyll.md @@ -0,0 +1,30 @@ +Remove-PSJekyll +--------------- + +### Synopsis +Removes content from Jekyll + +--- + +### Description + +Removes files from Jekyll + +This is a slightly limited version of Remove-Item. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|--------| +|`[String]`|true |1 |true (ByPropertyName)|FullName| + +--- + +### Syntax +```PowerShell +Remove-PSJekyll [-Path] [] +``` From 9c1d036ea2f9b786c5e1e1ef73f3e89fb0866873 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:01 +0000 Subject: [PATCH 098/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Set-PSJekyll.md | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/Set-PSJekyll.md diff --git a/docs/Set-PSJekyll.md b/docs/Set-PSJekyll.md new file mode 100644 index 0000000..72d950f --- /dev/null +++ b/docs/Set-PSJekyll.md @@ -0,0 +1,56 @@ +Set-PSJekyll +------------ + +### Synopsis +Sets the content of a file in Jekyll + +--- + +### Description + +Sets the content of a file in Jekyll. + +This is only slightly smarter than Set-Content. + +It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv. + +Otherwise, it will create a YAML header and then set the content. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput|Aliases | +|----------|--------|--------|-------------|--------| +|`[String]`|true |1 |false |FullName| + +#### **PassThru** +If set, will return the file object + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Content** +The content to set + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|--------------| +|`[Object]`|false |named |true (ByValue)| + +#### **MetaData** +Any metadata to set. +This will create a YAML header, which is required for most files in Jekyll to be processed properly. + +|Type |Required|Position|PipelineInput|Aliases | +|---------------|--------|--------|-------------|----------| +|`[IDictionary]`|false |named |false |YamlHeader| + +--- + +### Syntax +```PowerShell +Set-PSJekyll [-Path] [-PassThru] [-Content ] [-MetaData ] [] +``` From a0e6a39f888b4eacdfd0bc640830e7c451b7743a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:01 +0000 Subject: [PATCH 099/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Start-PSJekyll.md | 138 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 docs/Start-PSJekyll.md diff --git a/docs/Start-PSJekyll.md b/docs/Start-PSJekyll.md new file mode 100644 index 0000000..4f67c9f --- /dev/null +++ b/docs/Start-PSJekyll.md @@ -0,0 +1,138 @@ +Start-PSJekyll +-------------- + +### Synopsis +Starts a Jekyll server + +--- + +### Description + +Starts a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Config** +One or more config files to use + +|Type |Required|Position|PipelineInput|Aliases | +|------------|--------|--------|-------------|-------------| +|`[String[]]`|false |2 |false |Configuration| + +#### **SourcePath** +The source directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **DestinationPath** +The destination directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **HostHeader** +The host header + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |5 |false | + +#### **Port** +The port to listen on + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[UInt32]`|false |6 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |7 |false | + +#### **ShowDirectoryList** +If set, will show a directory list. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiveReload** +If set, will enable live reload. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Watch** +Watch for changes and rebuild + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **PreviewFuture** +If set, will publish posts with a future date (previewing them). + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **BaseUrl** +The base URL for the site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |8 |false | + +#### **Detach** +If set, will detach the process + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Incremental** +Enable incremental rebuilds + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +Start-PSJekyll [[-Name] ] [[-Config] ] [[-SourcePath] ] [[-DestinationPath] ] [[-HostHeader] ] [[-Port] ] [[-PluginPath] ] [-ShowDirectoryList] [-LiveReload] [-LiquidProfile] [-Trace] [-Watch] [-PreviewFuture] [[-BaseUrl] ] [-Detach] [-Incremental] [] +``` From 5846b81b93507cced73b18553286c7169b2b90f6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:01 +0000 Subject: [PATCH 100/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Stop-PSJekyll.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/Stop-PSJekyll.md diff --git a/docs/Stop-PSJekyll.md b/docs/Stop-PSJekyll.md new file mode 100644 index 0000000..def98b3 --- /dev/null +++ b/docs/Stop-PSJekyll.md @@ -0,0 +1,33 @@ +Stop-PSJekyll +------------- + +### Synopsis +Stops a Jekyll server + +--- + +### Description + +Stops a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll job + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |1 |true (ByPropertyName)| + +--- + +### Syntax +```PowerShell +Stop-PSJekyll [[-Name] ] [] +``` From 1890e95b9886b7cadc954a2d18ea994671f18e81 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:01 +0000 Subject: [PATCH 101/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/New-Jekyll.md | 103 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/New-Jekyll.md diff --git a/docs/New-Jekyll.md b/docs/New-Jekyll.md new file mode 100644 index 0000000..b1b5b27 --- /dev/null +++ b/docs/New-Jekyll.md @@ -0,0 +1,103 @@ +New-PSJekyll +------------ + +### Synopsis +Creates a new Jekyll site. + +--- + +### Description + +Creates a new Jekyll site, using PowerShell. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Blank** +Creates scaffolding but with empty files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Force** +Force creation even if PATH already exists + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Safe** +Safe mode + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SkipBundle** +Skip the bundle install + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SourcePath** +The path to the source files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |2 |false | + +#### **DestinationPath** +The path to the destination files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **LayoutPath** +The path to the layout files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |5 |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +New-PSJekyll [[-Name] ] [-Blank] [-Force] [-Safe] [-SkipBundle] [[-SourcePath] ] [[-DestinationPath] ] [[-LayoutPath] ] [[-PluginPath] ] [-LiquidProfile] [-Trace] [] +``` From bd9cd353df2b263d30baad4fadbb05287283c334 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:01 +0000 Subject: [PATCH 102/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Remove-Jekyll.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/Remove-Jekyll.md diff --git a/docs/Remove-Jekyll.md b/docs/Remove-Jekyll.md new file mode 100644 index 0000000..65e6471 --- /dev/null +++ b/docs/Remove-Jekyll.md @@ -0,0 +1,30 @@ +Remove-PSJekyll +--------------- + +### Synopsis +Removes content from Jekyll + +--- + +### Description + +Removes files from Jekyll + +This is a slightly limited version of Remove-Item. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|--------| +|`[String]`|true |1 |true (ByPropertyName)|FullName| + +--- + +### Syntax +```PowerShell +Remove-PSJekyll [-Path] [] +``` From 8812ac36ff036c7075202d391e9d940dce9d4d8a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:02 +0000 Subject: [PATCH 103/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Set-Jekyll.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/Set-Jekyll.md diff --git a/docs/Set-Jekyll.md b/docs/Set-Jekyll.md new file mode 100644 index 0000000..72d950f --- /dev/null +++ b/docs/Set-Jekyll.md @@ -0,0 +1,56 @@ +Set-PSJekyll +------------ + +### Synopsis +Sets the content of a file in Jekyll + +--- + +### Description + +Sets the content of a file in Jekyll. + +This is only slightly smarter than Set-Content. + +It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv. + +Otherwise, it will create a YAML header and then set the content. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput|Aliases | +|----------|--------|--------|-------------|--------| +|`[String]`|true |1 |false |FullName| + +#### **PassThru** +If set, will return the file object + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Content** +The content to set + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|--------------| +|`[Object]`|false |named |true (ByValue)| + +#### **MetaData** +Any metadata to set. +This will create a YAML header, which is required for most files in Jekyll to be processed properly. + +|Type |Required|Position|PipelineInput|Aliases | +|---------------|--------|--------|-------------|----------| +|`[IDictionary]`|false |named |false |YamlHeader| + +--- + +### Syntax +```PowerShell +Set-PSJekyll [-Path] [-PassThru] [-Content ] [-MetaData ] [] +``` From 051db8e17bd467175074058a38cb43398d535bf2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:02 +0000 Subject: [PATCH 104/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Start-Jekyll.md | 138 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 docs/Start-Jekyll.md diff --git a/docs/Start-Jekyll.md b/docs/Start-Jekyll.md new file mode 100644 index 0000000..4f67c9f --- /dev/null +++ b/docs/Start-Jekyll.md @@ -0,0 +1,138 @@ +Start-PSJekyll +-------------- + +### Synopsis +Starts a Jekyll server + +--- + +### Description + +Starts a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Config** +One or more config files to use + +|Type |Required|Position|PipelineInput|Aliases | +|------------|--------|--------|-------------|-------------| +|`[String[]]`|false |2 |false |Configuration| + +#### **SourcePath** +The source directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **DestinationPath** +The destination directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **HostHeader** +The host header + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |5 |false | + +#### **Port** +The port to listen on + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[UInt32]`|false |6 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |7 |false | + +#### **ShowDirectoryList** +If set, will show a directory list. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiveReload** +If set, will enable live reload. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Watch** +Watch for changes and rebuild + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **PreviewFuture** +If set, will publish posts with a future date (previewing them). + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **BaseUrl** +The base URL for the site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |8 |false | + +#### **Detach** +If set, will detach the process + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Incremental** +Enable incremental rebuilds + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +Start-PSJekyll [[-Name] ] [[-Config] ] [[-SourcePath] ] [[-DestinationPath] ] [[-HostHeader] ] [[-Port] ] [[-PluginPath] ] [-ShowDirectoryList] [-LiveReload] [-LiquidProfile] [-Trace] [-Watch] [-PreviewFuture] [[-BaseUrl] ] [-Detach] [-Incremental] [] +``` From 89d83bb8ebde08836354093429605f5794d0f68c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:02 +0000 Subject: [PATCH 105/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Stop-Jekyll.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/Stop-Jekyll.md diff --git a/docs/Stop-Jekyll.md b/docs/Stop-Jekyll.md new file mode 100644 index 0000000..def98b3 --- /dev/null +++ b/docs/Stop-Jekyll.md @@ -0,0 +1,33 @@ +Stop-PSJekyll +------------- + +### Synopsis +Stops a Jekyll server + +--- + +### Description + +Stops a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll job + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |1 |true (ByPropertyName)| + +--- + +### Syntax +```PowerShell +Stop-PSJekyll [[-Name] ] [] +``` From 567879eaf7fae9864ef562acb9e2f03978450708 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 106/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b57bd00 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,42 @@ +
+ +
+ +# PSJekyll + +Scary Simple Static Sites with PowerShell and Jekyll + +[Jekyll](https://jekyllrb.com) 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 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. + +~~~yaml +- name: UseEZOut +- uses: PowerShellWeb/PSJekyll@main +~~~ + +## PSJekyll Container + +PSJekyll ships every build in a container. + +To pull down PSJekyll and start your own server, use something like: + +~~~PowerShell +docker pull ghcr.io/powershellweb/psjekyll + +docker run -interactive --tty --publish 8069:4000 ghcr.io/powershellweb/psjekyll +~~~ + +## PSJekyll Commands + +* `New-PSJekyll` creates sites with `jekyll new`. +* `Start-PSJekyll` starts Jekyll servers in a jobs. +* `Stop-PSJekyll` stops running Jekyll jobs. From 71ecd2e0f9ef0e24a550c1e1623545f1003e27bf Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 107/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Assets/PSJekyll-Animated.svg | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/Assets/PSJekyll-Animated.svg diff --git a/docs/Assets/PSJekyll-Animated.svg b/docs/Assets/PSJekyll-Animated.svg new file mode 100644 index 0000000..9462180 --- /dev/null +++ b/docs/Assets/PSJekyll-Animated.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From 7408eaa33d19b457d9e12b85f8204800b9e4c082 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 108/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/Assets/PSJekyll.svg | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/Assets/PSJekyll.svg diff --git a/docs/Assets/PSJekyll.svg b/docs/Assets/PSJekyll.svg new file mode 100644 index 0000000..1d243ba --- /dev/null +++ b/docs/Assets/PSJekyll.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From 37d7b63b5764b64aff0623cd41c287eb554c24a4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 109/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/PSJekyll/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/PSJekyll/README.md diff --git a/docs/PSJekyll/README.md b/docs/PSJekyll/README.md new file mode 100644 index 0000000..56eface --- /dev/null +++ b/docs/PSJekyll/README.md @@ -0,0 +1,8 @@ +## PSJekyll + + +### Script Methods + + +* [FormatMarkdown](FormatMarkdown.md) +* [FormatYAML](FormatYAML.md) From 44bd78e60af65bacc08d6401d1f47b451f2cd215 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 110/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/PSJekyll/FormatMarkdown.md | 187 ++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 docs/PSJekyll/FormatMarkdown.md diff --git a/docs/PSJekyll/FormatMarkdown.md b/docs/PSJekyll/FormatMarkdown.md new file mode 100644 index 0000000..7c0eb1c --- /dev/null +++ b/docs/PSJekyll/FormatMarkdown.md @@ -0,0 +1,187 @@ +PSJekyll.FormatMarkdown() +------------------------- + +### Synopsis +Formats an object as Markdown + +--- + +### Description + +Formats an object as Markdown, with many options to work with + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +Format-Markdown -ScriptBlock { + Get-Process +} +``` +> EXAMPLE 2 + +```PowerShell +1..6 | Format-Markdown -HeadingSize { $_ } +``` + +--- + +### Parameters +#### **InputObject** + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|------------------------------| +|`[PSObject]`|false |1 |true (ByValue, ByPropertyName)| + +#### **MarkdownParagraph** +If set, will treat the -InputObject as a paragraph. +This is the default for strings, booleans, numbers, and other primitive types. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **MarkdownTable** +If set, will generate a markdown table. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **MarkdownTableAlignment** +If provided, will align columnns in a markdown table. +Valid Values: + +* Left +* Right +* Center +* + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|---------------------| +|`[String[]]`|false |2 |true (ByPropertyName)| + +#### **Property** +An array of properties. Providing this implies -MarkdownTable + +|Type |Required|Position|PipelineInput | +|--------------|--------|--------|---------------------| +|`[PSObject[]]`|false |3 |true (ByPropertyName)| + +#### **Heading** +A heading. +If provided without -HeadingSize, -HeadingSize will default to 2. +If provided with -InputObject, -Heading will take priority. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |4 |true (ByPropertyName)| + +#### **HeadingSize** +The heading size (1-6) +If provided without -Heading, the -InputObject will be considered to be a heading. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |5 |true (ByPropertyName)| + +#### **Link** +If set, will create a link. The -InputObject will be used as the link content + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|------------------| +|`[String]`|false |6 |true (ByPropertyName)|Hyperlink
Href| + +#### **ImageLink** +If set, will create an image link. The -Inputobject will be used as the link content. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |7 |true (ByPropertyName)| + +#### **BulletPoint** +If set, will generate a bullet point list. + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|---------------| +|`[Switch]`|false |named |true (ByPropertyName)|BulletpointList| + +#### **Checkbox** +If set, bullet or numbered list items will have a checkbox. +Each piped -InputObject will be an additional list item. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **Checked** +If set, bullet or numbered list items will be checked. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **NumberedList** +If set, will generate a numbered list. +Each piped -InputObject will be an additional list item. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **BlockQuote** +If set, will generate a block quote. +Each line of the -InputObject will be block quoted. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **BlockQuoteDepth** +If set, will generate a block quote of a particular depth. +Each line of the -InputObject will be block quoted. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |8 |true (ByPropertyName)| + +#### **Number** +If provided, will create a markdown numbered list with this particular item as the number. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |9 |true (ByPropertyName)| + +#### **HorizontalRule** +If set, will generate a horizontal rule. +If other parameters are provided, the horiztonal rule will be placed after. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **Code** +If set, will output the -InputObject as a Markdown code block + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **CodeLanguage** +If set, will output the -InputObject as a Markdown code block, with a given language +If the -InputObject is a ScriptBlock, -CodeLanguage will be set to PowerShell. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |10 |true (ByPropertyName)| + +#### **ScriptBlock** +If provided, will output a script block as a Markdown code block. + +|Type |Required|Position|PipelineInput | +|---------------|--------|--------|---------------------| +|`[ScriptBlock]`|false |11 |true (ByPropertyName)| + +--- From ce95fed35fca6d61ff871a9633a41576345b7b3f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 111/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- docs/PSJekyll/FormatYAML.md | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/PSJekyll/FormatYAML.md diff --git a/docs/PSJekyll/FormatYAML.md b/docs/PSJekyll/FormatYAML.md new file mode 100644 index 0000000..f57e880 --- /dev/null +++ b/docs/PSJekyll/FormatYAML.md @@ -0,0 +1,58 @@ +PSJekyll.FormatYAML() +--------------------- + +### Synopsis +Formats objects as YAML + +--- + +### Description + +Formats an object as YAML. + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +Format-Yaml -InputObject @("a", "b", "c") +``` +> EXAMPLE 2 + +```PowerShell +@{a="b";c="d";e=@{f=@('g')}} | Format-Yaml +``` + +--- + +### Parameters +#### **InputObject** +The InputObject. + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|--------------| +|`[PSObject]`|false |1 |true (ByValue)| + +#### **YamlHeader** +If set, will make a YAML header by adding a YAML Document tag above and below output. + +|Type |Required|Position|PipelineInput|Aliases | +|----------|--------|--------|-------------|------------| +|`[Switch]`|false |named |false |YAMLDocument| + +#### **Indent** + +|Type |Required|Position|PipelineInput| +|---------|--------|--------|-------------| +|`[Int32]`|false |2 |false | + +#### **Depth** +The maximum depth of objects to include. +Beyond this depth, an empty string will be returned. + +|Type |Required|Position|PipelineInput| +|---------|--------|--------|-------------| +|`[Int32]`|false |3 |false | + +--- From e0d3236851a69fb23ba355f0bbba26e3ebafa4a1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 112/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- PSJekyll-Help.xml | 993 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 993 insertions(+) create mode 100644 PSJekyll-Help.xml diff --git a/PSJekyll-Help.xml b/PSJekyll-Help.xml new file mode 100644 index 0000000..ad843a9 --- /dev/null +++ b/PSJekyll-Help.xml @@ -0,0 +1,993 @@ + + + + + New-PSJekyll + PSJekyll + New + + Creates a new Jekyll site. + + 0.1 + + + Creates a new Jekyll site, using PowerShell. + + + + New-PSJekyll + + Name + + The name of the Jekyll site + + String + + String + + + + + + + Blank + + Creates scaffolding but with empty files + + Switch + + Switch + + + + + + + Force + + Force creation even if PATH already exists + + Switch + + Switch + + + + + + + Safe + + Safe mode + + Switch + + Switch + + + + + + + SkipBundle + + Skip the bundle install + + Switch + + Switch + + + + + + + SourcePath + + The path to the source files + + String + + String + + + + + + + DestinationPath + + The path to the destination files + + String + + String + + + + + + + LayoutPath + + The path to the layout files + + String + + String + + + + + + + PluginPath + + The path to the plugin files + + System.String[] + + System.String[] + + + + + + + LiquidProfile + + If set, will generate a liquid profile + + Switch + + Switch + + + + + + + Trace + + If set, will trace the execution + + Switch + + Switch + + + + + + + + + + Blank + + Creates scaffolding but with empty files + + Switch + + Switch + + + + + + + DestinationPath + + The path to the destination files + + String + + String + + + + + + + Force + + Force creation even if PATH already exists + + Switch + + Switch + + + + + + + LayoutPath + + The path to the layout files + + String + + String + + + + + + + LiquidProfile + + If set, will generate a liquid profile + + Switch + + Switch + + + + + + + Name + + The name of the Jekyll site + + String + + String + + + + + + + PluginPath + + The path to the plugin files + + System.String[] + + System.String[] + + + + + + + Safe + + Safe mode + + Switch + + Switch + + + + + + + SkipBundle + + Skip the bundle install + + Switch + + Switch + + + + + + + SourcePath + + The path to the source files + + String + + String + + + + + + + Trace + + If set, will trace the execution + + Switch + + Switch + + + + + + + + + + + https://jekyllrb.com/ + + + + + + Remove-PSJekyll + PSJekyll + Remove + + Removes content from Jekyll + + 0.1 + + + Removes files from Jekyll + This is a slightly limited version of Remove-Item. + + + + Remove-PSJekyll + + Path + + The path to the file. + + String + + String + + + + + + + + + + Path + + The path to the file. + + String + + String + + + + + + + + + + Set-PSJekyll + PSJekyll + Set + + Sets the content of a file in Jekyll + + 0.1 + + + Sets the content of a file in Jekyll. + This is only slightly smarter than Set-Content. + It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv. + Otherwise, it will create a YAML header and then set the content. + + + + Set-PSJekyll + + Path + + The path to the file. + + String + + String + + + + + + + PassThru + + If set, will return the file object + + Switch + + Switch + + + + + + + Content + + The content to set + + System.Object + + System.Object + + + + + + + MetaData + + Any metadata to set. +This will create a YAML header, which is required for most files in Jekyll to be processed properly. + + System.Collections.IDictionary + + System.Collections.IDictionary + + + + + + + + + + Content + + The content to set + + System.Object + + System.Object + + + + + + + MetaData + + Any metadata to set. +This will create a YAML header, which is required for most files in Jekyll to be processed properly. + + System.Collections.IDictionary + + System.Collections.IDictionary + + + + + + + PassThru + + If set, will return the file object + + Switch + + Switch + + + + + + + Path + + The path to the file. + + String + + String + + + + + + + + + + Start-PSJekyll + PSJekyll + Start + + Starts a Jekyll server + + 0.1 + + + Starts a Jekyll server in a PowerShell job. + + + + Start-PSJekyll + + Name + + The name of the Jekyll site + + String + + String + + + + + + + Config + + One or more config files to use + + System.String[] + + System.String[] + + + + + + + SourcePath + + The source directory + + String + + String + + + + + + + DestinationPath + + The destination directory + + String + + String + + + + + + + HostHeader + + The host header + + String + + String + + + + + + + Port + + The port to listen on + + Uint + + Uint + + + + + + + PluginPath + + The path to the plugin files + + System.String[] + + System.String[] + + + + + + + ShowDirectoryList + + If set, will show a directory list. + + Switch + + Switch + + + + + + + LiveReload + + If set, will enable live reload. + + Switch + + Switch + + + + + + + LiquidProfile + + If set, will generate a liquid profile + + Switch + + Switch + + + + + + + Trace + + If set, will trace the execution + + Switch + + Switch + + + + + + + Watch + + Watch for changes and rebuild + + Switch + + Switch + + + + + + + PreviewFuture + + If set, will publish posts with a future date (previewing them). + + Switch + + Switch + + + + + + + BaseUrl + + The base URL for the site + + String + + String + + + + + + + Detach + + If set, will detach the process + + Switch + + Switch + + + + + + + Incremental + + Enable incremental rebuilds + + Switch + + Switch + + + + + + + + + + BaseUrl + + The base URL for the site + + String + + String + + + + + + + Config + + One or more config files to use + + System.String[] + + System.String[] + + + + + + + DestinationPath + + The destination directory + + String + + String + + + + + + + Detach + + If set, will detach the process + + Switch + + Switch + + + + + + + HostHeader + + The host header + + String + + String + + + + + + + Incremental + + Enable incremental rebuilds + + Switch + + Switch + + + + + + + LiquidProfile + + If set, will generate a liquid profile + + Switch + + Switch + + + + + + + LiveReload + + If set, will enable live reload. + + Switch + + Switch + + + + + + + Name + + The name of the Jekyll site + + String + + String + + + + + + + PluginPath + + The path to the plugin files + + System.String[] + + System.String[] + + + + + + + Port + + The port to listen on + + Uint + + Uint + + + + + + + PreviewFuture + + If set, will publish posts with a future date (previewing them). + + Switch + + Switch + + + + + + + ShowDirectoryList + + If set, will show a directory list. + + Switch + + Switch + + + + + + + SourcePath + + The source directory + + String + + String + + + + + + + Trace + + If set, will trace the execution + + Switch + + Switch + + + + + + + Watch + + Watch for changes and rebuild + + Switch + + Switch + + + + + + + + + + + https://jekyllrb.com/ + + + + + + Stop-PSJekyll + PSJekyll + Stop + + Stops a Jekyll server + + 0.1 + + + Stops a Jekyll server in a PowerShell job. + + + + Stop-PSJekyll + + Name + + The name of the Jekyll job + + String + + String + + + + + + + + + + Name + + The name of the Jekyll job + + String + + String + + + + + + + + + + + https://jekyllrb.com/ + + + + From af2a8dcedb44e335efab321bdecbdc473d743a94 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:36:03 +0000 Subject: [PATCH 113/769] feat: PSJekyll.HelpOut ( Fixes #18 ) --- allcommands.ps1 | 311 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) create mode 100644 allcommands.ps1 diff --git a/allcommands.ps1 b/allcommands.ps1 new file mode 100644 index 0000000..73b92d1 --- /dev/null +++ b/allcommands.ps1 @@ -0,0 +1,311 @@ +### DO NOT EDIT THIS FILE DIRECTLY ### + +#.ExternalHelp PSJekyll-Help.xml +function New-PSJekyll +{ + + [Alias('New-Jekyll')] + param( + # The name of the Jekyll site + [string] + $Name, + + # Creates scaffolding but with empty files + [switch] + $Blank, + + # Force creation even if PATH already exists + [switch] + $Force, + + # Safe mode + [switch] + $Safe, + + # Skip the bundle install + [switch] + $SkipBundle, + + # The path to the source files + [string] + $SourcePath, + + # The path to the destination files + [string] + $DestinationPath, + + # The path to the layout files + [string] + $LayoutPath, + + # The path to the plugin files + [string[]] + $PluginPath, + + # If set, will generate a liquid profile + [switch] + $LiquidProfile, + + # If set, will trace the execution + [switch] + $Trace + ) + + $jekyllSplat = @( + $name + if ($blank) { '--blank' } + if ($force) { '--force' } + if ($safe) { '--safe' } + if ($skipBundle) { '--skip-bundle' } + if ($sourcePath) {"--source $sourcePath"} + if ($destinationPath) {"--destination $destinationPath"} + if ($layoutPath) {"--layouts $layoutPath"} + if ($pluginPath) {"--plugins $($pluginPath -join ',')"} + if ($liquidProfile) {'--profile'} + if ($trace) {'--trace'} + ) + + $newJekyllJob = jekyll new @jekyllSplat & + $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job') + $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job.New-PSJekyll') + $newJekyllJob +} + +#.ExternalHelp PSJekyll-Help.xml +function Remove-PSJekyll { + + [Alias('Remove-Jekyll')] + param( + # The path to the file. + [Parameter(Mandatory,Position=0,ValueFromPipelineByPropertyName)] + [ValidatePattern('^[\\/]')] + [Alias('FullName')] + [string] + $Path + ) + + process { + if (Test-Path $path) { + Remove-Item -Path $path + } + } +} + +#.ExternalHelp PSJekyll-Help.xml +function Set-PSJekyll { + + [Alias('Set-Jekyll')] + param( + # The path to the file. + [Parameter(Mandatory,Position=0)] + [ValidatePattern('^[\\/]')] + [Alias('FullName')] + [string] + $Path, + + # If set, will return the file object + [switch] + $PassThru, + + # The content to set + [Parameter(ValueFromPipeline)] + [object] + $Content, + + # Any metadata to set. + # This will create a YAML header, which is required for most files in Jekyll to be processed properly. + [Alias('YamlHeader')] + [Collections.IDictionary] + $MetaData = [Ordered]@{} + ) + + $allInput = @($input) + if ((-not $allInput) -and $Content) { + $allInput = @($Content) + } + + if (-not $allInput) { return } + if (-not (Test-Path $path)) { + New-Item -Path $path -Type File -Force | Out-Null + if (-not $?) { return } + } + + if ($path -match '\.json$') { + if ($allInput.Length -eq 1) { + ConvertTo-Json -InputObject $allInput[0] -Depth $FormatEnumerationLimit | + Set-Content -Path $path + } else { + ConvertTo-Json -InputObject $allInput -Depth $FormatEnumerationLimit | + Set-Content -Path $path + } + } + elseif ($path -match '\.[ct]sv$') { + $csvSplat = [Ordered]@{Path=$path} + if ($path -match '\.t') { + $csvSplat.Delimiter = "`t" + } + $content | + Export-Csv @csvSplat -NoTypeInformation + } + else { + @( + $metadata | & $psJekyll.FormatYaml.Script -YamlHeader + $content + ) | + Set-Content -Path $path + } + if ($? -and $PassThru) { + Get-Item -Path $path + } +} + +#.ExternalHelp PSJekyll-Help.xml +function Start-PSJekyll +{ + + [Alias('Start-Jekyll')] + [CmdletBinding()] + param( + # The name of the Jekyll site + [string] + $Name, + + # One or more config files to use + [Alias('Configuration')] + [string[]] + $Config, + + # The source directory + [string] + $SourcePath, + + # The destination directory + [string] + $DestinationPath, + + # The host header + [string] + $HostHeader, + + # The port to listen on + [uint] + $Port, + + # The path to the plugin files + [string[]] + $PluginPath, + + # If set, will show a directory list. + [switch] + $ShowDirectoryList, + + # If set, will enable live reload. + [switch] + $LiveReload, + + # If set, will generate a liquid profile + [switch] + $LiquidProfile, + + # If set, will trace the execution + [switch] + $Trace, + + # Watch for changes and rebuild + [switch] + $Watch, + + # If set, will publish posts with a future date (previewing them). + [switch] + $PreviewFuture, + + # The base URL for the site + [string] + $BaseUrl, + + # If set, will detach the process + [switch] + $Detach, + + # Enable incremental rebuilds + [switch] + $Incremental + ) + + if ($env:IN_CONTAINER -and -not $HostHeader) { + $HostHeader = '*' + } + + $jekyllSplat = @( + if ($force) { '--force' } + if ($safe) { '--safe' } + if ($Detach) { '--detach' } + if ($PreviewFuture) { '--future' } + if ($liveReload) {'--livereload'} + if ($sourcePath) {"--source";"$sourcePath"} + if ($destinationPath) {"--destination";"$destinationPath"} + if ($BaseUrl) {"--baseurl";"$BaseUrl"} + if ($Incremental) {'--incremental'} + if ($HostHeader) {"--host"; "$HostHeader"} + if ($Port) {"--port"; "$Port"} + if ($ShowDirectoryList) {'--show-dir-list'} + if ($layoutPath) {"--layouts"; "$layoutPath"} + if ($pluginPath) {"--plugins"; "$($pluginPath -join ',')"} + if ($liquidProfile) {'--profile'} + if ($trace) {'--trace'} + if ($watch) {'--watch'} + + ) + + $startedAfter = [DateTime]::Now + if ($jekyllSplat -notmatch '--watch') { + $jekyllSplat += '--watch' + } + if ($jekyllSplat -notmatch '--incremental') { + $jekyllSplat += '--incremental' + } + if ($jekyllSplat -notmatch '--trace') { + $jekyllSplat += '--trace' + } + + Write-Verbose "Starting Jekyll server $jekyllSplat" + $jobName = if ($hostHeader) { "PSJekyll.$hostHeader" } else { "Start-PSJekyll" } + $jekyllJob = + Start-ThreadJob -ScriptBlock { + bundle install + + if ($args -match '^\*$' -and $args -match '^--host$') { + $otherArgs = @($args -notmatch '^(?>--host|\*)$') + bundle exec jekyll serve --host '*' @otherArgs + } else { + $promptLongForm = @('exec','jekyll','serve') + $args + bundle @promptLongForm + } + } -ArgumentList $jekyllSplat -Name $jobName + + $jekyllProcesses = Get-Process *ruby* | Where-Object { $_.StartTime -ge $startedAfter } + + Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action { + get-process ruby | Stop-Process -Force + } | Out-Null + + $jekyllJob.pstypenames.insert(0,"PSJekyll.JekyllJob") + $jekyllJob.psobject.properties.Add([psnoteproperty]::New("Processes", $jekyllProcesses)) + $jekyllJob +} + +#.ExternalHelp PSJekyll-Help.xml +function Stop-PSJekyll { + + [Alias('Stop-Jekyll')] + param( + # The name of the Jekyll job + [Parameter(ValueFromPipelineByPropertyName)] + [string] + $Name = '*' + ) + + process { + Get-Job -Name "Jekyll.$Name" | Stop-Job + } +} \ No newline at end of file From ee58c517b7ea32387428e4577ad33c73ff19c5ef Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:38:41 -0700 Subject: [PATCH 114/769] feat: PSJekyll Container.init.ps1 ( Fixes #12 ) Forcing profile creation --- Container.init.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Container.init.ps1 b/Container.init.ps1 index fef021d..167367e 100644 --- a/Container.init.ps1 +++ b/Container.init.ps1 @@ -52,7 +52,7 @@ Get-ChildItem -Path $PSScriptRoot | Copy-Item -Destination / # Create a profile -New-Item -Path $Profile -ItemType File | Out-Null +New-Item -Path $Profile -ItemType File -Force | Out-Null if ($ModuleName) { # Get the root module directory From 6df8a5229e8a08b0bedb75f81aae622f0590f5e4 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:41:35 -0700 Subject: [PATCH 115/769] feat: PSJekyll Module Scaffolding ( Fixes #1, re #18 ) Using allcommands.ps1 if git is not present --- PSJekyll.ps.psm1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/PSJekyll.ps.psm1 b/PSJekyll.ps.psm1 index ccd3154..a85d8bd 100644 --- a/PSJekyll.ps.psm1 +++ b/PSJekyll.ps.psm1 @@ -1,5 +1,11 @@ -$commandsPath = Join-Path $PSScriptRoot .\Commands -[include('*-*')]$commandsPath +$myGitDirectory = Join-Path $PSScriptRoot .git +if (Test-Path $myGitDirectory) { + $commandsPath = Join-Path $PSScriptRoot .\Commands + [include('*-*')]$commandsPath +} else { + . (Join-Path $PSScriptRoot "allcommands.ps1") +} + $myModule = $MyInvocation.MyCommand.ScriptBlock.Module $ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule) From 14f66588677408a9f4f7980ae7df1542fce89414 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:42:26 +0000 Subject: [PATCH 116/769] feat: PSJekyll Module Scaffolding ( Fixes #1, re #18 ) Using allcommands.ps1 if git is not present --- PSJekyll.psm1 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/PSJekyll.psm1 b/PSJekyll.psm1 index 1e9d7a1..5d009e2 100644 --- a/PSJekyll.psm1 +++ b/PSJekyll.psm1 @@ -1,15 +1,21 @@ -$commandsPath = Join-Path $PSScriptRoot .\Commands -:ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { - if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 - foreach ($exclusion in '\.[^\.]+\.ps1$') { - if (-not $exclusion) { continue } - if ($file.Name -match $exclusion) { - continue ToIncludeFiles # Skip excluded files - } - } - . $file.FullName +$myGitDirectory = Join-Path $PSScriptRoot .git +if (Test-Path $myGitDirectory) { + $commandsPath = Join-Path $PSScriptRoot .\Commands + :ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { + if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 + foreach ($exclusion in '\.[^\.]+\.ps1$') { + if (-not $exclusion) { continue } + if ($file.Name -match $exclusion) { + continue ToIncludeFiles # Skip excluded files + } + } + . $file.FullName + } +} else { + . (Join-Path $PSScriptRoot "allcommands.ps1") } + $myModule = $MyInvocation.MyCommand.ScriptBlock.Module $ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule) $myModule.pstypenames.insert(0, $myModule.Name) From 017c0bc9b046a571424fb289e6909ebfde6b5895 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 12:53:02 -0700 Subject: [PATCH 117/769] feat: PSJekyll Module Scaffolding ( Fixes #1, re #18 ) Using allcommands.ps1 if git is not present (adding verbose messages) --- PSJekyll.ps.psm1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PSJekyll.ps.psm1 b/PSJekyll.ps.psm1 index a85d8bd..44a2a31 100644 --- a/PSJekyll.ps.psm1 +++ b/PSJekyll.ps.psm1 @@ -1,8 +1,10 @@ $myGitDirectory = Join-Path $PSScriptRoot .git -if (Test-Path $myGitDirectory) { - $commandsPath = Join-Path $PSScriptRoot .\Commands +if (Test-Path $myGitDirectory) { + $commandsPath = Join-Path $PSScriptRoot Commands + Write-Verbose "Git directory found, loading commands from $commandsPath" [include('*-*')]$commandsPath } else { + Write-Verbose "Git directory not found, loading allcommands.ps1" . (Join-Path $PSScriptRoot "allcommands.ps1") } From 629ddacdc5c08c3719695a016360ec0af16b78c3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 19:53:52 +0000 Subject: [PATCH 118/769] feat: PSJekyll Module Scaffolding ( Fixes #1, re #18 ) Using allcommands.ps1 if git is not present (adding verbose messages) --- PSJekyll.psm1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PSJekyll.psm1 b/PSJekyll.psm1 index 5d009e2..9be773d 100644 --- a/PSJekyll.psm1 +++ b/PSJekyll.psm1 @@ -1,6 +1,7 @@ $myGitDirectory = Join-Path $PSScriptRoot .git -if (Test-Path $myGitDirectory) { - $commandsPath = Join-Path $PSScriptRoot .\Commands +if (Test-Path $myGitDirectory) { + $commandsPath = Join-Path $PSScriptRoot Commands + Write-Verbose "Git directory found, loading commands from $commandsPath" :ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 foreach ($exclusion in '\.[^\.]+\.ps1$') { @@ -12,6 +13,7 @@ if (Test-Path $myGitDirectory) { . $file.FullName } } else { + Write-Verbose "Git directory not found, loading allcommands.ps1" . (Join-Path $PSScriptRoot "allcommands.ps1") } From d836ae1660d0443e69fe9f49f965c1bc32965f22 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 13:02:36 -0700 Subject: [PATCH 119/769] feat: PSJekyll Container.start.ps1 ( Fixes #24 ) Supporting branches --- Container.start.ps1 | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Container.start.ps1 b/Container.start.ps1 index 02c228c..346ae5d 100644 --- a/Container.start.ps1 +++ b/Container.start.ps1 @@ -49,8 +49,27 @@ if ($args) { #region Custom foreach ($arg in $args) { $argAsUri = $arg -as [uri] - if ($argAsUri -and $argAsUri.LocalPath -match '\.git') { - $clonedRepo = git clone $arg + if ($argAsUri -and $argAsUri.LocalPath -match '\.git' -or $argAsUri.DnsSafeHost -eq 'github.com') { + $branchName = '' + $repoUrl = + if ($argAsUri.DnsSafeHost -eq 'github.com') { + # If there were only two segments, then it is a repo. + if ($argAsUri.Segments -eq 3) { + "$arg" + } elseif ($argAsUri.Segments -match '/tree' -and $argAsUri.Segments.Length -ge 4) { + $branchName = $argAsUri.Segments[4] + "https://github.com$($argAsUri.Segments[0..2] -join '')" + } + } else { + $arg + } + $clonedRepo = + if ($branchName) { + git clone $repoUrl --branch $branchName + } else { + git clone $repoUrl + } + $clonedRepo | Push-Location $foundConfigYaml = Get-ChildItem -Path $pwd -filter "_config.yml" -Recurse | Select-Object -First 1 From f0a294a5b33731b422c3cc6b342e1487c346af8a Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 13:06:13 -0700 Subject: [PATCH 120/769] feat: PSJekyll Container.start.ps1 ( Fixes #24 ) Supporting branches with slashes --- Container.start.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Container.start.ps1 b/Container.start.ps1 index 346ae5d..874e779 100644 --- a/Container.start.ps1 +++ b/Container.start.ps1 @@ -57,7 +57,7 @@ if ($args) { if ($argAsUri.Segments -eq 3) { "$arg" } elseif ($argAsUri.Segments -match '/tree' -and $argAsUri.Segments.Length -ge 4) { - $branchName = $argAsUri.Segments[4] + $branchName = $argAsUri.Segments[4..$($argAsUri.Segments.Length - 1)] -join '' "https://github.com$($argAsUri.Segments[0..2] -join '')" } } else { From f60c39b24026f78e5407b5600ec8667b8cfff8ff Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 13:14:17 -0700 Subject: [PATCH 121/769] feat: PSJekyll Container.start.ps1 ( Fixes #24 ) Keeping track of container arguments and fixing git clone parameter order --- Container.start.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Container.start.ps1 b/Container.start.ps1 index 874e779..32e88d2 100644 --- a/Container.start.ps1 +++ b/Container.start.ps1 @@ -45,6 +45,7 @@ if ($mountedFolders) { if ($args) { # If there are arguments, output them (you could handle them in a more complex way). "$args" | Out-Host + $global:ContainerStartArguments = @() + $args #region Custom foreach ($arg in $args) { @@ -65,7 +66,7 @@ if ($args) { } $clonedRepo = if ($branchName) { - git clone $repoUrl --branch $branchName + git clone --branch $branchName $repoUrl } else { git clone $repoUrl } From 029a83182b757fac2353cf75175a35c56b08abb9 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 13:23:11 -0700 Subject: [PATCH 122/769] feat: PSJekyll Container.start.ps1 ( Fixes #24 ) Fixing tree pattern --- Container.start.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Container.start.ps1 b/Container.start.ps1 index 32e88d2..cb4c900 100644 --- a/Container.start.ps1 +++ b/Container.start.ps1 @@ -57,7 +57,7 @@ if ($args) { # If there were only two segments, then it is a repo. if ($argAsUri.Segments -eq 3) { "$arg" - } elseif ($argAsUri.Segments -match '/tree' -and $argAsUri.Segments.Length -ge 4) { + } elseif ($argAsUri.Segments -match 'tree/$' -and $argAsUri.Segments.Length -ge 4) { $branchName = $argAsUri.Segments[4..$($argAsUri.Segments.Length - 1)] -join '' "https://github.com$($argAsUri.Segments[0..2] -join '')" } From b05af078acc11a248107bbdd659aeb0ab9257343 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 15:42:17 -0700 Subject: [PATCH 123/769] feat: PSJekyll.Template.MinGemFile ( Fixes #56 ) --- Types/PSJekyll.Template/MinGemFile.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Types/PSJekyll.Template/MinGemFile.ps1 diff --git a/Types/PSJekyll.Template/MinGemFile.ps1 b/Types/PSJekyll.Template/MinGemFile.ps1 new file mode 100644 index 0000000..449b5ed --- /dev/null +++ b/Types/PSJekyll.Template/MinGemFile.ps1 @@ -0,0 +1,10 @@ +<# +.SYNOPSIS + Minimal Gemfile for Jekyll projects. +.DESCRIPTION + Generates the minimal Gemfile for Jekyll projects. +#> +param() + +"source 'https://rubygems.org'" +"gem 'jekyll'" From fdd1be6581765a8f9c99b8290204d3773432b23d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 22:43:20 +0000 Subject: [PATCH 124/769] feat: PSJekyll.Template.MinGemFile ( Fixes #56 ) --- PSJekyll.types.ps1xml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index aef58eb..8792677 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1021,4 +1021,25 @@ Set-Content -Path ( + + PSJekyll.Template + + + MinGemFile + + + + \ No newline at end of file From 9790030f3860a331140937f71c97191e1d7ac3d8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 22:43:29 +0000 Subject: [PATCH 125/769] feat: PSJekyll.Template.MinGemFile ( Fixes #56 ) --- docs/PSJekyll/Template/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/PSJekyll/Template/README.md diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md new file mode 100644 index 0000000..c6ae417 --- /dev/null +++ b/docs/PSJekyll/Template/README.md @@ -0,0 +1,7 @@ +## PSJekyll.Template + + +### Script Methods + + +* [MinGemFile](MinGemFile.md) From 752edace042a84352908438fb2142a2270b71f2d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 22:43:29 +0000 Subject: [PATCH 126/769] feat: PSJekyll.Template.MinGemFile ( Fixes #56 ) --- docs/PSJekyll/Template/MinGemFile.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/PSJekyll/Template/MinGemFile.md diff --git a/docs/PSJekyll/Template/MinGemFile.md b/docs/PSJekyll/Template/MinGemFile.md new file mode 100644 index 0000000..ad57c58 --- /dev/null +++ b/docs/PSJekyll/Template/MinGemFile.md @@ -0,0 +1,13 @@ +PSJekyll.Template.MinGemFile() +------------------------------ + +### Synopsis +Minimal Gemfile for Jekyll projects. + +--- + +### Description + +Generates the minimal Gemfile for Jekyll projects. + +--- From 0df14147b255c60b5cba06780033f8ca50e75436 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 15:44:20 -0700 Subject: [PATCH 127/769] feat: PSJekyll.get_Template ( Fixes #55 ) --- Types/PSJekyll/get_Template.ps1 | 1 + 1 file changed, 1 insertion(+) create mode 100644 Types/PSJekyll/get_Template.ps1 diff --git a/Types/PSJekyll/get_Template.ps1 b/Types/PSJekyll/get_Template.ps1 new file mode 100644 index 0000000..ff9c733 --- /dev/null +++ b/Types/PSJekyll/get_Template.ps1 @@ -0,0 +1 @@ +[PSCustomObject]@{PSTypeName='PSJekyll.Template'} \ No newline at end of file From d94b70f147de1f74ef3f8ad4ca230c77eb998794 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 22:45:10 +0000 Subject: [PATCH 128/769] feat: PSJekyll.get_Template ( Fixes #55 ) --- PSJekyll.types.ps1xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 8792677..a80d911 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -635,6 +635,12 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { + + + + Template + + [PSCustomObject]@{PSTypeName='PSJekyll.Template'} From 32595cb9af5d67ca1a9dddfac65d1ea2fe84b070 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 15:47:36 -0700 Subject: [PATCH 129/769] feat: PSJekyll.Template.IncludeGoogleAnalytics ( Fixes #57 ) --- Types/PSJekyll.Template/IncludeGoogleAnalytics.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeGoogleAnalytics.ps1 diff --git a/Types/PSJekyll.Template/IncludeGoogleAnalytics.ps1 b/Types/PSJekyll.Template/IncludeGoogleAnalytics.ps1 new file mode 100644 index 0000000..cb528df --- /dev/null +++ b/Types/PSJekyll.Template/IncludeGoogleAnalytics.ps1 @@ -0,0 +1,14 @@ +param($AnalyticsId = 'site.analyticsId') + +@" +{% if $AnalyticsId %} + + + +{% endif %} +"@ \ No newline at end of file From 9d37c2bf159dd86517466d6d2de940fb122df3b3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sat, 5 Oct 2024 22:48:17 +0000 Subject: [PATCH 130/769] feat: PSJekyll.Template.IncludeGoogleAnalytics ( Fixes #57 ) --- PSJekyll.types.ps1xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index a80d911..ce3e1b6 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1030,6 +1030,25 @@ Set-Content -Path ( PSJekyll.Template + + IncludeGoogleAnalytics + + MinGemFile + + IncludeGoogleFont + + MinGemFile + + + IncludeOpenGraph + From d5f17947fee80175780c1d63dd75ffb444734232 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 17:16:10 -0700 Subject: [PATCH 147/769] feat: PSJekyll initial example ( Fixes #31 ) Setting LastDateBuilt --- PSJekyll.PSJekyll.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 4245b43..f42fabe 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -2,5 +2,6 @@ $sitePath = Join-Path $PSScriptRoot 'docs' Push-Location $sitePath $PSJekyll.CurrentSite.Domain = "psjekyll.powershellweb.com" -$PSJekyll.CurrentSite.File -match 'CNAME$' +$PSJekyll.CurrentSite.Data = @{LastDateBuilt = [datetime]::UtcNow.Date.ToString('yyyy-MM-dd')} +$PSJekyll.CurrentSite.Data Pop-Location \ No newline at end of file From cbddf018b0d1eaec6eeb80697112cb7f326caa51 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 17:34:52 -0700 Subject: [PATCH 148/769] feat: PSJekyll action ( Fixes #16 ) Adding OutError --- Build/GitHub/Actions/PSJekyllAction.ps1 | 17 +++++++++++++++-- action.yml | 21 +++++++++++++++++---- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/Build/GitHub/Actions/PSJekyllAction.ps1 b/Build/GitHub/Actions/PSJekyllAction.ps1 index 6d8d271..f2e95f5 100644 --- a/Build/GitHub/Actions/PSJekyllAction.ps1 +++ b/Build/GitHub/Actions/PSJekyllAction.ps1 @@ -44,6 +44,7 @@ $UserName ) $ErrorActionPreference = 'continue' +$error.Clear() "::group::Parameters" | Out-Host [PSCustomObject]$PSBoundParameters | Format-List | Out-Host "::endgroup::" | Out-Host @@ -170,10 +171,21 @@ function InvokeActionModule { $SummaryOfMyScripts | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY } - #region Custom + #region Custom #endregion Custom } +function OutError { + foreach ($err in $error) { + $errParts = @( + "::error" + "::" + $err.Exception.Message + ) -join '' + $errParts | Out-Host + } +} + function PushActionOutput { if ($anyFilesChanged) { "::notice::$($anyFilesChanged) Files Changed" | Out-Host @@ -238,4 +250,5 @@ filter ProcessOutput { . ImportActionModule . InitializeAction . InvokeActionModule -. PushActionOutput \ No newline at end of file +. PushActionOutput +. OutError \ No newline at end of file diff --git a/action.yml b/action.yml index f0c878d..55db156 100644 --- a/action.yml +++ b/action.yml @@ -34,11 +34,11 @@ runs: shell: pwsh env: PSJekyllScript: ${{inputs.PSJekyllScript}} + SkipPSJekyllPS1: ${{inputs.SkipPSJekyllPS1}} UserName: ${{inputs.UserName}} + UserEmail: ${{inputs.UserEmail}} CommitMessage: ${{inputs.CommitMessage}} InstallModule: ${{inputs.InstallModule}} - SkipPSJekyllPS1: ${{inputs.SkipPSJekyllPS1}} - UserEmail: ${{inputs.UserEmail}} run: | $Parameters = @{} $Parameters.PSJekyllScript = ${env:PSJekyllScript} @@ -101,6 +101,7 @@ runs: ) $ErrorActionPreference = 'continue' + $error.Clear() "::group::Parameters" | Out-Host [PSCustomObject]$PSBoundParameters | Format-List | Out-Host "::endgroup::" | Out-Host @@ -227,10 +228,21 @@ runs: $SummaryOfMyScripts | Out-File -Append -FilePath $env:GITHUB_STEP_SUMMARY } - #region Custom + #region Custom #endregion Custom } + function OutError { + foreach ($err in $error) { + $errParts = @( + "::error" + "::" + $err.Exception.Message + ) -join '' + $errParts | Out-Host + } + } + function PushActionOutput { if ($anyFilesChanged) { "::notice::$($anyFilesChanged) Files Changed" | Out-Host @@ -295,5 +307,6 @@ runs: . ImportActionModule . InitializeAction . InvokeActionModule - . PushActionOutput} @Parameters + . PushActionOutput + . OutError} @Parameters From ba09ef354e3f0bbbe82ccd0d6c3ef055cee855d4 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sat, 5 Oct 2024 17:44:52 -0700 Subject: [PATCH 149/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) --- Types/PSJekyll.Template/Include4bitcss.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Types/PSJekyll.Template/Include4bitcss.ps1 diff --git a/Types/PSJekyll.Template/Include4bitcss.ps1 b/Types/PSJekyll.Template/Include4bitcss.ps1 new file mode 100644 index 0000000..a78bc23 --- /dev/null +++ b/Types/PSJekyll.Template/Include4bitcss.ps1 @@ -0,0 +1,18 @@ +param( +[string] +$PaletteName +) + +if ($PaletteName) { +@" + +"@ +} else { + @( + "<% if site.palette %>" + '' + "<% endif %>" + ) -join [Environment]::Newline +} + + From ad2f7c3c23dfa98e743eb1e3d535e790fdaaf102 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 00:46:08 +0000 Subject: [PATCH 150/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) --- PSJekyll.types.ps1xml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index dd7e3d2..ff2f969 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1067,6 +1067,30 @@ Set-Content -Path ( PSJekyll.Template + + Include4bitcss + + IncludeGoogleAnalytics " +} else { +@' +{% if site.data.imports %} + + +{% endif %} + +'@ +} \ No newline at end of file From 84579fd93d6c6430e33b8a01216d4b14814007d6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 18:42:54 +0000 Subject: [PATCH 174/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) --- PSJekyll.types.ps1xml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 625ae63..4ae114e 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1196,6 +1196,49 @@ if ($FontName) { + + IncludeImportMap + + IncludeOpenGraph + +{% endif %} From 01de33a92eabc34c8a2414b22dfb8a5c80392bbe Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 18:57:23 +0000 Subject: [PATCH 185/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts --- docs/_includes/IncludeGoogleAnalytics.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/_includes/IncludeGoogleAnalytics.html diff --git a/docs/_includes/IncludeGoogleAnalytics.html b/docs/_includes/IncludeGoogleAnalytics.html new file mode 100644 index 0000000..493c932 --- /dev/null +++ b/docs/_includes/IncludeGoogleAnalytics.html @@ -0,0 +1,14 @@ +--- + +title: IncludeGoogleAnalytics.html +--- +{% if site.analyticsId %} + + + +{% endif %} \ No newline at end of file From 31be3c6b86f5cd8f8ed842e2861ad359f3f597b7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:01:56 -0700 Subject: [PATCH 186/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- Types/PSJekyll.Site/set_Include.ps1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Types/PSJekyll.Site/set_Include.ps1 b/Types/PSJekyll.Site/set_Include.ps1 index 6bc2f96..fed56de 100644 --- a/Types/PSJekyll.Site/set_Include.ps1 +++ b/Types/PSJekyll.Site/set_Include.ps1 @@ -29,12 +29,8 @@ if (-not $metadata.title) { $destinationPath = $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -$destinationContent = $( - @( - $metadata | & $psJekyll.FormatYaml.Script -YamlHeader - $content - ) -join [Environment]::NewLine -) +# Includes cannot have front matter. +$destinationContent = $content if (-not (Test-Path $destinationPath)) { New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force From b58a45be111255c8652a732867a8466d61b01b19 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 19:02:47 +0000 Subject: [PATCH 187/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- PSJekyll.types.ps1xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 4ae114e..02feed6 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -928,12 +928,8 @@ if (-not $metadata.title) { $destinationPath = $this.Directory,"_includes",($Name | toFileName) -join ([IO.Path]::DirectorySeparatorChar) -replace '^\\' -$destinationContent = $( - @( - $metadata | & $psJekyll.FormatYaml.Script -YamlHeader - $content - ) -join [Environment]::NewLine -) +# Includes cannot have front matter. +$destinationContent = $content if (-not (Test-Path $destinationPath)) { New-Item -Path $destinationPath -ItemType File -Value $destinationContent -Force From c44e65ceb782a4ac13ce845c9c327e520f009e65 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:02:59 +0000 Subject: [PATCH 188/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- docs/_includes/IncludeOpenGraph.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/IncludeOpenGraph.html b/docs/_includes/IncludeOpenGraph.html index 1caeb28..c8e4c5a 100644 --- a/docs/_includes/IncludeOpenGraph.html +++ b/docs/_includes/IncludeOpenGraph.html @@ -1,7 +1,3 @@ ---- - -title: IncludeOpenGraph.html ---- {% if page.title %} @@ -47,4 +43,4 @@ -{% endif %} \ No newline at end of file +{% endif %} From 937e42461afbf77c5191c5e2bd1c820e361e7593 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:02:59 +0000 Subject: [PATCH 189/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- docs/_includes/Include4bitcss.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/Include4bitcss.html b/docs/_includes/Include4bitcss.html index 17b67ea..be8372f 100644 --- a/docs/_includes/Include4bitcss.html +++ b/docs/_includes/Include4bitcss.html @@ -1,7 +1,3 @@ ---- - -title: Include4bitcss.html ---- <% if site.palette %> -<% endif %> \ No newline at end of file +<% endif %> From 4410e053239c1105ca7d983dbbee78cce2531e97 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:02:59 +0000 Subject: [PATCH 190/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- docs/_includes/IncludeGoogleFont.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/IncludeGoogleFont.html b/docs/_includes/IncludeGoogleFont.html index fe96d54..6aca5f3 100644 --- a/docs/_includes/IncludeGoogleFont.html +++ b/docs/_includes/IncludeGoogleFont.html @@ -1,7 +1,3 @@ ---- - -title: IncludeGoogleFont.html ---- <% if site.googleFont %> -<% endif %> \ No newline at end of file +<% endif %> From e5e7df6ea3e070780ec0b57cc800a5e1d32b1e11 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:02:59 +0000 Subject: [PATCH 191/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- docs/_includes/IncludeImportMap.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/_includes/IncludeImportMap.html b/docs/_includes/IncludeImportMap.html index 5c15fa9..12a9c88 100644 --- a/docs/_includes/IncludeImportMap.html +++ b/docs/_includes/IncludeImportMap.html @@ -1,7 +1,3 @@ ---- - -title: IncludeImportMap.html ---- {% if site.data.imports %} {% endif %} + From ee7b53b7701ad716f5cb3e30e590ffedcfec9c31 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:02:59 +0000 Subject: [PATCH 192/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Not including front matter --- docs/_includes/IncludeGoogleAnalytics.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/IncludeGoogleAnalytics.html b/docs/_includes/IncludeGoogleAnalytics.html index 493c932..6e5cdf1 100644 --- a/docs/_includes/IncludeGoogleAnalytics.html +++ b/docs/_includes/IncludeGoogleAnalytics.html @@ -1,7 +1,3 @@ ---- - -title: IncludeGoogleAnalytics.html ---- {% if site.analyticsId %} @@ -11,4 +7,4 @@ gtag('js', new Date()); gtag('config', '{{site.analyticsId}}'); -{% endif %} \ No newline at end of file +{% endif %} From 03cb9ead472a35d79e95062c8b53831b200df394 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:13:29 -0700 Subject: [PATCH 193/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- PSJekyll.PSJekyll.ps1 | 3 +- docs/_includes/Include4bitcss.html | 3 -- docs/_includes/IncludeGoogleAnalytics.html | 10 ----- docs/_includes/IncludeGoogleFont.html | 3 -- docs/_includes/IncludeImportMap.html | 14 ------- docs/_includes/IncludeOpenGraph.html | 46 ---------------------- 6 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 docs/_includes/Include4bitcss.html delete mode 100644 docs/_includes/IncludeGoogleAnalytics.html delete mode 100644 docs/_includes/IncludeGoogleFont.html delete mode 100644 docs/_includes/IncludeImportMap.html delete mode 100644 docs/_includes/IncludeOpenGraph.html diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 4b8fab8..c649e11 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -21,7 +21,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $templateFileType = $matches.0 - $templateFileName = $templateMethod.Name + $templateFileName = $templateMethod.Name -replace "^$templateFileType" if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' @@ -29,6 +29,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { $templateOut = $templateMethod.Invoke() $PSJekyll.CurrentSite.$templateFileType = $templateFileName, $templateOut } + $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include diff --git a/docs/_includes/Include4bitcss.html b/docs/_includes/Include4bitcss.html deleted file mode 100644 index be8372f..0000000 --- a/docs/_includes/Include4bitcss.html +++ /dev/null @@ -1,3 +0,0 @@ -<% if site.palette %> - -<% endif %> diff --git a/docs/_includes/IncludeGoogleAnalytics.html b/docs/_includes/IncludeGoogleAnalytics.html deleted file mode 100644 index 6e5cdf1..0000000 --- a/docs/_includes/IncludeGoogleAnalytics.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if site.analyticsId %} - - - -{% endif %} diff --git a/docs/_includes/IncludeGoogleFont.html b/docs/_includes/IncludeGoogleFont.html deleted file mode 100644 index 6aca5f3..0000000 --- a/docs/_includes/IncludeGoogleFont.html +++ /dev/null @@ -1,3 +0,0 @@ -<% if site.googleFont %> - -<% endif %> diff --git a/docs/_includes/IncludeImportMap.html b/docs/_includes/IncludeImportMap.html deleted file mode 100644 index 12a9c88..0000000 --- a/docs/_includes/IncludeImportMap.html +++ /dev/null @@ -1,14 +0,0 @@ -{% if site.data.imports %} - - -{% endif %} - diff --git a/docs/_includes/IncludeOpenGraph.html b/docs/_includes/IncludeOpenGraph.html deleted file mode 100644 index c8e4c5a..0000000 --- a/docs/_includes/IncludeOpenGraph.html +++ /dev/null @@ -1,46 +0,0 @@ - -{% if page.title %} - -{% elsif page.stylesheet %} - -{% else %} - -{% endif %} -{% if page.type %} - -{% else %} - -{% endif %} -{% if page.description %} - - - -{% elsif content %} - - - - - -{% elsif site.description %} - - - -{% endif %} -{% if page.date %} - -{% endif %} -{% if page.url %} - - - -{% endif %} - -{% if page.image %} - - - -{% elsif site.image %} - - - -{% endif %} From 3a338072e7974f47d9e3b06cbc14679b2f95e57f Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:14:42 +0000 Subject: [PATCH 194/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- docs/_includes/GoogleFont.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/GoogleFont.html diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html new file mode 100644 index 0000000..de3d8f4 --- /dev/null +++ b/docs/_includes/GoogleFont.html @@ -0,0 +1,3 @@ +<% if site.googleFont %> + +<% endif %> \ No newline at end of file From 201cd58e1862b1be1238ca8d3e39e55125603e56 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:14:42 +0000 Subject: [PATCH 195/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- docs/_includes/OpenGraph.html | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/_includes/OpenGraph.html diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html new file mode 100644 index 0000000..d9d5798 --- /dev/null +++ b/docs/_includes/OpenGraph.html @@ -0,0 +1,46 @@ + +{% if page.title %} + +{% elsif page.stylesheet %} + +{% else %} + +{% endif %} +{% if page.type %} + +{% else %} + +{% endif %} +{% if page.description %} + + + +{% elsif content %} + + + + + +{% elsif site.description %} + + + +{% endif %} +{% if page.date %} + +{% endif %} +{% if page.url %} + + + +{% endif %} + +{% if page.image %} + + + +{% elsif site.image %} + + + +{% endif %} \ No newline at end of file From 4f1d435c00d38efa48b10277a1938b93543db747 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:14:42 +0000 Subject: [PATCH 196/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- docs/_includes/4bitcss.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/4bitcss.html diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html new file mode 100644 index 0000000..cab662f --- /dev/null +++ b/docs/_includes/4bitcss.html @@ -0,0 +1,3 @@ +<% if site.palette %> + +<% endif %> \ No newline at end of file From 9b7c091d86f5009e6a6d3d57609fb55fd606e920 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:14:42 +0000 Subject: [PATCH 197/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- docs/_includes/GoogleAnalytics.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/_includes/GoogleAnalytics.html diff --git a/docs/_includes/GoogleAnalytics.html b/docs/_includes/GoogleAnalytics.html new file mode 100644 index 0000000..bde8fa8 --- /dev/null +++ b/docs/_includes/GoogleAnalytics.html @@ -0,0 +1,10 @@ +{% if site.analyticsId %} + + + +{% endif %} \ No newline at end of file From d8f2896c3997d0b4ee08c2cc426118f53469bd5c Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:14:42 +0000 Subject: [PATCH 198/769] feat: PSJekyll initial example ( Fixes #31 ) Propagating templates into includes and layouts, without the name prefix --- docs/_includes/ImportMap.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/_includes/ImportMap.html diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html new file mode 100644 index 0000000..a09c53e --- /dev/null +++ b/docs/_includes/ImportMap.html @@ -0,0 +1,13 @@ +{% if site.data.imports %} + + +{% endif %} From f1dad87939609ee482d2e22bfb21377f5ada6688 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:21:34 -0700 Subject: [PATCH 199/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) --- Types/PSJekyll.Template/LayoutDefault.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Types/PSJekyll.Template/LayoutDefault.ps1 diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 new file mode 100644 index 0000000..dc3b173 --- /dev/null +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -0,0 +1,18 @@ + +@" + + + + + + + {% include GoogleAnalytics.html %} + {% include ImportMap.html %} + {% include OpenGraph.html %} + {% include GoogleFont.html %} + {% include 4bitcss.html %} + + +{{content}} + +"@ \ No newline at end of file From 8d319fe556740fec057c9f050dff941e4f676eff Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 19:22:22 +0000 Subject: [PATCH 200/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) --- PSJekyll.types.ps1xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 02feed6..b7a5761 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1292,6 +1292,29 @@ if ($ImportMap) { + + LayoutDefault + + MinGemFile -{% endif %} \ No newline at end of file +{% endif %} From ba14e039707ac1ac26b6a1555a2e9ad1713040ca Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:22:32 +0000 Subject: [PATCH 206/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) --- docs/_includes/ImportMap.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html index a09c53e..12a9c88 100644 --- a/docs/_includes/ImportMap.html +++ b/docs/_includes/ImportMap.html @@ -11,3 +11,4 @@ {% endif %} + From 9bc5c77a5cd0145c8de20e13b089bf2ac9462d4d Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:26:54 -0700 Subject: [PATCH 207/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Adjusting conditionals --- Types/PSJekyll.Template/IncludeGoogleFont.ps1 | 4 ++-- docs/_layouts/Default.html | 19 ------------------- 2 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 docs/_layouts/Default.html diff --git a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 index 6dc48da..42cbd1c 100644 --- a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 +++ b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 @@ -16,9 +16,9 @@ if ($FontName) { "" } else { @( - "<% if site.googleFont %>" + "{% if site.googleFont %}" "" - "<% endif %>" + "{% endif %}" ) -join [Environment]::Newline } diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html deleted file mode 100644 index 6d13870..0000000 --- a/docs/_layouts/Default.html +++ /dev/null @@ -1,19 +0,0 @@ ---- - -title: Default.html ---- - - - - - - - {% include GoogleAnalytics.html %} - {% include ImportMap.html %} - {% include OpenGraph.html %} - {% include GoogleFont.html %} - {% include 4bitcss.html %} - - -{{content}} - \ No newline at end of file From 1cd760b9a3966af5c6b639e965de3d5778c2721a Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:28:40 -0700 Subject: [PATCH 208/769] feat: PSJekyll initial example ( Fixes #31 ) Always lowercasing default --- PSJekyll.PSJekyll.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index c649e11..9182062 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -23,6 +23,11 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { $templateFileName = $templateMethod.Name -replace "^$templateFileType" + # Correct the case of anything named "default" + if ($templateFileName -eq 'default') { + $templateFileName = 'default' + } + if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' } From f90add37514f53a767ef774379347176fc291b01 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 19:29:30 +0000 Subject: [PATCH 209/769] feat: PSJekyll initial example ( Fixes #31 ) Always lowercasing default --- PSJekyll.types.ps1xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index b7a5761..97a58a5 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1183,9 +1183,9 @@ if ($FontName) { "<link href='https://fonts.googleapis.com/css?family=$fontName' rel='stylesheet'>" } else { @( - "<% if site.googleFont %>" + "{% if site.googleFont %}" "<link href='https://fonts.googleapis.com/css?family={{site.googleFont}}' rel='stylesheet'>" - "<% endif %>" + "{% endif %}" ) -join [Environment]::Newline } From da12ba6af74a0b23c2bb136f0c956e023f00ae2d Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:29:41 +0000 Subject: [PATCH 210/769] feat: PSJekyll initial example ( Fixes #31 ) Always lowercasing default --- docs/_layouts/default.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/_layouts/default.html diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 0000000..f64c371 --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,19 @@ +--- + +title: default.html +--- + + + + + + + {% include GoogleAnalytics.html %} + {% include ImportMap.html %} + {% include OpenGraph.html %} + {% include GoogleFont.html %} + {% include 4bitcss.html %} + + +{{content}} + \ No newline at end of file From 8a1bd310ef3e31920596c515ffdf45609a6f5861 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:29:41 +0000 Subject: [PATCH 211/769] feat: PSJekyll initial example ( Fixes #31 ) Always lowercasing default --- docs/_includes/GoogleFont.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html index 6aca5f3..a53f1da 100644 --- a/docs/_includes/GoogleFont.html +++ b/docs/_includes/GoogleFont.html @@ -1,3 +1,3 @@ -<% if site.googleFont %> +{% if site.googleFont %} -<% endif %> +{% endif %} From 8c20ff347f9995e76f1a72b8feb61d61266a7e00 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:32:06 -0700 Subject: [PATCH 212/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting to Default in config, not correcting case --- PSJekyll.PSJekyll.ps1 | 11 +++++------ docs/_layouts/default.html | 19 ------------------- 2 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 docs/_layouts/default.html diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 9182062..9f0b228 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -12,6 +12,10 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ baseurl = "/" url = "https://psjekyll.powershellweb.com" permalink = 'pretty' + defaults = [Ordered]@{ + scope = @{path=''} + values = @{layout='Default'} + } } $PSJekyll.CurrentSite.Config @@ -21,12 +25,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $templateFileType = $matches.0 - $templateFileName = $templateMethod.Name -replace "^$templateFileType" - - # Correct the case of anything named "default" - if ($templateFileName -eq 'default') { - $templateFileName = 'default' - } + $templateFileName = $templateMethod.Name -replace "^$templateFileType" if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index f64c371..0000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,19 +0,0 @@ ---- - -title: default.html ---- - - - - - - - {% include GoogleAnalytics.html %} - {% include ImportMap.html %} - {% include OpenGraph.html %} - {% include GoogleFont.html %} - {% include 4bitcss.html %} - - -{{content}} - \ No newline at end of file From b75b676767acedb17e98dda52a4c06e5ad77fe75 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:33:00 +0000 Subject: [PATCH 213/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting to Default in config, not correcting case --- docs/_config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/_config.yml b/docs/_config.yml index a142b6e..850808e 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -4,3 +4,8 @@ description: A PowerShell module for creating Jekyll sites. baseurl: / url: https://psjekyll.powershellweb.com permalink: pretty +defaults: + scope: + path: + values: + layout: Default From 937798cdbdc61353653d4002ca902529ba03471e Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:33:00 +0000 Subject: [PATCH 214/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting to Default in config, not correcting case --- docs/_layouts/Default.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/_layouts/Default.html diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html new file mode 100644 index 0000000..6d13870 --- /dev/null +++ b/docs/_layouts/Default.html @@ -0,0 +1,19 @@ +--- + +title: Default.html +--- + + + + + + + {% include GoogleAnalytics.html %} + {% include ImportMap.html %} + {% include OpenGraph.html %} + {% include GoogleFont.html %} + {% include 4bitcss.html %} + + +{{content}} + \ No newline at end of file From 18dd7e6a1dc68a207c0b265edc054088acdd85a9 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:45:12 -0700 Subject: [PATCH 215/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) Fixing tagging --- Types/PSJekyll.Template/Include4bitcss.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Types/PSJekyll.Template/Include4bitcss.ps1 b/Types/PSJekyll.Template/Include4bitcss.ps1 index a78bc23..9592a49 100644 --- a/Types/PSJekyll.Template/Include4bitcss.ps1 +++ b/Types/PSJekyll.Template/Include4bitcss.ps1 @@ -9,9 +9,9 @@ if ($PaletteName) { "@ } else { @( - "<% if site.palette %>" + "{% if site.palette %}" '' - "<% endif %>" + "{% endif %}" ) -join [Environment]::Newline } From ac1fd9398ddc85e55ce84e02235611e971164ca7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 12:45:40 -0700 Subject: [PATCH 216/769] feat: PSJekyll initial example ( Fixes #31 ) Not setting defaults in config --- PSJekyll.PSJekyll.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 9f0b228..a1414e2 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -11,11 +11,7 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ description = "A PowerShell module for creating Jekyll sites." baseurl = "/" url = "https://psjekyll.powershellweb.com" - permalink = 'pretty' - defaults = [Ordered]@{ - scope = @{path=''} - values = @{layout='Default'} - } + permalink = 'pretty' } $PSJekyll.CurrentSite.Config From 5b7b6f2ea0d644ff4a526c52d8a70a5c20e9886c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 19:46:36 +0000 Subject: [PATCH 217/769] feat: PSJekyll initial example ( Fixes #31 ) Not setting defaults in config --- PSJekyll.types.ps1xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 97a58a5..753c506 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1133,9 +1133,9 @@ if ($PaletteName) { "@ } else { @( - "<% if site.palette %>" + "{% if site.palette %}" '<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/{{site.palette}}.css" />' - "<% endif %>" + "{% endif %}" ) -join [Environment]::Newline } From 9811d914b669e559422560df3ca95265ec7559af Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:46:45 +0000 Subject: [PATCH 218/769] feat: PSJekyll initial example ( Fixes #31 ) Not setting defaults in config --- docs/_config.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 850808e..a142b6e 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -4,8 +4,3 @@ description: A PowerShell module for creating Jekyll sites. baseurl: / url: https://psjekyll.powershellweb.com permalink: pretty -defaults: - scope: - path: - values: - layout: Default From 329870cd18b75210a7fb206eec527a1f2303c2ab Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:46:45 +0000 Subject: [PATCH 219/769] feat: PSJekyll initial example ( Fixes #31 ) Not setting defaults in config --- docs/_layouts/Default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index 6d13870..0fe5e94 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -16,4 +16,4 @@ {{content}} - \ No newline at end of file + From e7eaefcc0940f7b5906a8ffee04b23aff3e6ea8d Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 19:46:45 +0000 Subject: [PATCH 220/769] feat: PSJekyll initial example ( Fixes #31 ) Not setting defaults in config --- docs/_includes/4bitcss.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html index be8372f..38b754f 100644 --- a/docs/_includes/4bitcss.html +++ b/docs/_includes/4bitcss.html @@ -1,3 +1,3 @@ -<% if site.palette %> +{% if site.palette %} -<% endif %> +{% endif %} From 0d3c1cce70ba41cea8f865ec02bf7f48b580039e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 13:06:12 -0700 Subject: [PATCH 221/769] feat: PSJekyll initial example ( Fixes #31 ) Setting layout default and palette in config --- PSJekyll.PSJekyll.ps1 | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index a1414e2..bef5010 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -8,10 +8,13 @@ $PSJekyll.CurrentSite.Data # (this will generate more changes than necessary in the git repository, and will be noisier than desired) $PSJekyll.CurrentSite.Config = [Ordered]@{ title = "PSJekyll" - description = "A PowerShell module for creating Jekyll sites." - baseurl = "/" + description = "A PowerShell module for creating Jekyll sites." url = "https://psjekyll.powershellweb.com" - permalink = 'pretty' + permalink = 'pretty' + palette = 'Konsolas' + defaults = @([Ordered]@{ + values = @{layout='Default'} + }) } $PSJekyll.CurrentSite.Config @@ -21,7 +24,12 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $templateFileType = $matches.0 - $templateFileName = $templateMethod.Name -replace "^$templateFileType" + $templateFileName = $templateMethod.Name -replace "^$templateFileType" + + # Correct the case of anything named "default" + if ($templateFileName -eq 'default') { + $templateFileName = 'default' + } if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' From 315b697f9431af0bb0b07dc748bd9a8abfc9fb46 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 13:06:43 -0700 Subject: [PATCH 222/769] feat: PSJekyll initial example ( Fixes #31 ) Not correcting casing --- PSJekyll.PSJekyll.ps1 | 4 ---- docs/_layouts/Default.html | 19 ------------------- 2 files changed, 23 deletions(-) delete mode 100644 docs/_layouts/Default.html diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index bef5010..5b40855 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -26,10 +26,6 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { $templateFileName = $templateMethod.Name -replace "^$templateFileType" - # Correct the case of anything named "default" - if ($templateFileName -eq 'default') { - $templateFileName = 'default' - } if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html deleted file mode 100644 index 0fe5e94..0000000 --- a/docs/_layouts/Default.html +++ /dev/null @@ -1,19 +0,0 @@ ---- - -title: Default.html ---- - - - - - - - {% include GoogleAnalytics.html %} - {% include ImportMap.html %} - {% include OpenGraph.html %} - {% include GoogleFont.html %} - {% include 4bitcss.html %} - - -{{content}} - From def05f73d5730a1b29f5f0318708c924d0a26d55 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:07:44 +0000 Subject: [PATCH 223/769] feat: PSJekyll initial example ( Fixes #31 ) Not correcting casing --- docs/_config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index a142b6e..3bd020d 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,10 @@ title: PSJekyll description: A PowerShell module for creating Jekyll sites. -baseurl: / url: https://psjekyll.powershellweb.com permalink: pretty +palette: Konsolas +defaults: + - values: + layout: Default + From 77dc3a1673b05aee561e4dc4f480594aa2391f31 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:07:44 +0000 Subject: [PATCH 224/769] feat: PSJekyll initial example ( Fixes #31 ) Not correcting casing --- docs/_layouts/Default.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docs/_layouts/Default.html diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html new file mode 100644 index 0000000..6d13870 --- /dev/null +++ b/docs/_layouts/Default.html @@ -0,0 +1,19 @@ +--- + +title: Default.html +--- + + + + + + + {% include GoogleAnalytics.html %} + {% include ImportMap.html %} + {% include OpenGraph.html %} + {% include GoogleFont.html %} + {% include 4bitcss.html %} + + +{{content}} + \ No newline at end of file From 919a5366b85035297ecc9a1d4851bea427fd4983 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 13:34:01 -0700 Subject: [PATCH 225/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting google font to Noto Sans --- PSJekyll.PSJekyll.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 5b40855..141e818 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -12,6 +12,7 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ url = "https://psjekyll.powershellweb.com" permalink = 'pretty' palette = 'Konsolas' + googleFont = 'Noto Sans' defaults = @([Ordered]@{ values = @{layout='Default'} }) @@ -26,7 +27,6 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { $templateFileName = $templateMethod.Name -replace "^$templateFileType" - if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' } From 9a649ab871bc269f435dfb20fc1ce0afac1c2c77 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:35:10 +0000 Subject: [PATCH 226/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting google font to Noto Sans --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_config.yml b/docs/_config.yml index 3bd020d..2e7da34 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -4,6 +4,7 @@ description: A PowerShell module for creating Jekyll sites. url: https://psjekyll.powershellweb.com permalink: pretty palette: Konsolas +googleFont: Noto Sans defaults: - values: layout: Default From 99bdd91ebc360fadbbac87ebb3772ec3d21df9e6 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:35:11 +0000 Subject: [PATCH 227/769] feat: PSJekyll initial example ( Fixes #31 ) Defaulting google font to Noto Sans --- docs/_layouts/Default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index 6d13870..0fe5e94 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -16,4 +16,4 @@ {{content}} - \ No newline at end of file + From ae70fbf08108fc0b65b55c6be6fda55c3999d0e7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 13:45:08 -0700 Subject: [PATCH 228/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Adding style tag --- Types/PSJekyll.Template/IncludeGoogleFont.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 index 42cbd1c..05fb3c7 100644 --- a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 +++ b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 @@ -18,6 +18,7 @@ if ($FontName) { @( "{% if site.googleFont %}" "" + "" "{% endif %}" ) -join [Environment]::Newline } From 40de80ad9abf7833874f1ec7488ae659949011db Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 20:46:06 +0000 Subject: [PATCH 229/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Adding style tag --- PSJekyll.types.ps1xml | 1 + 1 file changed, 1 insertion(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 753c506..92c2261 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1185,6 +1185,7 @@ if ($FontName) { @( "{% if site.googleFont %}" "<link href='https://fonts.googleapis.com/css?family={{site.googleFont}}' rel='stylesheet'>" + "<style type='text/css'>font-family: {{site.googleFont}};</style>" "{% endif %}" ) -join [Environment]::Newline } From 7f990178b57be0a5ff0a460f04dc220133e7d80b Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:46:17 +0000 Subject: [PATCH 230/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Adding style tag --- docs/_includes/GoogleFont.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html index a53f1da..e54e2d8 100644 --- a/docs/_includes/GoogleFont.html +++ b/docs/_includes/GoogleFont.html @@ -1,3 +1,4 @@ {% if site.googleFont %} + {% endif %} From ef7621edd065b44aebf196cf57eb8320e22fe16b Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 13:50:39 -0700 Subject: [PATCH 231/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Applying to body --- Types/PSJekyll.Template/IncludeGoogleFont.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 index 05fb3c7..2fb50ea 100644 --- a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 +++ b/Types/PSJekyll.Template/IncludeGoogleFont.ps1 @@ -18,7 +18,7 @@ if ($FontName) { @( "{% if site.googleFont %}" "" - "" + "" "{% endif %}" ) -join [Environment]::Newline } From d32544ea45ff093fc838a64da60f15f86eafe26a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 20:51:28 +0000 Subject: [PATCH 232/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Applying to body --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 92c2261..e318ba1 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1185,7 +1185,7 @@ if ($FontName) { @( "{% if site.googleFont %}" "<link href='https://fonts.googleapis.com/css?family={{site.googleFont}}' rel='stylesheet'>" - "<style type='text/css'>font-family: {{site.googleFont}};</style>" + "<style type='text/css'>body { font-family: '{{site.googleFont}}',sans-serif } </style>" "{% endif %}" ) -join [Environment]::Newline } From 15ac638e47919ccd2a86afe690d7c6edec7150b3 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 20:51:39 +0000 Subject: [PATCH 233/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Applying to body --- docs/_includes/GoogleFont.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html index e54e2d8..6c6a600 100644 --- a/docs/_includes/GoogleFont.html +++ b/docs/_includes/GoogleFont.html @@ -1,4 +1,4 @@ {% if site.googleFont %} - + {% endif %} From c93386a006af8dd7ff1b864e3dde57976243353e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 14:05:08 -0700 Subject: [PATCH 234/769] feat: PSJekyll.Template.IncludeMargin ( Fixes #69 ) --- Types/PSJekyll.Template/IncludeMargin.ps1 | 27 +++++++++++++++++++++++ Types/PSJekyll.Template/LayoutDefault.ps1 | 1 + 2 files changed, 28 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeMargin.ps1 diff --git a/Types/PSJekyll.Template/IncludeMargin.ps1 b/Types/PSJekyll.Template/IncludeMargin.ps1 new file mode 100644 index 0000000..684a61c --- /dev/null +++ b/Types/PSJekyll.Template/IncludeMargin.ps1 @@ -0,0 +1,27 @@ +<# +.SYNOPSIS + Includes site margins +.DESCRIPTION + Includes site margins in the site. + + This will add a style tag with the margin. It should be located in the head of the site. + + If the margin parameter is provided, it will be used. Otherwise, the site.margin will be used. +#> +param( +# The margin to include. +[string] +$Margin +) + +if ($margin) { + "" +} else { + @( + "{% if site.margin %}" + "" + "{% else %}" + "" + "{% endif %}" + ) -join [Environment]::Newline +} diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 index dc3b173..08aea74 100644 --- a/Types/PSJekyll.Template/LayoutDefault.ps1 +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -11,6 +11,7 @@ {% include OpenGraph.html %} {% include GoogleFont.html %} {% include 4bitcss.html %} + {% include Margin.html %} {{content}} From eb039c371fab84947af263eae7e0a16b1c1a9e66 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 21:06:13 +0000 Subject: [PATCH 235/769] feat: PSJekyll.Template.IncludeMargin ( Fixes #69 ) Also updating LayoutDefault --- PSJekyll.types.ps1xml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index e318ba1..a05d2fe 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1236,6 +1236,39 @@ if ($ImportMap) { } + + IncludeMargin + + IncludeOpenGraph From 910944db264edb10ed29198d873eb1b784bc5935 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 21:41:50 +0000 Subject: [PATCH 250/769] feat: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Returning as single string. --- docs/_includes/GoogleFont.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html index e69de29..197888c 100644 --- a/docs/_includes/GoogleFont.html +++ b/docs/_includes/GoogleFont.html @@ -0,0 +1,14 @@ +{% if site.googleFont %} + + +{% else %} + + +{% endif %} +{% if site.codeFont %} + + +{% else %} + + +{% endif %} From 01609f60a2376ae85371ab5cf11ef231b7d05193 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 15:07:25 -0700 Subject: [PATCH 251/769] feat: PSJekyll.Template.InclueSitemap ( Fixes #70 ) Also, adding a sitemap page --- PSJekyll.PSJekyll.ps1 | 5 ++++- Types/PSJekyll.Template/IncludeSiteMap.ps1 | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Types/PSJekyll.Template/IncludeSiteMap.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 141e818..2f2855e 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -31,10 +31,13 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { $templateFileName += '.html' } $templateOut = $templateMethod.Invoke() - $PSJekyll.CurrentSite.$templateFileType = $templateFileName, $templateOut + $PSJekyll.CurrentSite.$templateFileType = $templateFileName, $templateOut } +$PSJekyll.CurrentSite.Page = 'SiteMap', "{% include SiteMap.html %}" + $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include +$PSJekyll.CurrentSite.Page Pop-Location \ No newline at end of file diff --git a/Types/PSJekyll.Template/IncludeSiteMap.ps1 b/Types/PSJekyll.Template/IncludeSiteMap.ps1 new file mode 100644 index 0000000..213a64e --- /dev/null +++ b/Types/PSJekyll.Template/IncludeSiteMap.ps1 @@ -0,0 +1,26 @@ +param() + +@' + +{% assign pages_by_url = site.pages | sort: "url" %} +{% assign page_depth = 0 %} + +{% for page in pages_by_url %} + {% if page.title == nil %} + {% continue %} + {% endif %} + {% assign page_parts = page.url | split: "/" %} + {% if page_parts.size > page_depth %} + {% assign page_depth = page_parts.size %} +
    + {% endif %} + {% if page_parts.size < page_depth %} + {% assign page_depth = page_parts.size %} +
+ {% endif %} +
  • +{{ page.title }} +
  • +{% endfor %} +
    +'@ \ No newline at end of file From 652b416f21cdf660acbd79f7114b33b48dfb9b94 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 22:08:28 +0000 Subject: [PATCH 252/769] feat: PSJekyll.Template.InclueSitemap ( Fixes #70 ) Also, adding a sitemap page --- PSJekyll.types.ps1xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 8b6f848..cd383fe 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1351,6 +1351,37 @@ body > * { margin: 1em; }
    + + IncludeSiteMap + + LayoutDefault -{% endif %} +{% endif %} \ No newline at end of file From 1609cb3b551c85a2e9ab80bd32a249f805c16841 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 22:31:19 +0000 Subject: [PATCH 265/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Simplifying Implementation by always using New-Item --- docs/_includes/Margin.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/Margin.html b/docs/_includes/Margin.html index 195df13..b478442 100644 --- a/docs/_includes/Margin.html +++ b/docs/_includes/Margin.html @@ -7,4 +7,4 @@ body > * { margin: .5em; } } -{% endif %} +{% endif %} \ No newline at end of file From 7738ffbfa3ccdd93eeeeaf64bab35f81f89a9d8c Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 22:31:19 +0000 Subject: [PATCH 266/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Simplifying Implementation by always using New-Item --- docs/_includes/SiteMap.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/SiteMap.html b/docs/_includes/SiteMap.html index 9aa8c94..9346d83 100644 --- a/docs/_includes/SiteMap.html +++ b/docs/_includes/SiteMap.html @@ -19,4 +19,4 @@ {{ page.title }} {% endfor %} - + \ No newline at end of file From 3b012d992a8deb8db6700afa8000e73ea362e7a9 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 22:31:19 +0000 Subject: [PATCH 267/769] feat: PSJekyll.Site.set_Include ( Fixes #50 ) Simplifying Implementation by always using New-Item --- docs/_includes/ImportMap.html | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html index 12a9c88..a09c53e 100644 --- a/docs/_includes/ImportMap.html +++ b/docs/_includes/ImportMap.html @@ -11,4 +11,3 @@ {% endif %} - From 173806621467542a6c9d4c9be8fd32dde9b46954 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 15:41:31 -0700 Subject: [PATCH 268/769] feat: PSJekyll.Template.InclueSitemap ( Fixes #70 ) Removing menu --- Types/PSJekyll.Template/IncludeSiteMap.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeSiteMap.ps1 b/Types/PSJekyll.Template/IncludeSiteMap.ps1 index e9bd439..1824ba3 100644 --- a/Types/PSJekyll.Template/IncludeSiteMap.ps1 +++ b/Types/PSJekyll.Template/IncludeSiteMap.ps1 @@ -1,7 +1,6 @@ param() @' - {% assign pages_by_url = site.pages | sort: "url" %} {% assign page_depth = 0 %} @@ -22,5 +21,4 @@ param() {{ page.title }} {% endfor %} - '@ \ No newline at end of file From c35413cb5fca3265f7d5857249181e468ba687a2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 22:42:27 +0000 Subject: [PATCH 269/769] feat: PSJekyll.Template.InclueSitemap ( Fixes #70 ) Removing menu --- PSJekyll.types.ps1xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 14c2b00..e95d7b8 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1354,7 +1354,6 @@ body > * { margin: 1em; } param() @' -<menu id='SiteMap'> {% assign pages_by_url = site.pages | sort: "url" %} {% assign page_depth = 0 %} @@ -1375,7 +1374,6 @@ body > * { margin: 1em; } <a href='{{page.url}}'>{{ page.title }}</a> </li> {% endfor %} -</menu> '@ From c556fbbf448a45cbdb5a8ffa84b5a89b2ab5b1e3 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 22:42:37 +0000 Subject: [PATCH 270/769] feat: PSJekyll.Template.InclueSitemap ( Fixes #70 ) Removing menu --- docs/_includes/SiteMap.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/_includes/SiteMap.html b/docs/_includes/SiteMap.html index 9346d83..b64882c 100644 --- a/docs/_includes/SiteMap.html +++ b/docs/_includes/SiteMap.html @@ -1,4 +1,3 @@ - {% assign pages_by_url = site.pages | sort: "url" %} {% assign page_depth = 0 %} @@ -18,5 +17,4 @@
  • {{ page.title }}
  • -{% endfor %} -
    \ No newline at end of file +{% endfor %} \ No newline at end of file From ba80398b6e11225989dc64cacd5940978ba22e9e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Sun, 6 Oct 2024 16:36:32 -0700 Subject: [PATCH 271/769] feat: PSJekyll.Template.IncludeStyleshet ( Fixes #60 ) --- Types/PSJekyll.Template/IncludeStylesheet.ps1 | 19 +++++++++++++++++++ Types/PSJekyll.Template/LayoutDefault.ps1 | 1 + 2 files changed, 20 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeStylesheet.ps1 diff --git a/Types/PSJekyll.Template/IncludeStylesheet.ps1 b/Types/PSJekyll.Template/IncludeStylesheet.ps1 new file mode 100644 index 0000000..d237723 --- /dev/null +++ b/Types/PSJekyll.Template/IncludeStylesheet.ps1 @@ -0,0 +1,19 @@ +param() + +@' +{% if site.data.stylesheet %} + {% for stylesheet in site.data.stylesheet %} + + {% endfor %} +{% endif %} +{% if page.stylesheet %} + {% for stylesheet in page.stylesheet %} + + {% endfor %} +{% endif %} +{% if include.stylesheet %} + {% for stylesheet in include.stylesheet %} + + {% endfor %} +{% endif %} +'@ \ No newline at end of file diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 index 08aea74..5ba4edf 100644 --- a/Types/PSJekyll.Template/LayoutDefault.ps1 +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -12,6 +12,7 @@ {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} + {% include Stylesheet.html %} {{content}} From 622c0d8401a14fac1f60ac709a9bc50516547712 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Sun, 6 Oct 2024 23:37:22 +0000 Subject: [PATCH 272/769] feat: PSJekyll.Template.IncludeStyleshet ( Fixes #60 ) --- PSJekyll.types.ps1xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index e95d7b8..c0f54d7 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1374,6 +1374,30 @@ body > * { margin: 1em; } <a href='{{page.url}}'>{{ page.title }}</a> </li> {% endfor %} +'@ + +
    + + IncludeStylesheet + @@ -1394,6 +1418,7 @@ body > * { margin: 1em; } {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} + {% include Stylesheet.html %} </head> <body> {{content}} From ac3d0d0437e5687fd882a19b11f246dbd18c347f Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 23:37:32 +0000 Subject: [PATCH 273/769] feat: PSJekyll.Template.IncludeStyleshet ( Fixes #60 ) --- docs/_layouts/Default.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index bb9e8ca..39a5a05 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -14,6 +14,7 @@ {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} + {% include Stylesheet.html %} {{content}} From 4e93fb1f8ca68506450af65b5ae1f78e78310cd3 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Sun, 6 Oct 2024 23:37:32 +0000 Subject: [PATCH 274/769] feat: PSJekyll.Template.IncludeStyleshet ( Fixes #60 ) --- docs/_includes/Stylesheet.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/_includes/Stylesheet.html diff --git a/docs/_includes/Stylesheet.html b/docs/_includes/Stylesheet.html new file mode 100644 index 0000000..3a32d64 --- /dev/null +++ b/docs/_includes/Stylesheet.html @@ -0,0 +1,15 @@ +{% if site.data.stylesheet %} + {% for stylesheet in site.data.stylesheet %} + + {% endfor %} +{% endif %} +{% if page.stylesheet %} + {% for stylesheet in page.stylesheet %} + + {% endfor %} +{% endif %} +{% if include.stylesheet %} + {% for stylesheet in include.stylesheet %} + + {% endfor %} +{% endif %} \ No newline at end of file From 6584a7f71e613178c07548419b09f688603af6bd Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 7 Oct 2024 14:33:17 -0700 Subject: [PATCH 275/769] feat: PSJekyll.Template.IncludeMyRepos ( Fixes #71 ) --- PSJekyll.PSJekyll.ps1 | 1 + Types/PSJekyll.Template/IncludeMyRepos.ps1 | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeMyRepos.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 2f2855e..ee9f3b4 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -35,6 +35,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $PSJekyll.CurrentSite.Page = 'SiteMap', "{% include SiteMap.html %}" +$PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.html %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include diff --git a/Types/PSJekyll.Template/IncludeMyRepos.ps1 b/Types/PSJekyll.Template/IncludeMyRepos.ps1 new file mode 100644 index 0000000..6a619be --- /dev/null +++ b/Types/PSJekyll.Template/IncludeMyRepos.ps1 @@ -0,0 +1,19 @@ +<# +.SYNOPSIS + Include my repositories. +.DESCRIPTION + Include my repositories in the site. + + This will add a list of the owner's repositories to the site. + + This will only work in GitHub Pages. +.LINK + https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md +#> +param() + +@' +{% for repository in site.github.public_repositories %} + * [{{ repository.name }}]({{ repository.html_url }}) +{% endfor %} +'@ From 929740e09850237682ec34a3d075dfd045748362 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Mon, 7 Oct 2024 21:34:13 +0000 Subject: [PATCH 276/769] feat: PSJekyll.Template.IncludeMyRepos ( Fixes #71 ) --- PSJekyll.types.ps1xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index c0f54d7..887310f 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1291,6 +1291,31 @@ body > * { margin: 1em; } + + IncludeMyRepos + + IncludeOpenGraph + + + IncludeCopyright + From 4ffa47e66f49eba8d50c2f85eab020a731eac816 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 00:12:40 +0000 Subject: [PATCH 306/769] feat: PSJekyll.Template.IncludeCopyright ( Fixes #73 ) --- docs/PSJekyll/Template/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md index ba8bad5..9f9d756 100644 --- a/docs/PSJekyll/Template/README.md +++ b/docs/PSJekyll/Template/README.md @@ -4,6 +4,7 @@ ### Script Methods +* [IncludeCopyright](IncludeCopyright.md) * [IncludeGoogleFont](IncludeGoogleFont.md) * [IncludeImportMap](IncludeImportMap.md) * [IncludeMargin](IncludeMargin.md) From c987a50a9ad452e6413300cbac1a453d79bde68d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 00:12:40 +0000 Subject: [PATCH 307/769] feat: PSJekyll.Template.IncludeCopyright ( Fixes #73 ) --- docs/PSJekyll/Template/IncludeCopyright.md | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/PSJekyll/Template/IncludeCopyright.md diff --git a/docs/PSJekyll/Template/IncludeCopyright.md b/docs/PSJekyll/Template/IncludeCopyright.md new file mode 100644 index 0000000..533b1c7 --- /dev/null +++ b/docs/PSJekyll/Template/IncludeCopyright.md @@ -0,0 +1,25 @@ +PSJekyll.Template.IncludeCopyright() +------------------------------------ + +### Synopsis +Includes a copyright notice + +--- + +### Description + +Include for a copyright notice. + +This can be included in Jekyll anytime a copyright notice is needed. + +--- + +### Parameters +#### **Copyright** +A custom copyright notice. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +--- From 7a6b6ca18fd579bc139b86aaa824e356a8c3551f Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 00:12:43 +0000 Subject: [PATCH 308/769] feat: PSJekyll.Template.IncludeCopyright ( Fixes #73 ) --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 540ba8f..5ae5110 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } From a8923f150ad006df3d9f367489908b71964169f0 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 00:12:43 +0000 Subject: [PATCH 309/769] feat: PSJekyll.Template.IncludeCopyright ( Fixes #73 ) --- docs/_includes/Copyright.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Copyright.html diff --git a/docs/_includes/Copyright.html b/docs/_includes/Copyright.html new file mode 100644 index 0000000..a160c7d --- /dev/null +++ b/docs/_includes/Copyright.html @@ -0,0 +1,9 @@ +© {% if page.copyright %} + {{page.copyright}} +{% elsif site.copyright %} + {{site.copyright}} +{% elsif site.data.PSModuleInfo.Copyright %} + {{site.data.PSModuleInfo.Copyright}} +{% else %} + {{ site.time | date: '%Y' }} {{ site.author }} +{% endif %} \ No newline at end of file From e4604ac0dbad959ff5ae14c8e98659025784fb6b Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Mon, 7 Oct 2024 21:40:26 -0700 Subject: [PATCH 310/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Letting page, site, or data declare an import map. Being alias happy. --- Types/PSJekyll.Template/IncludeImportMap.ps1 | 39 +++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeImportMap.ps1 b/Types/PSJekyll.Template/IncludeImportMap.ps1 index 38074bd..84c0cf3 100644 --- a/Types/PSJekyll.Template/IncludeImportMap.ps1 +++ b/Types/PSJekyll.Template/IncludeImportMap.ps1 @@ -6,7 +6,9 @@ This will add a script tag with the import map. It should be located in the head of the site. - If the importmap parameter is provided, it will be used. Otherwise, the site.data.imports will be used. + An importmap can be defined in the front matter of a page, in the site data, or in the site configuration. + + It may be called either `.imports` or `.importMap`. #> param( $ImportMap @@ -20,19 +22,30 @@ if ($ImportMap) { "" } else { @' -{% if site.data.imports %} +{% if page.imports %} + {% assign importMap = page.imports %} +{% elsif page.importMap %} + {% assign importMap = page.importMap %} +{% elsif site.imports %} + {% assign importMap = site.imports %} +{% elsif site.importMap %} + {% assign importMap = site.importMap %} +{% elseif site.data.imports %} + {% assign importMap = site.data.imports %} +{% elseif site.data.importMap %} + {% assign importMap = site.data.importMap %} +{% endif %} +{% if importMap %} - +{ + "imports": { + {% for eachImport in importMap %} + "{{eachImport[0]}}": "{{eachImport[1]}}"{% unless forloop.last %}, + {% endunless %} + {% endfor %} + } +} + {% endif %} - '@ } \ No newline at end of file From 92fcbfe46539ddad8383d36365db8e278ea215e4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 04:41:19 +0000 Subject: [PATCH 311/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Letting page, site, or data declare an import map. Being alias happy. --- PSJekyll.types.ps1xml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 8c4c9b6..da2b4d1 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1252,7 +1252,9 @@ if ($CodeFont) { This will add a script tag with the import map. It should be located in the head of the site. - If the importmap parameter is provided, it will be used. Otherwise, the site.data.imports will be used. + An importmap can be defined in the front matter of a page, in the site data, or in the site configuration. + + It may be called either `.imports` or `.importMap`. #> param( $ImportMap @@ -1266,20 +1268,31 @@ if ($ImportMap) { "</script>" } else { @' -{% if site.data.imports %} +{% if page.imports %} + {% assign importMap = page.imports %} +{% elsif page.importMap %} + {% assign importMap = page.importMap %} +{% elsif site.imports %} + {% assign importMap = site.imports %} +{% elsif site.importMap %} + {% assign importMap = site.importMap %} +{% elseif site.data.imports %} + {% assign importMap = site.data.imports %} +{% elseif site.data.importMap %} + {% assign importMap = site.data.importMap %} +{% endif %} +{% if importMap %} <script type="importmap"> - { - "imports": { - {% for eachImport in site.data.imports %} - "{{eachImport[0]}}": "{{eachImport[1]}}"{% unless forloop.last %}, - {% endunless %} - {% endfor %} - } - } -</script> - +{ + "imports": { + {% for eachImport in importMap %} + "{{eachImport[0]}}": "{{eachImport[1]}}"{% unless forloop.last %}, + {% endunless %} + {% endfor %} + } +} +</script> {% endif %} - '@ } From ba4be0c1745a02981ff2b0b56dbc1b331954c2a7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 04:41:28 +0000 Subject: [PATCH 312/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Letting page, site, or data declare an import map. Being alias happy. --- docs/PSJekyll/Template/IncludeImportMap.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/PSJekyll/Template/IncludeImportMap.md b/docs/PSJekyll/Template/IncludeImportMap.md index 84d134d..01b9e4f 100644 --- a/docs/PSJekyll/Template/IncludeImportMap.md +++ b/docs/PSJekyll/Template/IncludeImportMap.md @@ -12,7 +12,9 @@ Includes an import map in the site. This will add a script tag with the import map. It should be located in the head of the site. -If the importmap parameter is provided, it will be used. Otherwise, the site.data.imports will be used. +An importmap can be defined in the front matter of a page, in the site data, or in the site configuration. + +It may be called either `.imports` or `.importMap`. --- From f118a24704e5142f01928424e6f8bfe72dc9e77c Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 04:41:30 +0000 Subject: [PATCH 313/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Letting page, site, or data declare an import map. Being alias happy. --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 5ae5110..47ab8b9 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -20,8 +20,8 @@ "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } } From 9aaf3a7682e0986c35a03c32ad409ad1ffd0c761 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 04:41:31 +0000 Subject: [PATCH 314/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Letting page, site, or data declare an import map. Being alias happy. --- docs/_includes/ImportMap.html | 36 +++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html index a09c53e..5e45984 100644 --- a/docs/_includes/ImportMap.html +++ b/docs/_includes/ImportMap.html @@ -1,13 +1,25 @@ -{% if site.data.imports %} - - +{% if page.imports %} + {% assign importMap = page.imports %} +{% elsif page.importMap %} + {% assign importMap = page.importMap %} +{% elsif site.imports %} + {% assign importMap = site.imports %} +{% elsif site.importMap %} + {% assign importMap = site.importMap %} +{% elseif site.data.imports %} + {% assign importMap = site.data.imports %} +{% elseif site.data.importMap %} + {% assign importMap = site.data.importMap %} {% endif %} +{% if importMap %} + +{% endif %} \ No newline at end of file From 25a4e84795bf518649872c988426e7595b91f52d Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 09:00:38 -0700 Subject: [PATCH 315/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) Allowing page level palettes, adding id. --- Types/PSJekyll.Template/Include4bitcss.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Types/PSJekyll.Template/Include4bitcss.ps1 b/Types/PSJekyll.Template/Include4bitcss.ps1 index 9592a49..04173ed 100644 --- a/Types/PSJekyll.Template/Include4bitcss.ps1 +++ b/Types/PSJekyll.Template/Include4bitcss.ps1 @@ -5,12 +5,14 @@ $PaletteName if ($PaletteName) { @" - + "@ } else { @( - "{% if site.palette %}" - '' + "{% if page.palette %}" + '' + "{% elsif site.palette %}" + '' "{% endif %}" ) -join [Environment]::Newline } From 1bdd1932d5c63438d66f565450cf3ab04450258f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 16:01:46 +0000 Subject: [PATCH 316/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) Allowing page level palettes, adding id. --- PSJekyll.types.ps1xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index da2b4d1..7cc6ebd 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1125,12 +1125,14 @@ $PaletteName if ($PaletteName) { @" -<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/$($PaletteName -replace '\.css$').css" /> +<link rel="stylesheet" id="4bitcss" type="text/css" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/$($PaletteName -replace '\.css$').css" /> "@ } else { @( - "{% if site.palette %}" - '<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/{{site.palette}}.css" />' + "{% if page.palette %}" + '<link rel="stylesheet" type="text/css" id="4bitcss" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/{{page.palette}}.css" />' + "{% elsif site.palette %}" + '<link rel="stylesheet" type="text/css" id="4bitcss" href="https://cdn.jsdelivr.net/gh/2bitdesigns/4bitcss@latest/css/{{site.palette}}.css" />' "{% endif %}" ) -join [Environment]::Newline } From dadd81ec6cf0f1fef67db6393cc982cdb3de22e0 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 16:01:58 +0000 Subject: [PATCH 317/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) Allowing page level palettes, adding id. --- docs/_data/PSModuleInfo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 47ab8b9..8980f86 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + ] } } } From 97bdaa2b3f9b5b1a9170af72c6d7bbae234848d0 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 16:01:58 +0000 Subject: [PATCH 318/769] feat: PSJekyll.Template.Include4bitcss ( Fixes #63 ) Allowing page level palettes, adding id. --- docs/_includes/4bitcss.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html index 9915a9a..8d1ec76 100644 --- a/docs/_includes/4bitcss.html +++ b/docs/_includes/4bitcss.html @@ -1,3 +1,5 @@ -{% if site.palette %} - +{% if page.palette %} + +{% elsif site.palette %} + {% endif %} \ No newline at end of file From a2dbf813835235078571bcdbe74bd05dae4e05cb Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 10:48:40 -0700 Subject: [PATCH 319/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) --- Types/PSJekyll.Template/IncludeGitHubLink.ps1 | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeGitHubLink.ps1 diff --git a/Types/PSJekyll.Template/IncludeGitHubLink.ps1 b/Types/PSJekyll.Template/IncludeGitHubLink.ps1 new file mode 100644 index 0000000..8cc625f --- /dev/null +++ b/Types/PSJekyll.Template/IncludeGitHubLink.ps1 @@ -0,0 +1,23 @@ +<# +.SYNOPSIS + Includes a link to a GitHub repository. +.DESCRIPTION + Include for a link to a GitHub repository. + + This can be included in Jekyll anytime a link to a GitHub repository is needed. + + If no link is provided, the template will attempt to use the site's repository URL. + (this will only work in a GitHub page) +#> +param( +[uri] +$RepositoryUrl +) + +@(if ($RepositoryUrl) { + "[GitHub]($RepositoryUrl)" +} else { + "{% if site.github.repository_url %}" + "[GitHub]({{site.github.repository_url}})" + "{% endif %}" +}) -join [Environment]::Newline \ No newline at end of file From a18d07629cd91c705faf20a5c3a77b5da9586c29 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 17:49:50 +0000 Subject: [PATCH 320/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) --- PSJekyll.types.ps1xml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 7cc6ebd..081fd40 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1175,6 +1175,34 @@ if ($Copyright) { } + + IncludeGitHubLink + + IncludeGoogleAnalytics + + + IncludeFooter + @@ -1523,6 +1556,7 @@ param() </head> <body> {{content}} +{% include Footer.html %} </body> "@ From 868a9430d8a3cea6579b9c91b6200cb8064f31a4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 18:00:21 +0000 Subject: [PATCH 327/769] feat: PSJekyll.Template.IncludeFooter ( Fixes #75 ) Also, adding to LayoutDefault --- docs/PSJekyll/Template/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md index 2603b07..1a3705d 100644 --- a/docs/PSJekyll/Template/README.md +++ b/docs/PSJekyll/Template/README.md @@ -5,6 +5,7 @@ * [IncludeCopyright](IncludeCopyright.md) +* [IncludeFooter](IncludeFooter.md) * [IncludeGitHubLink](IncludeGitHubLink.md) * [IncludeGoogleFont](IncludeGoogleFont.md) * [IncludeImportMap](IncludeImportMap.md) From 2140f5c79c15d49ca897a839fed2b89e0c6f3592 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 18:00:22 +0000 Subject: [PATCH 328/769] feat: PSJekyll.Template.IncludeFooter ( Fixes #75 ) Also, adding to LayoutDefault --- docs/PSJekyll/Template/IncludeFooter.md | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/PSJekyll/Template/IncludeFooter.md diff --git a/docs/PSJekyll/Template/IncludeFooter.md b/docs/PSJekyll/Template/IncludeFooter.md new file mode 100644 index 0000000..b6e8633 --- /dev/null +++ b/docs/PSJekyll/Template/IncludeFooter.md @@ -0,0 +1,26 @@ +PSJekyll.Template.IncludeFooter() +--------------------------------- + +### Synopsis +Includes a footer + +--- + +### Description + +Include for a footer. + +This can be included in Jekyll anytime a footer is needed. + +It is automatically included below the content of any page. + +--- + +### Parameters +#### **Footer** + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Object]`|false |1 |false | + +--- From e39ab3b6d7edc808b802b3b8a8b1a48ab9e450b2 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:00:25 +0000 Subject: [PATCH 329/769] feat: PSJekyll.Template.IncludeFooter ( Fixes #75 ) Also, adding to LayoutDefault --- docs/_data/PSModuleInfo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 47ab8b9..b2b7701 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + ] } } } From 623b4c9fb9326405e25f88f747769318993b48aa Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:00:25 +0000 Subject: [PATCH 330/769] feat: PSJekyll.Template.IncludeFooter ( Fixes #75 ) Also, adding to LayoutDefault --- docs/_layouts/Default.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index 39a5a05..0db69e8 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -18,4 +18,5 @@ {{content}} +{% include Footer.html %} From 700d2fd445a15174364cfb311ae395ffc1f35fdf Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:00:25 +0000 Subject: [PATCH 331/769] feat: PSJekyll.Template.IncludeFooter ( Fixes #75 ) Also, adding to LayoutDefault --- docs/_includes/Footer.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Footer.html diff --git a/docs/_includes/Footer.html b/docs/_includes/Footer.html new file mode 100644 index 0000000..250a9fd --- /dev/null +++ b/docs/_includes/Footer.html @@ -0,0 +1,9 @@ +
    +{% if page.footer %} + {{page.footer}} +{% elsif site.footer %} + {{site.footer}} +{% else %} + {{include Copyright.html}} +{% endif %} +
    \ No newline at end of file From fbd77c8a097c663ec85f4467bb914f7d821efe50 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 11:07:15 -0700 Subject: [PATCH 332/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Fixing clauses --- Types/PSJekyll.Template/IncludeImportMap.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeImportMap.ps1 b/Types/PSJekyll.Template/IncludeImportMap.ps1 index 84c0cf3..e746e0a 100644 --- a/Types/PSJekyll.Template/IncludeImportMap.ps1 +++ b/Types/PSJekyll.Template/IncludeImportMap.ps1 @@ -30,9 +30,9 @@ if ($ImportMap) { {% assign importMap = site.imports %} {% elsif site.importMap %} {% assign importMap = site.importMap %} -{% elseif site.data.imports %} +{% elsif site.data.imports %} {% assign importMap = site.data.imports %} -{% elseif site.data.importMap %} +{% elsif site.data.importMap %} {% assign importMap = site.data.importMap %} {% endif %} {% if importMap %} From c0a07535faf6448ae49d0971ccd110b81465fe98 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 18:08:10 +0000 Subject: [PATCH 333/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Fixing clauses --- PSJekyll.types.ps1xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index fda6a72..49bfff3 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1339,9 +1339,9 @@ if ($ImportMap) { {% assign importMap = site.imports %} {% elsif site.importMap %} {% assign importMap = site.importMap %} -{% elseif site.data.imports %} +{% elsif site.data.imports %} {% assign importMap = site.data.imports %} -{% elseif site.data.importMap %} +{% elsif site.data.importMap %} {% assign importMap = site.data.importMap %} {% endif %} {% if importMap %} From ebd49e9e18fed6dd88d8789e2e16e16594830a28 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:08:21 +0000 Subject: [PATCH 334/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Fixing clauses --- docs/_data/PSModuleInfo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index b2b7701..5ae5110 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ] + ], + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } From c54e125bfaa6bbe601fd4c8eef95a5f18b2acff6 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:08:21 +0000 Subject: [PATCH 335/769] feat: PSJekyll.Template.IncludeImportMap ( Fixes #68 ) Fixing clauses --- docs/_includes/ImportMap.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html index 5e45984..af3a6ca 100644 --- a/docs/_includes/ImportMap.html +++ b/docs/_includes/ImportMap.html @@ -6,9 +6,9 @@ {% assign importMap = site.imports %} {% elsif site.importMap %} {% assign importMap = site.importMap %} -{% elseif site.data.imports %} +{% elsif site.data.imports %} {% assign importMap = site.data.imports %} -{% elseif site.data.importMap %} +{% elsif site.data.importMap %} {% assign importMap = site.data.importMap %} {% endif %} {% if importMap %} From afc1ecf720e8625be70f7e0bd1a94a823a6207eb Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 11:25:40 -0700 Subject: [PATCH 336/769] chore: PSJekyll.psd1 copyright --- PSJekyll.psd1 | 1 + 1 file changed, 1 insertion(+) diff --git a/PSJekyll.psd1 b/PSJekyll.psd1 index 06e3864..b8f52b2 100644 --- a/PSJekyll.psd1 +++ b/PSJekyll.psd1 @@ -6,6 +6,7 @@ TypesToProcess = @('PSJekyll.types.ps1xml') FormatsToProcess = @('PSJekyll.format.ps1xml') Author = 'James Brundage' + Copyright = '2024' CompanyName = 'PowerShellWeb' PrivateData = @{ PSData = @{ From 9809a6e67d34d61a446b0dae5cbecf8f01adc3a3 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Tue, 8 Oct 2024 18:26:47 +0000 Subject: [PATCH 337/769] chore: PSJekyll.psd1 copyright --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 5ae5110..f043611 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -9,7 +9,7 @@ "MinorRevision": -1 }, "Description": "Give Jekyll more power with PowerShell", - "Copyright": null, + "Copyright": "2024", "CompanyName": "PowerShellWeb", "Author": "James Brundage", "PrivateData": { From 48d92885d0168d7a38d609008fd84ee39ebda770 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 12:40:20 -0700 Subject: [PATCH 338/769] feat: PSJekyll.Template.IncludeMenuStyle ( Fixes #76 ) --- Types/PSJekyll.Template/IncludeMenuStyle.ps1 | 62 ++++++++++++++++++++ Types/PSJekyll.Template/LayoutDefault.ps1 | 1 + 2 files changed, 63 insertions(+) create mode 100644 Types/PSJekyll.Template/IncludeMenuStyle.ps1 diff --git a/Types/PSJekyll.Template/IncludeMenuStyle.ps1 b/Types/PSJekyll.Template/IncludeMenuStyle.ps1 new file mode 100644 index 0000000..01bb416 --- /dev/null +++ b/Types/PSJekyll.Template/IncludeMenuStyle.ps1 @@ -0,0 +1,62 @@ +param() + +@' + +'@ diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 index fa4b7f9..d2f7340 100644 --- a/Types/PSJekyll.Template/LayoutDefault.ps1 +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -13,6 +13,7 @@ {% include 4bitcss.html %} {% include Margin.html %} {% include Stylesheet.html %} + {% include MenuStyle.html %} {{content}} From 1af6ce184f0abfdd425b524c54b4d5ec3c748249 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 8 Oct 2024 19:41:27 +0000 Subject: [PATCH 339/769] feat: PSJekyll.Template.IncludeMenuStyle ( Fixes #76 ) --- PSJekyll.types.ps1xml | 69 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 49bfff3..f981886 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1400,6 +1400,74 @@ body > * { margin: 1em; } + + IncludeMenuStyle + + IncludeMyRepos + + IncludeMenu + + IncludeMenuStyle - - - IncludeMenuStyle - @@ -1659,8 +1728,7 @@ param() {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} - {% include Stylesheet.html %} - {% include MenuStyle.html %} + {% include Stylesheet.html %} </head> <body> {% include Menu.html %} From b71c5a5b67d5d2afb0055856d40f036156e8aa2f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 00:57:59 +0000 Subject: [PATCH 375/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding all menus and including menustyle inline --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index b959b3b..f043611 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } From 99d997aacac221dc2912143ad32a46fe3e6c13e3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 00:57:59 +0000 Subject: [PATCH 376/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding all menus and including menustyle inline --- docs/_layouts/Default.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index 96f07cb..ef75f19 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -14,8 +14,7 @@ {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} - {% include Stylesheet.html %} - {% include MenuStyle.html %} + {% include Stylesheet.html %} {% include Menu.html %} From 5dcbd4f37608388616e41209614e5a7d5d58feeb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 00:57:59 +0000 Subject: [PATCH 377/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding all menus and including menustyle inline --- docs/_includes/Menu.html | 139 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 008c38e..33fe599 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -13,7 +13,108 @@ {% unless site.NoGitHubLink or site.NoLink %} {{include.GitHubLink}} {% endunless %} -{% capture TopRightMenu %} +{% endcapture %} + +{% capture TopCenterMenu %} +{{page.menu.TopCenter}} +{{site.menu.TopCenter}} +{{site.data.menu.TopCenter}} +{% endcapture %} + +{% capture BottomLeftMenu %} +{{page.menu.BottomLeft}} +{{site.menu.BottomLeft}} +{{site.data.menu.BottomLeft}} +{% endcapture %} + +{% capture BottomRightMenu %} +{{page.menu.BottomRight}} +{{site.menu.BottomRight}} +{{site.data.menu.BottomRight}} +{% endcapture %} + +{% capture BottomCenterMenu %} +{{page.menu.BottomCenter}} +{{site.menu.BottomCenter}} +{{site.data.menu.BottomCenter}} +{% endcapture %} + +{% capture LeftCenterMenu %} +{{page.menu.LeftCenter}} +{{site.menu.LeftCenter}} +{{site.data.menu.LeftCenter}} +{% endcapture %} + +{% capture RightCenterMenu %} +{{page.menu.RightCenter}} +{{site.menu.RightCenter}} +{{site.data.menu.RightCenter}} +{% endcapture %} + +{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} + +{% endif %} + + {% if TopLeftMenu %} @@ -25,4 +126,40 @@ {{TopRightMenu}} +{% endif %} + +{% if TopCenterMenu %} + + {{TopCenterMenu}} + +{% endif %} + +{% if BottomLeftMenu %} + + {{BottomLeftMenu}} + +{% endif %} + +{% if BottomRightMenu %} + + {{BottomRightMenu}} + +{% endif %} + +{% if BottomCenterMenu %} + + {{BottomCenterMenu}} + +{% endif %} + +{% if LeftCenterMenu %} + + {{LeftCenterMenu}} + +{% endif %} + +{% if RightCenterMenu %} + + {{RightCenterMenu}} + {% endif %} \ No newline at end of file From b344ff9348491f2be775ffc3a93653e4d7e8a825 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:05:07 -0700 Subject: [PATCH 378/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Fixing menu styles and using more simple class names. Also stripping spaces in conditional. --- Types/PSJekyll.Template/IncludeMenu.ps1 | 92 ++++++++----------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeMenu.ps1 b/Types/PSJekyll.Template/IncludeMenu.ps1 index 27734e9..9aa74e7 100644 --- a/Types/PSJekyll.Template/IncludeMenu.ps1 +++ b/Types/PSJekyll.Template/IncludeMenu.ps1 @@ -15,7 +15,7 @@ param() {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include.GitHubLink}} + {{include GitHubLink}} {% endunless %} {% endcapture %} @@ -64,106 +64,70 @@ param() display: float; margin: 1em; } - {% if TopLeftMenu %} - menu .TopLeftMenu { - text-align: left; - top: 0; + menu[class~=Left] { left: 0; + text-align: left; } - {% endif %} - {% if TopRightMenu %} - menu .TopRightMenu { - text-align: right; - top: 0; - right: 0; - } - {% endif %} - {% if BottomRightMenu %} - menu .BottomRightMenu { - text-align: right; - bottom: 0; + menu[class~=Right] { right: 0; + text-align: right; } - {% endif %} - {% if TopCenterMenu %} - menu .TopCenterMenu { - text-align: center; - top: 0; - width: 100%; + menu[class~=Top] { + top: 0; } - {% endif %} - {% if BottomCenterMenu %} - menu .BottomCenterMenu { - text-align: center; - bottom: 0; - width: 100%; + menu[class~=Bottom] { + bottom: 0; } - {% endif %} - {% if LeftCenterMenu %} - menu .LeftCenterMenu { - text-align: left; - vertical-align: middle; - left: 0; - height: 100%; - } - {% endif %} - {% if RightCenterMenu %} - menu .RightCenterMenu { - text-align: right; - vertical-align: middle; - right: 0; - height: 100%; - } - {% endif %} + menu[class~=Center] { + text-align: center; + } {% endif %} - - -{% if TopLeftMenu %} - +{% if TopLeftMenu | strip %} + {{TopLeftMenu}} {% endif %} -{% if TopRightMenu %} - +{% if TopRightMenu | strip %} + {{TopRightMenu}} {% endif %} -{% if TopCenterMenu %} - +{% if TopCenterMenu | strip %} + {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu %} - +{% if BottomLeftMenu | strip %} + {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu %} - +{% if BottomRightMenu | strip %} + {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu %} - +{% if BottomCenterMenu | strip %} + {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu %} - +{% if LeftCenterMenu | strip %} + {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu %} - +{% if RightCenterMenu | strip %} + {{RightCenterMenu}} {% endif %} From faa92a54792a3db91b393af0c29b8635dbd23bd2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:06:03 +0000 Subject: [PATCH 379/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Fixing menu styles and using more simple class names. Also stripping spaces in conditional. --- PSJekyll.types.ps1xml | 92 +++++++++++++------------------------------ 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 24c0cd2..447f640 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1420,7 +1420,7 @@ body > * { margin: 1em; } {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include.GitHubLink}} + {{include GitHubLink}} {% endunless %} {% endcapture %} @@ -1469,106 +1469,70 @@ body > * { margin: 1em; } display: float; margin: 1em; } - {% if TopLeftMenu %} - menu .TopLeftMenu { - text-align: left; - top: 0; + menu[class~=Left] { left: 0; + text-align: left; } - {% endif %} - {% if TopRightMenu %} - menu .TopRightMenu { - text-align: right; - top: 0; - right: 0; - } - {% endif %} - {% if BottomRightMenu %} - menu .BottomRightMenu { - text-align: right; - bottom: 0; + menu[class~=Right] { right: 0; + text-align: right; } - {% endif %} - {% if TopCenterMenu %} - menu .TopCenterMenu { - text-align: center; - top: 0; - width: 100%; - } - {% endif %} - {% if BottomCenterMenu %} - menu .BottomCenterMenu { - text-align: center; - bottom: 0; - width: 100%; - } - {% endif %} - {% if LeftCenterMenu %} - menu .LeftCenterMenu { - text-align: left; - vertical-align: middle; - left: 0; - height: 100%; + menu[class~=Top] { + top: 0; } - {% endif %} - {% if RightCenterMenu %} - menu .RightCenterMenu { - text-align: right; - vertical-align: middle; - right: 0; - height: 100%; + menu[class~=Bottom] { + bottom: 0; } - {% endif %} + menu[class~=Center] { + text-align: center; + } </style> {% endif %} - - -{% if TopLeftMenu %} -<menu class='TopLeftMenu'> +{% if TopLeftMenu | strip %} +<menu class='Top Left'> {{TopLeftMenu}} </menu> {% endif %} -{% if TopRightMenu %} -<menu class='TopRightMenu'> +{% if TopRightMenu | strip %} +<menu class='Top Right'> {{TopRightMenu}} </menu> {% endif %} -{% if TopCenterMenu %} -<menu class='TopCenterMenu'> +{% if TopCenterMenu | strip %} +<menu class='Top Center'> {{TopCenterMenu}} </menu> {% endif %} -{% if BottomLeftMenu %} -<menu class='BottomLeftMenu'> +{% if BottomLeftMenu | strip %} +<menu class='Bottom Left'> {{BottomLeftMenu}} </menu> {% endif %} -{% if BottomRightMenu %} -<menu class='BottomRightMenu'> +{% if BottomRightMenu | strip %} +<menu class='Bottom Right'> {{BottomRightMenu}} </menu> {% endif %} -{% if BottomCenterMenu %} -<menu class='BottomCenterMenu'> +{% if BottomCenterMenu | strip %} +<menu class='Bottom Center'> {{BottomCenterMenu}} </menu> {% endif %} -{% if LeftCenterMenu %} -<menu class='LeftCenterMenu'> +{% if LeftCenterMenu | strip %} +<menu class='Left Center'> {{LeftCenterMenu}} </menu> {% endif %} -{% if RightCenterMenu %} -<menu class='RightCenterMenu'> +{% if RightCenterMenu | strip %} +<menu class='Right Center'> {{RightCenterMenu}} </menu> {% endif %} From d01de3bb68df45570fc1109070361d83f96655a4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:06:15 +0000 Subject: [PATCH 380/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Fixing menu styles and using more simple class names. Also stripping spaces in conditional. --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index f043611..edcbd10 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -20,8 +20,8 @@ "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } } From df3e90608726ce42c29753f87d33c4b0a9daa960 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:06:15 +0000 Subject: [PATCH 381/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Fixing menu styles and using more simple class names. Also stripping spaces in conditional. --- docs/_includes/Menu.html | 92 ++++++++++++---------------------------- 1 file changed, 28 insertions(+), 64 deletions(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 33fe599..48deaba 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -11,7 +11,7 @@ {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include.GitHubLink}} + {{include GitHubLink}} {% endunless %} {% endcapture %} @@ -60,106 +60,70 @@ display: float; margin: 1em; } - {% if TopLeftMenu %} - menu .TopLeftMenu { - text-align: left; - top: 0; + menu[class~=Left] { left: 0; + text-align: left; } - {% endif %} - {% if TopRightMenu %} - menu .TopRightMenu { - text-align: right; - top: 0; - right: 0; - } - {% endif %} - {% if BottomRightMenu %} - menu .BottomRightMenu { - text-align: right; - bottom: 0; + menu[class~=Right] { right: 0; + text-align: right; } - {% endif %} - {% if TopCenterMenu %} - menu .TopCenterMenu { - text-align: center; - top: 0; - width: 100%; + menu[class~=Top] { + top: 0; } - {% endif %} - {% if BottomCenterMenu %} - menu .BottomCenterMenu { - text-align: center; - bottom: 0; - width: 100%; + menu[class~=Bottom] { + bottom: 0; } - {% endif %} - {% if LeftCenterMenu %} - menu .LeftCenterMenu { - text-align: left; - vertical-align: middle; - left: 0; - height: 100%; - } - {% endif %} - {% if RightCenterMenu %} - menu .RightCenterMenu { - text-align: right; - vertical-align: middle; - right: 0; - height: 100%; - } - {% endif %} + menu[class~=Center] { + text-align: center; + } {% endif %} - - -{% if TopLeftMenu %} - +{% if TopLeftMenu | strip %} + {{TopLeftMenu}} {% endif %} -{% if TopRightMenu %} - +{% if TopRightMenu | strip %} + {{TopRightMenu}} {% endif %} -{% if TopCenterMenu %} - +{% if TopCenterMenu | strip %} + {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu %} - +{% if BottomLeftMenu | strip %} + {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu %} - +{% if BottomRightMenu | strip %} + {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu %} - +{% if BottomCenterMenu | strip %} + {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu %} - +{% if LeftCenterMenu | strip %} + {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu %} - +{% if RightCenterMenu | strip %} + {{RightCenterMenu}} {% endif %} \ No newline at end of file From 8744c9d3ad2b5a4d02aae1a9cc33426cfeffa858 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:15:31 -0700 Subject: [PATCH 382/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Stripping values earlier. Fixing menu centering. --- Types/PSJekyll.Template/IncludeMenu.ps1 | 40 ++++++++++++++++++------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeMenu.ps1 b/Types/PSJekyll.Template/IncludeMenu.ps1 index 9aa74e7..cc659da 100644 --- a/Types/PSJekyll.Template/IncludeMenu.ps1 +++ b/Types/PSJekyll.Template/IncludeMenu.ps1 @@ -9,51 +9,59 @@ param() {{site.data.menu.TopLeft}} {% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %}} {% capture TopRightMenu %} -{{page.menu.TopRight}} -{{site.menu.TopRight}} -{{site.data.menu.TopRight}} -{% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} -{% endunless %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {{include GitHubLink}} + {% endunless %} {% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} {% capture TopCenterMenu %} -{{page.menu.TopCenter}} -{{site.menu.TopCenter}} -{{site.data.menu.TopCenter}} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} {% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} {% capture BottomLeftMenu %} {{page.menu.BottomLeft}} {{site.menu.BottomLeft}} {{site.data.menu.BottomLeft}} {% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} {% capture BottomRightMenu %} {{page.menu.BottomRight}} {{site.menu.BottomRight}} {{site.data.menu.BottomRight}} {% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} {% capture BottomCenterMenu %} {{page.menu.BottomCenter}} {{site.menu.BottomCenter}} {{site.data.menu.BottomCenter}} {% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} {% capture LeftCenterMenu %} {{page.menu.LeftCenter}} {{site.menu.LeftCenter}} {{site.data.menu.LeftCenter}} {% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} {% capture RightCenterMenu %} {{page.menu.RightCenter}} {{site.menu.RightCenter}} {{site.data.menu.RightCenter}} {% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} {% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} {% endif %} From 2020b29fc5097e921039ce86ac37b928ffeade3f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:16:39 +0000 Subject: [PATCH 383/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Stripping values earlier. Fixing menu centering. --- PSJekyll.types.ps1xml | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 447f640..2a117b0 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1414,51 +1414,59 @@ body > * { margin: 1em; } {{site.data.menu.TopLeft}} {% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %}} {% capture TopRightMenu %} -{{page.menu.TopRight}} -{{site.menu.TopRight}} -{{site.data.menu.TopRight}} -{% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} -{% endunless %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {{include GitHubLink}} + {% endunless %} {% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} {% capture TopCenterMenu %} -{{page.menu.TopCenter}} -{{site.menu.TopCenter}} -{{site.data.menu.TopCenter}} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} {% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} {% capture BottomLeftMenu %} {{page.menu.BottomLeft}} {{site.menu.BottomLeft}} {{site.data.menu.BottomLeft}} {% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} {% capture BottomRightMenu %} {{page.menu.BottomRight}} {{site.menu.BottomRight}} {{site.data.menu.BottomRight}} {% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} {% capture BottomCenterMenu %} {{page.menu.BottomCenter}} {{site.menu.BottomCenter}} {{site.data.menu.BottomCenter}} {% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} {% capture LeftCenterMenu %} {{page.menu.LeftCenter}} {{site.menu.LeftCenter}} {{site.data.menu.LeftCenter}} {% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} {% capture RightCenterMenu %} {{page.menu.RightCenter}} {{site.menu.RightCenter}} {{site.data.menu.RightCenter}} {% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} {% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} <style> @@ -1485,7 +1493,19 @@ body > * { margin: 1em; } } menu[class~=Center] { text-align: center; - } + } + .Top .Center { + width: 100%; + } + .Left .Center { + height: 100%; + } + .Right .Center { + height: 100%; + } + .Bottom .Center { + width: 100%; + } </style> {% endif %} From a5b5aaefa2c9cbe174fb45b2a506ab40360f2a33 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:16:51 +0000 Subject: [PATCH 384/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Stripping values earlier. Fixing menu centering. --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index edcbd10..fbdc106 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } From c681379092cf567e28d3526bf31926efed6fdcc3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:16:51 +0000 Subject: [PATCH 385/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Stripping values earlier. Fixing menu centering. --- docs/_includes/Menu.html | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 48deaba..6445e08 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -5,51 +5,59 @@ {{site.data.menu.TopLeft}} {% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %}} {% capture TopRightMenu %} -{{page.menu.TopRight}} -{{site.menu.TopRight}} -{{site.data.menu.TopRight}} -{% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} -{% endunless %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {{include GitHubLink}} + {% endunless %} {% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} {% capture TopCenterMenu %} -{{page.menu.TopCenter}} -{{site.menu.TopCenter}} -{{site.data.menu.TopCenter}} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} {% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} {% capture BottomLeftMenu %} {{page.menu.BottomLeft}} {{site.menu.BottomLeft}} {{site.data.menu.BottomLeft}} {% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} {% capture BottomRightMenu %} {{page.menu.BottomRight}} {{site.menu.BottomRight}} {{site.data.menu.BottomRight}} {% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} {% capture BottomCenterMenu %} {{page.menu.BottomCenter}} {{site.menu.BottomCenter}} {{site.data.menu.BottomCenter}} {% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} {% capture LeftCenterMenu %} {{page.menu.LeftCenter}} {{site.menu.LeftCenter}} {{site.data.menu.LeftCenter}} {% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} {% capture RightCenterMenu %} {{page.menu.RightCenter}} {{site.menu.RightCenter}} {{site.data.menu.RightCenter}} {% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} {% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} {% endif %} From 1ebbbabb469be04470136407d28aa2d121e63b73 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:18:20 -0700 Subject: [PATCH 386/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Not stripping in conditionals, fixing include format. --- Types/PSJekyll.Template/IncludeMenu.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeMenu.ps1 b/Types/PSJekyll.Template/IncludeMenu.ps1 index cc659da..57a0ff2 100644 --- a/Types/PSJekyll.Template/IncludeMenu.ps1 +++ b/Types/PSJekyll.Template/IncludeMenu.ps1 @@ -16,7 +16,7 @@ param() {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} + {% include GitHubLink %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} @@ -104,49 +104,49 @@ param() {% endif %} -{% if TopLeftMenu | strip %} +{% if TopLeftMenu %} {{TopLeftMenu}} {% endif %} -{% if TopRightMenu | strip %} +{% if TopRightMenu %} {{TopRightMenu}} {% endif %} -{% if TopCenterMenu | strip %} +{% if TopCenterMenu %} {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu | strip %} +{% if BottomLeftMenu %} {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu | strip %} +{% if BottomRightMenu %} {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu | strip %} +{% if BottomCenterMenu %} {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu | strip %} +{% if LeftCenterMenu %} {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu | strip %} +{% if RightCenterMenu %} {{RightCenterMenu}} From 3b94e741de9b95f7756216d1b30ee442e9b2a208 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:19:34 +0000 Subject: [PATCH 387/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Not stripping in conditionals, fixing include format. --- PSJekyll.types.ps1xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 2a117b0..27497e5 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1421,7 +1421,7 @@ body > * { margin: 1em; } {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} + {% include GitHubLink %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} @@ -1509,49 +1509,49 @@ body > * { margin: 1em; } </style> {% endif %} -{% if TopLeftMenu | strip %} +{% if TopLeftMenu %} <menu class='Top Left'> {{TopLeftMenu}} </menu> {% endif %} -{% if TopRightMenu | strip %} +{% if TopRightMenu %} <menu class='Top Right'> {{TopRightMenu}} </menu> {% endif %} -{% if TopCenterMenu | strip %} +{% if TopCenterMenu %} <menu class='Top Center'> {{TopCenterMenu}} </menu> {% endif %} -{% if BottomLeftMenu | strip %} +{% if BottomLeftMenu %} <menu class='Bottom Left'> {{BottomLeftMenu}} </menu> {% endif %} -{% if BottomRightMenu | strip %} +{% if BottomRightMenu %} <menu class='Bottom Right'> {{BottomRightMenu}} </menu> {% endif %} -{% if BottomCenterMenu | strip %} +{% if BottomCenterMenu %} <menu class='Bottom Center'> {{BottomCenterMenu}} </menu> {% endif %} -{% if LeftCenterMenu | strip %} +{% if LeftCenterMenu %} <menu class='Left Center'> {{LeftCenterMenu}} </menu> {% endif %} -{% if RightCenterMenu | strip %} +{% if RightCenterMenu %} <menu class='Right Center'> {{RightCenterMenu}} </menu> From 6b5b983cbb87bc7beb7252ddc7c1d39cd9d8171d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:19:45 +0000 Subject: [PATCH 388/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Not stripping in conditionals, fixing include format. --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index fbdc106..edcbd10 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } } From 68930a0b68ef22499f800ef3630374132dbb6085 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:19:46 +0000 Subject: [PATCH 389/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Not stripping in conditionals, fixing include format. --- docs/_includes/Menu.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 6445e08..8dd51ad 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -12,7 +12,7 @@ {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {{include GitHubLink}} + {% include GitHubLink %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} @@ -100,49 +100,49 @@ {% endif %} -{% if TopLeftMenu | strip %} +{% if TopLeftMenu %} {{TopLeftMenu}} {% endif %} -{% if TopRightMenu | strip %} +{% if TopRightMenu %} {{TopRightMenu}} {% endif %} -{% if TopCenterMenu | strip %} +{% if TopCenterMenu %} {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu | strip %} +{% if BottomLeftMenu %} {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu | strip %} +{% if BottomRightMenu %} {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu | strip %} +{% if BottomCenterMenu %} {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu | strip %} +{% if LeftCenterMenu %} {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu | strip %} +{% if RightCenterMenu %} {{RightCenterMenu}} From 124b525dda8eac6b441050a147bb51ca00f28225 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:21:22 -0700 Subject: [PATCH 390/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding include extension --- Types/PSJekyll.Template/IncludeMenu.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/IncludeMenu.ps1 b/Types/PSJekyll.Template/IncludeMenu.ps1 index 57a0ff2..db74acd 100644 --- a/Types/PSJekyll.Template/IncludeMenu.ps1 +++ b/Types/PSJekyll.Template/IncludeMenu.ps1 @@ -16,7 +16,7 @@ param() {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink %} + {% include GitHubLink.html %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} From 8059a746d347630d1f257202ec8be698e3f4d381 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:22:23 +0000 Subject: [PATCH 391/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding include extension --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 27497e5..4ef59fa 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1421,7 +1421,7 @@ body > * { margin: 1em; } {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink %} + {% include GitHubLink.html %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} From 616e2656574405e20182379a6f1814349f844590 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:22:35 +0000 Subject: [PATCH 392/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding include extension --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index edcbd10..b959b3b 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } From ae2b6db6929a48a297901e25326fb4c7ff4e9d32 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:22:35 +0000 Subject: [PATCH 393/769] feat: PSJekyll.Template.IncludeMenu ( Fixes #77 ) Adding include extension --- docs/_includes/Menu.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 8dd51ad..29deaf4 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -12,7 +12,7 @@ {{site.menu.TopRight}} {{site.data.menu.TopRight}} {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink %} + {% include GitHubLink.html %} {% endunless %} {% endcapture %} {% assign TopRightMenu = TopRightMenu | strip %} From 8759d993082ec2ff3a12341f22f4d5935c095a19 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:29:23 -0700 Subject: [PATCH 394/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Returning HTML --- Types/PSJekyll.Template/IncludeGitHubLink.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Types/PSJekyll.Template/IncludeGitHubLink.ps1 b/Types/PSJekyll.Template/IncludeGitHubLink.ps1 index 8cc625f..5fa0637 100644 --- a/Types/PSJekyll.Template/IncludeGitHubLink.ps1 +++ b/Types/PSJekyll.Template/IncludeGitHubLink.ps1 @@ -15,9 +15,9 @@ $RepositoryUrl ) @(if ($RepositoryUrl) { - "[GitHub]($RepositoryUrl)" + "GitHub" } else { "{% if site.github.repository_url %}" - "[GitHub]({{site.github.repository_url}})" + "GitHub" "{% endif %}" }) -join [Environment]::Newline \ No newline at end of file From 9f20ef2c702dd60cddca186007d1778ccbd63b8c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:30:34 +0000 Subject: [PATCH 395/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Returning HTML --- PSJekyll.types.ps1xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 4ef59fa..ce15ac0 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1228,10 +1228,10 @@ $RepositoryUrl ) @(if ($RepositoryUrl) { - "[GitHub]($RepositoryUrl)" + "<a href='$RepositoryUrl'>GitHub</a>" } else { "{% if site.github.repository_url %}" - "[GitHub]({{site.github.repository_url}})" + "<a href='{{site.github.repository_url}}'>GitHub</a>" "{% endif %}" }) -join [Environment]::Newline From 2f348292d91ea62c3eac28c5a762f3031a4bd4cd Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:30:45 +0000 Subject: [PATCH 396/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Returning HTML --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index b959b3b..edcbd10 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } From 48a46ef42707cf67355f6de0a295e0150cfc9278 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:30:45 +0000 Subject: [PATCH 397/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Returning HTML --- docs/_includes/GitHubLink.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/GitHubLink.html b/docs/_includes/GitHubLink.html index fb9d9e7..3752c46 100644 --- a/docs/_includes/GitHubLink.html +++ b/docs/_includes/GitHubLink.html @@ -1,3 +1,3 @@ {% if site.github.repository_url %} -[GitHub]({{site.github.repository_url}}) +GitHub {% endif %} \ No newline at end of file From 768e668d9b1097dd1bb7e14327cc1722193672cd Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 18:35:23 -0700 Subject: [PATCH 398/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Renaming to Include.GitHubLink --- PSJekyll.PSJekyll.ps1 | 4 +-- ...ubLink.ps1 => Include.GitHubLink.html.ps1} | 0 docs/PSJekyll/Template/IncludeGitHubLink.md | 27 ------------------- 3 files changed, 2 insertions(+), 29 deletions(-) rename Types/PSJekyll.Template/{IncludeGitHubLink.ps1 => Include.GitHubLink.html.ps1} (100%) delete mode 100644 docs/PSJekyll/Template/IncludeGitHubLink.md diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index d340a4d..13a224f 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -65,12 +65,12 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ $PSJekyll.CurrentSite.Config foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { - if ($templateMethod.Name -notmatch '^(?>layout|include)') { + if ($templateMethod.Name -notmatch '^(?>layout|include)\p{P}+') { continue } $templateFileType = $matches.0 - $templateFileName = $templateMethod.Name -replace "^$templateFileType" + $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))" if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' diff --git a/Types/PSJekyll.Template/IncludeGitHubLink.ps1 b/Types/PSJekyll.Template/Include.GitHubLink.html.ps1 similarity index 100% rename from Types/PSJekyll.Template/IncludeGitHubLink.ps1 rename to Types/PSJekyll.Template/Include.GitHubLink.html.ps1 diff --git a/docs/PSJekyll/Template/IncludeGitHubLink.md b/docs/PSJekyll/Template/IncludeGitHubLink.md deleted file mode 100644 index b6ab035..0000000 --- a/docs/PSJekyll/Template/IncludeGitHubLink.md +++ /dev/null @@ -1,27 +0,0 @@ -PSJekyll.Template.IncludeGitHubLink() -------------------------------------- - -### Synopsis -Includes a link to a GitHub repository. - ---- - -### Description - -Include for a link to a GitHub repository. - -This can be included in Jekyll anytime a link to a GitHub repository is needed. - -If no link is provided, the template will attempt to use the site's repository URL. -(this will only work in a GitHub page) - ---- - -### Parameters -#### **RepositoryUrl** - -|Type |Required|Position|PipelineInput| -|-------|--------|--------|-------------| -|`[Uri]`|false |1 |false | - ---- From 590e4031ba487d0d106c7f79ebbc5961bfeb9aed Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 01:36:11 +0000 Subject: [PATCH 399/769] feat: PSJekyll.Template.IncludeGitHubLink ( Fixes #74 ) Renaming to Include.GitHubLink --- PSJekyll.types.ps1xml | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ce15ac0..a186743 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1115,6 +1115,34 @@ Set-Content -Path ( PSJekyll.Template + + Include.GitHubLink.html + + Include4bitcss - - IncludeGitHubLink - - IncludeGoogleAnalytics + + Include.Menu.html + + Include4bitcss - - IncludeMenu - - IncludeMyRepos + + + Include.Copyright.html + + Include.GitHubLink.html + + Include.GoogleAnalytics.html + + Include.Menu.html - - Include4bitcss - - - - IncludeCopyright - - IncludeFooter - - IncludeGoogleAnalytics - - IncludeGoogleFont + +{% endif %} \ No newline at end of file From ec0bae3ffcee2fc80d8177561dae802f2f2446d5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:11:07 +0000 Subject: [PATCH 419/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling --- docs/_includes/.Menu.html | 147 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/_includes/.Menu.html diff --git a/docs/_includes/.Menu.html b/docs/_includes/.Menu.html new file mode 100644 index 0000000..20aabdc --- /dev/null +++ b/docs/_includes/.Menu.html @@ -0,0 +1,147 @@ +{% capture TopLeftMenu %} + {{page.menu.TopLeft}} + {{site.menu.TopLeft}} + {{site.data.menu.TopLeft}} +{% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %}} + +{% capture TopRightMenu %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {% include GitHubLink.html %} + {% endunless %} +{% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} + +{% capture TopCenterMenu %} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} +{% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} + +{% capture BottomLeftMenu %} + {{page.menu.BottomLeft}} + {{site.menu.BottomLeft}} + {{site.data.menu.BottomLeft}} +{% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} + +{% capture BottomRightMenu %} + {{page.menu.BottomRight}} + {{site.menu.BottomRight}} + {{site.data.menu.BottomRight}} +{% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} + +{% capture BottomCenterMenu %} + {{page.menu.BottomCenter}} + {{site.menu.BottomCenter}} + {{site.data.menu.BottomCenter}} +{% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} + +{% capture LeftCenterMenu %} + {{page.menu.LeftCenter}} + {{site.menu.LeftCenter}} + {{site.data.menu.LeftCenter}} +{% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} + +{% capture RightCenterMenu %} + {{page.menu.RightCenter}} + {{site.menu.RightCenter}} + {{site.data.menu.RightCenter}} +{% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} + +{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} + +{% endif %} + +{% if TopLeftMenu %} + + {{TopLeftMenu}} + +{% endif %} + +{% if TopRightMenu %} + + {{TopRightMenu}} + +{% endif %} + +{% if TopCenterMenu %} + + {{TopCenterMenu}} + +{% endif %} + +{% if BottomLeftMenu %} + + {{BottomLeftMenu}} + +{% endif %} + +{% if BottomRightMenu %} + + {{BottomRightMenu}} + +{% endif %} + +{% if BottomCenterMenu %} + + {{BottomCenterMenu}} + +{% endif %} + +{% if LeftCenterMenu %} + + {{LeftCenterMenu}} + +{% endif %} + +{% if RightCenterMenu %} + + {{RightCenterMenu}} + +{% endif %} \ No newline at end of file From a6e312acb67782f7fd16b4d506f0452e0001d7bd Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:11:07 +0000 Subject: [PATCH 420/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling --- docs/_includes/.GitHubLink.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/.GitHubLink.html diff --git a/docs/_includes/.GitHubLink.html b/docs/_includes/.GitHubLink.html new file mode 100644 index 0000000..3752c46 --- /dev/null +++ b/docs/_includes/.GitHubLink.html @@ -0,0 +1,3 @@ +{% if site.github.repository_url %} +GitHub +{% endif %} \ No newline at end of file From c3851f923d1cdb68f02140f081d2691bb96f1b56 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:11:07 +0000 Subject: [PATCH 421/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling --- docs/_includes/.Copyright.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/.Copyright.html diff --git a/docs/_includes/.Copyright.html b/docs/_includes/.Copyright.html new file mode 100644 index 0000000..a160c7d --- /dev/null +++ b/docs/_includes/.Copyright.html @@ -0,0 +1,9 @@ +© {% if page.copyright %} + {{page.copyright}} +{% elsif site.copyright %} + {{site.copyright}} +{% elsif site.data.PSModuleInfo.Copyright %} + {{site.data.PSModuleInfo.Copyright}} +{% else %} + {{ site.time | date: '%Y' }} {{ site.author }} +{% endif %} \ No newline at end of file From a85efc29e195edc1daa8e9f870a0c54dca4dc685 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:12:41 -0700 Subject: [PATCH 422/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- PSJekyll.PSJekyll.ps1 | 2 +- docs/_includes/.4bitcss.html | 5 - docs/_includes/.Copyright.html | 9 -- docs/_includes/.GitHubLink.html | 3 - docs/_includes/.GoogleAnalytics.html | 10 -- docs/_includes/.Menu.html | 147 -------------------------- docs/_includes/4bitcss.html | 5 - docs/_includes/Copyright.html | 9 -- docs/_includes/Footer.html | 9 -- docs/_includes/GitHubLink.html | 3 - docs/_includes/GoogleAnalytics.html | 10 -- docs/_includes/GoogleFont.html | 14 --- docs/_includes/ImportMap.html | 25 ----- docs/_includes/Margin.html | 10 -- docs/_includes/Menu.html | 149 --------------------------- docs/_includes/MenuStyle.html | 58 ----------- docs/_includes/MyRepos.html | 3 - docs/_includes/OpenGraph.html | 46 --------- docs/_includes/SiteMap.html | 20 ---- docs/_includes/Stylesheet.html | 15 --- 20 files changed, 1 insertion(+), 551 deletions(-) delete mode 100644 docs/_includes/.4bitcss.html delete mode 100644 docs/_includes/.Copyright.html delete mode 100644 docs/_includes/.GitHubLink.html delete mode 100644 docs/_includes/.GoogleAnalytics.html delete mode 100644 docs/_includes/.Menu.html delete mode 100644 docs/_includes/4bitcss.html delete mode 100644 docs/_includes/Copyright.html delete mode 100644 docs/_includes/Footer.html delete mode 100644 docs/_includes/GitHubLink.html delete mode 100644 docs/_includes/GoogleAnalytics.html delete mode 100644 docs/_includes/GoogleFont.html delete mode 100644 docs/_includes/ImportMap.html delete mode 100644 docs/_includes/Margin.html delete mode 100644 docs/_includes/Menu.html delete mode 100644 docs/_includes/MenuStyle.html delete mode 100644 docs/_includes/MyRepos.html delete mode 100644 docs/_includes/OpenGraph.html delete mode 100644 docs/_includes/SiteMap.html delete mode 100644 docs/_includes/Stylesheet.html diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 39fe3f5..1aa4505 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -70,7 +70,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $templateFileType = $matches.0 -replace '\p{P}+$' - $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))" + $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))\p{P}+" if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' diff --git a/docs/_includes/.4bitcss.html b/docs/_includes/.4bitcss.html deleted file mode 100644 index 8d1ec76..0000000 --- a/docs/_includes/.4bitcss.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if page.palette %} - -{% elsif site.palette %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/.Copyright.html b/docs/_includes/.Copyright.html deleted file mode 100644 index a160c7d..0000000 --- a/docs/_includes/.Copyright.html +++ /dev/null @@ -1,9 +0,0 @@ -© {% if page.copyright %} - {{page.copyright}} -{% elsif site.copyright %} - {{site.copyright}} -{% elsif site.data.PSModuleInfo.Copyright %} - {{site.data.PSModuleInfo.Copyright}} -{% else %} - {{ site.time | date: '%Y' }} {{ site.author }} -{% endif %} \ No newline at end of file diff --git a/docs/_includes/.GitHubLink.html b/docs/_includes/.GitHubLink.html deleted file mode 100644 index 3752c46..0000000 --- a/docs/_includes/.GitHubLink.html +++ /dev/null @@ -1,3 +0,0 @@ -{% if site.github.repository_url %} -GitHub -{% endif %} \ No newline at end of file diff --git a/docs/_includes/.GoogleAnalytics.html b/docs/_includes/.GoogleAnalytics.html deleted file mode 100644 index bde8fa8..0000000 --- a/docs/_includes/.GoogleAnalytics.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if site.analyticsId %} - - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/.Menu.html b/docs/_includes/.Menu.html deleted file mode 100644 index 20aabdc..0000000 --- a/docs/_includes/.Menu.html +++ /dev/null @@ -1,147 +0,0 @@ -{% capture TopLeftMenu %} - {{page.menu.TopLeft}} - {{site.menu.TopLeft}} - {{site.data.menu.TopLeft}} -{% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %}} - -{% capture TopRightMenu %} - {{page.menu.TopRight}} - {{site.menu.TopRight}} - {{site.data.menu.TopRight}} - {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink.html %} - {% endunless %} -{% endcapture %} -{% assign TopRightMenu = TopRightMenu | strip %} - -{% capture TopCenterMenu %} - {{page.menu.TopCenter}} - {{site.menu.TopCenter}} - {{site.data.menu.TopCenter}} -{% endcapture %} -{% assign TopCenterMenu = TopCenterMenu | strip %} - -{% capture BottomLeftMenu %} - {{page.menu.BottomLeft}} - {{site.menu.BottomLeft}} - {{site.data.menu.BottomLeft}} -{% endcapture %} -{% assign BottomLeftMenu = BottomLeftMenu | strip %} - -{% capture BottomRightMenu %} - {{page.menu.BottomRight}} - {{site.menu.BottomRight}} - {{site.data.menu.BottomRight}} -{% endcapture %} -{% assign BottomRightMenu = BottomRightMenu | strip %} - -{% capture BottomCenterMenu %} - {{page.menu.BottomCenter}} - {{site.menu.BottomCenter}} - {{site.data.menu.BottomCenter}} -{% endcapture %} -{% assign BottomCenterMenu = BottomCenterMenu | strip %} - -{% capture LeftCenterMenu %} - {{page.menu.LeftCenter}} - {{site.menu.LeftCenter}} - {{site.data.menu.LeftCenter}} -{% endcapture %} -{% assign LeftCenterMenu = LeftCenterMenu | strip %} - -{% capture RightCenterMenu %} - {{page.menu.RightCenter}} - {{site.menu.RightCenter}} - {{site.data.menu.RightCenter}} -{% endcapture %} -{% assign RightCenterMenu = RightCenterMenu | strip %} - -{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} - -{% endif %} - -{% if TopLeftMenu %} - - {{TopLeftMenu}} - -{% endif %} - -{% if TopRightMenu %} - - {{TopRightMenu}} - -{% endif %} - -{% if TopCenterMenu %} - - {{TopCenterMenu}} - -{% endif %} - -{% if BottomLeftMenu %} - - {{BottomLeftMenu}} - -{% endif %} - -{% if BottomRightMenu %} - - {{BottomRightMenu}} - -{% endif %} - -{% if BottomCenterMenu %} - - {{BottomCenterMenu}} - -{% endif %} - -{% if LeftCenterMenu %} - - {{LeftCenterMenu}} - -{% endif %} - -{% if RightCenterMenu %} - - {{RightCenterMenu}} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html deleted file mode 100644 index 8d1ec76..0000000 --- a/docs/_includes/4bitcss.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if page.palette %} - -{% elsif site.palette %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Copyright.html b/docs/_includes/Copyright.html deleted file mode 100644 index a160c7d..0000000 --- a/docs/_includes/Copyright.html +++ /dev/null @@ -1,9 +0,0 @@ -© {% if page.copyright %} - {{page.copyright}} -{% elsif site.copyright %} - {{site.copyright}} -{% elsif site.data.PSModuleInfo.Copyright %} - {{site.data.PSModuleInfo.Copyright}} -{% else %} - {{ site.time | date: '%Y' }} {{ site.author }} -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Footer.html b/docs/_includes/Footer.html deleted file mode 100644 index 250a9fd..0000000 --- a/docs/_includes/Footer.html +++ /dev/null @@ -1,9 +0,0 @@ -
    -{% if page.footer %} - {{page.footer}} -{% elsif site.footer %} - {{site.footer}} -{% else %} - {{include Copyright.html}} -{% endif %} -
    \ No newline at end of file diff --git a/docs/_includes/GitHubLink.html b/docs/_includes/GitHubLink.html deleted file mode 100644 index 3752c46..0000000 --- a/docs/_includes/GitHubLink.html +++ /dev/null @@ -1,3 +0,0 @@ -{% if site.github.repository_url %} -GitHub -{% endif %} \ No newline at end of file diff --git a/docs/_includes/GoogleAnalytics.html b/docs/_includes/GoogleAnalytics.html deleted file mode 100644 index bde8fa8..0000000 --- a/docs/_includes/GoogleAnalytics.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if site.analyticsId %} - - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html deleted file mode 100644 index 93cca46..0000000 --- a/docs/_includes/GoogleFont.html +++ /dev/null @@ -1,14 +0,0 @@ -{% if site.googleFont %} - - -{% else %} - - -{% endif %} -{% if site.codeFont %} - - -{% else %} - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html deleted file mode 100644 index af3a6ca..0000000 --- a/docs/_includes/ImportMap.html +++ /dev/null @@ -1,25 +0,0 @@ -{% if page.imports %} - {% assign importMap = page.imports %} -{% elsif page.importMap %} - {% assign importMap = page.importMap %} -{% elsif site.imports %} - {% assign importMap = site.imports %} -{% elsif site.importMap %} - {% assign importMap = site.importMap %} -{% elsif site.data.imports %} - {% assign importMap = site.data.imports %} -{% elsif site.data.importMap %} - {% assign importMap = site.data.importMap %} -{% endif %} -{% if importMap %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Margin.html b/docs/_includes/Margin.html deleted file mode 100644 index b478442..0000000 --- a/docs/_includes/Margin.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if site.margin %} - -{% else %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html deleted file mode 100644 index 29deaf4..0000000 --- a/docs/_includes/Menu.html +++ /dev/null @@ -1,149 +0,0 @@ -{% capture TopLeftMenu %} - -{{page.menu.TopLeft}} -{{site.menu.TopLeft}} -{{site.data.menu.TopLeft}} - -{% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %}} - -{% capture TopRightMenu %} - {{page.menu.TopRight}} - {{site.menu.TopRight}} - {{site.data.menu.TopRight}} - {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink.html %} - {% endunless %} -{% endcapture %} -{% assign TopRightMenu = TopRightMenu | strip %} - -{% capture TopCenterMenu %} - {{page.menu.TopCenter}} - {{site.menu.TopCenter}} - {{site.data.menu.TopCenter}} -{% endcapture %} -{% assign TopCenterMenu = TopCenterMenu | strip %} - -{% capture BottomLeftMenu %} -{{page.menu.BottomLeft}} -{{site.menu.BottomLeft}} -{{site.data.menu.BottomLeft}} -{% endcapture %} -{% assign BottomLeftMenu = BottomLeftMenu | strip %} - -{% capture BottomRightMenu %} -{{page.menu.BottomRight}} -{{site.menu.BottomRight}} -{{site.data.menu.BottomRight}} -{% endcapture %} -{% assign BottomRightMenu = BottomRightMenu | strip %} - -{% capture BottomCenterMenu %} -{{page.menu.BottomCenter}} -{{site.menu.BottomCenter}} -{{site.data.menu.BottomCenter}} -{% endcapture %} -{% assign BottomCenterMenu = BottomCenterMenu | strip %} - -{% capture LeftCenterMenu %} -{{page.menu.LeftCenter}} -{{site.menu.LeftCenter}} -{{site.data.menu.LeftCenter}} -{% endcapture %} -{% assign LeftCenterMenu = LeftCenterMenu | strip %} - -{% capture RightCenterMenu %} -{{page.menu.RightCenter}} -{{site.menu.RightCenter}} -{{site.data.menu.RightCenter}} -{% endcapture %} -{% assign RightCenterMenu = RightCenterMenu | strip %} - -{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} - -{% endif %} - -{% if TopLeftMenu %} - - {{TopLeftMenu}} - -{% endif %} - -{% if TopRightMenu %} - - {{TopRightMenu}} - -{% endif %} - -{% if TopCenterMenu %} - - {{TopCenterMenu}} - -{% endif %} - -{% if BottomLeftMenu %} - - {{BottomLeftMenu}} - -{% endif %} - -{% if BottomRightMenu %} - - {{BottomRightMenu}} - -{% endif %} - -{% if BottomCenterMenu %} - - {{BottomCenterMenu}} - -{% endif %} - -{% if LeftCenterMenu %} - - {{LeftCenterMenu}} - -{% endif %} - -{% if RightCenterMenu %} - - {{RightCenterMenu}} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/MenuStyle.html b/docs/_includes/MenuStyle.html deleted file mode 100644 index 3e25d7f..0000000 --- a/docs/_includes/MenuStyle.html +++ /dev/null @@ -1,58 +0,0 @@ - \ No newline at end of file diff --git a/docs/_includes/MyRepos.html b/docs/_includes/MyRepos.html deleted file mode 100644 index fdc09e8..0000000 --- a/docs/_includes/MyRepos.html +++ /dev/null @@ -1,3 +0,0 @@ -{% for repository in site.github.public_repositories %} - * [{{ repository.name }}]({{ repository.html_url }}) -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html deleted file mode 100644 index d9d5798..0000000 --- a/docs/_includes/OpenGraph.html +++ /dev/null @@ -1,46 +0,0 @@ - -{% if page.title %} - -{% elsif page.stylesheet %} - -{% else %} - -{% endif %} -{% if page.type %} - -{% else %} - -{% endif %} -{% if page.description %} - - - -{% elsif content %} - - - - - -{% elsif site.description %} - - - -{% endif %} -{% if page.date %} - -{% endif %} -{% if page.url %} - - - -{% endif %} - -{% if page.image %} - - - -{% elsif site.image %} - - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/SiteMap.html b/docs/_includes/SiteMap.html deleted file mode 100644 index b64882c..0000000 --- a/docs/_includes/SiteMap.html +++ /dev/null @@ -1,20 +0,0 @@ -{% assign pages_by_url = site.pages | sort: "url" %} -{% assign page_depth = 0 %} - -{% for page in pages_by_url %} - {% if page.title == nil %} - {% continue %} - {% endif %} - {% assign page_parts = page.url | split: "/" %} - {% if page_parts.size > page_depth %} - {% assign page_depth = page_parts.size %} -
      - {% endif %} - {% if page_parts.size < page_depth %} - {% assign page_depth = page_parts.size %} -
    - {% endif %} -
  • -{{ page.title }} -
  • -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/Stylesheet.html b/docs/_includes/Stylesheet.html deleted file mode 100644 index 3a32d64..0000000 --- a/docs/_includes/Stylesheet.html +++ /dev/null @@ -1,15 +0,0 @@ -{% if site.data.stylesheet %} - {% for stylesheet in site.data.stylesheet %} - - {% endfor %} -{% endif %} -{% if page.stylesheet %} - {% for stylesheet in page.stylesheet %} - - {% endfor %} -{% endif %} -{% if include.stylesheet %} - {% for stylesheet in include.stylesheet %} - - {% endfor %} -{% endif %} \ No newline at end of file From a32875b80c8bf714260a242552f842a9ce14ba3d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 423/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index f043611..fbdc106 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } From c31baa5a8c2c423f102953dcc88b63a2f0ae34ec Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 424/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_includes/GitHubLink.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/GitHubLink.html diff --git a/docs/_includes/GitHubLink.html b/docs/_includes/GitHubLink.html new file mode 100644 index 0000000..3752c46 --- /dev/null +++ b/docs/_includes/GitHubLink.html @@ -0,0 +1,3 @@ +{% if site.github.repository_url %} +GitHub +{% endif %} \ No newline at end of file From d4dc445dfa24242f73c96fc575ec833e6fd9ad1f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 425/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_includes/Menu.html | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/_includes/Menu.html diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html new file mode 100644 index 0000000..20aabdc --- /dev/null +++ b/docs/_includes/Menu.html @@ -0,0 +1,147 @@ +{% capture TopLeftMenu %} + {{page.menu.TopLeft}} + {{site.menu.TopLeft}} + {{site.data.menu.TopLeft}} +{% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %}} + +{% capture TopRightMenu %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {% include GitHubLink.html %} + {% endunless %} +{% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} + +{% capture TopCenterMenu %} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} +{% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} + +{% capture BottomLeftMenu %} + {{page.menu.BottomLeft}} + {{site.menu.BottomLeft}} + {{site.data.menu.BottomLeft}} +{% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} + +{% capture BottomRightMenu %} + {{page.menu.BottomRight}} + {{site.menu.BottomRight}} + {{site.data.menu.BottomRight}} +{% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} + +{% capture BottomCenterMenu %} + {{page.menu.BottomCenter}} + {{site.menu.BottomCenter}} + {{site.data.menu.BottomCenter}} +{% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} + +{% capture LeftCenterMenu %} + {{page.menu.LeftCenter}} + {{site.menu.LeftCenter}} + {{site.data.menu.LeftCenter}} +{% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} + +{% capture RightCenterMenu %} + {{page.menu.RightCenter}} + {{site.menu.RightCenter}} + {{site.data.menu.RightCenter}} +{% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} + +{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} + +{% endif %} + +{% if TopLeftMenu %} + + {{TopLeftMenu}} + +{% endif %} + +{% if TopRightMenu %} + + {{TopRightMenu}} + +{% endif %} + +{% if TopCenterMenu %} + + {{TopCenterMenu}} + +{% endif %} + +{% if BottomLeftMenu %} + + {{BottomLeftMenu}} + +{% endif %} + +{% if BottomRightMenu %} + + {{BottomRightMenu}} + +{% endif %} + +{% if BottomCenterMenu %} + + {{BottomCenterMenu}} + +{% endif %} + +{% if LeftCenterMenu %} + + {{LeftCenterMenu}} + +{% endif %} + +{% if RightCenterMenu %} + + {{RightCenterMenu}} + +{% endif %} \ No newline at end of file From 9be293676c7d4465040fe38aac586f21028c1d08 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 426/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_includes/4bitcss.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/_includes/4bitcss.html diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html new file mode 100644 index 0000000..8d1ec76 --- /dev/null +++ b/docs/_includes/4bitcss.html @@ -0,0 +1,5 @@ +{% if page.palette %} + +{% elsif site.palette %} + +{% endif %} \ No newline at end of file From 80a2aa126e355014da9d43204471c741854ba83e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 427/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_includes/GoogleAnalytics.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/_includes/GoogleAnalytics.html diff --git a/docs/_includes/GoogleAnalytics.html b/docs/_includes/GoogleAnalytics.html new file mode 100644 index 0000000..bde8fa8 --- /dev/null +++ b/docs/_includes/GoogleAnalytics.html @@ -0,0 +1,10 @@ +{% if site.analyticsId %} + + + +{% endif %} \ No newline at end of file From 9003554ecfc07b19e0f110be954afb38a2b5b050 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:13:44 +0000 Subject: [PATCH 428/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Fixing template file type handling, removing old includes --- docs/_includes/Copyright.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Copyright.html diff --git a/docs/_includes/Copyright.html b/docs/_includes/Copyright.html new file mode 100644 index 0000000..a160c7d --- /dev/null +++ b/docs/_includes/Copyright.html @@ -0,0 +1,9 @@ +© {% if page.copyright %} + {{page.copyright}} +{% elsif site.copyright %} + {{site.copyright}} +{% elsif site.data.PSModuleInfo.Copyright %} + {{site.data.PSModuleInfo.Copyright}} +{% else %} + {{ site.time | date: '%Y' }} {{ site.author }} +{% endif %} \ No newline at end of file From 4fc03266bec0096450284e3f4fb649e8ec9b341a Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:18:15 -0700 Subject: [PATCH 429/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- PSJekyll.PSJekyll.ps1 | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 1aa4505..33fce2b 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -65,12 +65,11 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ $PSJekyll.CurrentSite.Config foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { - if ($templateMethod.Name -notmatch '^(?>layout|include)\p{P}+') { + if ($templateMethod.Name -notmatch '^(?>layout|include)\p{P}{0,}') { continue } - $templateFileType = $matches.0 -replace '\p{P}+$' - - $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))\p{P}+" + $templateFileType = $matches.0 -replace '\p{P}{0,}$' + $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))\p{P}{0,}" if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' @@ -81,8 +80,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } catch { $err = $_ Write-Error -Message "Failed to set $templateFileName of $templateFileType : $err" - } - + } } $PSJekyll.CurrentSite.Page = 'SiteMap', "{% include SiteMap.html %}" From c90b123d014c0cedf913e81ee70bc1baa19f87b0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:08 +0000 Subject: [PATCH 430/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index fbdc106..926c361 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + ] } } } From e3eb46b571029d4acc7026780da4156c279ff20f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:08 +0000 Subject: [PATCH 431/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_layouts/Default.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index ef75f19..9cda11c 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -17,7 +17,9 @@ {% include Stylesheet.html %} -{% include Menu.html %} + + + {{content}} {% include Footer.html %} From 2f72f15a3a3a73b05abf2a9c2e3e19434e634f43 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:08 +0000 Subject: [PATCH 432/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/GoogleFont.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/_includes/GoogleFont.html diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html new file mode 100644 index 0000000..93cca46 --- /dev/null +++ b/docs/_includes/GoogleFont.html @@ -0,0 +1,14 @@ +{% if site.googleFont %} + + +{% else %} + + +{% endif %} +{% if site.codeFont %} + + +{% else %} + + +{% endif %} \ No newline at end of file From c1c627b7e8f5546f8b0e0a5667bd78cd1acc926f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 433/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/OpenGraph.html | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/_includes/OpenGraph.html diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html new file mode 100644 index 0000000..d9d5798 --- /dev/null +++ b/docs/_includes/OpenGraph.html @@ -0,0 +1,46 @@ + +{% if page.title %} + +{% elsif page.stylesheet %} + +{% else %} + +{% endif %} +{% if page.type %} + +{% else %} + +{% endif %} +{% if page.description %} + + + +{% elsif content %} + + + + + +{% elsif site.description %} + + + +{% endif %} +{% if page.date %} + +{% endif %} +{% if page.url %} + + + +{% endif %} + +{% if page.image %} + + + +{% elsif site.image %} + + + +{% endif %} \ No newline at end of file From c7acec9701f8cec09355f03b94186cb859cf03d9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 434/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/Stylesheet.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/_includes/Stylesheet.html diff --git a/docs/_includes/Stylesheet.html b/docs/_includes/Stylesheet.html new file mode 100644 index 0000000..3a32d64 --- /dev/null +++ b/docs/_includes/Stylesheet.html @@ -0,0 +1,15 @@ +{% if site.data.stylesheet %} + {% for stylesheet in site.data.stylesheet %} + + {% endfor %} +{% endif %} +{% if page.stylesheet %} + {% for stylesheet in page.stylesheet %} + + {% endfor %} +{% endif %} +{% if include.stylesheet %} + {% for stylesheet in include.stylesheet %} + + {% endfor %} +{% endif %} \ No newline at end of file From ca7f7b1a4643d4af71113bdec638685bcb9362ec Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 435/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/Footer.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Footer.html diff --git a/docs/_includes/Footer.html b/docs/_includes/Footer.html new file mode 100644 index 0000000..250a9fd --- /dev/null +++ b/docs/_includes/Footer.html @@ -0,0 +1,9 @@ +
    +{% if page.footer %} + {{page.footer}} +{% elsif site.footer %} + {{site.footer}} +{% else %} + {{include Copyright.html}} +{% endif %} +
    \ No newline at end of file From 656adfc5663b0735eaff4c7859534c20874baddf Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 436/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/Margin.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/_includes/Margin.html diff --git a/docs/_includes/Margin.html b/docs/_includes/Margin.html new file mode 100644 index 0000000..b478442 --- /dev/null +++ b/docs/_includes/Margin.html @@ -0,0 +1,10 @@ +{% if site.margin %} + +{% else %} + +{% endif %} \ No newline at end of file From ba639dde53b235f7df4185b9dec30417c95453c8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 437/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/SiteMap.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/_includes/SiteMap.html diff --git a/docs/_includes/SiteMap.html b/docs/_includes/SiteMap.html new file mode 100644 index 0000000..b64882c --- /dev/null +++ b/docs/_includes/SiteMap.html @@ -0,0 +1,20 @@ +{% assign pages_by_url = site.pages | sort: "url" %} +{% assign page_depth = 0 %} + +{% for page in pages_by_url %} + {% if page.title == nil %} + {% continue %} + {% endif %} + {% assign page_parts = page.url | split: "/" %} + {% if page_parts.size > page_depth %} + {% assign page_depth = page_parts.size %} +
      + {% endif %} + {% if page_parts.size < page_depth %} + {% assign page_depth = page_parts.size %} +
    + {% endif %} +
  • +{{ page.title }} +
  • +{% endfor %} \ No newline at end of file From bb0866010bfbbc81ea1fb58658fa0c875b80c6a2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 438/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/ImportMap.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/_includes/ImportMap.html diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html new file mode 100644 index 0000000..af3a6ca --- /dev/null +++ b/docs/_includes/ImportMap.html @@ -0,0 +1,25 @@ +{% if page.imports %} + {% assign importMap = page.imports %} +{% elsif page.importMap %} + {% assign importMap = page.importMap %} +{% elsif site.imports %} + {% assign importMap = site.imports %} +{% elsif site.importMap %} + {% assign importMap = site.importMap %} +{% elsif site.data.imports %} + {% assign importMap = site.data.imports %} +{% elsif site.data.importMap %} + {% assign importMap = site.data.importMap %} +{% endif %} +{% if importMap %} + +{% endif %} \ No newline at end of file From e767d156a253c5ce24355c37d813080c6493812d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:19:09 +0000 Subject: [PATCH 439/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Allowing zero punctuation --- docs/_includes/MyRepos.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/MyRepos.html diff --git a/docs/_includes/MyRepos.html b/docs/_includes/MyRepos.html new file mode 100644 index 0000000..fdc09e8 --- /dev/null +++ b/docs/_includes/MyRepos.html @@ -0,0 +1,3 @@ +{% for repository in site.github.public_repositories %} + * [{{ repository.name }}]({{ repository.html_url }}) +{% endfor %} \ No newline at end of file From 36c7a54698da2b984fb78ef9c67f7de638424787 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:23:58 -0700 Subject: [PATCH 440/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) Re-adding menu --- Types/PSJekyll.Template/LayoutDefault.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 index ecb7321..b99c2bf 100644 --- a/Types/PSJekyll.Template/LayoutDefault.ps1 +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -16,9 +16,10 @@ - +{% include Menu.html %} {{content}} + {% include Footer.html %} "@ \ No newline at end of file From e51858622bef51eb86bb85c98babe5f614811e71 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:24:42 +0000 Subject: [PATCH 441/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) Re-adding menu --- PSJekyll.types.ps1xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ef01467..620bbb5 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1714,9 +1714,10 @@ param() </head> <body> - +{% include Menu.html %} {{content}} + {% include Footer.html %} </body> "@ From 68e882544ebdf3bf1e8f9a204f7dbc21d0955c31 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:24:54 +0000 Subject: [PATCH 442/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) Re-adding menu --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 926c361..9feb695 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,8 +14,8 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", From 0729ced36e3e16587a238feb09749031d793cf66 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:24:54 +0000 Subject: [PATCH 443/769] feat: PSJekyll.Template.LayoutDefault ( Fixes #64 ) Re-adding menu --- docs/_layouts/Default.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html index 9cda11c..92733a5 100644 --- a/docs/_layouts/Default.html +++ b/docs/_layouts/Default.html @@ -18,8 +18,9 @@ - +{% include Menu.html %} {{content}} + {% include Footer.html %} From 36fe219b096f31b90d4b4bc9331d8457ff70eb94 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:31:46 -0700 Subject: [PATCH 444/769] feat: PSJekyll.Template.Include.Menu ( Fixes #77 ) Removing errant brace and checking for empty strings --- Types/PSJekyll.Template/Include.Menu.html.ps1 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Types/PSJekyll.Template/Include.Menu.html.ps1 b/Types/PSJekyll.Template/Include.Menu.html.ps1 index 9fffbe4..605a120 100644 --- a/Types/PSJekyll.Template/Include.Menu.html.ps1 +++ b/Types/PSJekyll.Template/Include.Menu.html.ps1 @@ -7,7 +7,7 @@ param() {{site.menu.TopLeft}} {{site.data.menu.TopLeft}} {% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %}} +{% assign TopLeftMenu = TopLeftMenu | strip %} {% capture TopRightMenu %} {{page.menu.TopRight}} @@ -102,49 +102,49 @@ param() {% endif %} -{% if TopLeftMenu %} +{% if TopLeftMenu != "" %} {{TopLeftMenu}} {% endif %} -{% if TopRightMenu %} +{% if TopRightMenu != "" %} {{TopRightMenu}} {% endif %} -{% if TopCenterMenu %} +{% if TopCenterMenu != "" %} {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu %} +{% if BottomLeftMenu != "" %} {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu %} +{% if BottomRightMenu != "" %} {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu %} +{% if BottomCenterMenu != "" %} {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu %} +{% if LeftCenterMenu != "" %} {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu %} +{% if RightCenterMenu != "" %} {{RightCenterMenu}} From 71dc934f5a906789b5fced445c614114b1e34fa0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:32:42 +0000 Subject: [PATCH 445/769] feat: PSJekyll.Template.Include.Menu ( Fixes #77 ) Removing errant brace and checking for empty strings --- PSJekyll.types.ps1xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 620bbb5..aa65f87 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1234,7 +1234,7 @@ $RepositoryUrl {{site.menu.TopLeft}} {{site.data.menu.TopLeft}} {% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %}} +{% assign TopLeftMenu = TopLeftMenu | strip %} {% capture TopRightMenu %} {{page.menu.TopRight}} @@ -1329,49 +1329,49 @@ $RepositoryUrl </style> {% endif %} -{% if TopLeftMenu %} +{% if TopLeftMenu != "" %} <menu class='Top Left'> {{TopLeftMenu}} </menu> {% endif %} -{% if TopRightMenu %} +{% if TopRightMenu != "" %} <menu class='Top Right'> {{TopRightMenu}} </menu> {% endif %} -{% if TopCenterMenu %} +{% if TopCenterMenu != "" %} <menu class='Top Center'> {{TopCenterMenu}} </menu> {% endif %} -{% if BottomLeftMenu %} +{% if BottomLeftMenu != "" %} <menu class='Bottom Left'> {{BottomLeftMenu}} </menu> {% endif %} -{% if BottomRightMenu %} +{% if BottomRightMenu != "" %} <menu class='Bottom Right'> {{BottomRightMenu}} </menu> {% endif %} -{% if BottomCenterMenu %} +{% if BottomCenterMenu != "" %} <menu class='Bottom Center'> {{BottomCenterMenu}} </menu> {% endif %} -{% if LeftCenterMenu %} +{% if LeftCenterMenu != "" %} <menu class='Left Center'> {{LeftCenterMenu}} </menu> {% endif %} -{% if RightCenterMenu %} +{% if RightCenterMenu != "" %} <menu class='Right Center'> {{RightCenterMenu}} </menu> From ebfb07e187fed39bb820343d9df5b9a085c49e4e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:32:53 +0000 Subject: [PATCH 446/769] feat: PSJekyll.Template.Include.Menu ( Fixes #77 ) Removing errant brace and checking for empty strings --- docs/_data/PSModuleInfo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 9feb695..f043611 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ] + ], + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } From f3b88ecbec097c70f7758c53e8749db632fa0eb6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:32:53 +0000 Subject: [PATCH 447/769] feat: PSJekyll.Template.Include.Menu ( Fixes #77 ) Removing errant brace and checking for empty strings --- docs/_includes/Menu.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html index 20aabdc..14a7574 100644 --- a/docs/_includes/Menu.html +++ b/docs/_includes/Menu.html @@ -3,7 +3,7 @@ {{site.menu.TopLeft}} {{site.data.menu.TopLeft}} {% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %}} +{% assign TopLeftMenu = TopLeftMenu | strip %} {% capture TopRightMenu %} {{page.menu.TopRight}} @@ -98,49 +98,49 @@ {% endif %} -{% if TopLeftMenu %} +{% if TopLeftMenu != "" %} {{TopLeftMenu}} {% endif %} -{% if TopRightMenu %} +{% if TopRightMenu != "" %} {{TopRightMenu}} {% endif %} -{% if TopCenterMenu %} +{% if TopCenterMenu != "" %} {{TopCenterMenu}} {% endif %} -{% if BottomLeftMenu %} +{% if BottomLeftMenu != "" %} {{BottomLeftMenu}} {% endif %} -{% if BottomRightMenu %} +{% if BottomRightMenu != "" %} {{BottomRightMenu}} {% endif %} -{% if BottomCenterMenu %} +{% if BottomCenterMenu != "" %} {{BottomCenterMenu}} {% endif %} -{% if LeftCenterMenu %} +{% if LeftCenterMenu != "" %} {{LeftCenterMenu}} {% endif %} -{% if RightCenterMenu %} +{% if RightCenterMenu != "" %} {{RightCenterMenu}} From 25ddb4e9dac399958017bb29c747472a1d31fedd Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:43:18 -0700 Subject: [PATCH 448/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- Types/PSJekyll.Site/get_Data.ps1 | 8 ++++++++ Types/PSJekyll.Site/set_Data.ps1 | 33 ++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/Types/PSJekyll.Site/get_Data.ps1 b/Types/PSJekyll.Site/get_Data.ps1 index ede92ed..8369ad0 100644 --- a/Types/PSJekyll.Site/get_Data.ps1 +++ b/Types/PSJekyll.Site/get_Data.ps1 @@ -1,3 +1,11 @@ +<# +.SYNOPSIS + Gets data files in a Jekyll site +.DESCRIPTION + Gets data files in a Jekyll site, using PowerShell. + + This will return the file objects in the _data folder. +#> param() foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { diff --git a/Types/PSJekyll.Site/set_Data.ps1 b/Types/PSJekyll.Site/set_Data.ps1 index 9f55e7a..9a910ee 100644 --- a/Types/PSJekyll.Site/set_Data.ps1 +++ b/Types/PSJekyll.Site/set_Data.ps1 @@ -1,3 +1,13 @@ +<# +.SYNOPSIS + Sets data files in a Jekyll site +.DESCRIPTION + Sets data files in a Jekyll site, using PowerShell. + + Data files are a simple and powerful way to add custom data to your site. + + Simply use this to set a property, and the data will be available in Jekyll within `site.data` +#> param() $unrolledArguments = @($args | . { process { $_ } }) @@ -8,14 +18,14 @@ filter toJsonFileName { } foreach ($arg in $unrolledArguments) { - if ($arg -is [Collections.IDictionary]) { - + if ($arg -is [Collections.IDictionary]) { foreach ($keyValue in $arg.GetEnumerator()) { - $targetPath = $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) - if (-not (Test-Path $targetPath)) { - $null = New-Item -Path $targetPath -ItemType File -Force - } - Set-Content -Path $targetPath -Value ( + $targetPath = + $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join + [IO.Path]::DirectorySeparatorChar -replace + '[\\/]', [IO.Path]::DirectorySeparatorChar + + New-Item -Path $targetPath -ItemType File -Force -Value ( ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $($keyValue.Value) ) } @@ -24,11 +34,10 @@ foreach ($arg in $unrolledArguments) { $currentName = $arg } elseif ($currentName) { - $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) - if (-not (Test-Path $targetPath)) { - $null = New-Item -Path $targetPath -ItemType File -Force - } - Set-Content -Path $targetPath -Value ( + $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join + [IO.Path]::DirectorySeparatorChar -replace + '[\\/]', [IO.Path]::DirectorySeparatorChar + New-Item -Path $targetPath -ItemType File -Force -Value ( ConvertTo-Json -Depth ($FormatEnumerationLimit * 2) -InputObject $arg ) } From 8330a5b98bad996297338b8e189cb265d97d2176 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:13 +0000 Subject: [PATCH 449/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- PSJekyll.types.ps1xml | 45 +++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index aa65f87..b9d3207 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -731,7 +731,15 @@ if (Test-Path $configFile) { Data - param() + <# +.SYNOPSIS + Gets data files in a Jekyll site +.DESCRIPTION + Gets data files in a Jekyll site, using PowerShell. + + This will return the file objects in the _data folder. +#> +param() foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { $specialFile.pstypenames.add("PSJekyll.DataFile") @@ -740,7 +748,17 @@ foreach ($specialFile in $this.File -match '[\\/]_data[\\/]') { - param() + <# +.SYNOPSIS + Sets data files in a Jekyll site +.DESCRIPTION + Sets data files in a Jekyll site, using PowerShell. + + Data files are a simple and powerful way to add custom data to your site. + + Simply use this to set a property, and the data will be available in Jekyll within `site.data` +#> +param() $unrolledArguments = @($args | . { process { $_ } }) $currentName = '' @@ -750,14 +768,14 @@ filter toJsonFileName { } foreach ($arg in $unrolledArguments) { - if ($arg -is [Collections.IDictionary]) { - + if ($arg -is [Collections.IDictionary]) { foreach ($keyValue in $arg.GetEnumerator()) { - $targetPath = $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) - if (-not (Test-Path $targetPath)) { - $null = New-Item -Path $targetPath -ItemType File -Force - } - Set-Content -Path $targetPath -Value ( + $targetPath = + $this.Directory,"_data",($keyValue.Key | toJsonFileName) -join + [IO.Path]::DirectorySeparatorChar -replace + '[\\/]', [IO.Path]::DirectorySeparatorChar + + New-Item -Path $targetPath -ItemType File -Force -Value ( ConvertTo-Json -Depth $FormatEnumerationLimit -InputObject $($keyValue.Value) ) } @@ -766,11 +784,10 @@ foreach ($arg in $unrolledArguments) { $currentName = $arg } elseif ($currentName) { - $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join ([IO.Path]::DirectorySeparatorChar) - if (-not (Test-Path $targetPath)) { - $null = New-Item -Path $targetPath -ItemType File -Force - } - Set-Content -Path $targetPath -Value ( + $targetPath = $this.Directory,"_data",($currentName | toJsonFileName) -join + [IO.Path]::DirectorySeparatorChar -replace + '[\\/]', [IO.Path]::DirectorySeparatorChar + New-Item -Path $targetPath -ItemType File -Force -Value ( ConvertTo-Json -Depth ($FormatEnumerationLimit * 2) -InputObject $arg ) } From eaf41a96439b3cda524ca8d11c084b6e6bc6e455 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:21 +0000 Subject: [PATCH 450/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/PSJekyll/Site/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/PSJekyll/Site/README.md b/docs/PSJekyll/Site/README.md index 3cd1c75..77535a5 100644 --- a/docs/PSJekyll/Site/README.md +++ b/docs/PSJekyll/Site/README.md @@ -6,5 +6,7 @@ * [get_Config](get_Config.md) * [set_Config](set_Config.md) +* [get_Data](get_Data.md) +* [set_Data](set_Data.md) * [get_Domain](get_Domain.md) * [set_Domain](set_Domain.md) From c25bd5fe192c0ae8588cdb931ae2cbcce5c812fa Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:21 +0000 Subject: [PATCH 451/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/PSJekyll/Site/get_Data.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Site/get_Data.md diff --git a/docs/PSJekyll/Site/get_Data.md b/docs/PSJekyll/Site/get_Data.md new file mode 100644 index 0000000..481a4a4 --- /dev/null +++ b/docs/PSJekyll/Site/get_Data.md @@ -0,0 +1,15 @@ +PSJekyll.Site.get_Data() +------------------------ + +### Synopsis +Gets data files in a Jekyll site + +--- + +### Description + +Gets data files in a Jekyll site, using PowerShell. + +This will return the file objects in the _data folder. + +--- From 9dfaa408ef1e7f160938efadecc3a87fa47b8820 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:22 +0000 Subject: [PATCH 452/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/PSJekyll/Site/set_Data.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/PSJekyll/Site/set_Data.md diff --git a/docs/PSJekyll/Site/set_Data.md b/docs/PSJekyll/Site/set_Data.md new file mode 100644 index 0000000..23fc04b --- /dev/null +++ b/docs/PSJekyll/Site/set_Data.md @@ -0,0 +1,17 @@ +PSJekyll.Site.set_Data() +------------------------ + +### Synopsis +Sets data files in a Jekyll site + +--- + +### Description + +Sets data files in a Jekyll site, using PowerShell. + +Data files are a simple and powerful way to add custom data to your site. + +Simply use this to set a property, and the data will be available in Jekyll within `site.data` + +--- From 9914762c69096d66b84a96208143c475d42712d8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 453/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleInfo.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index f043611..4a27623 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + ] } } -} +} \ No newline at end of file From e42e88271daf917d4f6db18cf8a3478f587320c7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 454/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleVariableNames.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleVariableNames.json b/docs/_data/PSModuleVariableNames.json index 8014112..d19c8e6 100644 --- a/docs/_data/PSModuleVariableNames.json +++ b/docs/_data/PSModuleVariableNames.json @@ -1 +1 @@ -"PSJekyll" +"PSJekyll" \ No newline at end of file From 3e750c8cc43e0cf9bd1af72138808afd54bf0fda Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 455/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleCmdletNames.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleCmdletNames.json b/docs/_data/PSModuleCmdletNames.json index 19765bd..ec747fa 100644 --- a/docs/_data/PSModuleCmdletNames.json +++ b/docs/_data/PSModuleCmdletNames.json @@ -1 +1 @@ -null +null \ No newline at end of file From 1fc7388612a4e25a43a259c97d4e262ebf015c76 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 456/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/LastDateBuilt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/LastDateBuilt.json b/docs/_data/LastDateBuilt.json index 3f618fb..6620175 100644 --- a/docs/_data/LastDateBuilt.json +++ b/docs/_data/LastDateBuilt.json @@ -1 +1 @@ -"2024-10-09" +"2024-10-09" \ No newline at end of file From acd0de94db3bb5b500a6531793a8405184c67e26 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 457/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleAliasNames.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleAliasNames.json b/docs/_data/PSModuleAliasNames.json index 39c6351..e775ae1 100644 --- a/docs/_data/PSModuleAliasNames.json +++ b/docs/_data/PSModuleAliasNames.json @@ -4,4 +4,4 @@ "Set-Jekyll", "Start-Jekyll", "Stop-Jekyll" -] +] \ No newline at end of file From 04881bca639312aca3cd279bfef17f23396f3c82 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 458/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleExports.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleExports.json b/docs/_data/PSModuleExports.json index 63ae4d3..5b476ee 100644 --- a/docs/_data/PSModuleExports.json +++ b/docs/_data/PSModuleExports.json @@ -1871,4 +1871,4 @@ } ] } -] +] \ No newline at end of file From 7de60ca7060c2d9b7d73f91c861415eb82fe4814 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:44:24 +0000 Subject: [PATCH 459/769] docs: PSJekyll.Site.get/set_Data ( Fixes #41, Fixes #48 ) Adding documentation and always using New-Item --- docs/_data/PSModuleFunctionNames.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleFunctionNames.json b/docs/_data/PSModuleFunctionNames.json index 838648d..1ddd5ff 100644 --- a/docs/_data/PSModuleFunctionNames.json +++ b/docs/_data/PSModuleFunctionNames.json @@ -4,4 +4,4 @@ "Set-PSJekyll", "Start-PSJekyll", "Stop-PSJekyll" -] +] \ No newline at end of file From 5e632d309501cc8b7ed91b2e7150ddf2858c197f Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 19:52:09 -0700 Subject: [PATCH 460/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- Types/PSJekyll.Site/get_Config.ps1 | 4 +++- Types/PSJekyll.Site/set_Config.ps1 | 15 ++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Types/PSJekyll.Site/get_Config.ps1 b/Types/PSJekyll.Site/get_Config.ps1 index 1c191f0..fe5843a 100644 --- a/Types/PSJekyll.Site/get_Config.ps1 +++ b/Types/PSJekyll.Site/get_Config.ps1 @@ -5,8 +5,10 @@ Gets the configuration of the Jekyll site. This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) +.EXAMPLE + $psJekyll.CurrentSite.Config #> - +param() $configFile = Join-Path $this.Directory "_config.yml" if (Test-Path $configFile) { Get-Item -Path $configFile diff --git a/Types/PSJekyll.Site/set_Config.ps1 b/Types/PSJekyll.Site/set_Config.ps1 index 2ecb8e7..8e6c5e6 100644 --- a/Types/PSJekyll.Site/set_Config.ps1 +++ b/Types/PSJekyll.Site/set_Config.ps1 @@ -5,8 +5,16 @@ Gets the configuration of the Jekyll site. This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) +.EXAMPLE + $psJekyll.CurrentSite.Config = [Ordered]@{ + title = 'My Awesome Site' + description = 'This is a site that is awesome.' + permalink = 'pretty' + } #> param( +# The new configuration object. +# This will be converted to YAML and added to the _config.yml file. $Value ) $configFile = Join-Path $this.Directory "_config.yml" @@ -20,8 +28,5 @@ $valueToAdd = else { & $PSJekyll.FormatYAML.Script $value } -if (Test-Path $configFile) { - Set-Content -Path $configFile -Value $valueToAdd -} else { - New-Item -ItemType File -Path $configFile -Force -Value $valueToAdd -} \ No newline at end of file + +New-Item -ItemType File -Path $configFile -Force -Value $valueToAdd From 54572114954fe3f1dcb74722bfd94b2dda0caea2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:52:55 +0000 Subject: [PATCH 461/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- PSJekyll.types.ps1xml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index b9d3207..d8ee78a 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -691,8 +691,10 @@ foreach ($jekyllConfigFile in $jekyllConfigFiles) { Gets the configuration of the Jekyll site. This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) +.EXAMPLE + $psJekyll.CurrentSite.Config #> - +param() $configFile = Join-Path $this.Directory "_config.yml" if (Test-Path $configFile) { Get-Item -Path $configFile @@ -706,8 +708,16 @@ if (Test-Path $configFile) { Gets the configuration of the Jekyll site. This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) +.EXAMPLE + $psJekyll.CurrentSite.Config = [Ordered]@{ + title = 'My Awesome Site' + description = 'This is a site that is awesome.' + permalink = 'pretty' + } #> param( +# The new configuration object. +# This will be converted to YAML and added to the _config.yml file. $Value ) $configFile = Join-Path $this.Directory "_config.yml" @@ -721,11 +731,9 @@ $valueToAdd = else { & $PSJekyll.FormatYAML.Script $value } -if (Test-Path $configFile) { - Set-Content -Path $configFile -Value $valueToAdd -} else { - New-Item -ItemType File -Path $configFile -Force -Value $valueToAdd -} + +New-Item -ItemType File -Path $configFile -Force -Value $valueToAdd + From 99a4ac758a77ea2a1c3701b8422af9421fb2b892 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:53:04 +0000 Subject: [PATCH 462/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- docs/PSJekyll/Site/get_Config.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/PSJekyll/Site/get_Config.md b/docs/PSJekyll/Site/get_Config.md index 9d2165b..ff393c6 100644 --- a/docs/PSJekyll/Site/get_Config.md +++ b/docs/PSJekyll/Site/get_Config.md @@ -13,3 +13,12 @@ Gets the configuration of the Jekyll site. This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) --- + +### Examples +> EXAMPLE 1 + +```PowerShell +$psJekyll.CurrentSite.Config +``` + +--- From 0e84bb55dfa334ffbbd8e8fe433e9003b888151b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:53:04 +0000 Subject: [PATCH 463/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- docs/PSJekyll/Site/set_Config.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/PSJekyll/Site/set_Config.md b/docs/PSJekyll/Site/set_Config.md index 0093075..be1369a 100644 --- a/docs/PSJekyll/Site/set_Config.md +++ b/docs/PSJekyll/Site/set_Config.md @@ -14,8 +14,23 @@ This can be provided by a _config.yml file in the root of the site (and essentia --- +### Examples +> EXAMPLE 1 + +```PowerShell +$psJekyll.CurrentSite.Config = [Ordered]@{ + title = 'My Awesome Site' + description = 'This is a site that is awesome.' + permalink = 'pretty' +} +``` + +--- + ### Parameters #### **Value** +The new configuration object. +This will be converted to YAML and added to the _config.yml file. |Type |Required|Position|PipelineInput| |----------|--------|--------|-------------| From 30a57b6582140d234dc095ad455b51cdb86cd000 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:53:07 +0000 Subject: [PATCH 464/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 4a27623..bdc0333 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -15,13 +15,13 @@ "PrivateData": { "PSData": { "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ] + ], + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } } \ No newline at end of file From ab71b4cf03067f6b4210069b563ba478b95abd26 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 02:53:07 +0000 Subject: [PATCH 465/769] docs: PSJekyll.Site.get/set_Config ( Fixes #65, Fixes #66 ) Adding examples and always using New-Item --- docs/_config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index ad8291b..914c778 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -10,4 +10,3 @@ stylesheet: https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min defaults: - values: layout: Default - From be8ed72e3ed20212a8aaa05871cbc28ea60b2b7e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 20:16:38 -0700 Subject: [PATCH 466/769] docs: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Renaming and allowing page fonts --- ...gleFont.ps1 => Include.GoogleFont.html.ps1} | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) rename Types/PSJekyll.Template/{IncludeGoogleFont.ps1 => Include.GoogleFont.html.ps1} (59%) diff --git a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 b/Types/PSJekyll.Template/Include.GoogleFont.html.ps1 similarity index 59% rename from Types/PSJekyll.Template/IncludeGoogleFont.ps1 rename to Types/PSJekyll.Template/Include.GoogleFont.html.ps1 index 103fb6d..b2a52cf 100644 --- a/Types/PSJekyll.Template/IncludeGoogleFont.ps1 +++ b/Types/PSJekyll.Template/Include.GoogleFont.html.ps1 @@ -4,14 +4,20 @@ .DESCRIPTION Includes a Google Font in the site. - This will add a link to the Google Font. It should be located in the head of the site. + This will add a link to the Google Font. + + It can be located within the site or page front matter. #> param( # The name of the font to include. +# If no value is directly provided, it will attempt to find a value in site.googleFont. +# If no font is found, it will default to Roboto. [string] $FontName, +# The code font to include. +# If no code font is provided, it will default to Roboto Mono. [string] $CodeFont ) @@ -19,7 +25,10 @@ $CodeFont if ($FontName) { "" } else { - "{% if site.googleFont %}" + "{% if page.googleFont %}" + "" + "" + "{% elsif site.googleFont %}" "" "" "{% else %}" @@ -31,7 +40,10 @@ if ($FontName) { if ($CodeFont) { "" } else { - "{% if site.codeFont %}" + "{% if page.codeFont %}" + "" + "" + "{% elsif site.codeFont %}" "" "" "{% else %}" From 9f05e8f52fae04d08b247dd09dca811bf8b74be7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 03:17:33 +0000 Subject: [PATCH 467/769] docs: PSJekyll.Template.IncludeGoogleFont ( Fixes #59 ) Renaming and allowing page fonts --- PSJekyll.types.ps1xml | 110 +++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index d8ee78a..cc62d68 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1247,6 +1247,67 @@ $RepositoryUrl "@
    + + Include.GoogleFont.html + + Include.Menu.html - - IncludeGoogleFont - - IncludeImportMap + + + Include.Margin.html + @@ -1555,46 +1602,6 @@ if ($ImportMap) { } - - IncludeMargin - - IncludeMyRepos + + + Include.Footer.html + @@ -1537,39 +1570,6 @@ body > * { margin: 1em; } - - IncludeFooter - - IncludeImportMap + + Include.ImportMap.html + + Include.Margin.html - - IncludeImportMap - - IncludeMyRepos - IncludeMyRepos + Include.OpenGraph.html - - - IncludeOpenGraph - + + + IncludeMyRepos + From b92aaf65cc94a51098e0691bc35cc458b1db236c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:36:30 +0000 Subject: [PATCH 511/769] fix: PSJekyll.Template.Include.OpenGraph ( Fixes #58 ) Renaming and adding docs --- docs/PSJekyll/Template/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md index 1c2e51d..350d636 100644 --- a/docs/PSJekyll/Template/README.md +++ b/docs/PSJekyll/Template/README.md @@ -10,5 +10,6 @@ * [html](html.md) * [html](html.md) * [html](html.md) +* [html](html.md) * [IncludeMyRepos](IncludeMyRepos.md) * [MinGemFile](MinGemFile.md) From f909eeeb22263495ab74dab37513b94d51547b14 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:36:30 +0000 Subject: [PATCH 512/769] fix: PSJekyll.Template.Include.OpenGraph ( Fixes #58 ) Renaming and adding docs --- .../Template/Include/OpenGraph/html.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/OpenGraph/html.md diff --git a/docs/PSJekyll/Template/Include/OpenGraph/html.md b/docs/PSJekyll/Template/Include/OpenGraph/html.md new file mode 100644 index 0000000..7477f6b --- /dev/null +++ b/docs/PSJekyll/Template/Include/OpenGraph/html.md @@ -0,0 +1,31 @@ +PSJekyll.Template.Include.OpenGraph.html() +------------------------------------------ + +### Synopsis +Include Open Graph meta tags in a Jekyll site. + +--- + +### Description + +Include Open Graph meta tags in a Jekyll site. + +These tags can help social media sites understand the content of your site, and show preview images. + +This script is intended to be included in the head of a Jekyll site. + +It will output the Open Graph meta tags for the current page and site. + +--- + +### Notes +Tags included: +- og:site_name +- og:title +- og:type +- og:description +- og:url +- og:image +- article:published_time + +--- From 27b14763305c2a0c309afcac69391e6eb561e3ae Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:36:33 +0000 Subject: [PATCH 513/769] fix: PSJekyll.Template.Include.OpenGraph ( Fixes #58 ) Renaming and adding docs --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 82f209c..55570c7 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } From bbe9f2a9ce4d48d669e350e14ab6852d6eeb256f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:36:33 +0000 Subject: [PATCH 514/769] fix: PSJekyll.Template.Include.OpenGraph ( Fixes #58 ) Renaming and adding docs --- docs/_includes/OpenGraph.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html index d9d5798..c2a4fb5 100644 --- a/docs/_includes/OpenGraph.html +++ b/docs/_includes/OpenGraph.html @@ -1,8 +1,6 @@ {% if page.title %} -{% elsif page.stylesheet %} - {% else %} {% endif %} From 8ec3a67d63687cb78d78af35663d84a9960acce7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 21:42:48 -0700 Subject: [PATCH 515/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- PSJekyll.PSJekyll.ps1 | 17 +++++++++++------ ...ncludeMyRepos.ps1 => Include.MyRepos.md.ps1} | 0 2 files changed, 11 insertions(+), 6 deletions(-) rename Types/PSJekyll.Template/{IncludeMyRepos.ps1 => Include.MyRepos.md.ps1} (100%) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 33fce2b..30705f9 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -64,17 +64,22 @@ $PSJekyll.CurrentSite.Config = [Ordered]@{ } $PSJekyll.CurrentSite.Config -foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { - if ($templateMethod.Name -notmatch '^(?>layout|include)\p{P}{0,}') { +foreach ($templateMember in $PSJekyll.Template.psobject.Members) { + if ($templateMember.Name -notmatch '^(?>layout|include)\p{P}{0,}') { continue } $templateFileType = $matches.0 -replace '\p{P}{0,}$' - $templateFileName = $templateMethod.Name -replace "^$([Regex]::Escape($templateFileType))\p{P}{0,}" + $templateFileName = $templateMember.Name -replace "^$([Regex]::Escape($templateFileType))\p{P}{0,}" - if ($templateMethod.Name -notmatch '\.([^\.]+?)$') { + if ($templateMember.Name -notmatch '\.([^\.]+?)$') { $templateFileName += '.html' } - $templateOut = $templateMethod.Invoke() + $templateOut = + if ($templateMember.Invoke) { + $templateMember.Invoke() + } else { + $templateMember.Value + } try { $PSJekyll.CurrentSite.$templateFileType = $templateFileName, $templateOut } catch { @@ -84,7 +89,7 @@ foreach ($templateMethod in $PSJekyll.Template.psobject.Methods) { } $PSJekyll.CurrentSite.Page = 'SiteMap', "{% include SiteMap.html %}" -$PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.html %}" +$PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.md %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include $PSJekyll.CurrentSite.Page diff --git a/Types/PSJekyll.Template/IncludeMyRepos.ps1 b/Types/PSJekyll.Template/Include.MyRepos.md.ps1 similarity index 100% rename from Types/PSJekyll.Template/IncludeMyRepos.ps1 rename to Types/PSJekyll.Template/Include.MyRepos.md.ps1 From bfa702dade58170d89d12894476960e6c062f6f9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:43:57 +0000 Subject: [PATCH 516/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- PSJekyll.types.ps1xml | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index cc75abd..2affea7 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1624,6 +1624,31 @@ body > * { margin: 1em; } {{RightCenterMenu}} </menu> {% endif %} +'@ + + + + + Include.MyRepos.md + @@ -1702,31 +1727,6 @@ param() '@ - - - - IncludeMyRepos - From 965adc3990a159f6809eb801cceba350332c7937 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:44:07 +0000 Subject: [PATCH 517/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- docs/PSJekyll/Template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md index 350d636..d3dbe6f 100644 --- a/docs/PSJekyll/Template/README.md +++ b/docs/PSJekyll/Template/README.md @@ -10,6 +10,6 @@ * [html](html.md) * [html](html.md) * [html](html.md) +* [md](md.md) * [html](html.md) -* [IncludeMyRepos](IncludeMyRepos.md) * [MinGemFile](MinGemFile.md) From 9ed506887911f9152a223284bbffba99d20ab5bb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:44:07 +0000 Subject: [PATCH 518/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- docs/PSJekyll/Template/Include/MyRepos/md.md | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/MyRepos/md.md diff --git a/docs/PSJekyll/Template/Include/MyRepos/md.md b/docs/PSJekyll/Template/Include/MyRepos/md.md new file mode 100644 index 0000000..3c3c674 --- /dev/null +++ b/docs/PSJekyll/Template/Include/MyRepos/md.md @@ -0,0 +1,22 @@ +PSJekyll.Template.Include.MyRepos.md() +-------------------------------------- + +### Synopsis +Include my repositories. + +--- + +### Description + +Include my repositories in the site. + +This will add a list of the owner's repositories to the site. + +This will only work in GitHub Pages. + +--- + +### Related Links +* [https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md](https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md) + +--- From 50093de7055f3598bd4d5ffa1968d682d420ded4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:44:10 +0000 Subject: [PATCH 519/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 55570c7..82f209c 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } From 2826d7c5c06921578d7a25faf577368eaeab8939 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:44:11 +0000 Subject: [PATCH 520/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- docs/_includes/MyRepos.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/MyRepos.md diff --git a/docs/_includes/MyRepos.md b/docs/_includes/MyRepos.md new file mode 100644 index 0000000..fdc09e8 --- /dev/null +++ b/docs/_includes/MyRepos.md @@ -0,0 +1,3 @@ +{% for repository in site.github.public_repositories %} + * [{{ repository.name }}]({{ repository.html_url }}) +{% endfor %} \ No newline at end of file From e9cbc28fdaa1f6014a220e25c58c6c3b59172f06 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:44:11 +0000 Subject: [PATCH 521/769] fix: PSJekyll.Template.Include.MyRepos ( Fixes #71 ) Renaming and updating PSJekyll.PSJekyll.ps1 --- docs/MyRepos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/MyRepos.md b/docs/MyRepos.md index 93aa19c..d18ac75 100644 --- a/docs/MyRepos.md +++ b/docs/MyRepos.md @@ -2,4 +2,4 @@ title: MyRepos --- -{% include MyRepos.html %} +{% include MyRepos.md %} From 66202c8c0d5021ba7dd866def5eaffa8dcbc9fb1 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 21:52:12 -0700 Subject: [PATCH 522/769] fix: PSJekyll.Template.Include.SiteTree ( Fixes #70 ) Renaming and adding docs --- PSJekyll.PSJekyll.ps1 | 2 +- .../{IncludeSiteMap.ps1 => Include.SiteTree.html.ps1} | 8 ++++++++ docs/SiteMap.md | 5 ----- 3 files changed, 9 insertions(+), 6 deletions(-) rename Types/PSJekyll.Template/{IncludeSiteMap.ps1 => Include.SiteTree.html.ps1} (78%) delete mode 100644 docs/SiteMap.md diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 30705f9..4c26fa3 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -88,7 +88,7 @@ foreach ($templateMember in $PSJekyll.Template.psobject.Members) { } } -$PSJekyll.CurrentSite.Page = 'SiteMap', "{% include SiteMap.html %}" +$PSJekyll.CurrentSite.Page = 'Tree', "{% include SiteTree.html %}" $PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.md %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include diff --git a/Types/PSJekyll.Template/IncludeSiteMap.ps1 b/Types/PSJekyll.Template/Include.SiteTree.html.ps1 similarity index 78% rename from Types/PSJekyll.Template/IncludeSiteMap.ps1 rename to Types/PSJekyll.Template/Include.SiteTree.html.ps1 index 1824ba3..10dfbe9 100644 --- a/Types/PSJekyll.Template/IncludeSiteMap.ps1 +++ b/Types/PSJekyll.Template/Include.SiteTree.html.ps1 @@ -1,3 +1,11 @@ +<# +.SYNOPSIS + Gets the site tree. +.DESCRIPTION + Gets the site tree of the Jekyll site. + + This will return all pages in the Jekyll site. +#> param() @' diff --git a/docs/SiteMap.md b/docs/SiteMap.md deleted file mode 100644 index 4c21cc1..0000000 --- a/docs/SiteMap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- - -title: SiteMap ---- -{% include SiteMap.html %} From 72605e16951c721da00209cd08926782853d1d17 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 04:53:10 +0000 Subject: [PATCH 523/769] fix: PSJekyll.Template.Include.SiteTree ( Fixes #70 ) Renaming and adding docs --- PSJekyll.types.ps1xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 2affea7..60ad4fe 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1730,9 +1730,17 @@ param() - IncludeSiteMap + Include.SiteTree.html +{% endif %} +'@ \ No newline at end of file diff --git a/Types/PSJekyll.Template/LayoutDefault.ps1 b/Types/PSJekyll.Template/LayoutDefault.ps1 index b99c2bf..2478004 100644 --- a/Types/PSJekyll.Template/LayoutDefault.ps1 +++ b/Types/PSJekyll.Template/LayoutDefault.ps1 @@ -12,7 +12,8 @@ {% include GoogleFont.html %} {% include 4bitcss.html %} {% include Margin.html %} - {% include Stylesheet.html %} + {% include Stylesheet.html %} + {% include Htmx.html %} From f78f79fae11c2336f0360f53dbfe31529f02b512 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:14:12 +0000 Subject: [PATCH 530/769] feat: PSJekyll.Template.Include.Htmx ( Fixes #67 ) Adding to default layout --- PSJekyll.types.ps1xml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 60ad4fe..ba5ae42 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1364,6 +1364,26 @@ if ($CodeFont) { + + Include.Htmx.html + + Include.ImportMap.html +{% endif %} \ No newline at end of file From c933a43d52bc92970b8509f6edb22659af7f3f6a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:14:24 +0000 Subject: [PATCH 535/769] feat: PSJekyll.Template.Include.Htmx ( Fixes #67 ) Adding to default layout --- docs/Tree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Tree.md b/docs/Tree.md index 6f2d8aa..1ae2682 100644 --- a/docs/Tree.md +++ b/docs/Tree.md @@ -2,4 +2,4 @@ title: Tree --- -{% include SiteTree.html %} \ No newline at end of file +{% include SiteTree.html %} From 7d1fab62eb7cbd23e0c5e4777f4c301409428c21 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 22:22:20 -0700 Subject: [PATCH 536/769] feat: PSJekyll.Template.Include.Stylesheet ( Fixes #60 ) Renaming and adding docs. --- ...{IncludeStylesheet.ps1 => Include.Stylesheet.html.ps1} | 8 ++++++++ 1 file changed, 8 insertions(+) rename Types/PSJekyll.Template/{IncludeStylesheet.ps1 => Include.Stylesheet.html.ps1} (70%) diff --git a/Types/PSJekyll.Template/IncludeStylesheet.ps1 b/Types/PSJekyll.Template/Include.Stylesheet.html.ps1 similarity index 70% rename from Types/PSJekyll.Template/IncludeStylesheet.ps1 rename to Types/PSJekyll.Template/Include.Stylesheet.html.ps1 index d237723..6c662d4 100644 --- a/Types/PSJekyll.Template/IncludeStylesheet.ps1 +++ b/Types/PSJekyll.Template/Include.Stylesheet.html.ps1 @@ -1,3 +1,11 @@ +<# +.SYNOPSIS + Includes stylesheets in a Jekyll site. +.DESCRIPTION + Optionally includes stylesheets in a Jekyll site. + + If the site or page has any `.stylesheet` property, then the stylesheets will be included. +#> param() @' From 84a35ffa89856a19d99b847f4a0875e63809550e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:23:49 +0000 Subject: [PATCH 537/769] feat: PSJekyll.Template.Include.Stylesheet ( Fixes #60 ) Renaming and adding docs. --- PSJekyll.types.ps1xml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ba5ae42..860d5c1 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1787,9 +1787,17 @@ param() - IncludeStylesheet + Include.Stylesheet.html - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html deleted file mode 100644 index eef46f2..0000000 --- a/docs/_includes/GoogleFont.html +++ /dev/null @@ -1,20 +0,0 @@ -{% if page.googleFont %} - - -{% elsif site.googleFont %} - - -{% else %} - - -{% endif %} -{% if page.codeFont %} - - -{% elsif site.codeFont %} - - -{% else %} - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Htmx.html b/docs/_includes/Htmx.html deleted file mode 100644 index a8cfa5b..0000000 --- a/docs/_includes/Htmx.html +++ /dev/null @@ -1,3 +0,0 @@ -{% if page.htmx or site.htmx %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html deleted file mode 100644 index af3a6ca..0000000 --- a/docs/_includes/ImportMap.html +++ /dev/null @@ -1,25 +0,0 @@ -{% if page.imports %} - {% assign importMap = page.imports %} -{% elsif page.importMap %} - {% assign importMap = page.importMap %} -{% elsif site.imports %} - {% assign importMap = site.imports %} -{% elsif site.importMap %} - {% assign importMap = site.importMap %} -{% elsif site.data.imports %} - {% assign importMap = site.data.imports %} -{% elsif site.data.importMap %} - {% assign importMap = site.data.importMap %} -{% endif %} -{% if importMap %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Margin.html b/docs/_includes/Margin.html deleted file mode 100644 index f5f3c60..0000000 --- a/docs/_includes/Margin.html +++ /dev/null @@ -1,12 +0,0 @@ -{% if page.margin %} - -{% elsif site.margin %} - -{% else %} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html deleted file mode 100644 index 14a7574..0000000 --- a/docs/_includes/Menu.html +++ /dev/null @@ -1,147 +0,0 @@ -{% capture TopLeftMenu %} - {{page.menu.TopLeft}} - {{site.menu.TopLeft}} - {{site.data.menu.TopLeft}} -{% endcapture %} -{% assign TopLeftMenu = TopLeftMenu | strip %} - -{% capture TopRightMenu %} - {{page.menu.TopRight}} - {{site.menu.TopRight}} - {{site.data.menu.TopRight}} - {% unless site.NoGitHubLink or site.NoLink %} - {% include GitHubLink.html %} - {% endunless %} -{% endcapture %} -{% assign TopRightMenu = TopRightMenu | strip %} - -{% capture TopCenterMenu %} - {{page.menu.TopCenter}} - {{site.menu.TopCenter}} - {{site.data.menu.TopCenter}} -{% endcapture %} -{% assign TopCenterMenu = TopCenterMenu | strip %} - -{% capture BottomLeftMenu %} - {{page.menu.BottomLeft}} - {{site.menu.BottomLeft}} - {{site.data.menu.BottomLeft}} -{% endcapture %} -{% assign BottomLeftMenu = BottomLeftMenu | strip %} - -{% capture BottomRightMenu %} - {{page.menu.BottomRight}} - {{site.menu.BottomRight}} - {{site.data.menu.BottomRight}} -{% endcapture %} -{% assign BottomRightMenu = BottomRightMenu | strip %} - -{% capture BottomCenterMenu %} - {{page.menu.BottomCenter}} - {{site.menu.BottomCenter}} - {{site.data.menu.BottomCenter}} -{% endcapture %} -{% assign BottomCenterMenu = BottomCenterMenu | strip %} - -{% capture LeftCenterMenu %} - {{page.menu.LeftCenter}} - {{site.menu.LeftCenter}} - {{site.data.menu.LeftCenter}} -{% endcapture %} -{% assign LeftCenterMenu = LeftCenterMenu | strip %} - -{% capture RightCenterMenu %} - {{page.menu.RightCenter}} - {{site.menu.RightCenter}} - {{site.data.menu.RightCenter}} -{% endcapture %} -{% assign RightCenterMenu = RightCenterMenu | strip %} - -{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} - -{% endif %} - -{% if TopLeftMenu != "" %} - - {{TopLeftMenu}} - -{% endif %} - -{% if TopRightMenu != "" %} - - {{TopRightMenu}} - -{% endif %} - -{% if TopCenterMenu != "" %} - - {{TopCenterMenu}} - -{% endif %} - -{% if BottomLeftMenu != "" %} - - {{BottomLeftMenu}} - -{% endif %} - -{% if BottomRightMenu != "" %} - - {{BottomRightMenu}} - -{% endif %} - -{% if BottomCenterMenu != "" %} - - {{BottomCenterMenu}} - -{% endif %} - -{% if LeftCenterMenu != "" %} - - {{LeftCenterMenu}} - -{% endif %} - -{% if RightCenterMenu != "" %} - - {{RightCenterMenu}} - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/MyRepos.html b/docs/_includes/MyRepos.html deleted file mode 100644 index fdc09e8..0000000 --- a/docs/_includes/MyRepos.html +++ /dev/null @@ -1,3 +0,0 @@ -{% for repository in site.github.public_repositories %} - * [{{ repository.name }}]({{ repository.html_url }}) -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/MyRepos.md b/docs/_includes/MyRepos.md deleted file mode 100644 index fdc09e8..0000000 --- a/docs/_includes/MyRepos.md +++ /dev/null @@ -1,3 +0,0 @@ -{% for repository in site.github.public_repositories %} - * [{{ repository.name }}]({{ repository.html_url }}) -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html deleted file mode 100644 index c2a4fb5..0000000 --- a/docs/_includes/OpenGraph.html +++ /dev/null @@ -1,44 +0,0 @@ - -{% if page.title %} - -{% else %} - -{% endif %} -{% if page.type %} - -{% else %} - -{% endif %} -{% if page.description %} - - - -{% elsif content %} - - - - - -{% elsif site.description %} - - - -{% endif %} -{% if page.date %} - -{% endif %} -{% if page.url %} - - - -{% endif %} - -{% if page.image %} - - - -{% elsif site.image %} - - - -{% endif %} \ No newline at end of file diff --git a/docs/_includes/SiteMap.html b/docs/_includes/SiteMap.html deleted file mode 100644 index b64882c..0000000 --- a/docs/_includes/SiteMap.html +++ /dev/null @@ -1,20 +0,0 @@ -{% assign pages_by_url = site.pages | sort: "url" %} -{% assign page_depth = 0 %} - -{% for page in pages_by_url %} - {% if page.title == nil %} - {% continue %} - {% endif %} - {% assign page_parts = page.url | split: "/" %} - {% if page_parts.size > page_depth %} - {% assign page_depth = page_parts.size %} -
      - {% endif %} - {% if page_parts.size < page_depth %} - {% assign page_depth = page_parts.size %} -
    - {% endif %} -
  • -{{ page.title }} -
  • -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/SiteTree.html b/docs/_includes/SiteTree.html deleted file mode 100644 index b64882c..0000000 --- a/docs/_includes/SiteTree.html +++ /dev/null @@ -1,20 +0,0 @@ -{% assign pages_by_url = site.pages | sort: "url" %} -{% assign page_depth = 0 %} - -{% for page in pages_by_url %} - {% if page.title == nil %} - {% continue %} - {% endif %} - {% assign page_parts = page.url | split: "/" %} - {% if page_parts.size > page_depth %} - {% assign page_depth = page_parts.size %} -
      - {% endif %} - {% if page_parts.size < page_depth %} - {% assign page_depth = page_parts.size %} -
    - {% endif %} -
  • -{{ page.title }} -
  • -{% endfor %} \ No newline at end of file diff --git a/docs/_includes/Stylesheet.html b/docs/_includes/Stylesheet.html deleted file mode 100644 index 3a32d64..0000000 --- a/docs/_includes/Stylesheet.html +++ /dev/null @@ -1,15 +0,0 @@ -{% if site.data.stylesheet %} - {% for stylesheet in site.data.stylesheet %} - - {% endfor %} -{% endif %} -{% if page.stylesheet %} - {% for stylesheet in page.stylesheet %} - - {% endfor %} -{% endif %} -{% if include.stylesheet %} - {% for stylesheet in include.stylesheet %} - - {% endfor %} -{% endif %} \ No newline at end of file diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html deleted file mode 100644 index 9d0f2cb..0000000 --- a/docs/_layouts/Default.html +++ /dev/null @@ -1,27 +0,0 @@ ---- - -title: Default.html ---- - - - - - - - {% include GoogleAnalytics.html %} - {% include ImportMap.html %} - {% include OpenGraph.html %} - {% include GoogleFont.html %} - {% include 4bitcss.html %} - {% include Margin.html %} - {% include Stylesheet.html %} - {% include Htmx.html %} - - - -{% include Menu.html %} - -{{content}} - -{% include Footer.html %} - From cdd62f289f95f13713dc9e64cb70135ed246ae91 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:47 +0000 Subject: [PATCH 541/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- PSJekyll.psm1 | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/PSJekyll.psm1 b/PSJekyll.psm1 index 9be773d..7f1ccda 100644 --- a/PSJekyll.psm1 +++ b/PSJekyll.psm1 @@ -1,23 +1,15 @@ -$myGitDirectory = Join-Path $PSScriptRoot .git -if (Test-Path $myGitDirectory) { - $commandsPath = Join-Path $PSScriptRoot Commands - Write-Verbose "Git directory found, loading commands from $commandsPath" - :ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { - if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 - foreach ($exclusion in '\.[^\.]+\.ps1$') { - if (-not $exclusion) { continue } - if ($file.Name -match $exclusion) { - continue ToIncludeFiles # Skip excluded files - } - } - . $file.FullName - } -} else { - Write-Verbose "Git directory not found, loading allcommands.ps1" - . (Join-Path $PSScriptRoot "allcommands.ps1") +$commandsPath = Join-Path $PSScriptRoot Commands +:ToIncludeFiles foreach ($file in (Get-ChildItem -Path "$commandsPath" -Filter "*-*" -Recurse)) { + if ($file.Extension -ne '.ps1') { continue } # Skip if the extension is not .ps1 + foreach ($exclusion in '\.[^\.]+\.ps1$') { + if (-not $exclusion) { continue } + if ($file.Name -match $exclusion) { + continue ToIncludeFiles # Skip excluded files + } + } + . $file.FullName } - $myModule = $MyInvocation.MyCommand.ScriptBlock.Module $ExecutionContext.SessionState.PSVariable.Set($myModule.Name, $myModule) $myModule.pstypenames.insert(0, $myModule.Name) @@ -32,8 +24,6 @@ if ($home) { New-PSDrive -Name "My$($MyModule.Name)" -PSProvider FileSystem -Scope Global -Root $MyModuleProfileDirectory -ErrorAction Ignore } -$KnownVerbs = Get-Verb | Select-Object -ExpandProperty Verb - # Set a script variable of this, set to the module # (so all scripts in this scope default to the correct `$this`) $script:this = $myModule From be7c13d607fa35a06a0154101af325704875db32 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:54 +0000 Subject: [PATCH 542/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/New-PSJekyll.md | 103 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 docs/New-PSJekyll.md diff --git a/docs/New-PSJekyll.md b/docs/New-PSJekyll.md new file mode 100644 index 0000000..b1b5b27 --- /dev/null +++ b/docs/New-PSJekyll.md @@ -0,0 +1,103 @@ +New-PSJekyll +------------ + +### Synopsis +Creates a new Jekyll site. + +--- + +### Description + +Creates a new Jekyll site, using PowerShell. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Blank** +Creates scaffolding but with empty files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Force** +Force creation even if PATH already exists + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Safe** +Safe mode + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SkipBundle** +Skip the bundle install + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **SourcePath** +The path to the source files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |2 |false | + +#### **DestinationPath** +The path to the destination files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **LayoutPath** +The path to the layout files + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |5 |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +New-PSJekyll [[-Name] ] [-Blank] [-Force] [-Safe] [-SkipBundle] [[-SourcePath] ] [[-DestinationPath] ] [[-LayoutPath] ] [[-PluginPath] ] [-LiquidProfile] [-Trace] [] +``` From 060f70383276f853c5941719f98e459d7f0819d0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:55 +0000 Subject: [PATCH 543/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Remove-PSJekyll.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/Remove-PSJekyll.md diff --git a/docs/Remove-PSJekyll.md b/docs/Remove-PSJekyll.md new file mode 100644 index 0000000..65e6471 --- /dev/null +++ b/docs/Remove-PSJekyll.md @@ -0,0 +1,30 @@ +Remove-PSJekyll +--------------- + +### Synopsis +Removes content from Jekyll + +--- + +### Description + +Removes files from Jekyll + +This is a slightly limited version of Remove-Item. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|--------| +|`[String]`|true |1 |true (ByPropertyName)|FullName| + +--- + +### Syntax +```PowerShell +Remove-PSJekyll [-Path] [] +``` From 1c03a7c89c6271a7649c57a79f0f6078a8d2bb77 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:55 +0000 Subject: [PATCH 544/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Set-PSJekyll.md | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 docs/Set-PSJekyll.md diff --git a/docs/Set-PSJekyll.md b/docs/Set-PSJekyll.md new file mode 100644 index 0000000..72d950f --- /dev/null +++ b/docs/Set-PSJekyll.md @@ -0,0 +1,56 @@ +Set-PSJekyll +------------ + +### Synopsis +Sets the content of a file in Jekyll + +--- + +### Description + +Sets the content of a file in Jekyll. + +This is only slightly smarter than Set-Content. + +It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv. + +Otherwise, it will create a YAML header and then set the content. + +--- + +### Parameters +#### **Path** +The path to the file. + +|Type |Required|Position|PipelineInput|Aliases | +|----------|--------|--------|-------------|--------| +|`[String]`|true |1 |false |FullName| + +#### **PassThru** +If set, will return the file object + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Content** +The content to set + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|--------------| +|`[Object]`|false |named |true (ByValue)| + +#### **MetaData** +Any metadata to set. +This will create a YAML header, which is required for most files in Jekyll to be processed properly. + +|Type |Required|Position|PipelineInput|Aliases | +|---------------|--------|--------|-------------|----------| +|`[IDictionary]`|false |named |false |YamlHeader| + +--- + +### Syntax +```PowerShell +Set-PSJekyll [-Path] [-PassThru] [-Content ] [-MetaData ] [] +``` From 3c3dde9b9203db7cebc6b1755bbfb837fbda89bf Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:55 +0000 Subject: [PATCH 545/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Start-PSJekyll.md | 138 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 docs/Start-PSJekyll.md diff --git a/docs/Start-PSJekyll.md b/docs/Start-PSJekyll.md new file mode 100644 index 0000000..4f67c9f --- /dev/null +++ b/docs/Start-PSJekyll.md @@ -0,0 +1,138 @@ +Start-PSJekyll +-------------- + +### Synopsis +Starts a Jekyll server + +--- + +### Description + +Starts a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **Config** +One or more config files to use + +|Type |Required|Position|PipelineInput|Aliases | +|------------|--------|--------|-------------|-------------| +|`[String[]]`|false |2 |false |Configuration| + +#### **SourcePath** +The source directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |3 |false | + +#### **DestinationPath** +The destination directory + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |4 |false | + +#### **HostHeader** +The host header + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |5 |false | + +#### **Port** +The port to listen on + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[UInt32]`|false |6 |false | + +#### **PluginPath** +The path to the plugin files + +|Type |Required|Position|PipelineInput| +|------------|--------|--------|-------------| +|`[String[]]`|false |7 |false | + +#### **ShowDirectoryList** +If set, will show a directory list. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiveReload** +If set, will enable live reload. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **LiquidProfile** +If set, will generate a liquid profile + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Trace** +If set, will trace the execution + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Watch** +Watch for changes and rebuild + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **PreviewFuture** +If set, will publish posts with a future date (previewing them). + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **BaseUrl** +The base URL for the site + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |8 |false | + +#### **Detach** +If set, will detach the process + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +#### **Incremental** +Enable incremental rebuilds + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Switch]`|false |named |false | + +--- + +### Syntax +```PowerShell +Start-PSJekyll [[-Name] ] [[-Config] ] [[-SourcePath] ] [[-DestinationPath] ] [[-HostHeader] ] [[-Port] ] [[-PluginPath] ] [-ShowDirectoryList] [-LiveReload] [-LiquidProfile] [-Trace] [-Watch] [-PreviewFuture] [[-BaseUrl] ] [-Detach] [-Incremental] [] +``` From 401cb59feb41e82fc844efb7a8574ae623782329 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:55 +0000 Subject: [PATCH 546/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Stop-PSJekyll.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 docs/Stop-PSJekyll.md diff --git a/docs/Stop-PSJekyll.md b/docs/Stop-PSJekyll.md new file mode 100644 index 0000000..def98b3 --- /dev/null +++ b/docs/Stop-PSJekyll.md @@ -0,0 +1,33 @@ +Stop-PSJekyll +------------- + +### Synopsis +Stops a Jekyll server + +--- + +### Description + +Stops a Jekyll server in a PowerShell job. + +--- + +### Related Links +* [https://jekyllrb.com/](https://jekyllrb.com/) + +--- + +### Parameters +#### **Name** +The name of the Jekyll job + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |1 |true (ByPropertyName)| + +--- + +### Syntax +```PowerShell +Stop-PSJekyll [[-Name] ] [] +``` From f391813fdf1e57b0192f857e454b4c341401f911 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:57 +0000 Subject: [PATCH 547/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..312736e --- /dev/null +++ b/docs/README.md @@ -0,0 +1,48 @@ +
    + PSJekyll Logo (Animated) +
    + +# PSJekyll + +Scary Simple Static Sites with PowerShell and Jekyll + +[Jekyll](https://jekyllrb.com) 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 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. + +~~~yaml +- name: UseEZOut +- 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: + +~~~PowerShell +# 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. From 0521feb48cd5a93e5cb9f56f080c192ed3032692 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:57 +0000 Subject: [PATCH 548/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Assets/PSJekyll-Animated.svg | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 docs/Assets/PSJekyll-Animated.svg diff --git a/docs/Assets/PSJekyll-Animated.svg b/docs/Assets/PSJekyll-Animated.svg new file mode 100644 index 0000000..9462180 --- /dev/null +++ b/docs/Assets/PSJekyll-Animated.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From ee7479bb4728e2a5eee2f163e42a45f1b415babb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:57 +0000 Subject: [PATCH 549/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Assets/PSJekyll.svg | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/Assets/PSJekyll.svg diff --git a/docs/Assets/PSJekyll.svg b/docs/Assets/PSJekyll.svg new file mode 100644 index 0000000..1d243ba --- /dev/null +++ b/docs/Assets/PSJekyll.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + PSJekyll + From 12d1907f4134affcb7c4792ec664a269ee9f84c1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:57 +0000 Subject: [PATCH 550/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/PSJekyll/README.md diff --git a/docs/PSJekyll/README.md b/docs/PSJekyll/README.md new file mode 100644 index 0000000..56eface --- /dev/null +++ b/docs/PSJekyll/README.md @@ -0,0 +1,8 @@ +## PSJekyll + + +### Script Methods + + +* [FormatMarkdown](FormatMarkdown.md) +* [FormatYAML](FormatYAML.md) From ec19f298ae6223897b5b96e859c2616463945bf9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:57 +0000 Subject: [PATCH 551/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/FormatMarkdown.md | 187 ++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) create mode 100644 docs/PSJekyll/FormatMarkdown.md diff --git a/docs/PSJekyll/FormatMarkdown.md b/docs/PSJekyll/FormatMarkdown.md new file mode 100644 index 0000000..7c0eb1c --- /dev/null +++ b/docs/PSJekyll/FormatMarkdown.md @@ -0,0 +1,187 @@ +PSJekyll.FormatMarkdown() +------------------------- + +### Synopsis +Formats an object as Markdown + +--- + +### Description + +Formats an object as Markdown, with many options to work with + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +Format-Markdown -ScriptBlock { + Get-Process +} +``` +> EXAMPLE 2 + +```PowerShell +1..6 | Format-Markdown -HeadingSize { $_ } +``` + +--- + +### Parameters +#### **InputObject** + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|------------------------------| +|`[PSObject]`|false |1 |true (ByValue, ByPropertyName)| + +#### **MarkdownParagraph** +If set, will treat the -InputObject as a paragraph. +This is the default for strings, booleans, numbers, and other primitive types. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **MarkdownTable** +If set, will generate a markdown table. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **MarkdownTableAlignment** +If provided, will align columnns in a markdown table. +Valid Values: + +* Left +* Right +* Center +* + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|---------------------| +|`[String[]]`|false |2 |true (ByPropertyName)| + +#### **Property** +An array of properties. Providing this implies -MarkdownTable + +|Type |Required|Position|PipelineInput | +|--------------|--------|--------|---------------------| +|`[PSObject[]]`|false |3 |true (ByPropertyName)| + +#### **Heading** +A heading. +If provided without -HeadingSize, -HeadingSize will default to 2. +If provided with -InputObject, -Heading will take priority. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |4 |true (ByPropertyName)| + +#### **HeadingSize** +The heading size (1-6) +If provided without -Heading, the -InputObject will be considered to be a heading. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |5 |true (ByPropertyName)| + +#### **Link** +If set, will create a link. The -InputObject will be used as the link content + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|------------------| +|`[String]`|false |6 |true (ByPropertyName)|Hyperlink
    Href| + +#### **ImageLink** +If set, will create an image link. The -Inputobject will be used as the link content. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |7 |true (ByPropertyName)| + +#### **BulletPoint** +If set, will generate a bullet point list. + +|Type |Required|Position|PipelineInput |Aliases | +|----------|--------|--------|---------------------|---------------| +|`[Switch]`|false |named |true (ByPropertyName)|BulletpointList| + +#### **Checkbox** +If set, bullet or numbered list items will have a checkbox. +Each piped -InputObject will be an additional list item. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **Checked** +If set, bullet or numbered list items will be checked. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **NumberedList** +If set, will generate a numbered list. +Each piped -InputObject will be an additional list item. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **BlockQuote** +If set, will generate a block quote. +Each line of the -InputObject will be block quoted. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **BlockQuoteDepth** +If set, will generate a block quote of a particular depth. +Each line of the -InputObject will be block quoted. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |8 |true (ByPropertyName)| + +#### **Number** +If provided, will create a markdown numbered list with this particular item as the number. + +|Type |Required|Position|PipelineInput | +|---------|--------|--------|---------------------| +|`[Int32]`|false |9 |true (ByPropertyName)| + +#### **HorizontalRule** +If set, will generate a horizontal rule. +If other parameters are provided, the horiztonal rule will be placed after. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **Code** +If set, will output the -InputObject as a Markdown code block + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[Switch]`|false |named |true (ByPropertyName)| + +#### **CodeLanguage** +If set, will output the -InputObject as a Markdown code block, with a given language +If the -InputObject is a ScriptBlock, -CodeLanguage will be set to PowerShell. + +|Type |Required|Position|PipelineInput | +|----------|--------|--------|---------------------| +|`[String]`|false |10 |true (ByPropertyName)| + +#### **ScriptBlock** +If provided, will output a script block as a Markdown code block. + +|Type |Required|Position|PipelineInput | +|---------------|--------|--------|---------------------| +|`[ScriptBlock]`|false |11 |true (ByPropertyName)| + +--- From a0a5749c309e8b93f0e8fd8b27425c068bf83aeb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 552/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/FormatYAML.md | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 docs/PSJekyll/FormatYAML.md diff --git a/docs/PSJekyll/FormatYAML.md b/docs/PSJekyll/FormatYAML.md new file mode 100644 index 0000000..f57e880 --- /dev/null +++ b/docs/PSJekyll/FormatYAML.md @@ -0,0 +1,58 @@ +PSJekyll.FormatYAML() +--------------------- + +### Synopsis +Formats objects as YAML + +--- + +### Description + +Formats an object as YAML. + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +Format-Yaml -InputObject @("a", "b", "c") +``` +> EXAMPLE 2 + +```PowerShell +@{a="b";c="d";e=@{f=@('g')}} | Format-Yaml +``` + +--- + +### Parameters +#### **InputObject** +The InputObject. + +|Type |Required|Position|PipelineInput | +|------------|--------|--------|--------------| +|`[PSObject]`|false |1 |true (ByValue)| + +#### **YamlHeader** +If set, will make a YAML header by adding a YAML Document tag above and below output. + +|Type |Required|Position|PipelineInput|Aliases | +|----------|--------|--------|-------------|------------| +|`[Switch]`|false |named |false |YAMLDocument| + +#### **Indent** + +|Type |Required|Position|PipelineInput| +|---------|--------|--------|-------------| +|`[Int32]`|false |2 |false | + +#### **Depth** +The maximum depth of objects to include. +Beyond this depth, an empty string will be returned. + +|Type |Required|Position|PipelineInput| +|---------|--------|--------|-------------| +|`[Int32]`|false |3 |false | + +--- From 405f13343078b6480efa576688d0bfb08f658a6d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 553/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/PSJekyll/Site/README.md diff --git a/docs/PSJekyll/Site/README.md b/docs/PSJekyll/Site/README.md new file mode 100644 index 0000000..1b74ef0 --- /dev/null +++ b/docs/PSJekyll/Site/README.md @@ -0,0 +1,14 @@ +## PSJekyll.Site + + +### Script Methods + + +* [get_Config](get_Config.md) +* [set_Config](set_Config.md) +* [get_Data](get_Data.md) +* [set_Data](set_Data.md) +* [get_Domain](get_Domain.md) +* [set_Domain](set_Domain.md) +* [get_Draft](get_Draft.md) +* [set_Draft](set_Draft.md) From e6465fdfc2b8fe3688470ba02ad2f50a1a38b7eb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 554/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/get_Config.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/PSJekyll/Site/get_Config.md diff --git a/docs/PSJekyll/Site/get_Config.md b/docs/PSJekyll/Site/get_Config.md new file mode 100644 index 0000000..ff393c6 --- /dev/null +++ b/docs/PSJekyll/Site/get_Config.md @@ -0,0 +1,24 @@ +PSJekyll.Site.get_Config() +-------------------------- + +### Synopsis +Gets the config of the site. + +--- + +### Description + +Gets the configuration of the Jekyll site. + +This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +$psJekyll.CurrentSite.Config +``` + +--- From 0963976d6d178b266098003f0426b7320ac05b16 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 555/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/set_Config.md | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/PSJekyll/Site/set_Config.md diff --git a/docs/PSJekyll/Site/set_Config.md b/docs/PSJekyll/Site/set_Config.md new file mode 100644 index 0000000..be1369a --- /dev/null +++ b/docs/PSJekyll/Site/set_Config.md @@ -0,0 +1,39 @@ +PSJekyll.Site.set_Config() +-------------------------- + +### Synopsis +Gets the config of the site. + +--- + +### Description + +Gets the configuration of the Jekyll site. + +This can be provided by a _config.yml file in the root of the site (and essentially marks it as a site) + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +$psJekyll.CurrentSite.Config = [Ordered]@{ + title = 'My Awesome Site' + description = 'This is a site that is awesome.' + permalink = 'pretty' +} +``` + +--- + +### Parameters +#### **Value** +The new configuration object. +This will be converted to YAML and added to the _config.yml file. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Object]`|false |1 |false | + +--- From 0f8785edb407c85d844aee494c4cf23957d34769 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 556/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/get_Data.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Site/get_Data.md diff --git a/docs/PSJekyll/Site/get_Data.md b/docs/PSJekyll/Site/get_Data.md new file mode 100644 index 0000000..481a4a4 --- /dev/null +++ b/docs/PSJekyll/Site/get_Data.md @@ -0,0 +1,15 @@ +PSJekyll.Site.get_Data() +------------------------ + +### Synopsis +Gets data files in a Jekyll site + +--- + +### Description + +Gets data files in a Jekyll site, using PowerShell. + +This will return the file objects in the _data folder. + +--- From fb813c2e0cfb1b3e7c8d1580f639de37ce73d53e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 557/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/set_Data.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/PSJekyll/Site/set_Data.md diff --git a/docs/PSJekyll/Site/set_Data.md b/docs/PSJekyll/Site/set_Data.md new file mode 100644 index 0000000..23fc04b --- /dev/null +++ b/docs/PSJekyll/Site/set_Data.md @@ -0,0 +1,17 @@ +PSJekyll.Site.set_Data() +------------------------ + +### Synopsis +Sets data files in a Jekyll site + +--- + +### Description + +Sets data files in a Jekyll site, using PowerShell. + +Data files are a simple and powerful way to add custom data to your site. + +Simply use this to set a property, and the data will be available in Jekyll within `site.data` + +--- From 70426d6d352338384bc1ec2eeddb6c059f4a77b1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 558/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/get_Domain.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/PSJekyll/Site/get_Domain.md diff --git a/docs/PSJekyll/Site/get_Domain.md b/docs/PSJekyll/Site/get_Domain.md new file mode 100644 index 0000000..c692f9b --- /dev/null +++ b/docs/PSJekyll/Site/get_Domain.md @@ -0,0 +1,24 @@ +PSJekyll.Site.get_Domain() +-------------------------- + +### Synopsis +Gets the domain name of the site. + +--- + +### Description + +Gets the domain name of the Jekyll site. + +This can be provided by a CNAME file in the root of the site. + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +$PSJekyll.CurrentSite.Domain +``` + +--- From 9dd79e767d95e414859f62e36292526bfa0bf9f0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 559/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/set_Domain.md | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/PSJekyll/Site/set_Domain.md diff --git a/docs/PSJekyll/Site/set_Domain.md b/docs/PSJekyll/Site/set_Domain.md new file mode 100644 index 0000000..5ce0eea --- /dev/null +++ b/docs/PSJekyll/Site/set_Domain.md @@ -0,0 +1,35 @@ +PSJekyll.Site.set_Domain() +-------------------------- + +### Synopsis +Sets the domain name of the site. + +--- + +### Description + +Sets the domain name of the Jekyll site. + +This will create a CNAME file in the root of the site. + +This will also attempt to resolve the domain name to ensure it is valid, and will write a warning if it is not. + +--- + +### Examples +> EXAMPLE 1 + +```PowerShell +$PSJekyll.CurrentSite.Domain = 'psjekyll.powershellweb.com' +``` + +--- + +### Parameters +#### **cname** + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +--- From a0359c69de561ec8da6042455306ec69061c41c8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 560/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/get_Draft.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Site/get_Draft.md diff --git a/docs/PSJekyll/Site/get_Draft.md b/docs/PSJekyll/Site/get_Draft.md new file mode 100644 index 0000000..a72ecd4 --- /dev/null +++ b/docs/PSJekyll/Site/get_Draft.md @@ -0,0 +1,15 @@ +PSJekyll.Site.get_Draft() +------------------------- + +### Synopsis +Gets drafts in a Jekyll site. + +--- + +### Description + +Gets drafts in a Jekyll site, using PowerShell. + +This will return the file objects in the `_drafts` folder. + +--- From 143aa8ad1c120c9b743ffd86ad8a9fc6a971818f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 561/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Site/set_Draft.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 docs/PSJekyll/Site/set_Draft.md diff --git a/docs/PSJekyll/Site/set_Draft.md b/docs/PSJekyll/Site/set_Draft.md new file mode 100644 index 0000000..bf20a9c --- /dev/null +++ b/docs/PSJekyll/Site/set_Draft.md @@ -0,0 +1,17 @@ +PSJekyll.Site.set_Draft() +------------------------- + +### Synopsis +Sets a draft in a Jekyll site. + +--- + +### Description + +Sets a draft in a Jekyll site, using PowerShell. + +This will create a new draft in the `_drafts` folder. + +If no metadata is provided, it will default to the current date and the title of the draft. + +--- From 11856f9f9aee38cbc4960287efd6cb9058f53b53 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 562/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/PSJekyll/Template/README.md diff --git a/docs/PSJekyll/Template/README.md b/docs/PSJekyll/Template/README.md new file mode 100644 index 0000000..106feaf --- /dev/null +++ b/docs/PSJekyll/Template/README.md @@ -0,0 +1,18 @@ +## PSJekyll.Template + + +### Script Methods + + +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [md](md.md) +* [html](html.md) +* [html](html.md) +* [html](html.md) +* [MinGemFile](MinGemFile.md) From a9d9464227f31778c9bad717527c998ee30fd7b6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 563/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- .../Template/Include/Copyright/html.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/Copyright/html.md diff --git a/docs/PSJekyll/Template/Include/Copyright/html.md b/docs/PSJekyll/Template/Include/Copyright/html.md new file mode 100644 index 0000000..1985d06 --- /dev/null +++ b/docs/PSJekyll/Template/Include/Copyright/html.md @@ -0,0 +1,25 @@ +PSJekyll.Template.Include.Copyright.html() +------------------------------------------ + +### Synopsis +Includes a copyright notice + +--- + +### Description + +Include for a copyright notice. + +This can be included in Jekyll anytime a copyright notice is needed. + +--- + +### Parameters +#### **Copyright** +A custom copyright notice. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +--- From 1b59f34dc4a7a7eea96f043737425faeb69e6be6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:58 +0000 Subject: [PATCH 564/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/Footer/html.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/Footer/html.md diff --git a/docs/PSJekyll/Template/Include/Footer/html.md b/docs/PSJekyll/Template/Include/Footer/html.md new file mode 100644 index 0000000..b74ea3b --- /dev/null +++ b/docs/PSJekyll/Template/Include/Footer/html.md @@ -0,0 +1,26 @@ +PSJekyll.Template.Include.Footer.html() +--------------------------------------- + +### Synopsis +Includes a footer + +--- + +### Description + +Include for a footer. + +This can be included in Jekyll anytime a footer is needed. + +It is automatically included below the content of any page. + +--- + +### Parameters +#### **Footer** + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Object]`|false |1 |false | + +--- From 3ae1372420555e7610155fa0cc89ae1685ae2055 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 565/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- .../Template/Include/GitHubLink/html.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/GitHubLink/html.md diff --git a/docs/PSJekyll/Template/Include/GitHubLink/html.md b/docs/PSJekyll/Template/Include/GitHubLink/html.md new file mode 100644 index 0000000..9d3f6b7 --- /dev/null +++ b/docs/PSJekyll/Template/Include/GitHubLink/html.md @@ -0,0 +1,27 @@ +PSJekyll.Template.Include.GitHubLink.html() +------------------------------------------- + +### Synopsis +Includes a link to a GitHub repository. + +--- + +### Description + +Include for a link to a GitHub repository. + +This can be included in Jekyll anytime a link to a GitHub repository is needed. + +If no link is provided, the template will attempt to use the site's repository URL. +(this will only work in a GitHub page) + +--- + +### Parameters +#### **RepositoryUrl** + +|Type |Required|Position|PipelineInput| +|-------|--------|--------|-------------| +|`[Uri]`|false |1 |false | + +--- From 414b751309908a2766e19ad106abf247adef5291 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 566/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- .../Template/Include/GoogleFont/html.md | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/GoogleFont/html.md diff --git a/docs/PSJekyll/Template/Include/GoogleFont/html.md b/docs/PSJekyll/Template/Include/GoogleFont/html.md new file mode 100644 index 0000000..9bc3248 --- /dev/null +++ b/docs/PSJekyll/Template/Include/GoogleFont/html.md @@ -0,0 +1,37 @@ +PSJekyll.Template.Include.GoogleFont.html() +------------------------------------------- + +### Synopsis +Includes a Google Font. + +--- + +### Description + +Includes a Google Font in the site. + +This will add a link to the Google Font. + +It can be located within the site or page front matter. + +--- + +### Parameters +#### **FontName** +The name of the font to include. +If no value is directly provided, it will attempt to find a value in site.googleFont. +If no font is found, it will default to Roboto. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +#### **CodeFont** +The code font to include. +If no code font is provided, it will default to Roboto Mono. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |2 |false | + +--- From 1c0df8421dba66a271aff03b1821c4e79c3b1d51 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 567/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/Htmx/html.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/Htmx/html.md diff --git a/docs/PSJekyll/Template/Include/Htmx/html.md b/docs/PSJekyll/Template/Include/Htmx/html.md new file mode 100644 index 0000000..4119c88 --- /dev/null +++ b/docs/PSJekyll/Template/Include/Htmx/html.md @@ -0,0 +1,15 @@ +PSJekyll.Template.Include.Htmx.html() +------------------------------------- + +### Synopsis +Includes the htmx library. + +--- + +### Description + +Optionally includes the htmx library in a Jekyll site. + +If the site or page has any `.htmx` property, then the htmx library will be included. + +--- From 3910905a236bf2f3b4cc0512a68d0aca9bbee06a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 568/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- .../Template/Include/ImportMap/html.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/ImportMap/html.md diff --git a/docs/PSJekyll/Template/Include/ImportMap/html.md b/docs/PSJekyll/Template/Include/ImportMap/html.md new file mode 100644 index 0000000..0c3f1c8 --- /dev/null +++ b/docs/PSJekyll/Template/Include/ImportMap/html.md @@ -0,0 +1,30 @@ +PSJekyll.Template.Include.ImportMap.html() +------------------------------------------ + +### Synopsis +Includes an import map. + +--- + +### Description + +Includes an import map in the site. + +This will add a script tag with the import map. It should be located in the head of the site. + +An importmap can be defined in the front matter of a page, in the site data, or in the site configuration. + +It may be called either `.imports` or `.importMap`. + +--- + +### Parameters +#### **ImportMap** +The import map to include. +If no import map is included, then it will attempt to find an import map in the site or page front matter. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[Object]`|false |1 |false | + +--- From df1bb81624ded61b595909fbda00f42c30bb798c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 569/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/Margin/html.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/Margin/html.md diff --git a/docs/PSJekyll/Template/Include/Margin/html.md b/docs/PSJekyll/Template/Include/Margin/html.md new file mode 100644 index 0000000..1ac1794 --- /dev/null +++ b/docs/PSJekyll/Template/Include/Margin/html.md @@ -0,0 +1,32 @@ +PSJekyll.Template.Include.Margin.html() +--------------------------------------- + +### Synopsis +Includes site margins + +--- + +### Description + +Includes site margins in the site. + +This will add a style tag with the margin. It should be located in the head of the site. + +If the margin parameter is provided, it will be used. + +Otherwise, the `page.margin` or `site.margin` will be used. + +If neither margin exists, it will default to a margin of `1em` for all elements, +and `0.5em` for all elements when the screen is less than `960px`. + +--- + +### Parameters +#### **Margin** +The margin to include. + +|Type |Required|Position|PipelineInput| +|----------|--------|--------|-------------| +|`[String]`|false |1 |false | + +--- From 8baafbc6b60481b69cf82b5620eb475ed4656a38 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 570/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/MyRepos/md.md | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/MyRepos/md.md diff --git a/docs/PSJekyll/Template/Include/MyRepos/md.md b/docs/PSJekyll/Template/Include/MyRepos/md.md new file mode 100644 index 0000000..3c3c674 --- /dev/null +++ b/docs/PSJekyll/Template/Include/MyRepos/md.md @@ -0,0 +1,22 @@ +PSJekyll.Template.Include.MyRepos.md() +-------------------------------------- + +### Synopsis +Include my repositories. + +--- + +### Description + +Include my repositories in the site. + +This will add a list of the owner's repositories to the site. + +This will only work in GitHub Pages. + +--- + +### Related Links +* [https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md](https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md) + +--- From 07974dc1d18fe3b8875ebddd7aac3c1b657b2f10 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 571/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- .../Template/Include/OpenGraph/html.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/OpenGraph/html.md diff --git a/docs/PSJekyll/Template/Include/OpenGraph/html.md b/docs/PSJekyll/Template/Include/OpenGraph/html.md new file mode 100644 index 0000000..7477f6b --- /dev/null +++ b/docs/PSJekyll/Template/Include/OpenGraph/html.md @@ -0,0 +1,31 @@ +PSJekyll.Template.Include.OpenGraph.html() +------------------------------------------ + +### Synopsis +Include Open Graph meta tags in a Jekyll site. + +--- + +### Description + +Include Open Graph meta tags in a Jekyll site. + +These tags can help social media sites understand the content of your site, and show preview images. + +This script is intended to be included in the head of a Jekyll site. + +It will output the Open Graph meta tags for the current page and site. + +--- + +### Notes +Tags included: +- og:site_name +- og:title +- og:type +- og:description +- og:url +- og:image +- article:published_time + +--- From caf1bb23a8090045b5f8a477a9ca73d69bf2d752 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 572/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/SiteTree/html.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/SiteTree/html.md diff --git a/docs/PSJekyll/Template/Include/SiteTree/html.md b/docs/PSJekyll/Template/Include/SiteTree/html.md new file mode 100644 index 0000000..1cdda6e --- /dev/null +++ b/docs/PSJekyll/Template/Include/SiteTree/html.md @@ -0,0 +1,15 @@ +PSJekyll.Template.Include.SiteTree.html() +----------------------------------------- + +### Synopsis +Gets the site tree. + +--- + +### Description + +Gets the site tree of the Jekyll site. + +This will return all pages in the Jekyll site. + +--- From 8c4bf3422c9f2f25abef50670df9aa5cf97fdecb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 573/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/Include/Stylesheet/html.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/PSJekyll/Template/Include/Stylesheet/html.md diff --git a/docs/PSJekyll/Template/Include/Stylesheet/html.md b/docs/PSJekyll/Template/Include/Stylesheet/html.md new file mode 100644 index 0000000..cc7c07e --- /dev/null +++ b/docs/PSJekyll/Template/Include/Stylesheet/html.md @@ -0,0 +1,15 @@ +PSJekyll.Template.Include.Stylesheet.html() +------------------------------------------- + +### Synopsis +Includes stylesheets in a Jekyll site. + +--- + +### Description + +Optionally includes stylesheets in a Jekyll site. + +If the site or page has any `.stylesheet` property, then the stylesheets will be included. + +--- From d62113092a9a095d73b32322a94083b29826f090 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:34:59 +0000 Subject: [PATCH 574/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/PSJekyll/Template/MinGemFile.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/PSJekyll/Template/MinGemFile.md diff --git a/docs/PSJekyll/Template/MinGemFile.md b/docs/PSJekyll/Template/MinGemFile.md new file mode 100644 index 0000000..ad57c58 --- /dev/null +++ b/docs/PSJekyll/Template/MinGemFile.md @@ -0,0 +1,13 @@ +PSJekyll.Template.MinGemFile() +------------------------------ + +### Synopsis +Minimal Gemfile for Jekyll projects. + +--- + +### Description + +Generates the minimal Gemfile for Jekyll projects. + +--- From ba70f4082bbd05d2029704ab1204f2e65302a427 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 575/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleExports.json | 1874 +++++++++++++++++++++++++++++++ 1 file changed, 1874 insertions(+) create mode 100644 docs/_data/PSModuleExports.json diff --git a/docs/_data/PSModuleExports.json b/docs/_data/PSModuleExports.json new file mode 100644 index 0000000..5b476ee --- /dev/null +++ b/docs/_data/PSModuleExports.json @@ -0,0 +1,1874 @@ +[ + { + "Name": "New-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Creates a new Jekyll site.\n .DESCRIPTION\n Creates a new Jekyll site, using PowerShell.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('New-Jekyll')]\n param(\n # The name of the Jekyll site\n [string]\n $Name,\n\n # Creates scaffolding but with empty files\n [switch]\n $Blank,\n\n # Force creation even if PATH already exists\n [switch]\n $Force,\n\n # Safe mode\n [switch]\n $Safe,\n\n # Skip the bundle install\n [switch]\n $SkipBundle,\n\n # The path to the source files\n [string]\n $SourcePath,\n\n # The path to the destination files\n [string]\n $DestinationPath,\n\n # The path to the layout files\n [string]\n $LayoutPath,\n\n # The path to the plugin files\n [string[]]\n $PluginPath,\n\n # If set, will generate a liquid profile\n [switch]\n $LiquidProfile,\n\n # If set, will trace the execution\n [switch]\n $Trace\n )\n\n $jekyllSplat = @(\n $name\n if ($blank) { '--blank' }\n if ($force) { '--force' }\n if ($safe) { '--safe' }\n if ($skipBundle) { '--skip-bundle' }\n if ($sourcePath) {\"--source $sourcePath\"}\n if ($destinationPath) {\"--destination $destinationPath\"}\n if ($layoutPath) {\"--layouts $layoutPath\"}\n if ($pluginPath) {\"--plugins $($pluginPath -join ',')\"}\n if ($liquidProfile) {'--profile'}\n if ($trace) {'--trace'}\n )\n\n $newJekyllJob = jekyll new @jekyllSplat &\n $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job')\n $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job.New-PSJekyll')\n $newJekyllJob\n", + "ParameterName": [ + "Name", + "Blank", + "Force", + "Safe", + "SkipBundle", + "SourcePath", + "DestinationPath", + "LayoutPath", + "PluginPath", + "LiquidProfile", + "Trace" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Blank", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Force", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Safe", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SkipBundle", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LayoutPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Remove-PSJekyll", + "CommandType": 2, + "Definition": " \n <#\n .SYNOPSIS\n Removes content from Jekyll\n .DESCRIPTION\n Removes files from Jekyll\n\n This is a slightly limited version of Remove-Item.\n #>\n [Alias('Remove-Jekyll')]\n param(\n # The path to the file.\n [Parameter(Mandatory,Position=0,ValueFromPipelineByPropertyName)] \n [ValidatePattern('^[\\\\/]')]\n [Alias('FullName')]\n [string]\n $Path\n )\n \n process {\n if (Test-Path $path) { \n Remove-Item -Path $path \n }\n } \n", + "ParameterName": [ + "Path", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Set-PSJekyll", + "CommandType": 2, + "Definition": " \n <#\n .SYNOPSIS\n Sets the content of a file in Jekyll\n .DESCRIPTION\n Sets the content of a file in Jekyll.\n\n This is only slightly smarter than Set-Content. \n \n It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv.\n\n Otherwise, it will create a YAML header and then set the content.\n #>\n [Alias('Set-Jekyll')]\n param(\n # The path to the file.\n [Parameter(Mandatory,Position=0)] \n [ValidatePattern('^[\\\\/]')]\n [Alias('FullName')]\n [string]\n $Path,\n \n # If set, will return the file object\n [switch]\n $PassThru,\n \n # The content to set\n [Parameter(ValueFromPipeline)]\n [object]\n $Content,\n\n # Any metadata to set. \n # This will create a YAML header, which is required for most files in Jekyll to be processed properly.\n [Alias('YamlHeader')]\n [Collections.IDictionary]\n $MetaData = [Ordered]@{}\n )\n \n $allInput = @($input)\n if ((-not $allInput) -and $Content) {\n $allInput = @($Content)\n }\n\n if (-not $allInput) { return }\n if (-not (Test-Path $path)) { \n New-Item -Path $path -Type File -Force | Out-Null\n if (-not $?) { return }\n }\n \n if ($path -match '\\.json$') {\n if ($allInput.Length -eq 1) { \n ConvertTo-Json -InputObject $allInput[0] -Depth $FormatEnumerationLimit | \n Set-Content -Path $path\n } else {\n ConvertTo-Json -InputObject $allInput -Depth $FormatEnumerationLimit | \n Set-Content -Path $path\n } \n } \n elseif ($path -match '\\.[ct]sv$') {\n $csvSplat = [Ordered]@{Path=$path}\n if ($path -match '\\.t') {\n $csvSplat.Delimiter = \"`t\"\n }\n $content | \n Export-Csv @csvSplat -NoTypeInformation \n }\n else {\n @(\n $metadata | & $psJekyll.FormatYaml.Script -YamlHeader\n $content\n ) | \n Set-Content -Path $path\n }\n if ($? -and $PassThru) {\n Get-Item -Path $path\n }\n", + "ParameterName": [ + "Path", + "PassThru", + "Content", + "MetaData", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PassThru", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Content", + "ParameterType": "System.Object", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "MetaData", + "ParameterType": "System.Collections.IDictionary", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Start-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Starts a Jekyll server\n .DESCRIPTION\n Starts a Jekyll server in a PowerShell job.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('Start-Jekyll')]\n [CmdletBinding()]\n param(\n # The name of the Jekyll site\n [string]\n $Name,\n\n # One or more config files to use\n [Alias('Configuration')]\n [string[]]\n $Config,\n\n # The source directory\n [string]\n $SourcePath,\n\n # The destination directory\n [string]\n $DestinationPath,\n \n # The host header\n [string]\n $HostHeader,\n\n # The port to listen on\n [uint]\n $Port,\n\n # The path to the plugin files\n [string[]]\n $PluginPath,\n\n # If set, will show a directory list.\n [switch]\n $ShowDirectoryList,\n\n # If set, will enable live reload.\n [switch]\n $LiveReload,\n\n # If set, will generate a liquid profile\n [switch]\n $LiquidProfile,\n\n # If set, will trace the execution\n [switch]\n $Trace, \n\n # Watch for changes and rebuild\n [switch]\n $Watch,\n\n # If set, will publish posts with a future date (previewing them).\n [switch]\n $PreviewFuture,\n\n # The base URL for the site\n [string]\n $BaseUrl,\n\n # If set, will detach the process\n [switch]\n $Detach,\n\n # Enable incremental rebuilds\n [switch]\n $Incremental\n )\n\n if ($env:IN_CONTAINER -and -not $HostHeader) {\n $HostHeader = '*'\n } \n\n $jekyllSplat = @( \n if ($force) { '--force' }\n if ($safe) { '--safe' }\n if ($Detach) { '--detach' }\n if ($PreviewFuture) { '--future' }\n if ($liveReload) {'--livereload'}\n if ($sourcePath) {\"--source\";\"$sourcePath\"}\n if ($destinationPath) {\"--destination\";\"$destinationPath\"}\n if ($BaseUrl) {\"--baseurl\";\"$BaseUrl\"}\n if ($Incremental) {'--incremental'}\n if ($HostHeader) {\"--host\"; \"$HostHeader\"}\n if ($Port) {\"--port\"; \"$Port\"}\n if ($ShowDirectoryList) {'--show-dir-list'}\n if ($layoutPath) {\"--layouts\"; \"$layoutPath\"}\n if ($pluginPath) {\"--plugins\"; \"$($pluginPath -join ',')\"}\n if ($liquidProfile) {'--profile'}\n if ($trace) {'--trace'}\n if ($watch) {'--watch'}\n\n )\n \n $startedAfter = [DateTime]::Now\n if ($jekyllSplat -notmatch '--watch') {\n $jekyllSplat += '--watch'\n }\n if ($jekyllSplat -notmatch '--incremental') {\n $jekyllSplat += '--incremental'\n }\n if ($jekyllSplat -notmatch '--trace') {\n $jekyllSplat += '--trace'\n }\n \n Write-Verbose \"Starting Jekyll server $jekyllSplat\"\n $jobName = if ($hostHeader) { \"PSJekyll.$hostHeader\" } else { \"Start-PSJekyll\" }\n $jekyllJob = \n Start-ThreadJob -ScriptBlock {\n if ($ExecutionContext.SessionState.InvokeCommand.GetCommand('sudo','application')) {\n sudo bundle install\n } else {\n bundle install\n }\n \n if ($args -match '^\\*$' -and $args -match '^--host$') {\n $otherArgs = @($args -notmatch '^(?>--host|\\*)$') \n bundle exec jekyll serve --host '*' @otherArgs\n } else {\n $promptLongForm = @('exec','jekyll','serve') + $args \n bundle @promptLongForm\n } \n } -ArgumentList $jekyllSplat -Name $jobName\n \n $jekyllProcesses = Get-Process *ruby* | Where-Object { $_.StartTime -ge $startedAfter }\n\n Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action {\n get-process ruby | Stop-Process -Force\n } | Out-Null\n \n $jekyllJob.pstypenames.insert(0,\"PSJekyll.JekyllJob\")\n $jekyllJob.psobject.properties.Add([psnoteproperty]::New(\"Processes\", $jekyllProcesses))\n $jekyllJob\n", + "ParameterName": [ + "Name", + "Config", + "SourcePath", + "DestinationPath", + "HostHeader", + "Port", + "PluginPath", + "ShowDirectoryList", + "LiveReload", + "LiquidProfile", + "Trace", + "Watch", + "PreviewFuture", + "BaseUrl", + "Detach", + "Incremental", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Config", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "HostHeader", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Port", + "ParameterType": "System.UInt32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ShowDirectoryList", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiveReload", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Watch", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PreviewFuture", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "BaseUrl", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Detach", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Incremental", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Stop-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Stops a Jekyll server\n .DESCRIPTION\n Stops a Jekyll server in a PowerShell job.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('Stop-Jekyll')] \n param(\n # The name of the Jekyll job\n [Parameter(ValueFromPipelineByPropertyName)]\n [string]\n $Name = '*'\n )\n\n process {\n Get-Job -Name \"Jekyll.$Name\" | Stop-Job\n }\n", + "ParameterName": [ + "Name", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "New-Jekyll", + "CommandType": 1, + "Definition": "New-PSJekyll", + "ParameterName": [ + "Name", + "Blank", + "Force", + "Safe", + "SkipBundle", + "SourcePath", + "DestinationPath", + "LayoutPath", + "PluginPath", + "LiquidProfile", + "Trace" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Blank", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Force", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Safe", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SkipBundle", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LayoutPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Remove-Jekyll", + "CommandType": 1, + "Definition": "Remove-PSJekyll", + "ParameterName": [ + "Path", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Set-Jekyll", + "CommandType": 1, + "Definition": "Set-PSJekyll", + "ParameterName": [ + "Path", + "PassThru", + "Content", + "MetaData", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PassThru", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Content", + "ParameterType": "System.Object", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "MetaData", + "ParameterType": "System.Collections.IDictionary", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Start-Jekyll", + "CommandType": 1, + "Definition": "Start-PSJekyll", + "ParameterName": [ + "Name", + "Config", + "SourcePath", + "DestinationPath", + "HostHeader", + "Port", + "PluginPath", + "ShowDirectoryList", + "LiveReload", + "LiquidProfile", + "Trace", + "Watch", + "PreviewFuture", + "BaseUrl", + "Detach", + "Incremental", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Config", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "HostHeader", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Port", + "ParameterType": "System.UInt32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ShowDirectoryList", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiveReload", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Watch", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PreviewFuture", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "BaseUrl", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Detach", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Incremental", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Stop-Jekyll", + "CommandType": 1, + "Definition": "Stop-PSJekyll", + "ParameterName": [ + "Name", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + } +] \ No newline at end of file From 3b03c4d216677c55349654a073aa5015046b9bde Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 576/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleAliasNames.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_data/PSModuleAliasNames.json diff --git a/docs/_data/PSModuleAliasNames.json b/docs/_data/PSModuleAliasNames.json new file mode 100644 index 0000000..e775ae1 --- /dev/null +++ b/docs/_data/PSModuleAliasNames.json @@ -0,0 +1,7 @@ +[ + "New-Jekyll", + "Remove-Jekyll", + "Set-Jekyll", + "Start-Jekyll", + "Stop-Jekyll" +] \ No newline at end of file From 423decbb1ce4c3da91bb3996fbd3a0d316d0c0de Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 577/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleInfo.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/_data/PSModuleInfo.json diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json new file mode 100644 index 0000000..4a27623 --- /dev/null +++ b/docs/_data/PSModuleInfo.json @@ -0,0 +1,27 @@ +{ + "Name": "PSJekyll", + "Version": { + "Major": 0, + "Minor": 1, + "Build": -1, + "Revision": -1, + "MajorRevision": -1, + "MinorRevision": -1 + }, + "Description": "Give Jekyll more power with PowerShell", + "Copyright": "2024", + "CompanyName": "PowerShellWeb", + "Author": "James Brundage", + "PrivateData": { + "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "Tags": [ + "PowerShellWeb", + "Jekyll", + "Docker", + "GitHubAction" + ] + } + } +} \ No newline at end of file From 1d887fedefbc916c35259bdbbb4dc65951264715 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 578/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/LastDateBuilt.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_data/LastDateBuilt.json diff --git a/docs/_data/LastDateBuilt.json b/docs/_data/LastDateBuilt.json new file mode 100644 index 0000000..6620175 --- /dev/null +++ b/docs/_data/LastDateBuilt.json @@ -0,0 +1 @@ +"2024-10-09" \ No newline at end of file From 96a9d38e715a020a811abf7c2f4dc82c84c1ba66 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 579/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleFunctionNames.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_data/PSModuleFunctionNames.json diff --git a/docs/_data/PSModuleFunctionNames.json b/docs/_data/PSModuleFunctionNames.json new file mode 100644 index 0000000..1ddd5ff --- /dev/null +++ b/docs/_data/PSModuleFunctionNames.json @@ -0,0 +1,7 @@ +[ + "New-PSJekyll", + "Remove-PSJekyll", + "Set-PSJekyll", + "Start-PSJekyll", + "Stop-PSJekyll" +] \ No newline at end of file From a7d53ed990a1f351faad0d4aa829f55b88629c36 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 580/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleVariableNames.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_data/PSModuleVariableNames.json diff --git a/docs/_data/PSModuleVariableNames.json b/docs/_data/PSModuleVariableNames.json new file mode 100644 index 0000000..d19c8e6 --- /dev/null +++ b/docs/_data/PSModuleVariableNames.json @@ -0,0 +1 @@ +"PSJekyll" \ No newline at end of file From b39b36f8d0a5760104c728a019814f98eba8f01c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:01 +0000 Subject: [PATCH 581/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_data/PSModuleCmdletNames.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_data/PSModuleCmdletNames.json diff --git a/docs/_data/PSModuleCmdletNames.json b/docs/_data/PSModuleCmdletNames.json new file mode 100644 index 0000000..ec747fa --- /dev/null +++ b/docs/_data/PSModuleCmdletNames.json @@ -0,0 +1 @@ +null \ No newline at end of file From 0a25313e8d91b6350aacc36af214972773f77462 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 582/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/_config.yml diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..914c778 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,12 @@ + +title: PSJekyll +description: A PowerShell module for creating Jekyll sites. +url: https://psjekyll.powershellweb.com +permalink: pretty +palette: Konsolas +analyticsId: G-R5C30737B2 +googleFont: Noto Sans +stylesheet: https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css +defaults: + - values: + layout: Default From 1a46eca66eaf87a878b116c688f01a4cd39a57f2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 583/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_layouts/Default.html | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 docs/_layouts/Default.html diff --git a/docs/_layouts/Default.html b/docs/_layouts/Default.html new file mode 100644 index 0000000..9d96e1c --- /dev/null +++ b/docs/_layouts/Default.html @@ -0,0 +1,27 @@ +--- + +title: Default.html +--- + + + + + + + {% include GoogleAnalytics.html %} + {% include ImportMap.html %} + {% include OpenGraph.html %} + {% include GoogleFont.html %} + {% include 4bitcss.html %} + {% include Margin.html %} + {% include Stylesheet.html %} + {% include Htmx.html %} + + + +{% include Menu.html %} + +{{content}} + +{% include Footer.html %} + \ No newline at end of file From ecab648749f45879510f3d5c5126aafd88f2ba1b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 584/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/4bitcss.html | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/_includes/4bitcss.html diff --git a/docs/_includes/4bitcss.html b/docs/_includes/4bitcss.html new file mode 100644 index 0000000..8d1ec76 --- /dev/null +++ b/docs/_includes/4bitcss.html @@ -0,0 +1,5 @@ +{% if page.palette %} + +{% elsif site.palette %} + +{% endif %} \ No newline at end of file From fa57b174a49d14c4ae53fc7b7443f7d31657fd18 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 585/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Footer.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Footer.html diff --git a/docs/_includes/Footer.html b/docs/_includes/Footer.html new file mode 100644 index 0000000..4137469 --- /dev/null +++ b/docs/_includes/Footer.html @@ -0,0 +1,9 @@ +
    +{% if page.footer %} + {{page.footer}} +{% elsif site.footer %} + {{site.footer}} +{% else %} + {% include Copyright.html %} +{% endif %} +
    \ No newline at end of file From beaf9adfb28fe98b0c781ffb4e8b90666e8a6c4a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 586/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/ImportMap.html | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/_includes/ImportMap.html diff --git a/docs/_includes/ImportMap.html b/docs/_includes/ImportMap.html new file mode 100644 index 0000000..af3a6ca --- /dev/null +++ b/docs/_includes/ImportMap.html @@ -0,0 +1,25 @@ +{% if page.imports %} + {% assign importMap = page.imports %} +{% elsif page.importMap %} + {% assign importMap = page.importMap %} +{% elsif site.imports %} + {% assign importMap = site.imports %} +{% elsif site.importMap %} + {% assign importMap = site.importMap %} +{% elsif site.data.imports %} + {% assign importMap = site.data.imports %} +{% elsif site.data.importMap %} + {% assign importMap = site.data.importMap %} +{% endif %} +{% if importMap %} + +{% endif %} \ No newline at end of file From 4bf82db4599bbd78648e69c04a6cee1175eb0117 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 587/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/GitHubLink.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/GitHubLink.html diff --git a/docs/_includes/GitHubLink.html b/docs/_includes/GitHubLink.html new file mode 100644 index 0000000..3752c46 --- /dev/null +++ b/docs/_includes/GitHubLink.html @@ -0,0 +1,3 @@ +{% if site.github.repository_url %} +GitHub +{% endif %} \ No newline at end of file From 9f07fa05bd77f4dae669ebe3a093e398c86e5b3b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 588/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/MyRepos.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/MyRepos.md diff --git a/docs/_includes/MyRepos.md b/docs/_includes/MyRepos.md new file mode 100644 index 0000000..fdc09e8 --- /dev/null +++ b/docs/_includes/MyRepos.md @@ -0,0 +1,3 @@ +{% for repository in site.github.public_repositories %} + * [{{ repository.name }}]({{ repository.html_url }}) +{% endfor %} \ No newline at end of file From efdc6c9e06cf6d1b08924432b963d904d311851b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 589/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/SiteTree.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/_includes/SiteTree.html diff --git a/docs/_includes/SiteTree.html b/docs/_includes/SiteTree.html new file mode 100644 index 0000000..b64882c --- /dev/null +++ b/docs/_includes/SiteTree.html @@ -0,0 +1,20 @@ +{% assign pages_by_url = site.pages | sort: "url" %} +{% assign page_depth = 0 %} + +{% for page in pages_by_url %} + {% if page.title == nil %} + {% continue %} + {% endif %} + {% assign page_parts = page.url | split: "/" %} + {% if page_parts.size > page_depth %} + {% assign page_depth = page_parts.size %} +
      + {% endif %} + {% if page_parts.size < page_depth %} + {% assign page_depth = page_parts.size %} +
    + {% endif %} +
  • +{{ page.title }} +
  • +{% endfor %} \ No newline at end of file From 8ac79b9a5bae3431bdd04ffc663e92d49114750c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 590/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Menu.html | 147 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/_includes/Menu.html diff --git a/docs/_includes/Menu.html b/docs/_includes/Menu.html new file mode 100644 index 0000000..14a7574 --- /dev/null +++ b/docs/_includes/Menu.html @@ -0,0 +1,147 @@ +{% capture TopLeftMenu %} + {{page.menu.TopLeft}} + {{site.menu.TopLeft}} + {{site.data.menu.TopLeft}} +{% endcapture %} +{% assign TopLeftMenu = TopLeftMenu | strip %} + +{% capture TopRightMenu %} + {{page.menu.TopRight}} + {{site.menu.TopRight}} + {{site.data.menu.TopRight}} + {% unless site.NoGitHubLink or site.NoLink %} + {% include GitHubLink.html %} + {% endunless %} +{% endcapture %} +{% assign TopRightMenu = TopRightMenu | strip %} + +{% capture TopCenterMenu %} + {{page.menu.TopCenter}} + {{site.menu.TopCenter}} + {{site.data.menu.TopCenter}} +{% endcapture %} +{% assign TopCenterMenu = TopCenterMenu | strip %} + +{% capture BottomLeftMenu %} + {{page.menu.BottomLeft}} + {{site.menu.BottomLeft}} + {{site.data.menu.BottomLeft}} +{% endcapture %} +{% assign BottomLeftMenu = BottomLeftMenu | strip %} + +{% capture BottomRightMenu %} + {{page.menu.BottomRight}} + {{site.menu.BottomRight}} + {{site.data.menu.BottomRight}} +{% endcapture %} +{% assign BottomRightMenu = BottomRightMenu | strip %} + +{% capture BottomCenterMenu %} + {{page.menu.BottomCenter}} + {{site.menu.BottomCenter}} + {{site.data.menu.BottomCenter}} +{% endcapture %} +{% assign BottomCenterMenu = BottomCenterMenu | strip %} + +{% capture LeftCenterMenu %} + {{page.menu.LeftCenter}} + {{site.menu.LeftCenter}} + {{site.data.menu.LeftCenter}} +{% endcapture %} +{% assign LeftCenterMenu = LeftCenterMenu | strip %} + +{% capture RightCenterMenu %} + {{page.menu.RightCenter}} + {{site.menu.RightCenter}} + {{site.data.menu.RightCenter}} +{% endcapture %} +{% assign RightCenterMenu = RightCenterMenu | strip %} + +{% if TopLeftMenu or TopRightMenu or TopCenterMenu or BottomLeftMenu or BottomRightMenu or BottomCenterMenu or LeftCenterMenu or RightCenterMenu %} + +{% endif %} + +{% if TopLeftMenu != "" %} + + {{TopLeftMenu}} + +{% endif %} + +{% if TopRightMenu != "" %} + + {{TopRightMenu}} + +{% endif %} + +{% if TopCenterMenu != "" %} + + {{TopCenterMenu}} + +{% endif %} + +{% if BottomLeftMenu != "" %} + + {{BottomLeftMenu}} + +{% endif %} + +{% if BottomRightMenu != "" %} + + {{BottomRightMenu}} + +{% endif %} + +{% if BottomCenterMenu != "" %} + + {{BottomCenterMenu}} + +{% endif %} + +{% if LeftCenterMenu != "" %} + + {{LeftCenterMenu}} + +{% endif %} + +{% if RightCenterMenu != "" %} + + {{RightCenterMenu}} + +{% endif %} \ No newline at end of file From 4a2d51a44380a140e5c46c08aae73314b77ec0b9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 591/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Margin.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/_includes/Margin.html diff --git a/docs/_includes/Margin.html b/docs/_includes/Margin.html new file mode 100644 index 0000000..f5f3c60 --- /dev/null +++ b/docs/_includes/Margin.html @@ -0,0 +1,12 @@ +{% if page.margin %} + +{% elsif site.margin %} + +{% else %} + +{% endif %} \ No newline at end of file From 4b6dd3205fe088cf43f74a5c86add8005ed3e3cc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 592/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Stylesheet.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 docs/_includes/Stylesheet.html diff --git a/docs/_includes/Stylesheet.html b/docs/_includes/Stylesheet.html new file mode 100644 index 0000000..3a32d64 --- /dev/null +++ b/docs/_includes/Stylesheet.html @@ -0,0 +1,15 @@ +{% if site.data.stylesheet %} + {% for stylesheet in site.data.stylesheet %} + + {% endfor %} +{% endif %} +{% if page.stylesheet %} + {% for stylesheet in page.stylesheet %} + + {% endfor %} +{% endif %} +{% if include.stylesheet %} + {% for stylesheet in include.stylesheet %} + + {% endfor %} +{% endif %} \ No newline at end of file From 0cea94486a7ece50bf51b9c02927702dfbe702a6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 593/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/OpenGraph.html | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 docs/_includes/OpenGraph.html diff --git a/docs/_includes/OpenGraph.html b/docs/_includes/OpenGraph.html new file mode 100644 index 0000000..c2a4fb5 --- /dev/null +++ b/docs/_includes/OpenGraph.html @@ -0,0 +1,44 @@ + +{% if page.title %} + +{% else %} + +{% endif %} +{% if page.type %} + +{% else %} + +{% endif %} +{% if page.description %} + + + +{% elsif content %} + + + + + +{% elsif site.description %} + + + +{% endif %} +{% if page.date %} + +{% endif %} +{% if page.url %} + + + +{% endif %} + +{% if page.image %} + + + +{% elsif site.image %} + + + +{% endif %} \ No newline at end of file From 96ea7fc415b9fd3ace1d1393398b9ece55e49039 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 594/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/GoogleAnalytics.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docs/_includes/GoogleAnalytics.html diff --git a/docs/_includes/GoogleAnalytics.html b/docs/_includes/GoogleAnalytics.html new file mode 100644 index 0000000..bde8fa8 --- /dev/null +++ b/docs/_includes/GoogleAnalytics.html @@ -0,0 +1,10 @@ +{% if site.analyticsId %} + + + +{% endif %} \ No newline at end of file From f3ebcf7b6ca13676547751c5a22824fc9fa253fa Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 595/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Copyright.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/_includes/Copyright.html diff --git a/docs/_includes/Copyright.html b/docs/_includes/Copyright.html new file mode 100644 index 0000000..a160c7d --- /dev/null +++ b/docs/_includes/Copyright.html @@ -0,0 +1,9 @@ +© {% if page.copyright %} + {{page.copyright}} +{% elsif site.copyright %} + {{site.copyright}} +{% elsif site.data.PSModuleInfo.Copyright %} + {{site.data.PSModuleInfo.Copyright}} +{% else %} + {{ site.time | date: '%Y' }} {{ site.author }} +{% endif %} \ No newline at end of file From e4989bdbc3b7ca49510c5cc704e26b6d36714cee Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 596/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/GoogleFont.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docs/_includes/GoogleFont.html diff --git a/docs/_includes/GoogleFont.html b/docs/_includes/GoogleFont.html new file mode 100644 index 0000000..eef46f2 --- /dev/null +++ b/docs/_includes/GoogleFont.html @@ -0,0 +1,20 @@ +{% if page.googleFont %} + + +{% elsif site.googleFont %} + + +{% else %} + + +{% endif %} +{% if page.codeFont %} + + +{% elsif site.codeFont %} + + +{% else %} + + +{% endif %} \ No newline at end of file From 17c45bf42d8b11b40d398bd47330a944396c805b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 597/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/_includes/Htmx.html | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/Htmx.html diff --git a/docs/_includes/Htmx.html b/docs/_includes/Htmx.html new file mode 100644 index 0000000..a8cfa5b --- /dev/null +++ b/docs/_includes/Htmx.html @@ -0,0 +1,3 @@ +{% if page.htmx or site.htmx %} + +{% endif %} \ No newline at end of file From 9c8a57a735d5f1b39464951d0e06c218a9b1423d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 598/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/MyRepos.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/MyRepos.md diff --git a/docs/MyRepos.md b/docs/MyRepos.md new file mode 100644 index 0000000..50398ef --- /dev/null +++ b/docs/MyRepos.md @@ -0,0 +1,5 @@ +--- + +title: MyRepos +--- +{% include MyRepos.md %} \ No newline at end of file From c05dcd6ea7123b4ae3e61993842a36656fb29f1f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 05:35:02 +0000 Subject: [PATCH 599/769] feat: PSJekyll.HelpOut ( Fixes #18 ) Refreshing docs, removing MAML --- docs/Tree.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Tree.md diff --git a/docs/Tree.md b/docs/Tree.md new file mode 100644 index 0000000..6f2d8aa --- /dev/null +++ b/docs/Tree.md @@ -0,0 +1,5 @@ +--- + +title: Tree +--- +{% include SiteTree.html %} \ No newline at end of file From 7d993df23838a4c5761b859f5e18fddd9fd265b8 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 23:02:57 -0700 Subject: [PATCH 600/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Also generating /Function and /Functions --- PSJekyll.PSJekyll.ps1 | 2 ++ Types/PSJekyll.Template/Include.PSFunctions.md.ps1 | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 Types/PSJekyll.Template/Include.PSFunctions.md.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 4c26fa3..473a9f6 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -90,6 +90,8 @@ foreach ($templateMember in $PSJekyll.Template.psobject.Members) { $PSJekyll.CurrentSite.Page = 'Tree', "{% include SiteTree.html %}" $PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.md %}" +$PSJekyll.CurrentSite.Page = 'Function', "{% include PSFunctionList.md %}" +$PSJekyll.CurrentSite.Page = 'Functions', "{% include PSFunctionList.md %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include $PSJekyll.CurrentSite.Page diff --git a/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 new file mode 100644 index 0000000..b065056 --- /dev/null +++ b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 @@ -0,0 +1,7 @@ +param() + +@" +{% for functionName in site.data.PSModuleFunctionNames %} + "[{{ functionName }}](/{{functionName}})" +{% endfor %} +"@ \ No newline at end of file From f26dda21ca34e76bfe14e91f11bbdc25b2050e07 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:03:53 +0000 Subject: [PATCH 601/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Also generating /Function and /Functions --- PSJekyll.types.ps1xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 860d5c1..0d891ba 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1749,6 +1749,18 @@ param() + + Include.PSFunctions.md + + Include.SiteTree.html From d1c9bf1381e0471106663142f48942ff6880e815 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:18:34 +0000 Subject: [PATCH 616/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing indent --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 9d611ac..bdc0333 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } From 506b0c2245884051cf3601e90358dff2948d2f03 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:18:34 +0000 Subject: [PATCH 617/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing indent --- docs/_includes/PSFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSFunctions.md b/docs/_includes/PSFunctions.md index 06f8319..814a954 100644 --- a/docs/_includes/PSFunctions.md +++ b/docs/_includes/PSFunctions.md @@ -1,3 +1,3 @@ {% for functionName in site.data.PSModuleFunctionNames %} - "[{{ functionName }}](/{{functionName}})" +"* [{{ functionName }}](/{{functionName}})" {% endfor %} \ No newline at end of file From 5ce566b2a50243adfd5ad665e2c9c8595ac0faa7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 23:22:29 -0700 Subject: [PATCH 618/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing quotes --- Types/PSJekyll.Template/Include.PSFunctions.md.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 index 468e55f..4db65a4 100644 --- a/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 @@ -2,6 +2,6 @@ param() @" {% for functionName in site.data.PSModuleFunctionNames %} -"* [{{ functionName }}](/{{functionName}})" +* [{{ functionName }}](/{{functionName}}) {% endfor %} "@ \ No newline at end of file From f73b62ea6b2988b2936c4c90741350c4a889bd4c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:23:24 +0000 Subject: [PATCH 619/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing quotes --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index fb5c598..6b891de 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1756,7 +1756,7 @@ param() @" {% for functionName in site.data.PSModuleFunctionNames %} -"* [{{ functionName }}](/{{functionName}})" +* [{{ functionName }}](/{{functionName}}) {% endfor %} "@ From cedab848ebda7f43dab95eb7965899ca3aac5f42 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:23:37 +0000 Subject: [PATCH 620/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing quotes --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index bdc0333..4a27623 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -15,13 +15,13 @@ "PrivateData": { "PSData": { "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + ] } } } \ No newline at end of file From f3b0c4f6c84fdc16da0eac8a0432429c6cd367d9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:23:37 +0000 Subject: [PATCH 621/769] feat: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Removing quotes --- docs/_includes/PSFunctions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSFunctions.md b/docs/_includes/PSFunctions.md index 814a954..29725ad 100644 --- a/docs/_includes/PSFunctions.md +++ b/docs/_includes/PSFunctions.md @@ -1,3 +1,3 @@ {% for functionName in site.data.PSModuleFunctionNames %} -"* [{{ functionName }}](/{{functionName}})" +* [{{ functionName }}](/{{functionName}}) {% endfor %} \ No newline at end of file From b56839e870027c4599a8ed305e8b4da3bf318a27 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Tue, 8 Oct 2024 23:56:43 -0700 Subject: [PATCH 622/769] fix: PSJekyll Dockerfile ( Fixes #11 ) Setting KeepGit --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 2303a14..bc98544 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,7 @@ ENV ModuleName=PSJekyll ENV InstallAptGet="build-essential","ruby-full","bundler","git","curl","ca-certificates","libc6","libgcc1" ENV InstallModule="ugit" ENV InstallRubyGem="jekyll" +ENV KeepGit="true" # Copy the module into the container RUN --mount=type=bind,src=./,target=/Initialize /bin/pwsh -nologo -command /Initialize/Container.init.ps1 # Set the entrypoint to the script we just created. From b0c0c19d32d2e57b855fd4d639018bc5c4e4d1a3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 06:57:49 +0000 Subject: [PATCH 623/769] fix: PSJekyll Dockerfile ( Fixes #11 ) Setting KeepGit --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 4a27623..55570c7 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ] + ], + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } \ No newline at end of file From d01ddffa3b21f34717cd630d066663c8ab432df8 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 09:58:15 -0700 Subject: [PATCH 624/769] fix: Start-PSJekyll ( Fixes #5 ) Creating Gemfile if not present, using GitHubPages if in git. --- Commands/Start-PSJekyll.ps1 | 11 ++++++++++- Types/PSJekyll.Template/GitHubPages.Gemfile.ps1 | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Types/PSJekyll.Template/GitHubPages.Gemfile.ps1 diff --git a/Commands/Start-PSJekyll.ps1 b/Commands/Start-PSJekyll.ps1 index 64de616..e176367 100644 --- a/Commands/Start-PSJekyll.ps1 +++ b/Commands/Start-PSJekyll.ps1 @@ -112,7 +112,16 @@ function Start-PSJekyll if ($jekyllSplat -notmatch '--trace') { $jekyllSplat += '--trace' } - + $isGemFilePresent = Test-Path -Path './Gemfile' + if (-not $isGemFilePresent) { + Write-Warning "Gemfile not found in the current directory. Creating a default Gemfile." + $gitRemote = git remote + if ($gitRemote -isnot [string] -or $gitRemote -notmatch 'fatal') { + $PSJekyll.Template.'GitHubPages.Gemfile'() > ./Gemfile + } else { + $PSJekyll.Template.MinGemFile() > ./Gemfile + } + } Write-Verbose "Starting Jekyll server $jekyllSplat" $jobName = if ($hostHeader) { "PSJekyll.$hostHeader" } else { "Start-PSJekyll" } $jekyllJob = diff --git a/Types/PSJekyll.Template/GitHubPages.Gemfile.ps1 b/Types/PSJekyll.Template/GitHubPages.Gemfile.ps1 new file mode 100644 index 0000000..337f244 --- /dev/null +++ b/Types/PSJekyll.Template/GitHubPages.Gemfile.ps1 @@ -0,0 +1,12 @@ +<# +.SYNOPSIS + Creates a GitHub Pages Gemfile. +.DESCRIPTION + Creates a Gemfile for GitHub Pages. +#> +param() + +@' +source "https://rubygems.org" +gem 'github-pages', group: :jekyll_plugins +'@ From 8631f86c466dcc5a6fe454775a96ed1de90b7ab3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 16:59:55 +0000 Subject: [PATCH 625/769] fix: Start-PSJekyll ( Fixes #5 ) Creating Gemfile if not present, using GitHubPages if in git. --- PSJekyll.types.ps1xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 6b891de..9c09917 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1164,6 +1164,24 @@ Set-Content -Path ( PSJekyll.Template + + GitHubPages.Gemfile + + Include.4bitcss.html + + Include.PSAlias.md + + Include.PSFunctions.md From 1689edf0551a0f97eb24f4aa95037ad9f4d170a5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:45:51 +0000 Subject: [PATCH 636/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Also adding /Alias and /Aliases --- docs/_data/PSModuleInfo.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 9d611ac..bdc0333 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,13 +14,13 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } From f0e366ca9fc15b791491787ceec137054d2aed50 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:45:51 +0000 Subject: [PATCH 637/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Also adding /Alias and /Aliases --- docs/_includes/PSFunctions.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/_includes/PSFunctions.md b/docs/_includes/PSFunctions.md index 29725ad..af5bdaa 100644 --- a/docs/_includes/PSFunctions.md +++ b/docs/_includes/PSFunctions.md @@ -1,3 +1,7 @@ {% for functionName in site.data.PSModuleFunctionNames %} +{% if site.pages | where: "url", "/{{functionName}}" %} * [{{ functionName }}](/{{functionName}}) +{% else %} +* {{ functionName }} +{% endif %} {% endfor %} \ No newline at end of file From 4b4bc386775362d419a3017144d4b2ae46826d7a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:45:51 +0000 Subject: [PATCH 638/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Also adding /Alias and /Aliases --- docs/_includes/PSAlias.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_includes/PSAlias.md diff --git a/docs/_includes/PSAlias.md b/docs/_includes/PSAlias.md new file mode 100644 index 0000000..a469057 --- /dev/null +++ b/docs/_includes/PSAlias.md @@ -0,0 +1,7 @@ +{% for aliasName in site.data.PSModuleAliasNames %} +{% if site.pages | where: "url", "/{{aliasName}}" %} +* [{{ aliasName }}](/{{aliasName}}) +{% else %} +* {{ aliasName }} +{% endif %} +{% endfor %} \ No newline at end of file From ae4149fc81cc0559629f2a2738323f1d13fc369d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:45:52 +0000 Subject: [PATCH 639/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Also adding /Alias and /Aliases --- docs/Aliases.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Aliases.md diff --git a/docs/Aliases.md b/docs/Aliases.md new file mode 100644 index 0000000..c21840f --- /dev/null +++ b/docs/Aliases.md @@ -0,0 +1,5 @@ +--- + +title: Aliases +--- +{% include PSAlias.md %} \ No newline at end of file From ff28ccf76c2454e1532bb7af5197a5443568bbb7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:45:52 +0000 Subject: [PATCH 640/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Also adding /Alias and /Aliases --- docs/Alias.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Alias.md diff --git a/docs/Alias.md b/docs/Alias.md new file mode 100644 index 0000000..0238da1 --- /dev/null +++ b/docs/Alias.md @@ -0,0 +1,5 @@ +--- + +title: Alias +--- +{% include PSAlias.md %} \ No newline at end of file From 4d1f55ba4dd82a1e7ee349ed512a31834f43bdff Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 10:51:52 -0700 Subject: [PATCH 641/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- PSJekyll.PSJekyll.ps1 | 2 ++ Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 1548809..68db5d9 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -94,6 +94,8 @@ $PSJekyll.CurrentSite.Page = 'Function', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Functions', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Alias', "{% include PSAlias.md %}" $PSJekyll.CurrentSite.Page = 'Aliases', "{% include PSAlias.md %}" +$PSJekyll.CurrentSite.Page = 'Cmdlet', "{% include PSCmdlet.md %}" +$PSJekyll.CurrentSite.Page = 'Cmdlets', "{% include PSCmdlet.md %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include $PSJekyll.CurrentSite.Page diff --git a/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 b/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 new file mode 100644 index 0000000..2213152 --- /dev/null +++ b/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 @@ -0,0 +1,11 @@ +param() + +@" +{% for cmdletName in site.data.PSModuleCmdletNames %} +{% if site.pages | where: "url", "/{{cmdletName}}" %} +* [{{ cmdletName }}](/{{cmdletName}}) +{% else %} +* {{ cmdletName }} +{% endif %} +{% endfor %} +"@ \ No newline at end of file From 73e22b4c3fd60590f1725ea4835d30827e595bd0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:46 +0000 Subject: [PATCH 642/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- PSJekyll.types.ps1xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 4719888..b981c4b 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1782,6 +1782,22 @@ param() * {{ aliasName }} {% endif %} {% endfor %} +"@ + + + + Include.PSCmdlet.md + From 2213f42bb846206f6ad936c7cfa5411d240feded Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 643/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index bdc0333..82f209c 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" } } } \ No newline at end of file From 6498a5d638dc1facd7e6b88bc98455c8a541f2b6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 644/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/_includes/PSCmdlet.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_includes/PSCmdlet.md diff --git a/docs/_includes/PSCmdlet.md b/docs/_includes/PSCmdlet.md new file mode 100644 index 0000000..9453ffe --- /dev/null +++ b/docs/_includes/PSCmdlet.md @@ -0,0 +1,7 @@ +{% for cmdletName in site.data.PSModuleCmdletNames %} +{% if site.pages | where: "url", "/{{cmdletName}}" %} +* [{{ cmdletName }}](/{{cmdletName}}) +{% else %} +* {{ cmdletName }} +{% endif %} +{% endfor %} \ No newline at end of file From a1776e638f79627c7a25dcad1aea7626c2d3696b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 645/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/Cmdlets.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Cmdlets.md diff --git a/docs/Cmdlets.md b/docs/Cmdlets.md new file mode 100644 index 0000000..2f47ec9 --- /dev/null +++ b/docs/Cmdlets.md @@ -0,0 +1,5 @@ +--- + +title: Cmdlets +--- +{% include PSCmdlet.md %} \ No newline at end of file From d54cbc89d1b31b73b75e121da859303c15207928 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 646/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/Alias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Alias.md b/docs/Alias.md index 0238da1..9d034b3 100644 --- a/docs/Alias.md +++ b/docs/Alias.md @@ -2,4 +2,4 @@ title: Alias --- -{% include PSAlias.md %} \ No newline at end of file +{% include PSAlias.md %} From c1657d0c4014b157314f8fad75f550c4996defe8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 647/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/Aliases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Aliases.md b/docs/Aliases.md index c21840f..a63be11 100644 --- a/docs/Aliases.md +++ b/docs/Aliases.md @@ -2,4 +2,4 @@ title: Aliases --- -{% include PSAlias.md %} \ No newline at end of file +{% include PSAlias.md %} From fc35ac70f59eb3864512bdd7bf95494f234c1088 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:52:58 +0000 Subject: [PATCH 648/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Also adding /Cmdlet and /Cmdlets --- docs/Cmdlet.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Cmdlet.md diff --git a/docs/Cmdlet.md b/docs/Cmdlet.md new file mode 100644 index 0000000..449f0c1 --- /dev/null +++ b/docs/Cmdlet.md @@ -0,0 +1,5 @@ +--- + +title: Cmdlet +--- +{% include PSCmdlet.md %} \ No newline at end of file From 41787505b6fec9d995a1f7e526b25aa32e0a5cd7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 10:55:44 -0700 Subject: [PATCH 649/769] fix: Container.start.ps1 ( Fixes #13, Fixes #23, Fixes #24 ) Now launching current site if found. --- Container.start.ps1 | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/Container.start.ps1 b/Container.start.ps1 index cb4c900..ce5a574 100644 --- a/Container.start.ps1 +++ b/Container.start.ps1 @@ -79,23 +79,6 @@ if ($args) { Split-Path | Push-Location } - if (-not (Test-Path './Gemfile')) { - $defaultGemFile = @( - "source 'https://rubygems.org'" - "gem 'jekyll', '~> $((jekyll --version) -replace '^jekyll\s' -replace '\s')'" - if ($env:JekyllThemeName -and $env:JekyllThemeVersion) { - "gem '$env:JekyllThemeName', '~> $env:JekyllThemeVersion'" - } else { - 'gem "minima", "~> 2.5"' - } - "group :jejkyll_plugins do" - " gem 'jekyll-feed', '~> 0.12'" - "end" - 'gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]' - ) -join [Environment]::newline - Set-Content -Path './Gemfile' -Value $defaultGemFile - } - $jekyllJob = Start-PSJekyll while ($jekyllJob.State -notin 'Completed','Failed') { Start-Sleep -Milliseconds (Get-Random -Min 1000 -Max 10000) @@ -115,7 +98,10 @@ if ($args) { { # If a single drive is mounted, start the Jekyll server. if ($mountedFolders.Length -eq 1) { - Push-Location $mountedFolders[0].Fullname + Push-Location $mountedFolders[0].Fullname + Start-PSJekyll + } elseif ($psJekyll.CurrentSite) { + Push-Location $psJekyll.CurrentSite.Directory.FullName Start-PSJekyll } } From 47ec9b5d06d516fe07ab636c7890f59795c2f6ee Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:56:54 +0000 Subject: [PATCH 650/769] fix: Container.start.ps1 ( Fixes #13, Fixes #23, Fixes #24 ) Now launching current site if found. --- docs/_data/PSModuleInfo.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 82f209c..9d611ac 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -20,8 +20,8 @@ "Docker", "GitHubAction" ], - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll" + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" } } } \ No newline at end of file From b8e204d9fbc3584446e681421c05f2567e578548 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:56:55 +0000 Subject: [PATCH 651/769] fix: Container.start.ps1 ( Fixes #13, Fixes #23, Fixes #24 ) Now launching current site if found. --- docs/Cmdlets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Cmdlets.md b/docs/Cmdlets.md index 2f47ec9..e358037 100644 --- a/docs/Cmdlets.md +++ b/docs/Cmdlets.md @@ -2,4 +2,4 @@ title: Cmdlets --- -{% include PSCmdlet.md %} \ No newline at end of file +{% include PSCmdlet.md %} From d031792dd82ccd21adcb1e94c39665acac256384 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 17:56:55 +0000 Subject: [PATCH 652/769] fix: Container.start.ps1 ( Fixes #13, Fixes #23, Fixes #24 ) Now launching current site if found. --- docs/Cmdlet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Cmdlet.md b/docs/Cmdlet.md index 449f0c1..e4787bb 100644 --- a/docs/Cmdlet.md +++ b/docs/Cmdlet.md @@ -2,4 +2,4 @@ title: Cmdlet --- -{% include PSCmdlet.md %} \ No newline at end of file +{% include PSCmdlet.md %} From 72f2df2e64247c4f0ef544c5502d0e3ba2411153 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 10:59:41 -0700 Subject: [PATCH 653/769] feat: Container.stop.ps1 ( Fixes #14 ) Adding exit point and stopping ruby on exit --- Container.stop.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Container.stop.ps1 diff --git a/Container.stop.ps1 b/Container.stop.ps1 new file mode 100644 index 0000000..5703533 --- /dev/null +++ b/Container.stop.ps1 @@ -0,0 +1,10 @@ +<# +.SYNOPSIS + Stops the container. +.DESCRIPTION + This script is called when the container is about to stop. + + It can be used to perform any necessary cleanup before the container is stopped. +#> +"Container now exiting, thank you for using PSJekyll!" | Out-Host +Get-Process ruby | Stop-Process From fb27e1c3059dbc90a5e1006da56dcd4b3c30ed66 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:00:46 +0000 Subject: [PATCH 654/769] feat: Container.stop.ps1 ( Fixes #14 ) Adding exit point and stopping ruby on exit --- docs/_data/PSModuleInfo.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 9d611ac..4a27623 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -14,14 +14,14 @@ "Author": "James Brundage", "PrivateData": { "PSData": { + "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", + "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", "Tags": [ "PowerShellWeb", "Jekyll", "Docker", "GitHubAction" - ], - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE" + ] } } } \ No newline at end of file From 2ae32d36188a5d2acef62115626a036097e83086 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 11:01:56 -0700 Subject: [PATCH 655/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Not syncing module PrivateData --- PSJekyll.PSJekyll.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 68db5d9..bd4a18b 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -14,8 +14,7 @@ $PSJekyll.CurrentSite.Data = @{ Description, Copyright, CompanyName, - Author, - PrivateData + Author PSModuleExports = @( foreach ($command in $sourceModule.ExportedCommands.Values) { [Ordered]@{ From fa9ba0b577e1634c256586e9c6fc21ab582b0714 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:03:04 +0000 Subject: [PATCH 656/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Not syncing module PrivateData --- docs/_data/PSModuleInfo.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 4a27623..f40101c 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -11,17 +11,5 @@ "Description": "Give Jekyll more power with PowerShell", "Copyright": "2024", "CompanyName": "PowerShellWeb", - "Author": "James Brundage", - "PrivateData": { - "PSData": { - "ProjectUri": "https://github.com/PowerShellWeb/PSJekyll", - "LicenseUri": "https://github.com/PowerShellWeb/PSJekyll/blob/main/LICENSE", - "Tags": [ - "PowerShellWeb", - "Jekyll", - "Docker", - "GitHubAction" - ] - } - } + "Author": "James Brundage" } \ No newline at end of file From 35a1b96c7f253d3be610ec358136961970020758 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 11:04:29 -0700 Subject: [PATCH 657/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Adding PSModuleInfo tags --- PSJekyll.PSJekyll.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index bd4a18b..9bc61e2 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -14,7 +14,8 @@ $PSJekyll.CurrentSite.Data = @{ Description, Copyright, CompanyName, - Author + Author, + Tags PSModuleExports = @( foreach ($command in $sourceModule.ExportedCommands.Values) { [Ordered]@{ From 534a271d2b11e9df98136aca1895d523ec211af8 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:05:45 +0000 Subject: [PATCH 658/769] feat: PSJekyll.PSJekyll.ps1 ( Fixes #31 ) Adding PSModuleInfo tags --- docs/_data/PSModuleInfo.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index f40101c..915dafd 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -11,5 +11,15 @@ "Description": "Give Jekyll more power with PowerShell", "Copyright": "2024", "CompanyName": "PowerShellWeb", - "Author": "James Brundage" + "Author": "James Brundage", + "Tags": [ + "PowerShellWeb", + "Jekyll", + "Docker", + "GitHubAction", + "PowerShellWeb", + "Jekyll", + "Docker", + "GitHubAction" + ] } \ No newline at end of file From 02c6435956a5d67451b0d016dca1168a90fb7120 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 11:09:57 -0700 Subject: [PATCH 659/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Also adding /PSTag --- PSJekyll.PSJekyll.ps1 | 1 + Types/PSJekyll.Template/Include.PSTag.md.ps1 | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 Types/PSJekyll.Template/Include.PSTag.md.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 9bc61e2..b5df55a 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -96,6 +96,7 @@ $PSJekyll.CurrentSite.Page = 'Alias', "{% include PSAlias.md %}" $PSJekyll.CurrentSite.Page = 'Aliases', "{% include PSAlias.md %}" $PSJekyll.CurrentSite.Page = 'Cmdlet', "{% include PSCmdlet.md %}" $PSJekyll.CurrentSite.Page = 'Cmdlets', "{% include PSCmdlet.md %}" +$PSJekyll.CurrentSite.Page = 'PSTag', "{% include PSTag.md %}" $PSJekyll.CurrentSite.Layout $PSJekyll.CurrentSite.Include $PSJekyll.CurrentSite.Page diff --git a/Types/PSJekyll.Template/Include.PSTag.md.ps1 b/Types/PSJekyll.Template/Include.PSTag.md.ps1 new file mode 100644 index 0000000..28700ad --- /dev/null +++ b/Types/PSJekyll.Template/Include.PSTag.md.ps1 @@ -0,0 +1,7 @@ +param() + +@" +{% for tagName in site.data.PSModuleInfo.Tags %} +* [{{ tagName }}](https://www.powershellgallery.com/packages?q=Tags%3A%22{{tagName}}%22) +{% endfor %} +"@ \ No newline at end of file From 895e8778e051e3ddc1713b8e59ce2e9d13b8ce6a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:10:50 +0000 Subject: [PATCH 660/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Also adding /PSTag --- PSJekyll.types.ps1xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index b981c4b..13839c5 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1814,6 +1814,18 @@ param() * {{ functionName }} {% endif %} {% endfor %} +"@ + + + + Include.PSTag.md + From 8006cfa88d2e4e883d34e93af259d873f7c22c30 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:11:01 +0000 Subject: [PATCH 661/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Also adding /PSTag --- docs/_includes/PSTag.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/_includes/PSTag.md diff --git a/docs/_includes/PSTag.md b/docs/_includes/PSTag.md new file mode 100644 index 0000000..3745df3 --- /dev/null +++ b/docs/_includes/PSTag.md @@ -0,0 +1,3 @@ +{% for tagName in site.data.PSModuleInfo.Tags %} +* [{{ tagName }}](https://www.powershellgallery.com/packages?q=Tags%3A%22{{tagName}}%22) +{% endfor %} \ No newline at end of file From 32fc71c1b316e2fedad5d0a7a1ec9abcf45c38a4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:11:01 +0000 Subject: [PATCH 662/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Also adding /PSTag --- docs/PSTag.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/PSTag.md diff --git a/docs/PSTag.md b/docs/PSTag.md new file mode 100644 index 0000000..06cb3f6 --- /dev/null +++ b/docs/PSTag.md @@ -0,0 +1,5 @@ +--- + +title: PSTag +--- +{% include PSTag.md %} \ No newline at end of file From 1a3ad7c8e80b67f2623b06d8496c4429840ddaaa Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 11:13:42 -0700 Subject: [PATCH 663/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Selecting Unique PSTag --- PSJekyll.PSJekyll.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index b5df55a..3fae734 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -15,7 +15,10 @@ $PSJekyll.CurrentSite.Data = @{ Copyright, CompanyName, Author, - Tags + @{ + Name = 'Tags' + Expression = { @($_.PrivateData.PSData.Tags | Select-Object -Unique)} + } PSModuleExports = @( foreach ($command in $sourceModule.ExportedCommands.Values) { [Ordered]@{ From 5f4e16e2b67a66f2cff4908f125ebc21f63a1239 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:15:06 +0000 Subject: [PATCH 664/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Selecting Unique PSTag --- docs/_data/PSModuleInfo.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/_data/PSModuleInfo.json b/docs/_data/PSModuleInfo.json index 915dafd..7a67998 100644 --- a/docs/_data/PSModuleInfo.json +++ b/docs/_data/PSModuleInfo.json @@ -13,10 +13,6 @@ "CompanyName": "PowerShellWeb", "Author": "James Brundage", "Tags": [ - "PowerShellWeb", - "Jekyll", - "Docker", - "GitHubAction", "PowerShellWeb", "Jekyll", "Docker", From 80ed4907ea823ac757c3ad578f3757217daa9973 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:15:07 +0000 Subject: [PATCH 665/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Selecting Unique PSTag --- docs/PSTag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PSTag.md b/docs/PSTag.md index 06cb3f6..d2de97f 100644 --- a/docs/PSTag.md +++ b/docs/PSTag.md @@ -2,4 +2,4 @@ title: PSTag --- -{% include PSTag.md %} \ No newline at end of file +{% include PSTag.md %} From 56e59e375cdcd6efe9cadfce498febb57e7fe0b5 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 11:15:59 -0700 Subject: [PATCH 666/769] fix: PSJekyll.Template.Include.Repos ( Fixes #71 ) Renaming to 'Repos' --- PSJekyll.PSJekyll.ps1 | 2 +- ...de.MyRepos.md.ps1 => Include.Repos.md.ps1} | 0 docs/MyRepos.md | 5 ----- docs/PSJekyll/Template/Include/MyRepos/md.md | 22 ------------------- 4 files changed, 1 insertion(+), 28 deletions(-) rename Types/PSJekyll.Template/{Include.MyRepos.md.ps1 => Include.Repos.md.ps1} (100%) delete mode 100644 docs/MyRepos.md delete mode 100644 docs/PSJekyll/Template/Include/MyRepos/md.md diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 3fae734..547047c 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -92,7 +92,7 @@ foreach ($templateMember in $PSJekyll.Template.psobject.Members) { } $PSJekyll.CurrentSite.Page = 'Tree', "{% include SiteTree.html %}" -$PSJekyll.CurrentSite.Page = 'MyRepos', "{% include MyRepos.md %}" +$PSJekyll.CurrentSite.Page = 'Repos', "{% include Repos.md %}" $PSJekyll.CurrentSite.Page = 'Function', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Functions', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Alias', "{% include PSAlias.md %}" diff --git a/Types/PSJekyll.Template/Include.MyRepos.md.ps1 b/Types/PSJekyll.Template/Include.Repos.md.ps1 similarity index 100% rename from Types/PSJekyll.Template/Include.MyRepos.md.ps1 rename to Types/PSJekyll.Template/Include.Repos.md.ps1 diff --git a/docs/MyRepos.md b/docs/MyRepos.md deleted file mode 100644 index d18ac75..0000000 --- a/docs/MyRepos.md +++ /dev/null @@ -1,5 +0,0 @@ ---- - -title: MyRepos ---- -{% include MyRepos.md %} diff --git a/docs/PSJekyll/Template/Include/MyRepos/md.md b/docs/PSJekyll/Template/Include/MyRepos/md.md deleted file mode 100644 index 3c3c674..0000000 --- a/docs/PSJekyll/Template/Include/MyRepos/md.md +++ /dev/null @@ -1,22 +0,0 @@ -PSJekyll.Template.Include.MyRepos.md() --------------------------------------- - -### Synopsis -Include my repositories. - ---- - -### Description - -Include my repositories in the site. - -This will add a list of the owner's repositories to the site. - -This will only work in GitHub Pages. - ---- - -### Related Links -* [https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md](https://github.com/jekyll/github-metadata/blob/main/docs/site.github.md) - ---- From 69751eb018a3f58365042db9533c063f2433b216 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 18:16:51 +0000 Subject: [PATCH 667/769] fix: PSJekyll.Template.Include.Repos ( Fixes #71 ) Renaming to 'Repos' --- PSJekyll.types.ps1xml | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 13839c5..ebbfce3 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1664,31 +1664,6 @@ body > * { margin: 1em; } {{RightCenterMenu}} </menu> {% endif %} -'@ - - - - - Include.MyRepos.md - @@ -1829,6 +1804,31 @@ param() "@ + + Include.Repos.md + + Include.SiteTree.html + + + Include.Contributor.md + From 4675d25c1f67dcc1caa930deaf4026ea52068f12 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 19:13:57 +0000 Subject: [PATCH 692/769] fix: PSJekyll.Template.Include.Contributor ( Fixes #85 ) Also adding /Contributors --- docs/_includes/Contributor.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 docs/_includes/Contributor.md diff --git a/docs/_includes/Contributor.md b/docs/_includes/Contributor.md new file mode 100644 index 0000000..e69de29 From a42b0613d370bf3590fb52f5f3ffc9db2e402dfd Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 19:13:57 +0000 Subject: [PATCH 693/769] fix: PSJekyll.Template.Include.Contributor ( Fixes #85 ) Also adding /Contributors --- docs/Contibutors.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/Contibutors.md diff --git a/docs/Contibutors.md b/docs/Contibutors.md new file mode 100644 index 0000000..fb1c01a --- /dev/null +++ b/docs/Contibutors.md @@ -0,0 +1,5 @@ +--- + +title: Contibutors +--- +{% include Contributor.md %} \ No newline at end of file From 1e69b986efcec31cb0fa95956763f74195f8f956 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 19:14:28 +0000 Subject: [PATCH 694/769] fix: PSJekyll.Template.Include.Contributor ( Fixes #84 ) Also adding /Contributors --- docs/Contibutors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Contibutors.md b/docs/Contibutors.md index fb1c01a..094e77a 100644 --- a/docs/Contibutors.md +++ b/docs/Contibutors.md @@ -2,4 +2,4 @@ title: Contibutors --- -{% include Contributor.md %} \ No newline at end of file +{% include Contributor.md %} From 9b232bbefcd6fd95eb1de0997181e6555642890e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 19:14:28 +0000 Subject: [PATCH 695/769] fix: PSJekyll.Template.Include.OrgMember ( Fixes #85 ) Also adding /Members --- PSJekyll.PSJekyll.ps1 | 1 + Types/PSJekyll.Template/Include.OrgMember.md.ps1 | 5 +++++ docs/Contibutors.md | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 Types/PSJekyll.Template/Include.OrgMember.md.ps1 diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index d4486bb..0ceb9d9 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -94,6 +94,7 @@ foreach ($templateMember in $PSJekyll.Template.psobject.Members) { $PSJekyll.CurrentSite.Page = 'Tree', "{% include SiteTree.html %}" $PSJekyll.CurrentSite.Page = 'Repos', "{% include Repos.md %}" $PSJekyll.CurrentSite.Page = 'Contibutors', "{% include Contributor.md %}" +$PSJekyll.CurrentSite.Page = 'Members', "{% include OrgMember.md %}" $PSJekyll.CurrentSite.Page = 'Function', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Functions', "{% include PSFunctions.md %}" $PSJekyll.CurrentSite.Page = 'Alias', "{% include PSAlias.md %}" diff --git a/Types/PSJekyll.Template/Include.OrgMember.md.ps1 b/Types/PSJekyll.Template/Include.OrgMember.md.ps1 new file mode 100644 index 0000000..845fa4d --- /dev/null +++ b/Types/PSJekyll.Template/Include.OrgMember.md.ps1 @@ -0,0 +1,5 @@ +param() + +"{% for member in site.github.organization_members %}" +"* [{{ member.login }}]({{ member.html_url }})" +"{% endfor %}" \ No newline at end of file diff --git a/docs/Contibutors.md b/docs/Contibutors.md index fb1c01a..094e77a 100644 --- a/docs/Contibutors.md +++ b/docs/Contibutors.md @@ -2,4 +2,4 @@ title: Contibutors --- -{% include Contributor.md %} \ No newline at end of file +{% include Contributor.md %} From 440c13c149a13d74f0afaf59b482712417b67576 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 19:19:37 +0000 Subject: [PATCH 696/769] fix: PSJekyll.Template.Include.OrgMember ( Fixes #85 ) Also adding /Members --- PSJekyll.types.ps1xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 775bab4..8d9db37 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1829,6 +1829,16 @@ param() + + Include.OrgMember.md + + Include.PSAlias.md + + Include.Releases.md + + Include.Repos.md + + + Include.PSTypeName.md + From 6de26468d9fa0e01db042b617e974d7b765a8746 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:10:08 +0000 Subject: [PATCH 722/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Also adding /PSTypeName and associated data --- docs/_data/PSModuleExportTypeNames.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/_data/PSModuleExportTypeNames.json diff --git a/docs/_data/PSModuleExportTypeNames.json b/docs/_data/PSModuleExportTypeNames.json new file mode 100644 index 0000000..bf2496d --- /dev/null +++ b/docs/_data/PSModuleExportTypeNames.json @@ -0,0 +1,5 @@ +[ + "PSJekyll", + "PSJekyll.Site", + "PSJekyll.Template" +] \ No newline at end of file From 3d6971a88cd9fdb2fabb50dc2acf98183663edce Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:10:09 +0000 Subject: [PATCH 723/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Also adding /PSTypeName and associated data --- docs/_includes/PSTypeName.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_includes/PSTypeName.md diff --git a/docs/_includes/PSTypeName.md b/docs/_includes/PSTypeName.md new file mode 100644 index 0000000..af5bdaa --- /dev/null +++ b/docs/_includes/PSTypeName.md @@ -0,0 +1,7 @@ +{% for functionName in site.data.PSModuleFunctionNames %} +{% if site.pages | where: "url", "/{{functionName}}" %} +* [{{ functionName }}](/{{functionName}}) +{% else %} +* {{ functionName }} +{% endif %} +{% endfor %} \ No newline at end of file From 14b786c6215b9b32ff692d48532b16b8f2f529d9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:10:09 +0000 Subject: [PATCH 724/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Also adding /PSTypeName and associated data --- docs/Releases.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Releases.md b/docs/Releases.md index 421816c..cda6703 100644 --- a/docs/Releases.md +++ b/docs/Releases.md @@ -2,4 +2,4 @@ title: Releases --- -{% include Releases.md %} \ No newline at end of file +{% include Releases.md %} From 49218efa1c76d70b2abbafb4181aca04904c36bc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:10:09 +0000 Subject: [PATCH 725/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Also adding /PSTypeName and associated data --- docs/PSTypeName.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/PSTypeName.md diff --git a/docs/PSTypeName.md b/docs/PSTypeName.md new file mode 100644 index 0000000..2e44052 --- /dev/null +++ b/docs/PSTypeName.md @@ -0,0 +1,5 @@ +--- + +title: PSTypeName +--- +{% include PSTypeName.md %} \ No newline at end of file From e3b59d515a90c3de7becab5c966a8ad5ff6d3828 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 13:12:19 -0700 Subject: [PATCH 726/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Fixing data variable reference --- Types/PSJekyll.Template/Include.PSTypeName.md.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 index 65232ce..bb40a9c 100644 --- a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 @@ -1,7 +1,7 @@ param() @" -{% for functionName in site.data.PSModuleFunctionNames %} +{% for functionName in site.data.PSExportTypeNames %} {% if site.pages | where: "url", "/{{functionName}}" %} * [{{ functionName }}](/{{functionName}}) {% else %} From 97a0f0c6b33aafa207c7dd4130825ddf5729cc01 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:13:18 +0000 Subject: [PATCH 727/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Fixing data variable reference --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 37c61c5..e58e7d0 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1943,7 +1943,7 @@ param() param() @" -{% for functionName in site.data.PSModuleFunctionNames %} +{% for functionName in site.data.PSExportTypeNames %} {% if site.pages | where: "url", "/{{functionName}}" %} * [{{ functionName }}](/{{functionName}}) {% else %} From 025c78e9e6801bfcc02c7a6386e98257b6057ed4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:13:31 +0000 Subject: [PATCH 728/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Fixing data variable reference --- docs/_includes/PSTypeName.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSTypeName.md b/docs/_includes/PSTypeName.md index af5bdaa..a9dc02f 100644 --- a/docs/_includes/PSTypeName.md +++ b/docs/_includes/PSTypeName.md @@ -1,4 +1,4 @@ -{% for functionName in site.data.PSModuleFunctionNames %} +{% for functionName in site.data.PSExportTypeNames %} {% if site.pages | where: "url", "/{{functionName}}" %} * [{{ functionName }}](/{{functionName}}) {% else %} From 466040e86f3e6d57144d2590c89f403229697204 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 20:13:32 +0000 Subject: [PATCH 729/769] feat: PSJekyll.Template.IncludePSTypeName ( Fixes #87 ) Fixing data variable reference --- docs/PSTypeName.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/PSTypeName.md b/docs/PSTypeName.md index 2e44052..d0744b3 100644 --- a/docs/PSTypeName.md +++ b/docs/PSTypeName.md @@ -2,4 +2,4 @@ title: PSTypeName --- -{% include PSTypeName.md %} \ No newline at end of file +{% include PSTypeName.md %} From da19b5a92ba5c9ed4778ed80c39e003a1f1b52fb Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:16:18 -0700 Subject: [PATCH 730/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- PSJekyll.PSJekyll.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index ee529c6..0ad8759 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -8,7 +8,7 @@ Push-Location $sitePath $PSJekyll.CurrentSite.Domain = "psjekyll.powershellweb.com" $PSJekyll.CurrentSite.Data = @{LastDateBuilt = [datetime]::UtcNow.Date.ToString('yyyy-MM-dd')} $PSJekyll.CurrentSite.Data = @{ - PSModuleInfo = $sourceModule | + "PSModule/Info" = $sourceModule | Select-Object -Property Name, Version, Description, @@ -19,7 +19,7 @@ $PSJekyll.CurrentSite.Data = @{ Name = 'Tags' Expression = { @($_.PrivateData.PSData.Tags | Select-Object -Unique)} } - PSModuleExports = @( + "PSModule/Exports" = @( foreach ($command in $sourceModule.ExportedCommands.Values) { [Ordered]@{ Name = $command.Name @@ -44,11 +44,11 @@ $PSJekyll.CurrentSite.Data = @{ } ) - PSModuleFunctionNames = $sourceModule.ExportedFunctions.Keys - PSModuleCmdletNames = $sourceModule.ExportedCmdlets.Keys - PSModuleAliasNames = $sourceModule.ExportedAliases.Keys - PSModuleVariableNames = $sourceModule.ExportedVariables.Keys - PSModuleExportTypeNames = $sourceModule.ExportedTypeFiles | + "PSModule/FunctionNames" = $sourceModule.ExportedFunctions.Keys + "PSModule/CmdletNames" = $sourceModule.ExportedCmdlets.Keys + "PSModule/AliasNames" = $sourceModule.ExportedAliases.Keys + "PSModule/VariableNames" = $sourceModule.ExportedVariables.Keys + "PSModule/TypeNames" = $sourceModule.ExportedTypeFiles | ForEach-Object { (Select-Xml -XPath //Types/Type -Path $_).Node.Name } } $PSJekyll.CurrentSite.Data From e73e103ee9729332bd7cb8ccb4aa1fa731c50d33 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 731/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/Info.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 docs/_data/PSModule/Info.json diff --git a/docs/_data/PSModule/Info.json b/docs/_data/PSModule/Info.json new file mode 100644 index 0000000..7a67998 --- /dev/null +++ b/docs/_data/PSModule/Info.json @@ -0,0 +1,21 @@ +{ + "Name": "PSJekyll", + "Version": { + "Major": 0, + "Minor": 1, + "Build": -1, + "Revision": -1, + "MajorRevision": -1, + "MinorRevision": -1 + }, + "Description": "Give Jekyll more power with PowerShell", + "Copyright": "2024", + "CompanyName": "PowerShellWeb", + "Author": "James Brundage", + "Tags": [ + "PowerShellWeb", + "Jekyll", + "Docker", + "GitHubAction" + ] +} \ No newline at end of file From c5a8846c7a8ba1aad2d1f976491bc24421938ab3 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 732/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/TypeNames.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 docs/_data/PSModule/TypeNames.json diff --git a/docs/_data/PSModule/TypeNames.json b/docs/_data/PSModule/TypeNames.json new file mode 100644 index 0000000..bf2496d --- /dev/null +++ b/docs/_data/PSModule/TypeNames.json @@ -0,0 +1,5 @@ +[ + "PSJekyll", + "PSJekyll.Site", + "PSJekyll.Template" +] \ No newline at end of file From 8a862d2df0a3f7f366dd3e0b9dc12032a38f4dde Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 733/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/CmdletNames.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_data/PSModule/CmdletNames.json diff --git a/docs/_data/PSModule/CmdletNames.json b/docs/_data/PSModule/CmdletNames.json new file mode 100644 index 0000000..ec747fa --- /dev/null +++ b/docs/_data/PSModule/CmdletNames.json @@ -0,0 +1 @@ +null \ No newline at end of file From 664de87e00f8ef19cdea17d7d935d885f8dfff32 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 734/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/AliasNames.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_data/PSModule/AliasNames.json diff --git a/docs/_data/PSModule/AliasNames.json b/docs/_data/PSModule/AliasNames.json new file mode 100644 index 0000000..e775ae1 --- /dev/null +++ b/docs/_data/PSModule/AliasNames.json @@ -0,0 +1,7 @@ +[ + "New-Jekyll", + "Remove-Jekyll", + "Set-Jekyll", + "Start-Jekyll", + "Stop-Jekyll" +] \ No newline at end of file From 119d3a5606cd69aa5919fda9dc7e4e6f2e6f1474 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 735/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/Exports.json | 1874 ++++++++++++++++++++++++++++++ 1 file changed, 1874 insertions(+) create mode 100644 docs/_data/PSModule/Exports.json diff --git a/docs/_data/PSModule/Exports.json b/docs/_data/PSModule/Exports.json new file mode 100644 index 0000000..eaca875 --- /dev/null +++ b/docs/_data/PSModule/Exports.json @@ -0,0 +1,1874 @@ +[ + { + "Name": "New-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Creates a new Jekyll site.\n .DESCRIPTION\n Creates a new Jekyll site, using PowerShell.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('New-Jekyll')]\n param(\n # The name of the Jekyll site\n [string]\n $Name,\n\n # Creates scaffolding but with empty files\n [switch]\n $Blank,\n\n # Force creation even if PATH already exists\n [switch]\n $Force,\n\n # Safe mode\n [switch]\n $Safe,\n\n # Skip the bundle install\n [switch]\n $SkipBundle,\n\n # The path to the source files\n [string]\n $SourcePath,\n\n # The path to the destination files\n [string]\n $DestinationPath,\n\n # The path to the layout files\n [string]\n $LayoutPath,\n\n # The path to the plugin files\n [string[]]\n $PluginPath,\n\n # If set, will generate a liquid profile\n [switch]\n $LiquidProfile,\n\n # If set, will trace the execution\n [switch]\n $Trace\n )\n\n $jekyllSplat = @(\n $name\n if ($blank) { '--blank' }\n if ($force) { '--force' }\n if ($safe) { '--safe' }\n if ($skipBundle) { '--skip-bundle' }\n if ($sourcePath) {\"--source $sourcePath\"}\n if ($destinationPath) {\"--destination $destinationPath\"}\n if ($layoutPath) {\"--layouts $layoutPath\"}\n if ($pluginPath) {\"--plugins $($pluginPath -join ',')\"}\n if ($liquidProfile) {'--profile'}\n if ($trace) {'--trace'}\n )\n\n $newJekyllJob = jekyll new @jekyllSplat &\n $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job')\n $newJekyllJob.pstypenames.Insert(0,'PSJekyll.Job.New-PSJekyll')\n $newJekyllJob\n", + "ParameterName": [ + "Name", + "Blank", + "Force", + "Safe", + "SkipBundle", + "SourcePath", + "DestinationPath", + "LayoutPath", + "PluginPath", + "LiquidProfile", + "Trace" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Blank", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Force", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Safe", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SkipBundle", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LayoutPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Remove-PSJekyll", + "CommandType": 2, + "Definition": " \n <#\n .SYNOPSIS\n Removes content from Jekyll\n .DESCRIPTION\n Removes files from Jekyll\n\n This is a slightly limited version of Remove-Item.\n #>\n [Alias('Remove-Jekyll')]\n param(\n # The path to the file.\n [Parameter(Mandatory,Position=0,ValueFromPipelineByPropertyName)] \n [ValidatePattern('^[\\\\/]')]\n [Alias('FullName')]\n [string]\n $Path\n )\n \n process {\n if (Test-Path $path) { \n Remove-Item -Path $path \n }\n } \n", + "ParameterName": [ + "Path", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Set-PSJekyll", + "CommandType": 2, + "Definition": " \n <#\n .SYNOPSIS\n Sets the content of a file in Jekyll\n .DESCRIPTION\n Sets the content of a file in Jekyll.\n\n This is only slightly smarter than Set-Content. \n \n It will convert the content to JSON if the file ends in .json, and to CSV if the file ends in .csv or .tsv.\n\n Otherwise, it will create a YAML header and then set the content.\n #>\n [Alias('Set-Jekyll')]\n param(\n # The path to the file.\n [Parameter(Mandatory,Position=0)] \n [ValidatePattern('^[\\\\/]')]\n [Alias('FullName')]\n [string]\n $Path,\n \n # If set, will return the file object\n [switch]\n $PassThru,\n \n # The content to set\n [Parameter(ValueFromPipeline)]\n [object]\n $Content,\n\n # Any metadata to set. \n # This will create a YAML header, which is required for most files in Jekyll to be processed properly.\n [Alias('YamlHeader')]\n [Collections.IDictionary]\n $MetaData = [Ordered]@{}\n )\n \n $allInput = @($input)\n if ((-not $allInput) -and $Content) {\n $allInput = @($Content)\n }\n\n if (-not $allInput) { return }\n if (-not (Test-Path $path)) { \n New-Item -Path $path -Type File -Force | Out-Null\n if (-not $?) { return }\n }\n \n if ($path -match '\\.json$') {\n if ($allInput.Length -eq 1) { \n ConvertTo-Json -InputObject $allInput[0] -Depth $FormatEnumerationLimit | \n Set-Content -Path $path\n } else {\n ConvertTo-Json -InputObject $allInput -Depth $FormatEnumerationLimit | \n Set-Content -Path $path\n } \n } \n elseif ($path -match '\\.[ct]sv$') {\n $csvSplat = [Ordered]@{Path=$path}\n if ($path -match '\\.t') {\n $csvSplat.Delimiter = \"`t\"\n }\n $content | \n Export-Csv @csvSplat -NoTypeInformation \n }\n else {\n @(\n $metadata | & $psJekyll.FormatYaml.Script -YamlHeader\n $content\n ) | \n Set-Content -Path $path\n }\n if ($? -and $PassThru) {\n Get-Item -Path $path\n }\n", + "ParameterName": [ + "Path", + "PassThru", + "Content", + "MetaData", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PassThru", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Content", + "ParameterType": "System.Object", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "MetaData", + "ParameterType": "System.Collections.IDictionary", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Start-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Starts a Jekyll server\n .DESCRIPTION\n Starts a Jekyll server in a PowerShell job.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('Start-Jekyll')]\n [CmdletBinding()]\n param(\n # The name of the Jekyll site\n [string]\n $Name,\n\n # One or more config files to use\n [Alias('Configuration')]\n [string[]]\n $Config,\n\n # The source directory\n [string]\n $SourcePath,\n\n # The destination directory\n [string]\n $DestinationPath,\n \n # The host header\n [string]\n $HostHeader,\n\n # The port to listen on\n [uint]\n $Port,\n\n # The path to the plugin files\n [string[]]\n $PluginPath,\n\n # If set, will show a directory list.\n [switch]\n $ShowDirectoryList,\n\n # If set, will enable live reload.\n [switch]\n $LiveReload,\n\n # If set, will generate a liquid profile\n [switch]\n $LiquidProfile,\n\n # If set, will trace the execution\n [switch]\n $Trace, \n\n # Watch for changes and rebuild\n [switch]\n $Watch,\n\n # If set, will publish posts with a future date (previewing them).\n [switch]\n $PreviewFuture,\n\n # The base URL for the site\n [string]\n $BaseUrl,\n\n # If set, will detach the process\n [switch]\n $Detach,\n\n # Enable incremental rebuilds\n [switch]\n $Incremental\n )\n\n if ($env:IN_CONTAINER -and -not $HostHeader) {\n $HostHeader = '*'\n } \n\n $jekyllSplat = @( \n if ($force) { '--force' }\n if ($safe) { '--safe' }\n if ($Detach) { '--detach' }\n if ($PreviewFuture) { '--future' }\n if ($liveReload) {'--livereload'}\n if ($sourcePath) {\"--source\";\"$sourcePath\"}\n if ($destinationPath) {\"--destination\";\"$destinationPath\"}\n if ($BaseUrl) {\"--baseurl\";\"$BaseUrl\"}\n if ($Incremental) {'--incremental'}\n if ($HostHeader) {\"--host\"; \"$HostHeader\"}\n if ($Port) {\"--port\"; \"$Port\"}\n if ($ShowDirectoryList) {'--show-dir-list'}\n if ($layoutPath) {\"--layouts\"; \"$layoutPath\"}\n if ($pluginPath) {\"--plugins\"; \"$($pluginPath -join ',')\"}\n if ($liquidProfile) {'--profile'}\n if ($trace) {'--trace'}\n if ($watch) {'--watch'}\n\n )\n \n $startedAfter = [DateTime]::Now\n if ($jekyllSplat -notmatch '--watch') {\n $jekyllSplat += '--watch'\n }\n if ($jekyllSplat -notmatch '--incremental') {\n $jekyllSplat += '--incremental'\n }\n if ($jekyllSplat -notmatch '--trace') {\n $jekyllSplat += '--trace'\n }\n $isGemFilePresent = Test-Path -Path './Gemfile'\n if (-not $isGemFilePresent) {\n Write-Warning \"Gemfile not found in the current directory. Creating a default Gemfile.\"\n $gitRemote = git remote\n if ($gitRemote -isnot [string] -or $gitRemote -notmatch 'fatal') {\n $PSJekyll.Template.'GitHubPages.Gemfile'() > ./Gemfile\n } else {\n $PSJekyll.Template.MinGemFile() > ./Gemfile\n } \n }\n Write-Verbose \"Starting Jekyll server $jekyllSplat\"\n $jobName = if ($hostHeader) { \"PSJekyll.$hostHeader\" } else { \"Start-PSJekyll\" }\n $jekyllJob = \n Start-ThreadJob -ScriptBlock {\n if ($ExecutionContext.SessionState.InvokeCommand.GetCommand('sudo','application')) {\n sudo bundle install\n } else {\n bundle install\n }\n \n if ($args -match '^\\*$' -and $args -match '^--host$') {\n $otherArgs = @($args -notmatch '^(?>--host|\\*)$') \n bundle exec jekyll serve --host '*' @otherArgs\n } else {\n $promptLongForm = @('exec','jekyll','serve') + $args \n bundle @promptLongForm\n } \n } -ArgumentList $jekyllSplat -Name $jobName\n \n $jekyllProcesses = Get-Process *ruby* | Where-Object { $_.StartTime -ge $startedAfter }\n\n Register-EngineEvent -SourceIdentifier PowerShell.Exiting -Action {\n get-process ruby | Stop-Process -Force\n } | Out-Null\n \n $jekyllJob.pstypenames.insert(0,\"PSJekyll.JekyllJob\")\n $jekyllJob.psobject.properties.Add([psnoteproperty]::New(\"Processes\", $jekyllProcesses))\n $jekyllJob\n", + "ParameterName": [ + "Name", + "Config", + "SourcePath", + "DestinationPath", + "HostHeader", + "Port", + "PluginPath", + "ShowDirectoryList", + "LiveReload", + "LiquidProfile", + "Trace", + "Watch", + "PreviewFuture", + "BaseUrl", + "Detach", + "Incremental", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Config", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "HostHeader", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Port", + "ParameterType": "System.UInt32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ShowDirectoryList", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiveReload", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Watch", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PreviewFuture", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "BaseUrl", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Detach", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Incremental", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Stop-PSJekyll", + "CommandType": 2, + "Definition": "\n <#\n .SYNOPSIS\n Stops a Jekyll server\n .DESCRIPTION\n Stops a Jekyll server in a PowerShell job.\n .LINK\n https://jekyllrb.com/\n #>\n [Alias('Stop-Jekyll')] \n param(\n # The name of the Jekyll job\n [Parameter(ValueFromPipelineByPropertyName)]\n [string]\n $Name = '*'\n )\n\n process {\n Get-Job -Name \"Jekyll.$Name\" | Stop-Job\n }\n", + "ParameterName": [ + "Name", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "New-Jekyll", + "CommandType": 1, + "Definition": "New-PSJekyll", + "ParameterName": [ + "Name", + "Blank", + "Force", + "Safe", + "SkipBundle", + "SourcePath", + "DestinationPath", + "LayoutPath", + "PluginPath", + "LiquidProfile", + "Trace" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Blank", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Force", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Safe", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SkipBundle", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LayoutPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Remove-Jekyll", + "CommandType": 1, + "Definition": "Remove-PSJekyll", + "ParameterName": [ + "Path", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Set-Jekyll", + "CommandType": 1, + "Definition": "Set-PSJekyll", + "ParameterName": [ + "Path", + "PassThru", + "Content", + "MetaData", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Path", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PassThru", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Content", + "ParameterType": "System.Object", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "MetaData", + "ParameterType": "System.Collections.IDictionary", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Start-Jekyll", + "CommandType": 1, + "Definition": "Start-PSJekyll", + "ParameterName": [ + "Name", + "Config", + "SourcePath", + "DestinationPath", + "HostHeader", + "Port", + "PluginPath", + "ShowDirectoryList", + "LiveReload", + "LiquidProfile", + "Trace", + "Watch", + "PreviewFuture", + "BaseUrl", + "Detach", + "Incremental", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Config", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "SourcePath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "DestinationPath", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "HostHeader", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Port", + "ParameterType": "System.UInt32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PluginPath", + "ParameterType": "System.String[]", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ShowDirectoryList", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiveReload", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "LiquidProfile", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Trace", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Watch", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PreviewFuture", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "BaseUrl", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Detach", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Incremental", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + }, + { + "Name": "Stop-Jekyll", + "CommandType": 1, + "Definition": "Stop-PSJekyll", + "ParameterName": [ + "Name", + "Verbose", + "Debug", + "ErrorAction", + "WarningAction", + "InformationAction", + "ProgressAction", + "ErrorVariable", + "WarningVariable", + "InformationVariable", + "OutVariable", + "OutBuffer", + "PipelineVariable" + ], + "Parameter": [ + { + "Name": "Name", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Verbose", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "Debug", + "ParameterType": "System.Management.Automation.SwitchParameter", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ProgressAction", + "ParameterType": "System.Management.Automation.ActionPreference", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "ErrorVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "WarningVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "InformationVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "OutBuffer", + "ParameterType": "System.Int32", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + }, + { + "Name": "PipelineVariable", + "ParameterType": "System.String", + "Position": null, + "Mandatory": null, + "ValueFromPipeline": null, + "ValueFromPipelineByPropertyName": null, + "ValueFromRemainingArguments": null, + "HelpMessage": null + } + ] + } +] \ No newline at end of file From 94d216aacd9e74af0d89d181b02247304be8539e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 736/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/FunctionNames.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/_data/PSModule/FunctionNames.json diff --git a/docs/_data/PSModule/FunctionNames.json b/docs/_data/PSModule/FunctionNames.json new file mode 100644 index 0000000..1ddd5ff --- /dev/null +++ b/docs/_data/PSModule/FunctionNames.json @@ -0,0 +1,7 @@ +[ + "New-PSJekyll", + "Remove-PSJekyll", + "Set-PSJekyll", + "Start-PSJekyll", + "Stop-PSJekyll" +] \ No newline at end of file From 3729561e56ee93b9b098e7e265be0f912f98a4ae Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:17:54 +0000 Subject: [PATCH 737/769] fix: PSJekyll.PSJekyll.ps1 Putting PSModule data into subfolders --- docs/_data/PSModule/VariableNames.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/_data/PSModule/VariableNames.json diff --git a/docs/_data/PSModule/VariableNames.json b/docs/_data/PSModule/VariableNames.json new file mode 100644 index 0000000..d19c8e6 --- /dev/null +++ b/docs/_data/PSModule/VariableNames.json @@ -0,0 +1 @@ +"PSJekyll" \ No newline at end of file From 2de1e43e68c5c65d66066a8b1be5e9890dc26826 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:21:24 -0700 Subject: [PATCH 738/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Simplifying and fixing pathing --- Types/PSJekyll.Template/Include.PSTypeName.md.ps1 | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 index bb40a9c..ce2cec3 100644 --- a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 @@ -1,11 +1,7 @@ param() @" -{% for functionName in site.data.PSExportTypeNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} -* [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} +{% for typeName in site.data.PSModule.TypeNames %} +* [{{ typeName }}](/{{typeName}}) {% endfor %} "@ \ No newline at end of file From 0bc38ff1bda90f3089d3c63a4b930c0abdeaeba6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:22:21 +0000 Subject: [PATCH 739/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Simplifying and fixing pathing --- PSJekyll.types.ps1xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index e58e7d0..7d7a31c 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1943,12 +1943,8 @@ param() param() @" -{% for functionName in site.data.PSExportTypeNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} -* [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} +{% for typeName in site.data.PSModule.TypeNames %} +* [{{ typeName }}](/{{typeName}}) {% endfor %} "@ From 5ad005e1373b3b9071367b640731d5951b7c5c6b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:22:33 +0000 Subject: [PATCH 740/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Simplifying and fixing pathing --- docs/_includes/PSTypeName.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/_includes/PSTypeName.md b/docs/_includes/PSTypeName.md index a9dc02f..6cac6b1 100644 --- a/docs/_includes/PSTypeName.md +++ b/docs/_includes/PSTypeName.md @@ -1,7 +1,3 @@ -{% for functionName in site.data.PSExportTypeNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} -* [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} +{% for typeName in site.data.PSModule.TypeNames %} +* [{{ typeName }}](/{{typeName}}) {% endfor %} \ No newline at end of file From 33e63dc824401c54504c69df72661d800120af10 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:25:13 -0700 Subject: [PATCH 741/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Replacing periods with slashes --- Types/PSJekyll.Template/Include.PSTypeName.md.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 index ce2cec3..afb19bf 100644 --- a/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSTypeName.md.ps1 @@ -2,6 +2,6 @@ param() @" {% for typeName in site.data.PSModule.TypeNames %} -* [{{ typeName }}](/{{typeName}}) +* [{{ typeName }}](/{{typeName | replace: ".", "/"}}) {% endfor %} "@ \ No newline at end of file From be4f55e667d0b32d5f8327aab08ade90378e0248 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:26:05 +0000 Subject: [PATCH 742/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Replacing periods with slashes --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 7d7a31c..96aea7a 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1944,7 +1944,7 @@ param() @" {% for typeName in site.data.PSModule.TypeNames %} -* [{{ typeName }}](/{{typeName}}) +* [{{ typeName }}](/{{typeName | replace: ".", "/"}}) {% endfor %} "@ From e033d860f6a2d0fb75ea5c3e7036dec838add668 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:26:16 +0000 Subject: [PATCH 743/769] fix: PSJekyll.Template.Include.PSTypeName ( Fixes #87 ) Replacing periods with slashes --- docs/_includes/PSTypeName.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSTypeName.md b/docs/_includes/PSTypeName.md index 6cac6b1..3bd71d8 100644 --- a/docs/_includes/PSTypeName.md +++ b/docs/_includes/PSTypeName.md @@ -1,3 +1,3 @@ {% for typeName in site.data.PSModule.TypeNames %} -* [{{ typeName }}](/{{typeName}}) +* [{{ typeName }}](/{{typeName | replace: ".", "/"}}) {% endfor %} \ No newline at end of file From f555b60179b4aab4444c099663a969f43815a1e7 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:32:48 -0700 Subject: [PATCH 744/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Making into table --- PSJekyll.PSJekyll.ps1 | 4 ++++ Types/PSJekyll.Template/Include.PSAlias.md.ps1 | 11 ++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/PSJekyll.PSJekyll.ps1 b/PSJekyll.PSJekyll.ps1 index 0ad8759..65f510a 100644 --- a/PSJekyll.PSJekyll.ps1 +++ b/PSJekyll.PSJekyll.ps1 @@ -47,9 +47,13 @@ $PSJekyll.CurrentSite.Data = @{ "PSModule/FunctionNames" = $sourceModule.ExportedFunctions.Keys "PSModule/CmdletNames" = $sourceModule.ExportedCmdlets.Keys "PSModule/AliasNames" = $sourceModule.ExportedAliases.Keys + "PSModule/Aliases" = @($sourceModule.ExportedAliases.Values | + ForEach-Object { [Ordered]@{Name=$_.Name;Definition=$_.Definition} }) + "PSModule/VariableNames" = $sourceModule.ExportedVariables.Keys "PSModule/TypeNames" = $sourceModule.ExportedTypeFiles | ForEach-Object { (Select-Xml -XPath //Types/Type -Path $_).Node.Name } + } $PSJekyll.CurrentSite.Data # It is important to use [Ordered], otherwise, the order of the keys will be random. diff --git a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 index 096a0eb..a17cdd8 100644 --- a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 @@ -1,12 +1,9 @@ param() @" -{% for aliasName in site.data.PSModuleAliasNames %} -{% assign pageLink = site.pages | where: "url", "/{{aliasName}}" %} -{% if pageLink %} -* [{{ aliasName }}](/{{aliasName}}) -{% else %} -* {{ aliasName }} -{% endif %} +| Alias | Command | +|-|-| +{% for alias in site.data.PSModule.Aliases %} +| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | {% endfor %} "@ \ No newline at end of file From f0f436dd4f49f5691712cc5d7f3ec717e9f3e396 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:33:58 +0000 Subject: [PATCH 745/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Making into table --- PSJekyll.types.ps1xml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 96aea7a..fe358c9 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1882,13 +1882,10 @@ param() param() @" -{% for aliasName in site.data.PSModuleAliasNames %} -{% assign pageLink = site.pages | where: "url", "/{{aliasName}}" %} -{% if pageLink %} -* [{{ aliasName }}](/{{aliasName}}) -{% else %} -* {{ aliasName }} -{% endif %} +| Alias | Command | +|-|-| +{% for alias in site.data.PSModule.Aliases %} +| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | {% endfor %} "@ From 00a94eba7fe797def86f523743627f7011d1f298 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:34:09 +0000 Subject: [PATCH 746/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Making into table --- docs/_data/PSModule/Aliases.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 docs/_data/PSModule/Aliases.json diff --git a/docs/_data/PSModule/Aliases.json b/docs/_data/PSModule/Aliases.json new file mode 100644 index 0000000..4579eb9 --- /dev/null +++ b/docs/_data/PSModule/Aliases.json @@ -0,0 +1,22 @@ +[ + { + "Name": "New-Jekyll", + "Definition": "New-PSJekyll" + }, + { + "Name": "Remove-Jekyll", + "Definition": "Remove-PSJekyll" + }, + { + "Name": "Set-Jekyll", + "Definition": "Set-PSJekyll" + }, + { + "Name": "Start-Jekyll", + "Definition": "Start-PSJekyll" + }, + { + "Name": "Stop-Jekyll", + "Definition": "Stop-PSJekyll" + } +] \ No newline at end of file From 1251a59fd27725e9985f58d686a3f17de5cbcf79 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:34:10 +0000 Subject: [PATCH 747/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Making into table --- docs/_includes/PSAlias.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/_includes/PSAlias.md b/docs/_includes/PSAlias.md index 1671319..cbe0a7d 100644 --- a/docs/_includes/PSAlias.md +++ b/docs/_includes/PSAlias.md @@ -1,8 +1,5 @@ -{% for aliasName in site.data.PSModuleAliasNames %} -{% assign pageLink = site.pages | where: "url", "/{{aliasName}}" %} -{% if pageLink %} -* [{{ aliasName }}](/{{aliasName}}) -{% else %} -* {{ aliasName }} -{% endif %} +| Alias | Command | +|-|-| +{% for alias in site.data.PSModule.Aliases %} +| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | {% endfor %} \ No newline at end of file From e06668b56634ec42568946edb6aeb2f53f724854 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:36:18 -0700 Subject: [PATCH 748/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table spacing --- Types/PSJekyll.Template/Include.PSAlias.md.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 index a17cdd8..7cd0539 100644 --- a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 @@ -2,8 +2,7 @@ param() @" | Alias | Command | -|-|-| -{% for alias in site.data.PSModule.Aliases %} -| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | +|-|-|{% for alias in site.data.PSModule.Aliases %} +|{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} "@ \ No newline at end of file From 4ef964e4190ea516c3aaa8d58ec6b7bac5f478f9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:37:15 +0000 Subject: [PATCH 749/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table spacing --- PSJekyll.types.ps1xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index fe358c9..84238f5 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1883,9 +1883,8 @@ param() @" | Alias | Command | -|-|-| -{% for alias in site.data.PSModule.Aliases %} -| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | +|-|-|{% for alias in site.data.PSModule.Aliases %} +|{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} "@ From b3a073748635d67f9d079530292d2c97e7fb4b7a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:37:28 +0000 Subject: [PATCH 750/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table spacing --- docs/_includes/PSAlias.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/_includes/PSAlias.md b/docs/_includes/PSAlias.md index cbe0a7d..9165b11 100644 --- a/docs/_includes/PSAlias.md +++ b/docs/_includes/PSAlias.md @@ -1,5 +1,4 @@ | Alias | Command | -|-|-| -{% for alias in site.data.PSModule.Aliases %} -| {{ alias.Name }} | [{{ alias.Definition }}](/{{alias.Definition}}) | +|-|-|{% for alias in site.data.PSModule.Aliases %} +|{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} \ No newline at end of file From 4ee297b4910386a89fd9d237e1b9d6a464abbe5c Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:38:45 -0700 Subject: [PATCH 751/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table alignment --- Types/PSJekyll.Template/Include.PSAlias.md.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 index 7cd0539..dfe3f57 100644 --- a/Types/PSJekyll.Template/Include.PSAlias.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSAlias.md.ps1 @@ -2,7 +2,7 @@ param() @" | Alias | Command | -|-|-|{% for alias in site.data.PSModule.Aliases %} +|:-|-:|{% for alias in site.data.PSModule.Aliases %} |{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} "@ \ No newline at end of file From d0f59b3dd58da1f024880bc8769e07dda96a5862 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:39:37 +0000 Subject: [PATCH 752/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table alignment --- PSJekyll.types.ps1xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 84238f5..64d507d 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1883,7 +1883,7 @@ param() @" | Alias | Command | -|-|-|{% for alias in site.data.PSModule.Aliases %} +|:-|-:|{% for alias in site.data.PSModule.Aliases %} |{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} "@ From 677bc596be68c44233b200e583de095dc8d29448 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:39:49 +0000 Subject: [PATCH 753/769] fix: PSJekyll.Template.Include.PSAlias ( Fixes #80 ) Adjusting table alignment --- docs/_includes/PSAlias.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSAlias.md b/docs/_includes/PSAlias.md index 9165b11..95c1c0d 100644 --- a/docs/_includes/PSAlias.md +++ b/docs/_includes/PSAlias.md @@ -1,4 +1,4 @@ | Alias | Command | -|-|-|{% for alias in site.data.PSModule.Aliases %} +|:-|-:|{% for alias in site.data.PSModule.Aliases %} |{{ alias.Name }}|[{{ alias.Definition }}](/{{alias.Definition}})| {% endfor %} \ No newline at end of file From c680d7a49b1303f71715c2306944d821777dac16 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:48:50 -0700 Subject: [PATCH 754/769] fix: PSJekyll.Template.Include.PSTag ( Fixes #82 ) Updating pathing --- Types/PSJekyll.Template/Include.PSTag.md.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Types/PSJekyll.Template/Include.PSTag.md.ps1 b/Types/PSJekyll.Template/Include.PSTag.md.ps1 index 28700ad..983b5ee 100644 --- a/Types/PSJekyll.Template/Include.PSTag.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSTag.md.ps1 @@ -1,7 +1,7 @@ param() @" -{% for tagName in site.data.PSModuleInfo.Tags %} +{% for tagName in site.data.PSModule.Info.Tags %} * [{{ tagName }}](https://www.powershellgallery.com/packages?q=Tags%3A%22{{tagName}}%22) {% endfor %} "@ \ No newline at end of file From 270ca56d5c5d4b1cefeb186d4de883666485e62e Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:53:02 -0700 Subject: [PATCH 755/769] fix: PSJekyll.Template.Include.PSFunctions ( Fixes #78 ) Updating pathing --- Types/PSJekyll.Template/Include.PSFunctions.md.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 index 65232ce..ee5a304 100644 --- a/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSFunctions.md.ps1 @@ -1,11 +1,7 @@ param() @" -{% for functionName in site.data.PSModuleFunctionNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} +{% for functionName in site.data.PSModule.FunctionNames %} * [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} {% endfor %} "@ \ No newline at end of file From e2de079c27b463a77f2060de69dbe8b82aa52da6 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 15:54:56 -0700 Subject: [PATCH 756/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Updating pathing --- Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 b/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 index 2213152..7ddd9a4 100644 --- a/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 +++ b/Types/PSJekyll.Template/Include.PSCmdlet.md.ps1 @@ -1,11 +1,7 @@ param() @" -{% for cmdletName in site.data.PSModuleCmdletNames %} -{% if site.pages | where: "url", "/{{cmdletName}}" %} +{% for cmdletName in site.data.PSModule.CmdletNames %} * [{{ cmdletName }}](/{{cmdletName}}) -{% else %} -* {{ cmdletName }} -{% endif %} {% endfor %} "@ \ No newline at end of file From b8dfd9bab37f25310f83ac30ee1bda1f92c8ffc2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:55:53 +0000 Subject: [PATCH 757/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Updating pathing --- PSJekyll.types.ps1xml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index 64d507d..ec29773 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -1895,12 +1895,8 @@ param() param() @" -{% for cmdletName in site.data.PSModuleCmdletNames %} -{% if site.pages | where: "url", "/{{cmdletName}}" %} +{% for cmdletName in site.data.PSModule.CmdletNames %} * [{{ cmdletName }}](/{{cmdletName}}) -{% else %} -* {{ cmdletName }} -{% endif %} {% endfor %} "@ @@ -1911,12 +1907,8 @@ param() param() @" -{% for functionName in site.data.PSModuleFunctionNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} +{% for functionName in site.data.PSModule.FunctionNames %} * [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} {% endfor %} "@ @@ -1927,7 +1919,7 @@ param() param() @" -{% for tagName in site.data.PSModuleInfo.Tags %} +{% for tagName in site.data.PSModule.Info.Tags %} * [{{ tagName }}](https://www.powershellgallery.com/packages?q=Tags%3A%22{{tagName}}%22) {% endfor %} "@ From 9e8dc0b33721010587c873d5a1bb6613a3143cae Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:56:04 +0000 Subject: [PATCH 758/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Updating pathing --- docs/_includes/PSFunctions.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/PSFunctions.md b/docs/_includes/PSFunctions.md index af5bdaa..ac0680b 100644 --- a/docs/_includes/PSFunctions.md +++ b/docs/_includes/PSFunctions.md @@ -1,7 +1,3 @@ -{% for functionName in site.data.PSModuleFunctionNames %} -{% if site.pages | where: "url", "/{{functionName}}" %} +{% for functionName in site.data.PSModule.FunctionNames %} * [{{ functionName }}](/{{functionName}}) -{% else %} -* {{ functionName }} -{% endif %} {% endfor %} \ No newline at end of file From 879e2f88b0b9346ac1d20f32a04416c0c65545ac Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:56:04 +0000 Subject: [PATCH 759/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Updating pathing --- docs/_includes/PSCmdlet.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/_includes/PSCmdlet.md b/docs/_includes/PSCmdlet.md index 9453ffe..15fafc4 100644 --- a/docs/_includes/PSCmdlet.md +++ b/docs/_includes/PSCmdlet.md @@ -1,7 +1,3 @@ -{% for cmdletName in site.data.PSModuleCmdletNames %} -{% if site.pages | where: "url", "/{{cmdletName}}" %} +{% for cmdletName in site.data.PSModule.CmdletNames %} * [{{ cmdletName }}](/{{cmdletName}}) -{% else %} -* {{ cmdletName }} -{% endif %} {% endfor %} \ No newline at end of file From f0d2239526b14f7e5d48e43d0f8f6b1326d836ff Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Wed, 9 Oct 2024 22:56:04 +0000 Subject: [PATCH 760/769] fix: PSJekyll.Template.Include.PSCmdlet ( Fixes #81 ) Updating pathing --- docs/_includes/PSTag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_includes/PSTag.md b/docs/_includes/PSTag.md index 3745df3..391f486 100644 --- a/docs/_includes/PSTag.md +++ b/docs/_includes/PSTag.md @@ -1,3 +1,3 @@ -{% for tagName in site.data.PSModuleInfo.Tags %} +{% for tagName in site.data.PSModule.Info.Tags %} * [{{ tagName }}](https://www.powershellgallery.com/packages?q=Tags%3A%22{{tagName}}%22) {% endfor %} \ No newline at end of file From 8daa4611480851f829ae4b403f692ec1721ba70a Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 16:11:43 -0700 Subject: [PATCH 761/769] fix: PSJekyll Action ( Fixes #16 ) Adding -TargetBranch --- Build/GitHub/Actions/PSJekyllAction.ps1 | 18 +++++++++++++++++- action.yml | 23 ++++++++++++++++++++++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/Build/GitHub/Actions/PSJekyllAction.ps1 b/Build/GitHub/Actions/PSJekyllAction.ps1 index c9ba1fd..4315059 100644 --- a/Build/GitHub/Actions/PSJekyllAction.ps1 +++ b/Build/GitHub/Actions/PSJekyllAction.ps1 @@ -30,6 +30,10 @@ $SkipPSJekyllPS1, [string[]] $InstallModule, +# If provided, will checkout a new branch before making the changes. +[string] +$TargetBranch, + # If provided, will commit any remaining changes made to the workspace with this commit message. [string] $CommitMessage, @@ -115,6 +119,14 @@ function InitializeAction { # Pull down any changes git pull | Out-Host + + if ($TargetBranch) { + "::notice title=Expanding target branch string $targetBranch" | Out-Host + $TargetBranch = $ExecutionContext.SessionState.InvokeCommand.ExpandString($TargetBranch) + "::notice title=Checking out target branch::$targetBranch" | Out-Host + git checkout -b $TargetBranch | Out-Host + git pull | Out-Host + } } function InvokeActionModule { @@ -227,7 +239,11 @@ function PushActionOutput { $checkDetached = git symbolic-ref -q HEAD if (-not $LASTEXITCODE) { "::notice::Pushing Changes" | Out-Host - git push + if ($TargetBranch -and $anyFilesChanged) { + git push --set-upstream origin $TargetBranch + } elseif ($anyFilesChanged) { + git push + } "Git Push Output: $($gitPushed | Out-String)" } else { "::notice::Not pushing changes (on detached head)" | Out-Host diff --git a/action.yml b/action.yml index 10a0b89..a2c8f0e 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,9 @@ inputs: InstallModule: required: false description: A list of modules to be installed from the PowerShell gallery before scripts run. + TargetBranch: + required: false + description: If provided, will checkout a new branch before making the changes. CommitMessage: required: false description: If provided, will commit any remaining changes made to the workspace with this commit message. @@ -39,6 +42,7 @@ runs: PSJekyllScript: ${{inputs.PSJekyllScript}} CommitMessage: ${{inputs.CommitMessage}} UserName: ${{inputs.UserName}} + TargetBranch: ${{inputs.TargetBranch}} run: | $Parameters = @{} $Parameters.PSJekyllScript = ${env:PSJekyllScript} @@ -46,6 +50,7 @@ runs: $Parameters.SkipPSJekyllPS1 = $parameters.SkipPSJekyllPS1 -match 'true'; $Parameters.InstallModule = ${env:InstallModule} $Parameters.InstallModule = $parameters.InstallModule -split ';' -replace '^[''"]' -replace '[''"]$' + $Parameters.TargetBranch = ${env:TargetBranch} $Parameters.CommitMessage = ${env:CommitMessage} $Parameters.UserEmail = ${env:UserEmail} $Parameters.UserName = ${env:UserName} @@ -87,6 +92,10 @@ runs: [string[]] $InstallModule, + # If provided, will checkout a new branch before making the changes. + [string] + $TargetBranch, + # If provided, will commit any remaining changes made to the workspace with this commit message. [string] $CommitMessage, @@ -172,6 +181,14 @@ runs: # Pull down any changes git pull | Out-Host + + if ($TargetBranch) { + "::notice title=Expanding target branch string $targetBranch" | Out-Host + $TargetBranch = $ExecutionContext.SessionState.InvokeCommand.ExpandString($TargetBranch) + "::notice title=Checking out target branch::$targetBranch" | Out-Host + git checkout -b $TargetBranch | Out-Host + git pull | Out-Host + } } function InvokeActionModule { @@ -284,7 +301,11 @@ runs: $checkDetached = git symbolic-ref -q HEAD if (-not $LASTEXITCODE) { "::notice::Pushing Changes" | Out-Host - git push + if ($TargetBranch -and $anyFilesChanged) { + git push --set-upstream origin $TargetBranch + } elseif ($anyFilesChanged) { + git push + } "Git Push Output: $($gitPushed | Out-String)" } else { "::notice::Not pushing changes (on detached head)" | Out-Host From 85360f14caed44f851156c3acef9f43c5e20c387 Mon Sep 17 00:00:00 2001 From: James Brundage <+@noreply.github.com> Date: Wed, 9 Oct 2024 17:07:56 -0700 Subject: [PATCH 762/769] feat: PSJekyll.get_CurrentSite ( Fixes #38 ) Aliasing to .Site --- Types/PSJekyll/Alias.psd1 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Types/PSJekyll/Alias.psd1 diff --git a/Types/PSJekyll/Alias.psd1 b/Types/PSJekyll/Alias.psd1 new file mode 100644 index 0000000..f41bdb5 --- /dev/null +++ b/Types/PSJekyll/Alias.psd1 @@ -0,0 +1,3 @@ +@{ + Site = 'CurrentSite' +} From e4436bd1029cc8e51517d77cb4708976ba80c2fc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Thu, 10 Oct 2024 00:08:46 +0000 Subject: [PATCH 763/769] feat: PSJekyll.get_CurrentSite ( Fixes #38 ) Aliasing to .Site --- PSJekyll.types.ps1xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PSJekyll.types.ps1xml b/PSJekyll.types.ps1xml index ec29773..1a62315 100644 --- a/PSJekyll.types.ps1xml +++ b/PSJekyll.types.ps1xml @@ -3,6 +3,10 @@ PSJekyll + + Site + CurrentSite + FormatMarkdown