Good Day All!
It’s not easy until we get adopted in the new work environment. This blog is composed using Windows 10 Phone due to the security restriction at my work place. I have no access to external web sites but as a TechNet Wiki Community member I managed to publish “Thursday Council Spotlight” with the help of our own TechNet Wiki Ninja (Ronen Airley) pituach.
A PowerShell Tip: Copy Markdown as HTML and share a TechNet Wiki Article.
Indeed, we all share a TechNet wiki articles focusing different Microsoft Technologies and showcase the PowerShell snippets, scripts or modules. However, we get questions like
- Where to share the PowerShell scripts or modules?
- I write a MD file for GitHub can I share in TechNet Wiki?
Please share the scripts or modules in PSGallery, GitHub or in TechNet Script Center to helps other technical persons from same platforms to discover and make use of your code.
I need to write a readme.md for GitHub and repeat the same or part of the content to Wiki. It’s time consuming. Hold On! It’s that easy to share an article in TechNet Wiki – Just read this article! TechNet Wiki supports HTML formats and MD (Markdown) language is Text to HTML. So, yes you can copy the MD as HTML and share a TN Wiki article quickly.But, ensure you the content you are sharing should meet the needs in respective areas. Enough of theory! Let’s walk you through the steps
- If you don’t have Visual Studio Code, first download and install it.
- Install PowerShell Extension.
- Install Copy Markdown as HTML extension.
We are set good to move on! The below screen shot illustrates the PowerShell script which we would like to share in GitHub with readme.md file
Here the script file Export-SystemInformation is underneath the folder C:\Temp\ and has a stylesheets folder which holds the CSS file for my HTML file. Yes, the system information will render the output in fancy HTML! For now, we will focus the readme.md file to share the information about the script and to copy the content as HTML.
Note: ‘#’ header 1 and ‘##’ is header 2. The sign ‘>’ represents quote which can be used for Tip, Note etc.
To know more about the Markdown codes refer this link.
Press F1 and choose ‘Copy Markdown as HTML’ which returns the HTML tags with our contents and in Wiki article it appears as illustrated below.
have a great day, and I’ll see you in the next post or at TechNet Wiki group on Facebook 🙂
Keep Sharing and Keep growing! We will share few more tips in our next Thursday Council Spotlight!
TechNet Wiki Addict____