Skip to content

Instantly share code, notes, and snippets.

@abhiesa
Created July 27, 2014 10:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhiesa/2c6e0d02a4607b79354c to your computer and use it in GitHub Desktop.
Save abhiesa/2c6e0d02a4607b79354c to your computer and use it in GitHub Desktop.
Octopress Cheet Sheet
# Pushing Changes to the Blog Source
cd octopress
git add .
git commit -m 'modded blog source'
git push origin source
# create a new post
rake new_post["title"]
#Images
{% caption_img /images/image_name.jpg Caption for the image %}
#Syntax Highlightling
{% codeblock Title or something (FileName.m) lang:objc %}
code here
{% endcodeblock %}
# Generate & Preview
rake generate # Generates posts and pages into the public directory
rake watch # Watches source/ and sass/ for changes and regenerates
rake preview # Watches, and mounts a webserver at http://localhost:4000
# Generate & Deploy
rake generate
rake deploy
# commit recent changes and push to github (source branch)
git add .
git commit -m 'description of commit'
git push origin source
cd code/octopress
rake new_post[“post-title”]
gvim source/_posts/YYYY-MM-DD-post-title.markdown
rake generate
rake preview – local preview
rake deploy
git add source/_posts/YYYY-MM-DD-post-title.markdown
git commit -m “new post”
New Page Workflow
cd code/octopress
rake new_page[“mynewpage”]
gvim source/mynewpage/index.markdown
gvim source/_includes/custom/navigation.html
add a link to the page
rake generate
rake preview – local preview
rake deploy
git add source/mynewpage
git commit -m “new page”
Edit existing post
cd code/octopress
gvim source/_posts/PostNameHere
rake generate
rake preview – local preview
rake deploy
git add source/_posts/YYYY-MM-DD-post-title.markdown
git commit -m “post change”
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment