Creating Blog Posts With Octopress

Octopress provides an easy way to create blog posts by proving a task that will automatically place and name your markdown file. This helps manage your blog posts in a sensible structure and avoids conflicts.

To create a new post, use the following command inside your Octopress project folder:

1
rake new_post["Title of your blog post"]

This will create a markdown file including frontmatter to apply the blog post style. The task creates the file under the _source folder and included the date at the start of the filename.

Now you can edit the file and simply add your content. Once you have written your blog post you can ask Octopress to generate the html for your new post.

1
rake generate

You can view the results locally, or simply deploy up to your chosen location (eg. github pages)

1
2
rake preview
rake deploy

If you are confident about the changes you are making, or have a test website you are deploying to, then you can use a single command to generate the new version of the site and publish it directly.

1
rake gen_deploy

Summary

This covers the bloggine workflow for Octopress. Next we will cover adding content in your blog post markdown files, inlcuding text formatting, images, code snippets, embedded video, etc

Thank you


This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket
Creative Commons License