Mathjax javascript librry setup

Octopress Jekyll Cheatsheet

Key Resources

Octopress Rake Commands

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
rake list     # list tasks

# Creating pages
rake new_post["title"]         # creates a new markdown source file for a new post, including a default YAML header.
rake new_page[awesome]         # creates awesome/page.html under the source directory
rake new_page[awesome/page.md] # creates awesome/page.md Markdown page under the source directory

# Working with Posts
rake isolate[filename]         # Move all other posts than the one currently being worked on to a temporary stash location
rake integrate                 # Move all stashed posts back into the posts directory, ready for site generation.

# Generating the website
rake generate # Generates posts and pages into the public directory
rake preview  # Watches, and mounts a webserver at http://localhost:4000
              # Does not properly handle relative links so does not work all that well

# Other tasks
rake clean    # Clean out caches: .pygments-cache, .gist-cache, .sass-cache

Bills Make Commands

I should have learned Ruby and extended the Rake file, but I used make instead :-(

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Setup
bcp                 # alias to enter my Octopress blog directory
source setup.sh     # sets up the overall environment. 

# Generating the website
make generate       # Sets up environment variables, and does a rake generate
make build          # Does a generate, then generates pdf files and txt files that can be linked to as markdown source
make preview        # Does a generate, then copies the generated website to a directory where it is served by Apache
make build-local    # Does a build, then copies the generated website to a directory where it is served by Apache

# Deploying the website
# These targets do not generate the web site in anyway... they just copy files
make deploy-local   # Copies the website to a directory where it is served by Apache.
make deploy-staging # Uses ncftp to ftp the website to a test directory on http://test.sourceform.ca
make deploy-prod    # Uses ncftp to ftp the website to a test directory on http://sourceform.ca

# Other tasks
make clean    # Does a rake clean, deletes the source pdfs and src directories, and deletes the "public" directory
make setup    # Sets up Ruby environment, Locale environment variables, etc

Yaml Configuration _config.yml ##

See Jekyll Information for the basic use of Yaml front matter in a Jekyll page

  • My Post YAML template

    ---
    layout: post
    title: "Zombie Ninjas Attack: A survivor's retrospective"
    date: 2011-07-03 5:59
    comments: true
    sharing: true
    footer: true
    categories: [peopleware, practices]
    tags: [How Google Tests Software, Clean Coder, Robert Martin, Programmer Culture]
    published: true
    ---

Octopress Cheatsheet

Octopress Specific Liquid Tags

These are Octopress specific Liquid Templating Engine tags.

Excepts for the Posts main page

A <!-- more --> comment inserted into a post will prevent the content below this mark from being displayed on the index page for the blog posts, a Continue -> button will link to the full post.

Blockquote

Syntax

{% blockquote [author[, source]] [link] [source_link_title] %}
  Quote string
{% endblockquote %}

: Examples

    {% blockquote Douglas Adams, The Hichhikers Guide to the Galaxy %}
      Flying is learning how to throw yourself at the ground and miss.
    {% endblockquote %}
    


    {% blockquote @allanbranch https://twitter.com/allanbranch/status/90766146063712256 %}
        Over the past 24 hours I've been reflecting on my life & I've realized only one thing. I need a medieval battle axe.
    {% endblockquote %}
    

    {% blockquote Seth Godin http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html Welcome to Island Marketing %}
      Every interaction is both precious and an opportunity to delight.
    {% endblockquote %}
    
Pullquote

Syntax

{% pullquote %}
  Surround your paragraph with the pull quote tags. Then when you come to
  the text you want to pull, {" surround it like this "} and that's all there is to it.
{% endpullquote %}
Image Tag

Syntax

 {% img [class names] /path/to/image [width] [height] [title text [alt text]] %}

: Examples

    {% img http://placekitten.com/890/280 %}
    {% img left http://placekitten.com/320/250 Place Kitten #2 %}
    {% img right http://placekitten.com/300/500 150 250 Place Kitten #3 %}
    {% img right http://placekitten.com/300/500 150 250 'Place Kitten #4' 'An image of a very cute kitten' %}
    
HTML5 Video Tag

Syntax

{% video url/to/video [width height] [url/to/poster] %}

: Example

    {% video http://s3.imathis.com/video/zero-to-fancy-buttons.mp4 640 320 http://s3.imathis.com/video/zero-to-fancy-buttons.png %}
    `

Comments