# Retype Powershell Module

By
,
Powershell
,
Modules
Published 2022-07-16

Get Retype Here
https://www.powershellgallery.com/packages/Retype/1.0.1

Retype is an awesome static site generator using markdown
Retype is an awesome static site generator using markdown

# Super easy web design 👶

You may have guessed this already but yes this whole site has been developed and done using the Install-Module Retype and plain Notepad just mainly typing what's in my head to document all the recent work I done. I even smashed a demo website last night which took me less than an hour and I had it published on the internet. Seriously this is so fast, it can build your entire website in seconds. All you need to provide is some simple markdown files with the information you want to display. I only really got to try this module out last night and was able to smash this demo website and have it published to the internet in under an hour

My Demo Retype Website 👉
https://powershellretype.netlify.app/

# Please give it a go 🙏

I stumbled across this package by chance on nuget.org

Super Find
Super Find

However I was thinking this would take me weeks, possibly months to build. Literally two evenings later after work I managed to pull it off 😁

On the Powershell Gallery
On the Powershell Gallery

# It's free but...

There is two limitations to using this freebie gift of a module

  • Maximum of 100 pages can be built
  • The Powered by Retype branding cannot be removed All information about this application can be found on the main website
    Main Retype Website 👉
    https://retype.com/

# I miss Powershell Universal 😭

Sadly I have not used Powershell Universal in a long-time. Where I currently work I have dropped lots and lots of hints about purchasing it and how good it is, but I guess if they have budgets, and I am only a contractor then it's only as good as I say it is. Seriously though if you are impressed by this module then go check out Powershell Universal and honestly it is just so amazing 👀 all you have to do is google Powershell Universal it is well worth purchasing this product as the only limitation is your imagination

# Documentation 👁️‍🗨️

If you need to get something documented, and make it look all nice and fancy, and have some really nice built in features like dark or light mode. Search history, search capability. Then it's all built right in. It's so easy to use as well, this whole site was put together in an evening. Yes that's right one evening. How? Well all I had to do was type this text you are reading into notepad. So easy and such an elegant output of plain text. So if you need an awesome Powershell Module for generating static webpages Retype is your answer

# Code Used 💬

Again I know this is probably not the best coding for C# but it does all work and built without errors, and let me put this beautiful site together.

using System;
using System.Management.Automation;
using System.Diagnostics;

namespace RetypeRun
{
    [Cmdlet(VerbsData.Initialize, "ReTypeRun")]
    public class Retype : PSCmdlet
    {
        [Parameter(Mandatory = true)]
        public string? Path { get; set; }
        protected override void EndProcessing()
        {
            string runPath = Path;
            ProcessStartInfo ProcessInfo;
            Process ProcessRun;
            ProcessInfo = new ProcessStartInfo("retype.exe", "run" + " " + runPath + " " + "--verbose");
            ProcessInfo.CreateNoWindow = false;
            ProcessInfo.UseShellExecute = false;
            ProcessRun = Process.Start(ProcessInfo);
            WriteObject("Running your Retype website:-" + " " + runPath);
        }
    }
}



namespace RetypeWatch
{
    [Cmdlet(VerbsData.Initialize, "ReTypeWatch")]
    public class Retype : PSCmdlet
    {
        [Parameter(Mandatory = true)]
        public string? Path { get; set; }
        protected override void EndProcessing()
        {
            string watchPath = Path;
            ProcessStartInfo ProcessInfo;
            Process ProcessWatch;
            ProcessInfo = new ProcessStartInfo("retype.exe", "watch" + " " + watchPath + " " + "--verbose");
            ProcessInfo.CreateNoWindow = false;
            ProcessInfo.UseShellExecute = false;
            ProcessWatch = Process.Start(ProcessInfo);
            WriteObject("Building your Retype website which will be output to:-" + " " + watchPath);
        }
    }
}


namespace RetypeProject
{
    [Cmdlet(VerbsData.Initialize, "ReTypeProject")]
    public class Retype : PSCmdlet
    {
        [Parameter(Mandatory = true)]
        public string? Path { get; set; }
        protected override void EndProcessing()
        {
            string projectPath = Path;
            ProcessStartInfo ProcessInfo;
            Process ProcessInitialise;
            ProcessInfo = new ProcessStartInfo("retype.exe", "init" + " " + projectPath);
            ProcessInfo.CreateNoWindow = false;
            ProcessInfo.UseShellExecute = false;
            ProcessInitialise = Process.Start(ProcessInfo);
            WriteObject("Initialization process started .yml file will be output here:-" + " " + projectPath);
        }
    }
}

namespace RetypeBuild
{
    [Cmdlet(VerbsData.Initialize, "ReTypeBuild")]
    public class Retype : PSCmdlet
    {
        [Parameter(Mandatory = true)]
        public string? Path { get; set; }
        protected override void EndProcessing()
        {
            string websitePath = Path;
            ProcessStartInfo ProcessInfo;
            Process ProcessBuild;
            ProcessInfo = new ProcessStartInfo("retype.exe", "build" + " " + websitePath + " " + "--verbose");
            ProcessInfo.CreateNoWindow = false;
            ProcessInfo.UseShellExecute = false;
            ProcessBuild = Process.Start(ProcessInfo);
            WriteObject("Building your Retype website which will be output to:-" + " " + websitePath);
        }
    }
}

I included all the commands availble with this dotnet application. I would like to do a video on using this Powershell module. Maybe I might get an invite to demo it to the Powershell masses...?

# Thanks for reading 😄

I hope you have had a good time reading this blog of mine and if you want to get in contact then please tweet me on twitter. Thank you very much