Created
July 27, 2014 10:11
-
-
Save abhiesa/2c6e0d02a4607b79354c to your computer and use it in GitHub Desktop.
Octopress Cheet Sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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