Files
blog.ewpt3ch.dev/content/posts/blog-script.md
T
2025-12-19 22:14:51 -07:00

828 B

title, slug, date, .. tags, .. category, .. link, .. description, draft
title slug date .. tags .. category .. link .. description draft
Blog script blog-script 2017-06-01T20:26:53-06:00 blog,documentation,web,nikola,script,bash false

I created a script for bash that automates creating a new post, rebuilding and deploying

~/.dotfile/blog.bash symlink in ~/bin
#!/bin/bash
#script to make blogging easier

#activate nikola
source ~/nikola/bin/activate

#create a new post
cd ~/myblog
nikola new_post -e

#build the new site
#nikola build

#deploy
#rsync -av --delete output/ ewpt3ch.com:/srv/http/ewpt3ch.com/blog/

#deactivate nikola
deactivate

simple and effective, pop open a terminal and away we go. in the future i may move the deployment into a different script so i can edit/revise before putting it up.