Using VS Code for editing and publishing

Publish date: 27 May 2019
Tags: tools

For a while, I have been using the Windows bash shell to run the blog locally while I edit and then used the bash shell to commit my changes to Github. I’ve now started using VS Code to edit and deploy my blog, all from VS Code. How do I do this?

  1. Launch VS Code ( Visual Studio Code) and open up the folder of the blog e.g. D:\
  2. In the terminal window ( in VSCode ) ensure that you have a wsl terminal ( Windows Subsystem for Linux). I’m running Windows 10, i.e. a Windows bash shell. Read more here
  3. Type
bundle exec jekyll serve

in the terminal window and this will build and launch the site locally at screenshot

  1. Once you have finished editing, its time to use the ‘Source control’ tools to add (stage the changes) and commit to git hub. All within VS Code. Add to GitHub
  2. Commit and push to GitHub. This generates the latest blog post at GitHub