New-JekyllBlogSession.ps1
19 Sep 2025Description
Purpose
Creates a new blog session by setting up a new PowerShell drive and opening the code editor.
Detailed Description
The New-BlogSession function creates a new blog session by prompting the user to select a root folder for the blog. It then creates a new PowerShell drive using the selected folder as the root. Finally, it opens the code editor with the selected folder as the workspace.
Usage
Example 1
New-BlogSession
Notes
No additional notes.
Script
<#
.SYNOPSIS
Creates a new blog session by setting up a new PowerShell drive and opening the code editor.
.DESCRIPTION
The New-BlogSession function creates a new blog session by prompting the user to select a root folder for the blog. It then creates a new PowerShell drive using the selected folder as the root. Finally, it opens the code editor with the selected folder as the workspace.
.PARAMETER None
.EXAMPLE
New-BlogSession
#>
function New-BlogSession {
$PSRootFolder = Select-FolderLocation
New-PSDrive -Name BlogDrive -PSProvider "FileSystem" -Root $PSRootFolder
code ($PSRootFolder) -n
}
Download
Please feel free to copy parts of the script or if you would like to download the entire script, simply 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.