auto-generate metadata now
refactor code, combine add new and edit blog function