Managing Github Pages blog with VScode and Jekyll

This post has no headings.

In recent days, I barely managed my blog after graduation. Switching my most favorite code editor from Atom to VScode also makes it hard, since there is no plugins such like Jekyll Atom. It provides an integrated Jekyll commands, and several tools for post management. There is a plugin named Jekyll Snippets in VScode marketplace, , but I don’t think it is not comparable to Atom’s plugin.

As I do not want to use several editors, I kept looking for a way to manage my blog with VScode, and I found a reasonable one: using VScode insider, Docker Jekyll and jekyll-post plugin.

Each has the following advantages:

vscode_insiders Those files are stored in my server.


$ docker run --rm --volume="$PWD:/srv/jekyll" --it -p 4000:4000 jekyll/jekyll jekyll serve


That’s it. $PWD is the root directory of my Github Pages repository, everything else is managed by Jekyll in the container. As the directory is bound inside to the container, Jekyll recognizes the change and regenerates the local site right after I save a file, then I can see the result in the browser.

With this setup, now I can manage the blog wherever with any computers, without duplicately cloning the repository. A brief diagram of editing is as follows.