Say you have a site
example.com running on jekyll and you want
example.com/blog to also be served from the same jekyll setup, here is what you need to do :
cd ~/example.com-> Root dir.
cd _includes-> Add a
blogskin.htmlthat would contain all the required css and js.
cd _layoutsand create a
bloglayout that each of your blog posts will use, don't forget to
Included file 'blogskin.html' not found in _includes directory
mkdir blog-> This would be the index for
example.com/blogand hence must contain the
index.htmlstatic file, listing all the blog posts, similar to an index file that
jekyll newwould generate, have a
layout: blogso that index and the blog posts look and feel remains in sync.
echo "permalink: /blog/:title.html" >> _config.yml-> This would be premalink format for your blog posts.
jekyll build && jekyll server must have
example.com/blog serving your blog :-)
Hope this helps, not sure if a bash script to do this will help more, will decide after some feedback ;)
This was a part of my learning gained while preparing yeoman's team blog.
@GNUmanth good notes! Thanks for helping us get the setup right for yeoman.io.— Addy Osmani (@addyosmani) August 25, 2013