New-StaticHTMLSiteProject
🔖 Synopsis
Create a customizable Markdown to HTML site conversion project.
Syntax
New-StaticHTMLSiteProject -ProjectDirectory <String> [<CommonParameters>]
Description
Create a new static HTML site project directoy with some default content ready for building.
A single markdown file (README.md) is provided as initial content. It explains
some customization options and the typical site authoring process.
It is recommended to build the project by executing its build script
Build.ps1. This creates the initial static HTML site with the HTML version of
the README (docs/README.html) which is more pleasant to read also showcases
some features.
See Project Customization for details about the project directory structure and site customization.
Parameters
-ProjectDirectory <String>
The location of the new Markdown to HTML site conversion project.
Parameter Property Value Required? true Position? 1 Default value `` Accept pipeline input? false Accept wildcard characters? false
Inputs
None
Outputs
The new project directory object [System.IO.DirectoryInfo]
Notes
Upgrading Static Site Projects
Upgrades to the MarkdownToHtml module usually come with an updated factory
template and sometimes also with an updated project build scripts (Build.ps1) and
project configurations (Build.json).
Unless you want to take advantage of the new template resources and build files or there is a Known Incompatibility, no action is needed.
☝️ A convenient way to upgrade an existing static site project is described below:
- Use
New-StaticHTMLSiteProjectto create a temporary static site project:PS> New-HTMLTemplate -Destination 'TempProject' - Replace all resources in
Templatedirectory of tje static site project you want to update with the resources fromTempProject\Template. Do not overwite template files you migh have customized. Candidates areTemplate\md-template.htmlandTemplate\styles\md-styles.css - Merge changes to following files using your favorite merge tool:
TempProject\Template\md-template.htmlTempProject\Template\styles\md-styles.cssTempProject\Build.jsonTempProject\Build.ps1
Examples
EXAMPLE 1
New-StaticHTMLSiteProject -ProjectDirectory MyProject
Create a new conversion project names 'MyProject' in the current directory. The project is ready for build.
Related Links
- https://wethat.github.io/MarkdownToHtml/2.8/New-StaticHTMLSiteProject.html
New-HTMLTemplate- Project Customization
- Factory Configuration
Module: MarkDownToHTML; Version: 2.8.0; (c) 2018-2024 WetHat Lab. All rights reserved.