Generate a Jekyll blog post template using shell
Overall, it is clear and well formatted.  Here are some suggestions:

shellcheck.net

Firstly, I highly recommend running your scripts through shellcheck.net.  This reveals:


Where you're using $filepath you should use "$filepath" in case part of the path contains spaces.  Although shellcheck didn't catch it the assignment to filepath= should have quotes around the right side so it doesn't get broken up.
cd can fail and you should check the exit code, but in your case you're just using it inside of a subshell so it is probably fine as is.


double brackets

Using double brackets for conditionals in the shell is a good habit to get into.  They won't surprise you when people leave variables empty, for instance.  So

if [ -z "$title" ]; then


should be

if [[ -z "$title" ]]; then


bug

Where you check for the files existence you don't substitute the variable, you're checking for the existence of a file named filepath which probably never will be there.  Replace:

if [ -f filepath ]; then


with

if [[ -f "$filepath" ]]; then


to get the desired result.  I'm also using the quotes around the variable and double brackets previously mentioned.

heredocs

Instead of repeatedly appending to your file, why not do it in one fell swoop:

cat &lt;&lt; EOF &gt;&gt; "$filepath"
---
layout:      post
title:       "$title"
date:        "$(date +"%Y-%m-%d %H:%M:%S %z")"
categories:  [weekly]
---
EOF


That can replace your block of echos.  Now you don't have to worry about escaping your double quotes and the template is clearly separated from the code.  Heredocs also make it easier to edit the template within the script without messing up what the code is doing.

finally

Thanks for posting your shell script on codereview and trying to get better.