It took me 2 days to set up a pipeline for this blog.

Requirements to write a post thats going up to this webpage

When writing the post that will end up to this webPage its best to

  1. Start bash
  2. Go to your blog directory
  3. Run jekyll serve –baseurl=””
  4. Add all images to assets folder in blog directory
  5. Refernce images. Like this
![](/blog/assets/cb1.png)

This allows to see the image in the visual studio code editor and allows for blogPipeline.py function to rename the references appropriately so the posts can be uploaded to github. Here is the blogPipeline.py renamed image example.

Basic actions to modifying a post and making it web ready. :

  1. Write a new or modify an old .markdown Only .mardkown file with Visual Studio Code mdmath editor in whatever folder you want.
  2. Use the script blogPipeline to all copy the contents of your modified folder into the webPage _post folder. It replaces old files and adds new files. This does necessary conversions for the files as well.

Usage of this script is like this(segment located in the end of file):

files = getAllFilesInSub(modifyDirectory('F:\Projects\posts'))
print(len(files))
for file in files:
    print(file)
modifyFile(file, outPath=modifyDirectory("F:\Projects\jekyll\\blog\_posts"))

In script replace:

  • “F:\Projects\jekyll\blog_posts” <- Output files
  • ‘F:\Projects\posts’ <- Input files
  1. Now you can commit the code to gh-pages.

Setting up Jekyll blog on github References

Most important

Additional info