This site is a customised Jekyll site using Mardown to author content. It is authored locally uses Azure Devops as a repository where it is built and from where it is publsihed published. It is hosted on Azure as a Blob Storage Static Website. I’ve just added another script to simplify content creation which addresses one of two issues.

I have previously created several posts here about the creation of this site starting with Creating this Blog Site. I started with the steps that Carl-Hugo Marcotte blogged starting at How to deploy and host a Jekyll website in Azure blob storage using a VSTS continuous deployment pipeline. I have though customised my blog site to meet my requiremenst covere here.

There are two drawback though:

  1. When I post an update the whole site get rebuilt on Azure Devops, the site host is claened out and the new version copied there. It would be more efficient to only build new content and/or at least just copy the changes.
  2. Working locally, authoring content, I am working with the whole repository. So if I want to run the site locally (Jekyll serve) it takes ages to start this.

The change here only addresses the second point:

I have made a copy of the local copy, and removed all posts and media. I also removed the .git file from the copy so that I can’t actually deposit the copy to Azure Devops. I then create a new post in _posts there and edit that. I can now start the site locally quite quickly and changes there after are quickly reflected in the page showing in the browser. I also created a script that copies the new post to the original local copy of the Deveops repository.

param ($filename="")
$file ="fred"
$extn =".md"
$Blog = "DjzBlog"
if($file -eq "") {
    $filename = $file
cp ./_posts/$filename2 ../$Blog/_posts
dir ../$Blog/_posts/$filename2


You create a new post in the copy folder, you change the $file value, avoiding any issues with using a *.md copy. Note no extension. Alternatively you can supply teh filenames, less its extension as a parameter. At this point I only want to copy the new post.

  Next: > Blazor How To
<  Prev:   Blazor How To
 This Category Links 
Category:Web Sites Index:Web Sites
  Next: >  
<  Prev:   Jekyll-Markdown