New-JekyllBlogPost.ps1
Description
Some information about the exciting thing
Script
function New-JekyllScriptsPost {
param(
[Parameter(Mandatory = $true)]
[string]$Title,
[Parameter(Mandatory = $false)]
[string]$Tag = 'Draft',
[Parameter(Mandatory = $false)]
[string]$Date = (Get-Date -Format yyyy-MM-dd),
[Parameter(Mandatory = $false)]
[string]$Content,
[Parameter(Mandatory = $true)]
[ValidateSet(Post, Page)]
[string]$Layout,
[Parameter(Mandatory = $true)]
[string]$Destination
)
$Content = Get-Content -Path -Raw -ReadAllBytes
$Path = $Destination + "\$date\$date-blogpost.md"
New-Item -ItemType File -Value $Content -Path $Path
New-Item -ItemType directory -Path ".\$date"
code $Path
}
# Find-Files -Path C:\GitRepos\scripts-blog\PowerShell\
<#
$Content =
"---
layout: $Layout
title: $Title
permalink: /menu/_pages/$Title.html
tags:
- $Tag
- PowerShell
---
$Content
"
$Path = $Destination + "\$date\$date-blogpost.md"
New-Item -ItemType File -Value $Content -Path $Path
New-Item -ItemType directory -Path ".\$date"
code $Path
#>
Download
Please feel free to copy parts of the script or if you would like to download the entire script, simple click the download button. You can download the complete repository in a zip file by clicking the Download link in the menu bar on the left hand side of the page.
Report Issues
You can report an issue or contribute to this site on GitHub. Simply click the button below and add any relevant notes. I will attempt to respond to all issues as soon as possible.