36 lines
828 B
Markdown
36 lines
828 B
Markdown
---
|
|
title: Blog script
|
|
slug: blog-script
|
|
date: 2017-06-01T20:26:53-06:00
|
|
.. tags: blog,documentation,web,nikola,script,bash
|
|
.. category:
|
|
.. link:
|
|
.. description:
|
|
draft: false
|
|
---
|
|
|
|
I created a script for bash that automates creating a new post, rebuilding and deploying
|
|
<!--more-->
|
|
|
|
~/.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.
|