This is an entry about how to create entries. This is as much for
myself (so I don’t have to struggle to remmeber) as for anyone else
looking at Ocotpress.
Background
I recently decided to start posting on my blog again. This was
after a year or more of doing nothing. So, I had to go back and
remember how things worked. Not only this, but since I’ve rebuilt
my desktop a few times since then.. I didn’t have ruby and the other
pre-requisites for Ocotpress. (I’ll try to write up another post
about how I did that.. but stupid Evernote lost the notes I was
keeping.)
How I use Octopress
I wanted something easy to use for blogging and it had to be able
to be done on the command line. I also would like to be able to
update it from anywhere..
I wanted it to be CHEAP for hosting. I also didn’t want to have
to maintain yet another server. (Yeah, I’m getting old.)
I use GitHub to store the octopress and “source” directory. This
gives me a central place to store and upload edits. I also have a
“publish” server that runs on my home servers. This is a simple
OpenVZ container. I have ruby and ocotopress installed with some
cron jobs. They push the “generated” ocotpress content out to an
Amazon S3 bucket. That bucket is configured to serve the files in
that bucket as web pages.
Workflow
The workflow goes something like this:
Create/Update the post
Commit and push the post up into my GitHub repo
The “publish” server does a cron’d git pull followed by a rake generate and a rake s3
Typical update
I do a git pull to make sure I’ve got the latest code
I do my editing with VI
I review with git diff, then git add the file and finally a git commit.
Publish server
Manual update
The commands I manually run are below. These pull dow the site,
generate it locally and then uplaod it to S3.