Site updated at 2011-08-11 21:08:28 UTC
BIN
assets/jwplayer/glow/controlbar/background.png
Normal file
After Width: | Height: | Size: 141 B |
BIN
assets/jwplayer/glow/controlbar/blankButton.png
Normal file
After Width: | Height: | Size: 82 B |
BIN
assets/jwplayer/glow/controlbar/divider.png
Normal file
After Width: | Height: | Size: 118 B |
BIN
assets/jwplayer/glow/controlbar/fullscreenButton.png
Normal file
After Width: | Height: | Size: 203 B |
BIN
assets/jwplayer/glow/controlbar/fullscreenButtonOver.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
assets/jwplayer/glow/controlbar/muteButton.png
Normal file
After Width: | Height: | Size: 343 B |
BIN
assets/jwplayer/glow/controlbar/muteButtonOver.png
Normal file
After Width: | Height: | Size: 835 B |
BIN
assets/jwplayer/glow/controlbar/normalscreenButton.png
Normal file
After Width: | Height: | Size: 210 B |
BIN
assets/jwplayer/glow/controlbar/normalscreenButtonOver.png
Normal file
After Width: | Height: | Size: 664 B |
BIN
assets/jwplayer/glow/controlbar/pauseButton.png
Normal file
After Width: | Height: | Size: 170 B |
BIN
assets/jwplayer/glow/controlbar/pauseButtonOver.png
Normal file
After Width: | Height: | Size: 442 B |
BIN
assets/jwplayer/glow/controlbar/playButton.png
Normal file
After Width: | Height: | Size: 251 B |
BIN
assets/jwplayer/glow/controlbar/playButtonOver.png
Normal file
After Width: | Height: | Size: 553 B |
BIN
assets/jwplayer/glow/controlbar/timeSliderBuffer.png
Normal file
After Width: | Height: | Size: 112 B |
BIN
assets/jwplayer/glow/controlbar/timeSliderCapLeft.png
Normal file
After Width: | Height: | Size: 94 B |
BIN
assets/jwplayer/glow/controlbar/timeSliderCapRight.png
Normal file
After Width: | Height: | Size: 103 B |
BIN
assets/jwplayer/glow/controlbar/timeSliderProgress.png
Normal file
After Width: | Height: | Size: 114 B |
BIN
assets/jwplayer/glow/controlbar/timeSliderRail.png
Normal file
After Width: | Height: | Size: 116 B |
BIN
assets/jwplayer/glow/controlbar/unmuteButton.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
assets/jwplayer/glow/controlbar/unmuteButtonOver.png
Normal file
After Width: | Height: | Size: 649 B |
BIN
assets/jwplayer/glow/display/background.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
assets/jwplayer/glow/display/bufferIcon.png
Normal file
After Width: | Height: | Size: 816 B |
BIN
assets/jwplayer/glow/display/muteIcon.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
assets/jwplayer/glow/display/playIcon.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
assets/jwplayer/glow/dock/button.png
Normal file
After Width: | Height: | Size: 686 B |
115
assets/jwplayer/glow/glow.xml
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0"?>
|
||||
<skin version="1.1" name="Glow" author="LongTail Video">
|
||||
|
||||
<settings>
|
||||
<setting name="backcolor" value="0x000000" />
|
||||
<setting name="frontcolor" value="0xeeeeee" />
|
||||
<setting name="lightcolor" value="0xeeeeee" />
|
||||
<setting name="screencolor" value="0x000000" />
|
||||
</settings>
|
||||
|
||||
<components>
|
||||
<component name="controlbar">
|
||||
<settings>
|
||||
<setting name="margin" value="0" />
|
||||
<setting name="fontsize" value="11" />
|
||||
<setting name="fontcolor" value="0xEEEEEE" />
|
||||
<setting name="buttoncolor" value="0xEEEEEE" />
|
||||
</settings>
|
||||
|
||||
<layout>
|
||||
<group position="left">
|
||||
<button name="play" />
|
||||
<text name="elapsed" />
|
||||
</group>
|
||||
<group position="center">
|
||||
<slider name="time" />
|
||||
</group>
|
||||
<group position="right">
|
||||
<text name="duration" />
|
||||
<button name="blank" />
|
||||
<button name="mute" />
|
||||
<button name="fullscreen" />
|
||||
</group>
|
||||
</layout>
|
||||
|
||||
<elements>
|
||||
<element name="background" src="background.png" />
|
||||
<element name="capLeft" src="divider.png" />
|
||||
<element name="capRight" src="divider.png" />
|
||||
<element name="divider" src="divider.png" />
|
||||
<element name="blankButton" src="blankButton.png" />
|
||||
<element name="fullscreenButton" src="fullscreenButton.png" />
|
||||
<element name="fullscreenButtonOver" src="fullscreenButtonOver.png" />
|
||||
<element name="muteButton" src="muteButton.png" />
|
||||
<element name="muteButtonOver" src="muteButtonOver.png" />
|
||||
<element name="pauseButton" src="pauseButton.png" />
|
||||
<element name="pauseButtonOver" src="pauseButtonOver.png" />
|
||||
<element name="playButton" src="playButton.png" />
|
||||
<element name="playButtonOver" src="playButtonOver.png" />
|
||||
<element name="timeSliderBuffer" src="timeSliderBuffer.png" />
|
||||
<element name="timeSliderCapLeft" src="timeSliderCapLeft.png" />
|
||||
<element name="timeSliderCapRight" src="timeSliderCapRight.png" />
|
||||
<element name="timeSliderProgress" src="timeSliderProgress.png" />
|
||||
<element name="timeSliderRail" src="timeSliderRail.png" />
|
||||
<element name="normalscreenButton" src="normalscreenButton.png" />
|
||||
<element name="normalscreenButtonOver" src="normalscreenButtonOver.png" />
|
||||
<element name="unmuteButton" src="unmuteButton.png" />
|
||||
<element name="unmuteButtonOver" src="unmuteButtonOver.png" />
|
||||
<element name="volumeSliderRail" src="divider.png" />
|
||||
<element name="volumeSliderProgress" src="divider.png" />
|
||||
</elements>
|
||||
</component>
|
||||
|
||||
<component name="display">
|
||||
<settings>
|
||||
<setting name="bufferinterval" value="250" />
|
||||
<setting name="bufferrotation" value="90" />
|
||||
</settings>
|
||||
<elements>
|
||||
<element name="background" src="background.png" />
|
||||
<element name="playIcon" src="playIcon.png" />
|
||||
<element name="muteIcon" src="muteIcon.png" />
|
||||
<element name="errorIcon" src="bufferIcon.png" />
|
||||
<element name="bufferIcon" src="bufferIcon.png" />
|
||||
</elements>
|
||||
</component>
|
||||
|
||||
<component name="dock">
|
||||
<settings>
|
||||
<setting name="fontcolor" value="0xFFFFFF" />
|
||||
</settings>
|
||||
<elements>
|
||||
<element name="button" src="button.png" />
|
||||
</elements>
|
||||
</component>
|
||||
|
||||
<component name="playlist">
|
||||
<settings>
|
||||
<setting name="fontcolor" value="0xEEEEEE" />
|
||||
<setting name="overcolor" value="0xFFFFFF" />
|
||||
<setting name="activecolor" value="0xFFFFFF" />
|
||||
<setting name="backgroundcolor" value="0x333333" />
|
||||
</settings>
|
||||
<elements>
|
||||
<element name="item" src="item.png" />
|
||||
<element name="itemOver" src="itemOver.png" />
|
||||
<element name="sliderCapBottom" src="sliderCapBottom.png" />
|
||||
<element name="sliderCapTop" src="sliderCapTop.png" />
|
||||
<element name="sliderRail" src="sliderRail.png" />
|
||||
<element name="sliderThumb" src="sliderThumb.png" />
|
||||
</elements>
|
||||
</component>
|
||||
|
||||
<component name="sharing">
|
||||
<elements>
|
||||
<element name="embedIcon" src="embedIcon.png" />
|
||||
<element name="embedScreen" src="embedScreen.png" />
|
||||
<element name="shareIcon" src="shareIcon.png" />
|
||||
<element name="shareScreen" src="shareScreen.png" />
|
||||
</elements>
|
||||
</component>
|
||||
|
||||
</components>
|
||||
|
||||
</skin>
|
BIN
assets/jwplayer/glow/playlist/item.png
Normal file
After Width: | Height: | Size: 172 B |
BIN
assets/jwplayer/glow/playlist/itemOver.png
Normal file
After Width: | Height: | Size: 171 B |
BIN
assets/jwplayer/glow/playlist/sliderCapBottom.png
Normal file
After Width: | Height: | Size: 108 B |
BIN
assets/jwplayer/glow/playlist/sliderCapTop.png
Normal file
After Width: | Height: | Size: 105 B |
BIN
assets/jwplayer/glow/playlist/sliderRail.png
Normal file
After Width: | Height: | Size: 100 B |
BIN
assets/jwplayer/glow/playlist/sliderThumb.png
Normal file
After Width: | Height: | Size: 97 B |
BIN
assets/jwplayer/glow/sharing/embedIcon.png
Normal file
After Width: | Height: | Size: 749 B |
BIN
assets/jwplayer/glow/sharing/embedScreen.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
assets/jwplayer/glow/sharing/shareIcon.png
Normal file
After Width: | Height: | Size: 589 B |
BIN
assets/jwplayer/glow/sharing/shareScreen.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
assets/jwplayer/player.swf
Normal file
74
atom.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
|
||||
<title>Octopress</title>
|
||||
<link href="http://octopress.org/atom.xml" rel="self"/>
|
||||
<link href="http://octopress.org/"/>
|
||||
<updated>2011-08-11T17:07:20-04:00</updated>
|
||||
<id>http://octopress.org/</id>
|
||||
<author>
|
||||
<name>Brandon Mathis</name>
|
||||
|
||||
<email>brandon@imathis.com</email>
|
||||
|
||||
</author>
|
||||
|
||||
|
||||
<entry>
|
||||
<title>Octopress 2.0 Surfaces</title>
|
||||
<link href="http://octopress.org/blog/2011/07/23/octopress-20-surfaces/"/>
|
||||
<updated>2011-07-23T18:05:00-04:00</updated>
|
||||
<id>http://octopress.org/blog/2011/07/23/octopress-20-surfaces</id>
|
||||
<content type="html"><p>Octopress is a framework designed by <a href="http://brandonmathis.com">Brandon Mathis</a> for <a href="http://github.com/mojombo/jekyll">Jekyll</a>, the blog aware static site generator powering Github Pages.
|
||||
To start blogging with with Jekyll, you have to write your own HTML templates, CSS, Javascripts and set up your configuration. But with Octopress
|
||||
All of that is already taken care of. Simply <a href="https://github.com/imathis/octopress">clone or fork Octopress</a>, install dependencies and the theme, and you're set.</p>
|
||||
|
||||
<h2>What's new in 2.0?</h2>
|
||||
|
||||
<p>Short answer: Everything. Octopress is now based on <a href="http://github.com/mojombo/jekyll">mojombo/jekyll</a> has been completely rewritten from the ground up with a mountain of goodies.</p>
|
||||
|
||||
<p>Octopress comes with:</p>
|
||||
|
||||
<ul>
|
||||
<li>A semantic HTML5 template</li>
|
||||
<li>A Mobile friendly responsive (<a href="http://stuffandnonsense.co.uk/projects/320andup/">320 and up</a>) layout (rotate, or resize your browser and see)</li>
|
||||
<li>Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics</li>
|
||||
<li>An easy deployment strategy using Github pages or Rsync</li>
|
||||
<li>Built in support for POW and Rack servers</li>
|
||||
<li>Easy theming with Compass and Sass</li>
|
||||
<li>A Beautiful <a href="http://ethanschoonover.com/solarized">Solarized</a> syntax highlighting</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Be sure to check out the <a href="http://octopress.org/docs">documentation</a> to get the full scoop.</p>
|
||||
|
||||
<h3>Plugins FTW</h3>
|
||||
|
||||
<p>Most of these plugins have been created just for Octopress, but a few come from the Jekyll community along with improvements and updates.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="http://octopress.org/docs/plugins/video-tag">HTML5 Video Tag</a> - <em>easily post mp4 HTML5 video with flash player fallback</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/codeblock">Code Block</a> - <em>for easy inline code sharing</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/include-code">Include Code</a> - <em>embed code from your filesystem</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/gist-tag">Gist Tag</a> - <em>automatically downloads and embeds Github gists</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/image-tag">Image Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/render-partial">Render Partial</a> - <em>insert any file into another post or page</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/blockquote">Blockquote</a> - <em>generate beautiful, semantic block quotes</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/pullquote">Pullquote</a> - <em>generate CSS only pull quotes &mdash; no duplicate data, no javascript</em></li>
|
||||
<li><a href="http://octopress.org/docs/plugins/category-generator">Category Generator</a> - <em>generates archive pages for each blog category</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>For more plugins check out the <a href="http://octopress.org/docs/plugins">plugin list</a></p>
|
||||
|
||||
<h2>Ready to Get Started?</h2>
|
||||
|
||||
<p>Octopress is really easy to set up and deploy, <a href="http://octopress.org/docs/setup">start here</a>.</p>
|
||||
|
||||
<p>For now that's it. Check out the <a href="http://octopress.org/docs">docs</a>, <a href="http://github.com/imathis/octopress">kick the tires</a>, post <a href="http://github.com/imathis/octopress/issues">issues</a> send me <a href="http://convore.com/octopress/support">support requests</a> and tell all your friends.</p>
|
||||
|
||||
<p>Oh, and if you like, follow <a href="http://twitter.com/octopress">@octopress</a> and <a href="http://twitter.com/imathis">@imathis</a> on Twitter.</p>
|
||||
</content>
|
||||
</entry>
|
||||
|
||||
</feed>
|
280
blog/2011/07/23/octopress-20-surfaces/index.html
Normal file
@ -0,0 +1,280 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Octopress 2.0 Surfaces</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/blog/2011/07/23/octopress-20-surfaces/"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article class="hentry">
|
||||
|
||||
<header>
|
||||
|
||||
<h1 class="entry-title">Octopress 2.0 Surfaces</h1>
|
||||
|
||||
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-23 18:05:00 -0400" pubdate updated >Jul 23<span>rd</span>, 2011</time>
|
||||
|
||||
|
||||
<time class="updated" datetime="2011-07-24 10:15:00 -0400"></time>
|
||||
|
||||
</p>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="entry-content"><p>Octopress is a framework designed by <a href="http://brandonmathis.com">Brandon Mathis</a> for <a href="http://github.com/mojombo/jekyll">Jekyll</a>, the blog aware static site generator powering Github Pages.
|
||||
To start blogging with with Jekyll, you have to write your own HTML templates, CSS, Javascripts and set up your configuration. But with Octopress
|
||||
All of that is already taken care of. Simply <a href="https://github.com/imathis/octopress">clone or fork Octopress</a>, install dependencies and the theme, and you’re set.</p>
|
||||
|
||||
<h2>What’s new in 2.0?</h2>
|
||||
|
||||
<p>Short answer: Everything. Octopress is now based on <a href="http://github.com/mojombo/jekyll">mojombo/jekyll</a> has been completely rewritten from the ground up with a mountain of goodies.</p>
|
||||
|
||||
<p>Octopress comes with:</p>
|
||||
|
||||
<ul>
|
||||
<li>A semantic HTML5 template</li>
|
||||
<li>A Mobile friendly responsive (<a href="http://stuffandnonsense.co.uk/projects/320andup/">320 and up</a>) layout (rotate, or resize your browser and see)</li>
|
||||
<li>Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics</li>
|
||||
<li>An easy deployment strategy using Github pages or Rsync</li>
|
||||
<li>Built in support for POW and Rack servers</li>
|
||||
<li>Easy theming with Compass and Sass</li>
|
||||
<li>A Beautiful <a href="http://ethanschoonover.com/solarized">Solarized</a> syntax highlighting</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Be sure to check out the <a href="/octopress/docs">documentation</a> to get the full scoop.</p>
|
||||
|
||||
<h3>Plugins FTW</h3>
|
||||
|
||||
<p>Most of these plugins have been created just for Octopress, but a few come from the Jekyll community along with improvements and updates.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/plugins/video-tag">HTML5 Video Tag</a> - <em>easily post mp4 HTML5 video with flash player fallback</em></li>
|
||||
<li><a href="/octopress/docs/plugins/codeblock">Code Block</a> - <em>for easy inline code sharing</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-code">Include Code</a> - <em>embed code from your filesystem</em></li>
|
||||
<li><a href="/octopress/docs/plugins/gist-tag">Gist Tag</a> - <em>automatically downloads and embeds Github gists</em></li>
|
||||
<li><a href="/octopress/docs/plugins/image-tag">Image Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/render-partial">Render Partial</a> - <em>insert any file into another post or page</em></li>
|
||||
<li><a href="/octopress/docs/plugins/blockquote">Blockquote</a> - <em>generate beautiful, semantic block quotes</em></li>
|
||||
<li><a href="/octopress/docs/plugins/pullquote">Pullquote</a> - <em>generate CSS only pull quotes — no duplicate data, no javascript</em></li>
|
||||
<li><a href="/octopress/docs/plugins/category-generator">Category Generator</a> - <em>generates archive pages for each blog category</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>For more plugins check out the <a href="/octopress/docs/plugins">plugin list</a></p>
|
||||
|
||||
<h2>Ready to Get Started?</h2>
|
||||
|
||||
<p>Octopress is really easy to set up and deploy, <a href="/octopress/docs/setup">start here</a>.</p>
|
||||
|
||||
<p>For now that’s it. Check out the <a href="/octopress/docs">docs</a>, <a href="http://github.com/imathis/octopress">kick the tires</a>, post <a href="http://github.com/imathis/octopress/issues">issues</a> send me <a href="http://convore.com/octopress/support">support requests</a> and tell all your friends.</p>
|
||||
|
||||
<p>Oh, and if you like, follow <a href="http://twitter.com/octopress">@octopress</a> and <a href="http://twitter.com/imathis">@imathis</a> on Twitter.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<footer>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
<span class="byline author vcard">Posted by <span class="fn">Brandon Mathis</span></span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-23 18:05:00 -0400" pubdate updated >Jul 23<span>rd</span>, 2011</time>
|
||||
|
||||
|
||||
<time class="updated" datetime="2011-07-24 10:15:00 -0400"></time>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class="categories">
|
||||
|
||||
<a class='category' href='/octopress/octopress/blog/categories/release/'>release</a>
|
||||
|
||||
</span>
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<div class="sharing">
|
||||
|
||||
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://octopress.org/blog/2011/07/23/octopress-20-surfaces/" data-via="octopress" data-counturl="http://octopress.org/blog/2011/07/23/octopress-20-surfaces/" >Tweet</a>
|
||||
|
||||
|
||||
<g:plusone size="medium"></g:plusone>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
<section>
|
||||
<h1>Comments</h1>
|
||||
<div id="disqus_thread"><div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = 'octopress';
|
||||
var disqus_identifier = 'http://octopress.org/blog/2011/07/23/octopress-20-surfaces/';
|
||||
var disqus_url = 'http://octopress.org/blog/2011/07/23/octopress-20-surfaces/';
|
||||
//var disqus_developer = 1;
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
175
blog/archives/index.html
Normal file
@ -0,0 +1,175 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Blog Archive</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/blog/archives/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Blog Archive</h1>
|
||||
|
||||
</header>
|
||||
<div id="blog-archives">
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>2011</h2>
|
||||
|
||||
<article>
|
||||
|
||||
<h1><a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a></h1>
|
||||
<time datetime="2011-07-23 18:05:00 -0400" pubdate><span class='month'>Jul</span> <span class='day'>23</span> <span class='year'>2011</span></time>
|
||||
|
||||
<footer>
|
||||
<span class="categories">posted in <a class='category' href='/octopress/octopress/blog/categories/release/'>release</a></span>
|
||||
</footer>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
177
blog/categories/release/index.html
Normal file
@ -0,0 +1,177 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Category: release</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
<meta name="description" content="Category: release"/>
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.orgblog/categories/release/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Category: Release</h1>
|
||||
|
||||
</header>
|
||||
<div id="blog-archives" class="category">
|
||||
|
||||
|
||||
|
||||
|
||||
<h2>2011</h2>
|
||||
|
||||
<article>
|
||||
|
||||
<h1><a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a></h1>
|
||||
<time datetime="2011-07-23 18:05:00 -0400" pubdate><span class='month'>Jul</span> <span class='day'>23</span> <span class='year'>2011</span></time>
|
||||
|
||||
<footer>
|
||||
<span class="categories">posted in <a class='category' href='/octopress/octopress/blog/categories/release/'>release</a></span>
|
||||
</footer>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
0
blog/index.html
Normal file
349
docs/blogging/code/index.html
Normal file
@ -0,0 +1,349 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Sharing Code Snippets</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/blogging/code/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Sharing Code Snippets</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-19 18:10:00 -0400" pubdate updated >Jul 19<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p><a href="/octopress/docs/blogging">« Previous, Blogging Basics</a></p>
|
||||
|
||||
<p>Sharing code is important, and blogging about it should be easy and beautiful.
|
||||
That’s why Octopress is packed with features to make blogging your code a breeze.
|
||||
Though Jekyll comes with support for <a href="http://pygments.org">Pygments syntax highlighting</a>,
|
||||
Octopress makes it way better. Here’s how.</p>
|
||||
|
||||
<ul>
|
||||
<li>A Sass port of <a href="http://ethanschoonover.com/solarized">Solarized syntax highlighting</a> created specifically for Octopress.</li>
|
||||
<li>Gist code embedding - by <a href="https://gist.github.com/1027674">Brandon Tilly</a>.</li>
|
||||
<li>Insert code snippets from your filesystem with a download link.</li>
|
||||
<li>Easy inline code blocks with <code><figure></code> and <code><figcaption></code> and optional download links.</li>
|
||||
<li>Pygments caching - a <a href="https://github.com/rsim/blog.rayapps.com/blob/master/_plugins/pygments_cache_patch.rb">Jekyll community plugin</a>.</li>
|
||||
<li>Table based line numbers added with javascript.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Solarized Highlighting</h2>
|
||||
|
||||
<p><a href="http://ethanschoonover.com/solarized">Solarized</a> has a beautiful syntax highlighting color scheme, but reproducing it requires a highly sophisticated highlighting engine.
|
||||
<a href="http://pygments.org">Pygments</a> (the highlighter Jekyll uses) processes code snippets into styleable HTML, but it isn’t nearly as powerful as the highlighting engine in Vim for example.
|
||||
In order to port Solarized theme to octopress, I processed its <a href="https://github.com/altercation/solarized/tree/master/utils/tests">test files</a> with Pygments and styled the output with Sass while comparing
|
||||
them to the Vim rendered versions.</p>
|
||||
|
||||
<p>Check out the <a href="/octopress/docs/blogging/code/test">test page</a> to see the results.</p>
|
||||
|
||||
<h2>Github Style Code Blocks</h2>
|
||||
|
||||
<p>With the <code>backtick_codeblock</code> filter you can use Github’s lovely back tick syntax highlighting blocks.
|
||||
Simply start a line with three back ticks followed by a space and the language you’re using. Tab in four spaces
|
||||
for your code snippets, and then finish your code block with three more back ticks.</p>
|
||||
|
||||
<p><strong>Note: Back tick code blocks are only supported in HTML and Markdown. With the Textile markup language, use the <a href="/octopress/docs/plugins/codeblock/">codeblocks</a> instead.</strong></p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<div><figure role=code><pre><code>``` language
|
||||
code snippet
|
||||
```</code></pre></figure></div>
|
||||
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<div><figure role=code><pre><code>``` ruby
|
||||
class Fixnum
|
||||
def prime?
|
||||
('1' * self) !~ /^1?$|^(11+?)\1+$/
|
||||
end
|
||||
end
|
||||
```</code></pre></figure></div>
|
||||
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='ruby'><div class='line'><span class="k">class</span> <span class="nc">Fixnum</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">prime?</span>
|
||||
</div><div class='line'> <span class="p">(</span><span class="s1">'1'</span> <span class="o">*</span> <span class="nb">self</span><span class="p">)</span> <span class="o">!~</span> <span class="sr">/^1?$|^(11+?)\1+$/</span>
|
||||
</div><div class='line'> <span class="k">end</span>
|
||||
</div><div class='line'><span class="k">end</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>This is a nice, lightweight way to add a highlighted code snippet. For features like titles and links you’ll want to look
|
||||
at the <a href="/octopress/docs/plugins/code-block/">codeblock</a> or <a href="/octopress/docs/plugins/include-code/">include_code</a> liquid tags.</p>
|
||||
|
||||
<h2>Gist Embedding</h2>
|
||||
|
||||
<p>All you need is the gist’s id and you can easily embed it in your page. This actually downloads a cache of the gist and embeds it in a <code><noscript></code> tag for RSS
|
||||
readers and search engines, while still using Github’s javascript gist embed code for browsers.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% gist gist_id [filename] %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<pre><code>{% gist 996818 %}
|
||||
</code></pre>
|
||||
|
||||
<div><script src='https://gist.github.com/996818.js?file='></script>
|
||||
<noscript><pre><code>@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase
|
||||
it "should generate a sprite from nested folders" do
|
||||
css = render <<-SCSS
|
||||
- @import "nested/*.png";
|
||||
+ @import "nested/**/*.png";
|
||||
@include all-nested-sprites;
|
||||
SCSS
|
||||
assert_correct css, <<-CSS</code></pre></noscript></div>
|
||||
|
||||
|
||||
<p>If you have a gist with multiple files, you can include files one at a time by adding the name after the gist id.</p>
|
||||
|
||||
<pre><code>{% gist 1059334 svg_bullets.rb %}
|
||||
{% gist 1059334 usage.scss %}
|
||||
</code></pre>
|
||||
|
||||
<p>This plugin was developed by <a href="http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html">Brandon Tilly</a> but I have fixed some bugs and made some improvements to it for Octopress.</p>
|
||||
|
||||
<h2>Include Code Snippets</h2>
|
||||
|
||||
<p>Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link.
|
||||
In the <code>_config.yml</code> you can set your <code>code_dir</code> but the default is <code>source/downloads/code</code>. Simply put a file anywhere under that directory and
|
||||
use the following tag to embed it in a post.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% include_code [title] url %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 1</h4>
|
||||
|
||||
<pre><code>{% include_code javascripts/test.js %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 2 (with optional title)</h4>
|
||||
|
||||
<pre><code>{% include_code Testing include_code javascripts/test.js %}
|
||||
</code></pre>
|
||||
|
||||
<p>This includes a file from <code>source/downloads/code/javascripts/test.js</code>. By default the <code><figcaption></code> will be the filename, but you can add a title before the filepath if you like.</p>
|
||||
|
||||
<h4>Demo of Example 2</h4>
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing include_code (test.js)</span> <a href='http://octopress.org/downloads/code/javascripts/test.js'>download</a></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="cm">/**</span>
|
||||
</div><div class='line'><span class="cm">sample javascript from xui</span>
|
||||
</div><div class='line'><span class="cm">*/</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="kc">undefined</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">xui</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nb">window</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">string</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">String</span><span class="p">(</span><span class="s1">'string'</span><span class="p">),</span>
|
||||
</div><div class='line'> <span class="nb">document</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nb">document</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">simpleExpr</span> <span class="o">=</span> <span class="sr">/^#?([\w-]+)$/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">idExpr</span> <span class="o">=</span> <span class="sr">/^#/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">tagExpr</span> <span class="o">=</span> <span class="sr">/<([\w:]+)/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">[].</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">e</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> <span class="p">};</span>
|
||||
</div><div class='line'> <span class="k">try</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">a</span> <span class="o">=</span> <span class="nx">slice</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">documentElement</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">nodeType</span><span class="p">;</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">ret</span><span class="o">=</span><span class="p">[];</span> <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="nx">ret</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span> <span class="k">return</span> <span class="nx">ret</span><span class="p">;</span> <span class="p">};</span> <span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nb">window</span><span class="p">.</span><span class="nx">x$</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">xui</span> <span class="o">=</span> <span class="nx">xui</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="k">new</span> <span class="nx">xui</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="p">};</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<h2>Inline Code Blocks</h2>
|
||||
|
||||
<p>With this plugin you can write blocks of code directly in your posts and optionally add titles and links.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% codeblock [title] [url] [link text] %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 1</h4>
|
||||
|
||||
<pre><code>{% codeblock %}
|
||||
Awesome code snippet
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><pre><code>Awesome code snippet</code></pre></figure></div>
|
||||
|
||||
|
||||
<h4>Example 2</h4>
|
||||
|
||||
<pre><code># Including a file extension in the title enables highlighting
|
||||
{% codeblock Time to be Awesome - awesome.rb %}
|
||||
puts "Awesome!" unless lame
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><figcaption><span>Time to be Awesome - awesome.rb </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='rb'><div class='line'><span class="nb">puts</span> <span class="s2">"Awesome!"</span> <span class="k">unless</span> <span class="n">lame</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<h4>Example 3</h4>
|
||||
|
||||
<pre><code># Add an optional URL to enable downloading or linking to source
|
||||
{% codeblock Got pain? painreleif.sh http://example.com/painreleief.sh Download it! %}
|
||||
$ rm -rf ~/PAIN
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><figcaption><span>Javascript Array Syntax (array.js)</span><a href='https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array'>MDN Documentation </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="kd">var</span> <span class="nx">arr1</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">arrayLength</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="nx">arr2</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">element0</span><span class="p">,</span> <span class="nx">element1</span><span class="p">,</span> <span class="p">...,</span> <span class="nx">elementN</span><span class="p">);</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>The last argument <code>link_text</code> is optional. You may want to link to a source for download file, or documentation on some other site.</p>
|
||||
|
||||
<p>Also, see <a href="/octopress/docs/blogging/plugins">Blogging with Plugins</a> and <a href="/octopress/docs/plugins">The Octopress plugins page</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
782
docs/blogging/code/test/index.html
Normal file
@ -0,0 +1,782 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Syntax Highlighting Test</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/blogging/code/test/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Syntax Highlighting Test</h1>
|
||||
|
||||
</header>
|
||||
<div><figure role=code><figcaption><span> (test.js)</span> <a href='http://octopress.org/downloads/code/javascripts/test.js'>download</a></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="cm">/**</span>
|
||||
</div><div class='line'><span class="cm">sample javascript from xui</span>
|
||||
</div><div class='line'><span class="cm">*/</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="kc">undefined</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">xui</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nb">window</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">string</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">String</span><span class="p">(</span><span class="s1">'string'</span><span class="p">),</span>
|
||||
</div><div class='line'> <span class="nb">document</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nb">document</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">simpleExpr</span> <span class="o">=</span> <span class="sr">/^#?([\w-]+)$/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">idExpr</span> <span class="o">=</span> <span class="sr">/^#/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">tagExpr</span> <span class="o">=</span> <span class="sr">/<([\w:]+)/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">[].</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">e</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> <span class="p">};</span>
|
||||
</div><div class='line'> <span class="k">try</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">a</span> <span class="o">=</span> <span class="nx">slice</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">documentElement</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">nodeType</span><span class="p">;</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">ret</span><span class="o">=</span><span class="p">[];</span> <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="nx">ret</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span> <span class="k">return</span> <span class="nx">ret</span><span class="p">;</span> <span class="p">};</span> <span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nb">window</span><span class="p">.</span><span class="nx">x$</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">xui</span> <span class="o">=</span> <span class="nx">xui</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="k">new</span> <span class="nx">xui</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="p">};</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="cp"><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"></span>
|
||||
</div><div class='line'><span class="nt"><html><head></span>
|
||||
</div><div class='line'><span class="nt"><title></span>A Tiny Page<span class="nt"></title></span>
|
||||
</div><div class='line'><span class="nt"><style </span><span class="na">type=</span><span class="s">"text/css"</span><span class="nt">></span>
|
||||
</div><div class='line'><span class="o"><!</span><span class="nt">--</span>
|
||||
</div><div class='line'> <span class="nt">p</span> <span class="p">{</span> <span class="k">font-size</span><span class="o">:</span><span class="m">15pt</span><span class="p">;</span> <span class="k">color</span><span class="o">:</span><span class="m">#000</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="nt">--</span><span class="o">></span>
|
||||
</div><div class='line'><span class="nt"></style></head></span><span class="c"><!-- real comment --></span>
|
||||
</div><div class='line'><span class="nt"><body</span> <span class="na">bgcolor=</span><span class="s">"#FFFFFF"</span> <span class="na">text=</span><span class="s">"#000000"</span> <span class="na">link=</span><span class="s">"#0000CC"</span><span class="nt">></span>
|
||||
</div><div class='line'><span class="nt"><script </span><span class="na">language=</span><span class="s">"javascript"</span> <span class="na">type=</span><span class="s">"text/javascript"</span><span class="nt">></span>
|
||||
</div><div class='line'> <span class="kd">function</span> <span class="nx">changeHeight</span><span class="p">(</span><span class="nx">h</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="kd">var</span> <span class="nx">tds</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">getElementsByTagName</span><span class="p">(</span><span class="s2">"td"</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="k">for</span><span class="p">(</span><span class="kd">var</span> <span class="nx">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="nx">i</span> <span class="o"><</span> <span class="nx">tds</span><span class="p">.</span><span class="nx">length</span><span class="p">;</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="nx">tds</span><span class="p">[</span><span class="nx">i</span><span class="p">].</span><span class="nx">setAttribute</span><span class="p">(</span><span class="s2">"height"</span><span class="p">,</span> <span class="nx">h</span> <span class="o">+</span> <span class="s2">"px"</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="p">}}</span>
|
||||
</div><div class='line'><span class="nt"></script></span>
|
||||
</div><div class='line'><span class="nt"><h1></span>abc<span class="nt"></h1></span>
|
||||
</div><div class='line'><span class="nt"><h2></span>def<span class="nt"></h2></span>
|
||||
</div><div class='line'><span class="nt"><p></span>Testing page<span class="nt"></p></span>
|
||||
</div><div class='line'><span class="nt"></body></html></span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<div><script src='https://gist.github.com/996818.js?file='></script>
|
||||
<noscript><pre><code>@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase
|
||||
it "should generate a sprite from nested folders" do
|
||||
css = render <<-SCSS
|
||||
- @import "nested/*.png";
|
||||
+ @import "nested/**/*.png";
|
||||
@include all-nested-sprites;
|
||||
SCSS
|
||||
assert_correct css, <<-CSS</code></pre></noscript></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing PHP (syntax_test.php) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
<span class='line'>27</span>
|
||||
<span class='line'>28</span>
|
||||
<span class='line'>29</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='php'><div class='line'><span class="cp"><?php</span>
|
||||
</div><div class='line'><span class="k">require_once</span><span class="p">(</span><span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'g_campsiteDir'</span><span class="p">]</span><span class="o">.</span> <span class="s2">"/</span><span class="si">$ADMIN_DIR</span><span class="s2">/country/common.php"</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="k">require_once</span><span class="p">(</span><span class="nv">$GLOBALS</span><span class="p">[</span><span class="s1">'g_campsiteDir'</span><span class="p">]</span><span class="o">.</span> <span class="s2">"/classes/SimplePager.php"</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="nx">camp_load_translation_strings</span><span class="p">(</span><span class="s2">"api"</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nv">$f_country_language_selected</span> <span class="o">=</span> <span class="nx">camp_session_get</span><span class="p">(</span><span class="s1">'f_language_selected'</span><span class="p">,</span> <span class="s1">''</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="nv">$f_country_offset</span> <span class="o">=</span> <span class="nx">camp_session_get</span><span class="p">(</span><span class="s1">'f_country_offset'</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="k">if</span> <span class="p">(</span><span class="k">empty</span><span class="p">(</span><span class="nv">$f_country_language_selected</span><span class="p">))</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="nv">$f_country_language_selected</span> <span class="o">=</span> <span class="k">null</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div><div class='line'><span class="nv">$ItemsPerPage</span> <span class="o">=</span> <span class="mi">20</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="nv">$languages</span> <span class="o">=</span> <span class="nx">Language</span><span class="o">::</span><span class="na">GetLanguages</span><span class="p">(</span><span class="k">null</span><span class="p">,</span> <span class="k">null</span><span class="p">,</span> <span class="k">null</span><span class="p">,</span> <span class="k">array</span><span class="p">(),</span> <span class="k">array</span><span class="p">(),</span> <span class="k">true</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="nv">$numCountries</span> <span class="o">=</span> <span class="nx">Country</span><span class="o">::</span><span class="na">GetNumCountries</span><span class="p">(</span><span class="nv">$f_country_language_selected</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nv">$pager</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SimplePager</span><span class="p">(</span><span class="nv">$numCountries</span><span class="p">,</span> <span class="nv">$ItemsPerPage</span><span class="p">,</span> <span class="s2">"index.php?"</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nv">$crumbs</span> <span class="o">=</span> <span class="k">array</span><span class="p">();</span>
|
||||
</div><div class='line'><span class="nv">$crumbs</span><span class="p">[]</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="nx">getGS</span><span class="p">(</span><span class="s2">"Configure"</span><span class="p">),</span> <span class="s2">""</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="nv">$crumbs</span><span class="p">[]</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span><span class="nx">getGS</span><span class="p">(</span><span class="s2">"Countries"</span><span class="p">),</span> <span class="s2">""</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="k">echo</span> <span class="nx">camp_html_breadcrumbs</span><span class="p">(</span><span class="nv">$crumbs</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="cp">?></span><span class="x"></span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="cp"><?php</span> <span class="k">if</span> <span class="p">(</span><span class="nv">$g_user</span><span class="o">-></span><span class="na">hasPermission</span><span class="p">(</span><span class="s2">"ManageCountries"</span><span class="p">))</span> <span class="p">{</span> <span class="cp">?></span><span class="x"></span>
|
||||
</div><div class='line'><span class="x"><table BORDER="0" CELLSPACING="0" CELLPADDING="1"></span>
|
||||
</div><div class='line'><span class="x"> <tr></span>
|
||||
</div><div class='line'><span class="x"> <td><a href="add.php"></span><span class="cp"><?php</span> <span class="nx">putGS</span><span class="p">(</span><span class="s2">"Add new"</span><span class="p">);</span> <span class="cp">?></span><span class="x"></a></td></span>
|
||||
</div><div class='line'><span class="x"> </tr></span>
|
||||
</div><div class='line'><span class="x"></table></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing Objective C (Cocoa1AppDelegate.m) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='objc'><div class='line'><span class="cp">#import "Cocoa1AppDelegate.h"</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">@implementation</span> <span class="nc">Cocoa1AppDelegate</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">@synthesize</span> <span class="n">window</span><span class="p">,</span><span class="n">siteUrl</span><span class="p">,</span><span class="n">pageContents</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="o">-</span> <span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="nl">applicationDidFinishLaunching:</span><span class="p">(</span><span class="n">NSNotification</span> <span class="o">*</span><span class="p">)</span><span class="n">aNotification</span>
|
||||
</div><div class='line'><span class="p">{</span>
|
||||
</div><div class='line'> <span class="c1">// Insert code here to initialize your application</span>
|
||||
</div><div class='line'> <span class="n">model</span> <span class="o">=</span> <span class="p">[[</span><span class="n">Cocoa1Model</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="o">-</span> <span class="p">(</span><span class="kt">IBAction</span><span class="p">)</span><span class="nl">getSiteContents:</span><span class="p">(</span><span class="kt">id</span><span class="p">)</span><span class="n">sender</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="p">[</span><span class="n">model</span> <span class="nl">setPageUrl:</span><span class="p">[</span><span class="n">siteUrl</span> <span class="n">stringValue</span><span class="p">]];</span>
|
||||
</div><div class='line'> <span class="n">NSString</span><span class="o">*</span> <span class="n">reply</span> <span class="o">=</span> <span class="p">[</span><span class="n">model</span> <span class="n">getUrlAsString</span><span class="p">];</span>
|
||||
</div><div class='line'> <span class="n">NSLog</span><span class="p">(</span><span class="s">@"pageSrc: %@"</span><span class="p">,</span> <span class="n">reply</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="p">[</span><span class="n">pageContents</span> <span class="nl">setString:</span><span class="n">reply</span><span class="p">];</span>
|
||||
</div><div class='line'> <span class="p">[[[</span><span class="n">pageContents</span> <span class="n">textStorage</span><span class="p">]</span> <span class="n">mutableString</span><span class="p">]</span> <span class="nl">appendString:</span><span class="n">reply</span><span class="p">];</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">@end</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing Haskel (syntax_test.hs) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
<span class='line'>27</span>
|
||||
<span class='line'>28</span>
|
||||
<span class='line'>29</span>
|
||||
<span class='line'>30</span>
|
||||
<span class='line'>31</span>
|
||||
<span class='line'>32</span>
|
||||
<span class='line'>33</span>
|
||||
<span class='line'>34</span>
|
||||
<span class='line'>35</span>
|
||||
<span class='line'>36</span>
|
||||
<span class='line'>37</span>
|
||||
<span class='line'>38</span>
|
||||
<span class='line'>39</span>
|
||||
<span class='line'>40</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='hs'><div class='line'><span class="cm">{-# LANGUAGE OverloadedStrings #-}</span>
|
||||
</div><div class='line'><span class="kr">module</span> <span class="nn">Main</span> <span class="kr">where</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1">--import Prelude hiding (id)</span>
|
||||
</div><div class='line'><span class="c1">--import Control.Category (id)</span>
|
||||
</div><div class='line'><span class="kr">import</span> <span class="nn">Control.Arrow</span> <span class="p">((</span><span class="o">>>></span><span class="p">),</span> <span class="p">(</span><span class="o">***</span><span class="p">),</span> <span class="nf">arr</span><span class="p">)</span>
|
||||
</div><div class='line'><span class="kr">import</span> <span class="nn">Control.Monad</span> <span class="p">(</span><span class="nf">forM_</span><span class="p">)</span>
|
||||
</div><div class='line'><span class="c1">-- import Data.Monoid (mempty, mconcat)</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1">-- import System.FilePath</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kr">import</span> <span class="nn">Hakyll</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nf">main</span> <span class="ow">::</span> <span class="kt">IO</span> <span class="nb">()</span>
|
||||
</div><div class='line'><span class="nf">main</span> <span class="ow">=</span> <span class="n">hakyll</span> <span class="o">$</span> <span class="kr">do</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">route</span> <span class="s">"css/*"</span> <span class="o">$</span> <span class="n">setExtension</span> <span class="s">"css"</span>
|
||||
</div><div class='line'> <span class="n">compile</span> <span class="s">"css/*"</span> <span class="o">$</span> <span class="n">byExtension</span> <span class="p">(</span><span class="ne">error</span> <span class="s">"Not a (S)CSS file"</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="p">[</span> <span class="p">(</span><span class="s">".css"</span><span class="p">,</span> <span class="n">compressCssCompiler</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="p">,</span> <span class="p">(</span><span class="s">".scss"</span><span class="p">,</span> <span class="n">sass</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="p">]</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">route</span> <span class="s">"js/**"</span> <span class="n">idRoute</span>
|
||||
</div><div class='line'> <span class="n">compile</span> <span class="s">"js/**"</span> <span class="n">copyFileCompiler</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">route</span> <span class="s">"img/*"</span> <span class="n">idRoute</span>
|
||||
</div><div class='line'> <span class="n">compile</span> <span class="s">"img/*"</span> <span class="n">copyFileCompiler</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">compile</span> <span class="s">"templates/*"</span> <span class="n">templateCompiler</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">forM_</span> <span class="p">[</span><span class="s">"test.md"</span><span class="p">,</span> <span class="s">"index.md"</span><span class="p">]</span> <span class="o">$</span> <span class="nf">\</span><span class="n">page</span> <span class="ow">-></span> <span class="kr">do</span>
|
||||
</div><div class='line'> <span class="n">route</span> <span class="n">page</span> <span class="o">$</span> <span class="n">setExtension</span> <span class="s">"html"</span>
|
||||
</div><div class='line'> <span class="n">compile</span> <span class="n">page</span> <span class="o">$</span> <span class="n">pageCompiler</span>
|
||||
</div><div class='line'> <span class="o">>>></span> <span class="n">applyTemplateCompiler</span> <span class="s">"templates/default.html"</span>
|
||||
</div><div class='line'> <span class="o">>>></span> <span class="n">relativizeUrlsCompiler</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nf">sass</span> <span class="ow">::</span> <span class="kt">Compiler</span> <span class="kt">Resource</span> <span class="kt">String</span>
|
||||
</div><div class='line'><span class="nf">sass</span> <span class="ow">=</span> <span class="n">getResourceString</span> <span class="o">>>></span> <span class="n">unixFilter</span> <span class="s">"sass"</span> <span class="p">[</span><span class="s">"-s"</span><span class="p">,</span> <span class="s">"--scss"</span><span class="p">]</span>
|
||||
</div><div class='line'> <span class="o">>>></span> <span class="n">arr</span> <span class="n">compressCss</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing Bash (syntax_test.sh) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'><span class="c">#!/bin/bash</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nb">cd</span> <span class="nv">$ROOT_DIR</span>
|
||||
</div><div class='line'><span class="nv">DOT_FILES</span><span class="o">=</span><span class="s2">"lastpass weechat ssh Xauthority"</span>
|
||||
</div><div class='line'><span class="k">for </span>dotfile in <span class="nv">$DOT_FILES</span>; <span class="k">do </span>conform_link <span class="s2">"$DATA_DIR/$dotfile"</span> <span class="s2">".$dotfile"</span>; <span class="k">done</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c"># TODO: refactor with suffix variables (or common cron values)</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">case</span> <span class="s2">"$PLATFORM"</span> in
|
||||
</div><div class='line'> linux<span class="o">)</span>
|
||||
</div><div class='line'> <span class="c">#conform_link "$CONF_DIR/shell/zshenv" ".zshenv"</span>
|
||||
</div><div class='line'> crontab -l > <span class="nv">$ROOT_DIR</span>/tmp/crontab-conflict-arch
|
||||
</div><div class='line'> <span class="nb">cd</span> <span class="nv">$ROOT_DIR</span>/<span class="nv">$CONF_DIR</span>/cron
|
||||
</div><div class='line'> <span class="k">if</span> <span class="o">[[</span> <span class="s2">"$(diff ~/tmp/crontab-conflict-arch crontab-current-arch)"</span> <span class="o">==</span> <span class="s2">""</span>
|
||||
</div><div class='line'> <span class="o">]]</span>;
|
||||
</div><div class='line'> <span class="k">then</span> <span class="c"># no difference with current backup</span>
|
||||
</div><div class='line'> logger <span class="s2">"$LOG_PREFIX: crontab live settings match stored "</span><span class="se">\</span>
|
||||
</div><div class='line'> <span class="s2">"settings; no restore required"</span>
|
||||
</div><div class='line'> rm ~/tmp/crontab-conflict-arch
|
||||
</div><div class='line'> <span class="k">else</span> <span class="c"># current crontab settings in file do not match live settings</span>
|
||||
</div><div class='line'> crontab <span class="nv">$ROOT_DIR</span>/<span class="nv">$CONF_DIR</span>/cron/crontab-current-arch
|
||||
</div><div class='line'> logger <span class="s2">"$LOG_PREFIX: crontab stored settings conflict with "</span><span class="se">\</span>
|
||||
</div><div class='line'> <span class="s2">"live settings; stored settings restored. "</span><span class="se">\</span>
|
||||
</div><div class='line'> <span class="s2">"Previous settings recorded in ~/tmp/crontab-conflict-arch."</span>
|
||||
</div><div class='line'> <span class="k">fi</span>
|
||||
</div><div class='line'> ;;
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing Python (syntax_test.py) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
<span class='line'>27</span>
|
||||
<span class='line'>28</span>
|
||||
<span class='line'>29</span>
|
||||
<span class='line'>30</span>
|
||||
<span class='line'>31</span>
|
||||
<span class='line'>32</span>
|
||||
<span class='line'>33</span>
|
||||
<span class='line'>34</span>
|
||||
<span class='line'>35</span>
|
||||
<span class='line'>36</span>
|
||||
<span class='line'>37</span>
|
||||
<span class='line'>38</span>
|
||||
<span class='line'>39</span>
|
||||
<span class='line'>40</span>
|
||||
<span class='line'>41</span>
|
||||
<span class='line'>42</span>
|
||||
<span class='line'>43</span>
|
||||
<span class='line'>44</span>
|
||||
<span class='line'>45</span>
|
||||
<span class='line'>46</span>
|
||||
<span class='line'>47</span>
|
||||
<span class='line'>48</span>
|
||||
<span class='line'>49</span>
|
||||
<span class='line'>50</span>
|
||||
<span class='line'>51</span>
|
||||
<span class='line'>52</span>
|
||||
<span class='line'>53</span>
|
||||
<span class='line'>54</span>
|
||||
<span class='line'>55</span>
|
||||
<span class='line'>56</span>
|
||||
<span class='line'>57</span>
|
||||
<span class='line'>58</span>
|
||||
<span class='line'>59</span>
|
||||
<span class='line'>60</span>
|
||||
<span class='line'>61</span>
|
||||
<span class='line'>62</span>
|
||||
<span class='line'>63</span>
|
||||
<span class='line'>64</span>
|
||||
<span class='line'>65</span>
|
||||
<span class='line'>66</span>
|
||||
<span class='line'>67</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='py'><div class='line'><span class="c"># test python (sample from offlineimap)</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">class</span> <span class="nc">ExitNotifyThread</span><span class="p">(</span><span class="n">Thread</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""This class is designed to alert a "monitor" to the fact that a thread has</span>
|
||||
</div><div class='line'><span class="sd"> exited and to provide for the ability for it to find out why."""</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">run</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="k">global</span> <span class="n">exitthreads</span><span class="p">,</span> <span class="n">profiledir</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">threadid</span> <span class="o">=</span> <span class="n">thread</span><span class="o">.</span><span class="n">get_ident</span><span class="p">()</span>
|
||||
</div><div class='line'> <span class="k">try</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="ow">not</span> <span class="n">profiledir</span><span class="p">:</span> <span class="c"># normal case</span>
|
||||
</div><div class='line'> <span class="n">Thread</span><span class="o">.</span><span class="n">run</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="k">else</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="k">try</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="kn">import</span> <span class="nn">cProfile</span> <span class="kn">as</span> <span class="nn">profile</span>
|
||||
</div><div class='line'> <span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="kn">import</span> <span class="nn">profile</span>
|
||||
</div><div class='line'> <span class="n">prof</span> <span class="o">=</span> <span class="n">profile</span><span class="o">.</span><span class="n">Profile</span><span class="p">()</span>
|
||||
</div><div class='line'> <span class="k">try</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="n">prof</span> <span class="o">=</span> <span class="n">prof</span><span class="o">.</span><span class="n">runctx</span><span class="p">(</span><span class="s">"Thread.run(self)"</span><span class="p">,</span> <span class="nb">globals</span><span class="p">(),</span> <span class="nb">locals</span><span class="p">())</span>
|
||||
</div><div class='line'> <span class="k">except</span> <span class="ne">SystemExit</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="k">pass</span>
|
||||
</div><div class='line'> <span class="n">prof</span><span class="o">.</span><span class="n">dump_stats</span><span class="p">(</span> \
|
||||
</div><div class='line'> <span class="n">profiledir</span> <span class="o">+</span> <span class="s">"/"</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">threadid</span><span class="p">)</span> <span class="o">+</span> <span class="s">"_"</span> <span class="o">+</span> \
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">getName</span><span class="p">()</span> <span class="o">+</span> <span class="s">".prof"</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="k">except</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">setExitCause</span><span class="p">(</span><span class="s">'EXCEPTION'</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="n">sys</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">setExitException</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">exc_info</span><span class="p">()[</span><span class="mi">1</span><span class="p">])</span>
|
||||
</div><div class='line'> <span class="n">tb</span> <span class="o">=</span> <span class="n">traceback</span><span class="o">.</span><span class="n">format_exc</span><span class="p">()</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">setExitStackTrace</span><span class="p">(</span><span class="n">tb</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="k">else</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">setExitCause</span><span class="p">(</span><span class="s">'NORMAL'</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="ow">not</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="s">'exitmessage'</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">setExitMessage</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="n">exitthreads</span><span class="p">:</span>
|
||||
</div><div class='line'> <span class="n">exitthreads</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="bp">True</span><span class="p">)</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">setExitCause</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">cause</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">exitcause</span> <span class="o">=</span> <span class="n">cause</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">getExitCause</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""Returns the cause of the exit, one of:</span>
|
||||
</div><div class='line'><span class="sd"> 'EXCEPTION' -- the thread aborted because of an exception</span>
|
||||
</div><div class='line'><span class="sd"> 'NORMAL' -- normal termination."""</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">exitcause</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">setExitException</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">exitexception</span> <span class="o">=</span> <span class="n">exc</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">getExitException</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""If getExitCause() is 'EXCEPTION', holds the value from</span>
|
||||
</div><div class='line'><span class="sd"> sys.exc_info()[1] for this exception."""</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">exitexception</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">setExitStackTrace</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">st</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">exitstacktrace</span> <span class="o">=</span> <span class="n">st</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">getExitStackTrace</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""If getExitCause() is 'EXCEPTION', returns a string representing</span>
|
||||
</div><div class='line'><span class="sd"> the stack trace for this exception."""</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">exitstacktrace</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">setExitMessage</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""Sets the exit message to be fetched by a subsequent call to</span>
|
||||
</div><div class='line'><span class="sd"> getExitMessage. This message may be any object or type except</span>
|
||||
</div><div class='line'><span class="sd"> None."""</span>
|
||||
</div><div class='line'> <span class="bp">self</span><span class="o">.</span><span class="n">exitmessage</span> <span class="o">=</span> <span class="n">msg</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">getExitMessage</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
</div><div class='line'> <span class="sd">"""For any exit cause, returns the message previously set by</span>
|
||||
</div><div class='line'><span class="sd"> a call to setExitMessage(), or None if there was no such message</span>
|
||||
</div><div class='line'><span class="sd"> set."""</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">exitmessage</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing Perl (syntax_test.pl) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
<span class='line'>27</span>
|
||||
<span class='line'>28</span>
|
||||
<span class='line'>29</span>
|
||||
<span class='line'>30</span>
|
||||
<span class='line'>31</span>
|
||||
<span class='line'>32</span>
|
||||
<span class='line'>33</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='perl'><div class='line'><span class="c1">#!perl -w</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1"># Time-stamp: <2002/04/06, 13:12:13 (EST), maverick, csvformat.pl></span>
|
||||
</div><div class='line'><span class="c1"># Two pass CSV file to table formatter</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nv">$delim</span> <span class="o">=</span> <span class="nv">$#ARGV</span> <span class="o">>=</span> <span class="mi">1</span> <span class="p">?</span> <span class="nv">$ARGV</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="p">:</span> <span class="s">','</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="k">print</span> <span class="bp">STDERR</span> <span class="s">"Split pattern: $delim\n"</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1"># first pass</span>
|
||||
</div><div class='line'><span class="nb">open</span> <span class="n">F</span><span class="p">,</span> <span class="s">"<$ARGV[0]"</span> <span class="ow">or</span> <span class="nb">die</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="k">while</span><span class="p">(</span><span class="sr"><F></span><span class="p">)</span>
|
||||
</div><div class='line'><span class="p">{</span>
|
||||
</div><div class='line'> <span class="nb">chomp</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="nv">$i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="nb">map</span> <span class="p">{</span> <span class="nv">$max</span><span class="p">[</span><span class="nv">$_</span><span class="o">-></span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">=</span> <span class="nv">$_</span><span class="o">-></span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="nv">$_</span><span class="o">-></span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">></span> <span class="p">(</span><span class="nv">$max</span><span class="p">[</span><span class="nv">$_</span><span class="o">-></span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">||</span> <span class="mi">0</span><span class="p">)</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="p">(</span><span class="nb">map</span> <span class="p">{[</span><span class="nb">length</span> <span class="nv">$_</span><span class="p">,</span> <span class="nv">$i</span><span class="o">++</span><span class="p">]}</span> <span class="nb">split</span><span class="p">(</span><span class="nv">$delim</span><span class="p">));</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div><div class='line'><span class="nb">close</span> <span class="n">F</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="k">print</span> <span class="bp">STDERR</span> <span class="s">'Field width: '</span><span class="p">,</span> <span class="nb">join</span><span class="p">(</span><span class="s">', '</span><span class="p">,</span> <span class="nv">@max</span><span class="p">),</span> <span class="s">"\n"</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="k">print</span> <span class="bp">STDERR</span> <span class="nb">join</span><span class="p">(</span><span class="s">' '</span><span class="p">,</span> <span class="nb">map</span> <span class="p">{</span><span class="s">'-'</span> <span class="n">x</span> <span class="nv">$_</span><span class="p">}</span> <span class="nv">@max</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1"># second pass</span>
|
||||
</div><div class='line'><span class="nb">open</span> <span class="n">F</span><span class="p">,</span> <span class="s">"<$ARGV[0]"</span> <span class="ow">or</span> <span class="nb">die</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="k">while</span><span class="p">(</span><span class="sr"><F></span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="nb">chomp</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="nv">$i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="nb">map</span> <span class="p">{</span> <span class="nb">printf</span><span class="p">(</span><span class="s">"%-$max[$_->[1]]s "</span><span class="p">,</span> <span class="nv">$_</span><span class="o">-></span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="p">(</span><span class="nb">map</span> <span class="p">{[</span><span class="nv">$_</span><span class="p">,</span> <span class="nv">$i</span><span class="o">++</span><span class="p">]}</span> <span class="nb">split</span><span class="p">(</span><span class="nv">$delim</span><span class="p">));</span>
|
||||
</div><div class='line'> <span class="k">print</span> <span class="s">"\n"</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div><div class='line'><span class="nb">close</span> <span class="n">F</span><span class="p">;</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Test Java (syntax_test.java) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='java'><div class='line'><span class="kn">import</span> <span class="nn">java.util.Map</span><span class="o">;</span>
|
||||
</div><div class='line'><span class="kn">import</span> <span class="nn">java.util.TreeSet</span><span class="o">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kd">public</span> <span class="kd">class</span> <span class="nc">GetEnv</span> <span class="o">{</span>
|
||||
</div><div class='line'> <span class="cm">/**</span>
|
||||
</div><div class='line'><span class="cm"> * let's test generics</span>
|
||||
</div><div class='line'><span class="cm"> * @param args the command line arguments</span>
|
||||
</div><div class='line'><span class="cm"> */</span>
|
||||
</div><div class='line'> <span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">main</span><span class="o">(</span><span class="n">String</span><span class="o">[]</span> <span class="n">args</span><span class="o">)</span> <span class="o">{</span>
|
||||
</div><div class='line'> <span class="c1">// get a map of environment variables</span>
|
||||
</div><div class='line'> <span class="n">Map</span><span class="o"><</span><span class="n">String</span><span class="o">,</span> <span class="n">String</span><span class="o">></span> <span class="n">env</span> <span class="o">=</span> <span class="n">System</span><span class="o">.</span><span class="na">getenv</span><span class="o">();</span>
|
||||
</div><div class='line'> <span class="c1">// build a sorted set out of the keys and iterate</span>
|
||||
</div><div class='line'> <span class="k">for</span><span class="o">(</span><span class="n">String</span> <span class="nl">k:</span> <span class="k">new</span> <span class="n">TreeSet</span><span class="o"><</span><span class="n">String</span><span class="o">>(</span><span class="n">env</span><span class="o">.</span><span class="na">keySet</span><span class="o">()))</span> <span class="o">{</span>
|
||||
</div><div class='line'> <span class="n">System</span><span class="o">.</span><span class="na">out</span><span class="o">.</span><span class="na">printf</span><span class="o">(</span><span class="s">"%s = %s\n"</span><span class="o">,</span> <span class="n">k</span><span class="o">,</span> <span class="n">env</span><span class="o">.</span><span class="na">get</span><span class="o">(</span><span class="n">k</span><span class="o">));</span>
|
||||
</div><div class='line'> <span class="o">}</span>
|
||||
</div><div class='line'> <span class="o">}</span> <span class="o">}</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div><figure role=code><figcaption><span>Test C (syntax_test.c) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
<span class='line'>21</span>
|
||||
<span class='line'>22</span>
|
||||
<span class='line'>23</span>
|
||||
<span class='line'>24</span>
|
||||
<span class='line'>25</span>
|
||||
<span class='line'>26</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='c'><div class='line'><span class="cp">#define UNICODE</span>
|
||||
</div><div class='line'><span class="cp">#include <windows.h></span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span> <span class="o">**</span><span class="n">argv</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="kt">int</span> <span class="n">speed</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">speed1</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">speed2</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="c1">// 1-20</span>
|
||||
</div><div class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">"Set Mouse Speed by Maverick</span><span class="se">\n</span><span class="s">"</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">SystemParametersInfo</span><span class="p">(</span><span class="n">SPI_GETMOUSESPEED</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&</span><span class="n">speed</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">"Current speed: %2d</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">speed</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="p">(</span><span class="n">argc</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="p">(</span><span class="n">argc</span> <span class="o">>=</span> <span class="mi">2</span><span class="p">)</span> <span class="n">sscanf</span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="s">"%d"</span><span class="p">,</span> <span class="o">&</span><span class="n">speed1</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="p">(</span><span class="n">argc</span> <span class="o">>=</span> <span class="mi">3</span><span class="p">)</span> <span class="n">sscanf</span><span class="p">(</span><span class="n">argv</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="s">"%d"</span><span class="p">,</span> <span class="o">&</span><span class="n">speed2</span><span class="p">);</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="k">if</span> <span class="p">(</span><span class="n">argc</span> <span class="o">==</span> <span class="mi">2</span><span class="p">)</span> <span class="c1">// set speed to first value</span>
|
||||
</div><div class='line'> <span class="n">speed</span> <span class="o">=</span> <span class="n">speed1</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="k">else</span> <span class="k">if</span> <span class="p">(</span><span class="n">speed</span> <span class="o">==</span> <span class="n">speed1</span> <span class="o">||</span> <span class="n">speed</span> <span class="o">==</span> <span class="n">speed2</span><span class="p">)</span> <span class="c1">// alternate</span>
|
||||
</div><div class='line'> <span class="n">speed</span> <span class="o">=</span> <span class="n">speed1</span> <span class="o">+</span> <span class="n">speed2</span> <span class="o">-</span> <span class="n">speed</span><span class="p">;</span>
|
||||
</div><div class='line'> <span class="k">else</span>
|
||||
</div><div class='line'> <span class="n">speed</span> <span class="o">=</span> <span class="n">speed1</span><span class="p">;</span> <span class="c1">// start with first value</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'> <span class="n">SystemParametersInfo</span><span class="p">(</span><span class="n">SPI_SETMOUSESPEED</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">speed</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="n">SystemParametersInfo</span><span class="p">(</span><span class="n">SPI_GETMOUSESPEED</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="o">&</span><span class="n">speed</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="n">printf</span><span class="p">(</span><span class="s">"New speed: %2d</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">speed</span><span class="p">);</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="p">}</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
267
docs/blogging/index.html
Normal file
@ -0,0 +1,267 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Blogging Basics</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/blogging/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Blogging Basics</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-19 00:00:00 -0400" pubdate updated >Jul 19<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Octopress offers some rake tasks to create post and pages preloaded with metadata and according to Jekyll’s naming conventions.</p>
|
||||
|
||||
<h2>Blog Posts</h2>
|
||||
|
||||
<p>Blog posts must be stored in the <code>source/_posts</code> directory and named according to Jekyll’s naming conventions: <code>YYYY-MM-DD-post-title.markdown</code>. The name of the file will be used
|
||||
as the url slug, and the date helps with file distinction and determines the sorting order for post loops.</p>
|
||||
|
||||
<p>Octopress provides a rake task to create new blog posts with the right naming conventions, with sensible yaml metadata.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake new_post<span class="o">[</span><span class="s2">"title"</span><span class="o">]</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p><code>new_post</code> expects a naturally written title and strips out undesirable url characters when creating the filename.
|
||||
The default file extension for new posts is <code>markdown</code> but you can configure that in the <code>Rakefile</code>.</p>
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake new_post<span class="o">[</span><span class="s2">"Zombie Ninjas Attack: A survivor's retrospective"</span><span class="o">]</span>
|
||||
</div><div class='line'><span class="c"># Creates source/_posts/2011-07-03-zombie-ninjas-attack-a-survivors-retrospective.markdown</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>The filename will determine your url. With the default <a href="https://github.com/mojombo/jekyll/wiki/Permalinks">permalink settings</a> the url would be something like
|
||||
<code>http://site.com/blog/20011/07/03/zombie-ninjas-attack-a-survivors-retrospective/index.html</code>.</p>
|
||||
|
||||
<p>Open a post in a text editor and you’ll see a block of <a href="https://github.com/mojombo/jekyll/wiki/yaml-front-matter">yaml front matter</a>
|
||||
which tells Jekyll how to processes posts and pages.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="nn">---</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">post</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="s">"Zombie</span><span class="nv"> </span><span class="s">Ninjas</span><span class="nv"> </span><span class="s">Attack:</span><span class="nv"> </span><span class="s">A</span><span class="nv"> </span><span class="s">survivor's</span><span class="nv"> </span><span class="s">retrospective"</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">date</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">2011-07-03 5:59</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">comments</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span>
|
||||
</div><div class='line'><span class="nn">---</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Here you can turn comments off and or categories to your post. If you are working on a multi-author blog, you can add <code>author: Your Name</code> to the
|
||||
metadata for proper attribution on a post. If you are working on a draft, you can add <code>published: false</code> to prevent it from being posted when you generate your blog.</p>
|
||||
|
||||
<p>You can add a single category or multiple categories like this.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="c1"># One category</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Sass</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1"># Multiple categories example 1</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">CSS3</span><span class="p-Indicator">,</span> <span class="nv">Sass</span><span class="p-Indicator">,</span> <span class="nv">Media Queries</span><span class="p-Indicator">]</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1"># Multiple categories example 2</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">categories</span><span class="p-Indicator">:</span>
|
||||
</div><div class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">CSS3</span>
|
||||
</div><div class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">Sass</span>
|
||||
</div><div class='line'><span class="p-Indicator">-</span> <span class="l-Scalar-Plain">Media Queries</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<h2>New Pages</h2>
|
||||
|
||||
<p>You can add pages anywhere in your blog source directory and they’ll be parsed by Jekyll. The URL will correspond directly to the filepath, so <code>about.markdown</code> will become <code>site.com/about.html</code>. If you prefer the URL <code>site.com/about/</code> you’ll want to create the page as <code>about/index.markdown</code>.
|
||||
Octopress has a rake task for creating new pages easily.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake new_page<span class="o">[</span>super-awesome<span class="o">]</span>
|
||||
</div><div class='line'><span class="c"># creates /source/super-awesome/index.markdown</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'>rake new_page<span class="o">[</span>super-awesome/page.html<span class="o">]</span>
|
||||
</div><div class='line'><span class="c"># creates /source/super-awesome/page.html</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Like with the new post task, the default file extension is <code>markdown</code> but you can configure that in the <code>Rakefile</code>. A freshly generated page might look like this.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="nn">---</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">page</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="s">"Super</span><span class="nv"> </span><span class="s">Awesome"</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">date</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">2011-07-03 5:59</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">comments</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">sharing</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">footer</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">true</span>
|
||||
</div><div class='line'><span class="nn">---</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>The title is derived from the filename so you’ll likely want to change that. This is very similar to the post yaml except it doesn’t include categories, and you can toggle sharing and comments or remove the footer altogehter. If you don’t want to show a date on your page, just remove it from the yaml.</p>
|
||||
|
||||
<h2>Generate & Preview</h2>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake generate <span class="c"># Generates posts and pages into the public directory</span>
|
||||
</div><div class='line'>rake watch <span class="c"># Watches source/ and sass/ for changes and regenerates</span>
|
||||
</div><div class='line'>rake preview <span class="c"># Watches, and mounts a webserver at http://localhost:4000</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Jekyll’s built in WEBrick server is handy, but if you’re a <a href="http://pow.cx">POW</a> user, you can set it up to work with Octopress like this.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'><span class="nb">cd</span> ~/.pow
|
||||
</div><div class='line'>ln -s /path/to/octopress
|
||||
</div><div class='line'><span class="nb">cd</span> -
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Now that you’re setup with POW, you’ll just run <code>rake watch</code> and load up <code>http://octopress.dev</code> instead.</p>
|
||||
|
||||
<p>Also see <a href="/octopress/docs/blogging/code">Sharing Code Snippets</a> and <a href="/octopress/docs/blogging/plugins">Blogging with Plugins</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
249
docs/blogging/plugins/index.html
Normal file
@ -0,0 +1,249 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Plugins</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/blogging/plugins/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Plugins</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 11:18:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>There are <a href="/octopress/docs/plugins">other plugins</a> for octopress, but here’s an overview of the ones you’ll be likely to use while blogging.
|
||||
This is mainly a description and demo, so be sure to follow the links beneath each section for examples and documentation.</p>
|
||||
|
||||
<h2>Excerpts</h2>
|
||||
|
||||
<p>When writing a post, you can add an HTML comment <code><!--more--></code> to split the post for an excerpt. Only the first section of the post, before the comment,
|
||||
will show up on the blog index.</p>
|
||||
|
||||
<h2>HTML5 Video Tag</h2>
|
||||
|
||||
<p>This plugin makes it easy to insert mp4 encoded HTML5 videos in a post. Octopress ships with javascripts which
|
||||
detect mp4 video support (<a href="http://modernizr.com">using Modernizr</a>) and automatically offer a flash player fallback.</p>
|
||||
|
||||
<p><a href="/octopress/docs/plugins/video-tag/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Image Tag</h2>
|
||||
|
||||
<p>This plugin makes it easy to insert images in a post, with optional class names, alt and title attributes.</p>
|
||||
|
||||
<p><a href="/octopress/docs/plugins/image-tag/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Block quote</h2>
|
||||
|
||||
<blockquote><p>Give a man a fish, he’ll have food for a day. Teach a man to fish, and he’ll always come to you with his fishing problems.</p><footer><strong>@AustinTaylor</strong><cite><a href='https://twitter.com/austintaylor/status/73136957617750016'>twitter.com/austintaylor/status/…</a></cite></footer></blockquote>
|
||||
|
||||
|
||||
<p><a href="/octopress/docs/plugins/blockquote/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Pull quote</h2>
|
||||
|
||||
<p>Octopress offers a CSS only technique for pull quotes, based on the technique by <a href="http://miekd.com/articles/pull-quotes-with-html5-and-css/">Maykel Loomans</a>.</p>
|
||||
|
||||
<p><span class='has-pullquote' data-pullquote='pull quotes are merely visual in presentation and should not appear twice in the text. '>
|
||||
When writing longform posts, I find it helpful to include pull quotes to help readers easily identify the topics covered in each section. Some prefer to break things up with lots of headings, and while this seems to be a trend it doesn’t work so well for long form prose.
|
||||
It is important to note that pull quotes are merely visual in presentation and should not appear twice in the text. That is why it a CSS only technique for styling pull quotes is preferable. Octopress includes a handy pull quote plugin to make this easy for you.
|
||||
</span></p>
|
||||
|
||||
<p><a href="/octopress/docs/plugins/pullquote/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Code Blocks</h2>
|
||||
|
||||
<p>Write blocks of code directly in your posts and optionally add titles and links.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Javascript Array Syntax (array.js)</span><a href='https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array'>MDN Documentation </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="kd">var</span> <span class="nx">arr1</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">arrayLength</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="nx">arr2</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">element0</span><span class="p">,</span> <span class="nx">element1</span><span class="p">,</span> <span class="p">...,</span> <span class="nx">elementN</span><span class="p">);</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p><a href="/octopress/docs/plugins/codeblock/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Gist Tag</h2>
|
||||
|
||||
<p>Easily embed gists in your posts or pages.</p>
|
||||
|
||||
<pre><code>{% gist 996818 %}
|
||||
</code></pre>
|
||||
|
||||
<p><a href="/octopress/docs/plugins/gist-tag/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Include Code</h2>
|
||||
|
||||
<p>Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing include_code (test.js)</span> <a href='http://octopress.org/downloads/code/javascripts/test.js'>download</a></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="cm">/**</span>
|
||||
</div><div class='line'><span class="cm">sample javascript from xui</span>
|
||||
</div><div class='line'><span class="cm">*/</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="kc">undefined</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">xui</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nb">window</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">string</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">String</span><span class="p">(</span><span class="s1">'string'</span><span class="p">),</span>
|
||||
</div><div class='line'> <span class="nb">document</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nb">document</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">simpleExpr</span> <span class="o">=</span> <span class="sr">/^#?([\w-]+)$/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">idExpr</span> <span class="o">=</span> <span class="sr">/^#/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">tagExpr</span> <span class="o">=</span> <span class="sr">/<([\w:]+)/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">[].</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">e</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> <span class="p">};</span>
|
||||
</div><div class='line'> <span class="k">try</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">a</span> <span class="o">=</span> <span class="nx">slice</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">documentElement</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">nodeType</span><span class="p">;</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">ret</span><span class="o">=</span><span class="p">[];</span> <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="nx">ret</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span> <span class="k">return</span> <span class="nx">ret</span><span class="p">;</span> <span class="p">};</span> <span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nb">window</span><span class="p">.</span><span class="nx">x$</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">xui</span> <span class="o">=</span> <span class="nx">xui</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="k">new</span> <span class="nx">xui</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="p">};</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p><a href="/octopress/docs/plugins/include-code/">Examples & documentation »</a></p>
|
||||
|
||||
<h2>Render Partial</h2>
|
||||
|
||||
<p>Import files on your file system into any blog post or page. For example, to embed this page in another post I’d use the following code.</p>
|
||||
|
||||
<pre><code>{% render_partial docs/blogging/plugins/index.markdown %}
|
||||
</code></pre>
|
||||
|
||||
<p><a href="/octopress/docs/plugins/render-partial/">Examples & documentation »</a></p>
|
||||
|
||||
<p>Also see the <a href="/octopress/docs/plugins">Octopress Plugin index</a> for the full list of Octopress plugins.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
237
docs/configuring/index.html
Normal file
@ -0,0 +1,237 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Configuring Octopress</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/configuring/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Configuring Octopress</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-19 00:00:00 -0400" pubdate updated >Jul 19<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p><a href="/octopress/docs/setup">« Previous, Octopress Setup</a></p>
|
||||
|
||||
<p>I’ve tried to keep configuring Octopress fairly simple and you’ll probably only ever change the <code>Rakefile</code> and the <code>_config.yml</code>.
|
||||
Here’s a list of files for configuring Octopress.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>_config.yml <span class="c"># Main config (Jekyll's settings)</span>
|
||||
</div><div class='line'>Rakefile <span class="c"># Configs for deployment</span>
|
||||
</div><div class='line'>config.rb <span class="c"># Compass config</span>
|
||||
</div><div class='line'>config.ru <span class="c"># Rack config</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Configurations in the <code>Rakefile</code> are mostly related to deployment and you probably won’t have to touch them unless you’re using rsync.</p>
|
||||
|
||||
<h2>Blog Configuration</h2>
|
||||
|
||||
<p>In the <code>_config.yml</code> there are three sections for configuring your Octopress Blog.
|
||||
<strong>Spoiler:</strong> You must change <code>url</code>, and you’ll probably change <code>title</code>, <code>subtitle</code> and <code>author</code> and enable some 3rd party services.</p>
|
||||
|
||||
<h3>Main Configs</h3>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="l-Scalar-Plain">url</span><span class="p-Indicator">:</span> <span class="c1"># For rewriting urls for RSS, etc</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="c1"># Used in the header and title tags</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">subtitle</span><span class="p-Indicator">:</span> <span class="c1"># A description used in the header</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">author</span><span class="p-Indicator">:</span> <span class="c1"># Your name, for RSS, Copyright, Metadata</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">simple_search</span><span class="p-Indicator">:</span> <span class="c1"># Search engine for simple site search</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">subscribe_rss</span><span class="p-Indicator">:</span> <span class="c1"># Url for your blog's feed, defauts to /atom.xml</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">subscribe_email</span><span class="p-Indicator">:</span> <span class="c1"># Url to subscribe by email (service required)</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">email</span><span class="p-Indicator">:</span> <span class="c1"># Email address for the RSS feed if you want it.</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p><strong>Note:</strong> If your site is a multi-author blog, you may want to set this config’s <code>author</code> to the name of your
|
||||
company or project, and add author metadata to posts and pages to give proper attribution for those works.</p>
|
||||
|
||||
<h3>Jekyll & Plugins</h3>
|
||||
|
||||
<p>These configurations are used by Jekyll and Plugins. If you’re not familiar with Jekyll, you should probably have a look at the <a href="https://github.com/mojombo/jekyll/wiki/Configuration">configuration docs</a> which lists more options that aren’t covered here.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="l-Scalar-Plain">root</span><span class="p-Indicator">:</span> <span class="c1"># Mapping for relative urls (default: /)</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">port</span><span class="p-Indicator">:</span> <span class="c1"># Port to mount Jekyll's WEBrick server</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">permalink</span><span class="p-Indicator">:</span> <span class="c1"># Permalink structure for blog posts</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">source</span><span class="p-Indicator">:</span> <span class="c1"># Directory for site source files</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">destination</span><span class="p-Indicator">:</span> <span class="c1"># Directory for generated site files</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">plugins</span><span class="p-Indicator">:</span> <span class="c1"># Directory for Jekyll plugins</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">code_dir</span><span class="p-Indicator">:</span> <span class="c1"># Directory for code snippets (for include_code plugin)</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">category_dir</span><span class="p-Indicator">:</span> <span class="c1"># Directory for generated blog category pages</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">pygments</span><span class="p-Indicator">:</span> <span class="c1"># Toggle python pygments syntax highlighting</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">paginate</span><span class="p-Indicator">:</span> <span class="c1"># Posts per page on the blog index</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">recent_posts</span><span class="p-Indicator">:</span> <span class="c1"># Number of recent posts to appear in the sidebar</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">default_asides</span><span class="p-Indicator">:</span> <span class="c1"># Configure what shows up in the sidebar and in what order</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">blog_index_asides</span><span class="p-Indicator">:</span> <span class="c1"># Optional sidebar config for blog index page</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">post_asides</span><span class="p-Indicator">:</span> <span class="c1"># Optional sidebar config for post layout</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">page_asides</span><span class="p-Indicator">:</span> <span class="c1"># Optional sidebar config for page layout</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>If you want to change the way permalinks are written for your blog posts, see <a href="https://github.com/mojombo/jekyll/wiki/Permalinks">Jekyll’s permalink docs</a>.</p>
|
||||
|
||||
<p><strong>Note:</strong> Jekyll has a <code>baseurl</code> config which adds a redirect for Jekyll’s WEBrick server for subdirectory support. This works fine if you want
|
||||
to use the WEBrick server, but for any other web service you have to add support for the redirect. Instead, Octopress uses the <code>root</code> config and offers a rake task
|
||||
<code>set_root_dir[/some/directory]</code> which moves the output directory into a subdirectory and updates configurations. <a href="/octopress/docs/deploying">(see Deploying Octopress)</a>.</p>
|
||||
|
||||
<h3 id="third_party">3rd Party Settings</h3>
|
||||
|
||||
|
||||
<p>These third party integrations are already set up for you. Simply fill in the configurations and they’ll be added to your site.</p>
|
||||
|
||||
<ul>
|
||||
<li><strong>Twitter</strong> - <em>Setup a sidebar twitter feed, follow button, and tweet button (for sharing posts and pages).</em></li>
|
||||
<li><strong>Google Plus One</strong> - <em>Setup sharing for posts and pages on Google’s plus one network.</em></li>
|
||||
<li><strong>Pinboard</strong> - <em>Share your recent Pinboard bookmarks in the sidebar.</em></li>
|
||||
<li><strong>Delicious</strong> - <em>Share your recent Delicious bookmarks in the sidebar.</em></li>
|
||||
<li><strong>Disqus Comments</strong> - <em>Add your disqus short name to enable disqus comments on your site.</em></li>
|
||||
<li><strong>Google Analytics</strong> - <em>Add your tracking id to enable Google Analytics tracking for your site.</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>The Octopress layouts read these configurations and only include the javascript and html necessary for the enabled services.</p>
|
||||
|
||||
<p><a href="/octopress/docs/blogging/">Next, Blogging with Octopress »</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
251
docs/deploying/index.html
Normal file
@ -0,0 +1,251 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Deploying Octopress</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/deploying/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Deploying Octopress</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-18 00:00:00 -0400" pubdate updated >Jul 18<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<h2 id="rsync">Deploying with Rsync via SSH</h2>
|
||||
|
||||
|
||||
<p>Add your server configurations to the <code>Rakefile</code> under Rsync deploy config. To deploy with Rsync, be sure your public key is listed in your server’s <code>~/.ssh/authorized_keys</code> file.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='ruby'><div class='line'><span class="n">ssh_user</span> <span class="o">=</span> <span class="s2">"user@domain.com"</span>
|
||||
</div><div class='line'><span class="n">document_root</span> <span class="o">=</span> <span class="s2">"~/website.com/"</span>
|
||||
</div><div class='line'><span class="n">deploy_default</span> <span class="o">=</span> <span class="s2">"rsync"</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Now if you run</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake generate <span class="c"># If you haven't generated your blog yet</span>
|
||||
</div><div class='line'>rake deploy <span class="c"># Syncs your blog via ssh</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>in your terminal, your <code>public</code> directory will be synced to your server’s document root.</p>
|
||||
|
||||
<h2 id="github_pages">Deploying to Github Pages</h2>
|
||||
|
||||
|
||||
<p>To setup deployment, you’ll want to clone your target repository into the <code>_deploy</code> directory in your Octopress project.
|
||||
If you’re using Github user or organization pages, clone the repository <code>git@github.com:username/username.github.com.git</code>.</p>
|
||||
|
||||
<h3>With Github User/Organization pages</h3>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>git clone git@github.com:username/username.github.com _deploy
|
||||
</div><div class='line'>rake config_deploy<span class="o">[</span>master<span class="o">]</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<h3>With Github Project pages (gh-pages)</h3>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>git clone git@github.com:username/project.git _deploy
|
||||
</div><div class='line'>rake config_deploy<span class="o">[</span>gh-pages<span class="o">]</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>The <code>config_deploy</code> rake task takes a branch name as an argument and creates a <a href="http://book.git-scm.com/5_creating_new_empty_branches.html">new empty branch</a>, and adds an initial commit.
|
||||
This also sets <code>deploy_default = "push"</code> in your <code>_config.yml</code> and prepares your branch for easy deployment. The <code>rake deploy</code> task copies the generated blog from the <code>public</code> directory to the <code>_deploy</code> directory, adds new files, removes old files, sets a commit message, and pushes to Github.
|
||||
Github will queue your site for publishing (which usually occurs instantly or within minutes if it’s your first commit).</p>
|
||||
|
||||
<p>Now you should be set up to deploy, just run</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake generate <span class="c"># If you haven't generated your blog yet</span>
|
||||
</div><div class='line'>rake deploy <span class="c"># Pushes your generated blog to Github</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<h2 id="deploy_subdir">Deploying to a Subdirectory (Github Project Pages does this)</h2>
|
||||
|
||||
|
||||
<p>If you’re deploying to a subdirectory on your site, or if you’re using Github’s project pages, make sure you set up your urls correctly in your configs.
|
||||
You can do this <em>almost</em> automatically:</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake set_root_dir<span class="o">[</span>your/path<span class="o">]</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c"># To go back to publishing to the document root</span>
|
||||
</div><div class='line'>rake set_root_dir<span class="o">[</span>/<span class="o">]</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Then update your <code>_config.yml</code> and <code>Rakefile</code> as follows:</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'><span class="c"># _config.yml</span>
|
||||
</div><div class='line'>url: http://yoursite.com/your/path
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c"># Rakefile (if deploying with rsync)</span>
|
||||
</div><div class='line'><span class="nv">document_root</span> <span class="o">=</span> <span class="s2">"~/yoursite.com/your/path"</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>To manually configure deployment to a subdirectory, you’ll change <code>_config.yml</code>, <code>config.rb</code> and <code>Rakefile</code>.
|
||||
Here’s an example for deploying the Octopress website to Github Project Pages:</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'><span class="c"># _config.yml</span>
|
||||
</div><div class='line'>destination: public/octopress
|
||||
</div><div class='line'>url: http://imathis.github.com/octopress
|
||||
</div><div class='line'>subscribe_rss: /octopress/atom.xml
|
||||
</div><div class='line'>root: /octopress
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c"># config.rb - for Compass & Sass</span>
|
||||
</div><div class='line'><span class="nv">http_path</span> <span class="o">=</span> <span class="s2">"/octopress"</span>
|
||||
</div><div class='line'><span class="nv">http_images_path</span> <span class="o">=</span> <span class="s2">"/octopress/images"</span>
|
||||
</div><div class='line'><span class="nv">http_fonts_path</span> <span class="o">=</span> <span class="s2">"/octopress/fonts"</span>
|
||||
</div><div class='line'><span class="nv">css_dir</span> <span class="o">=</span> <span class="s2">"public/octopress/stylesheets"</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c"># Rakefile</span>
|
||||
</div><div class='line'><span class="nv">public_dir</span> <span class="o">=</span> <span class="s2">"public/octopress"</span>
|
||||
</div><div class='line'><span class="c"># If deploying with rsync, update your Rakefile path</span>
|
||||
</div><div class='line'><span class="nv">document_root</span> <span class="o">=</span> <span class="s2">"~/yoursite.com/your/path"</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
190
docs/index.html
Normal file
@ -0,0 +1,190 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Octopress Documentation</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Octopress Documentation</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 00:00:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Octopress is a framework designed for Jekyll, the static blogging engine powering Github Pages. Have a look through
|
||||
the documentation and if you have trouble, <a href="http://convore.com/octopress/support">I’ll be happy to help</a>. If you find errors
|
||||
<a href="https://github.com/imathis/octopress/issues">post an issue</a> or fork and send a pull request on the <a href="https://github.com/imathis/octopress/tree/site">site branch</a>.</p>
|
||||
|
||||
<p><strong>Note:</strong> If you already have a blog, check out <a href="https://github.com/mojombo/jekyll/wiki/blog-migrations">Jekyll’s Migration page</a> to help you get your current blog set up for Octopress blogging.</p>
|
||||
|
||||
<h2>Getting Started</h2>
|
||||
|
||||
<p>This section will help you get set up, and explain how to configure Octopress for your site.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/setup">Initial setup</a> - <em>get source and install dependencies</em></li>
|
||||
<li><a href="/octopress/docs/configuring">Basic Configuration</a> - <em>enable third party services and personalize your blog</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Using Octopress</h2>
|
||||
|
||||
<p>Your blog should be awesome. This should help.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/blogging">Blogging Basics</a> - <em>how to create blog posts and pages</em></li>
|
||||
<li><a href="/octopress/docs/deploying">Deploying Octopress</a> - <em>simple deploy instructions for Rsync and Github pages</em></li>
|
||||
<li><a href="/octopress/docs/blogging/code">Sharing Code Snippets</a> - <em>share code snippets with ease</em></li>
|
||||
<li><a href="/octopress/docs/blogging/plugins">Blogging With Plugins</a> - <em>overview of plugins for blogging</em></li>
|
||||
<li><a href="/octopress/docs/theme">Theming & Customization</a> - <em>guide to making changes to your Octopress theme</em></li>
|
||||
<li><a href="/octopress/docs/updating">Updating Octopress</a> - <em>a guide to help you stay current with Octopress</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<h2>Octopress Plugins - Usage & Examples</h2>
|
||||
|
||||
<p>Octopress ships with the following plugins. Many have been written specially for Octopress, but some have been selected from the Jekyll community with various changes and improvements.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/plugins/video-tag/">HTML5 Video Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/github-style-codeblock/">Github Style codeblock</a> - <em>for simple lightweight code sharing</em></li>
|
||||
<li><a href="/octopress/docs/plugins/codeblock/">Code Block</a> - <em>for sharing code with titles and links</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-code/">Include Code</a> - <em>embed code from your filesystem with a download link</em></li>
|
||||
<li><a href="/octopress/docs/plugins/gist-tag/">Gist Tag</a> - <em>automatically downloads and embeds Github gists</em></li>
|
||||
<li><a href="/octopress/docs/plugins/image-tag/">Image Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/render-partial/">Render Partial</a> - <em>insert any file into another post or page</em></li>
|
||||
<li><a href="/octopress/docs/plugins/blockquote/">Blockquote</a> - <em>generate beautiful, semantic block quotes</em></li>
|
||||
<li><a href="/octopress/docs/plugins/pullquote/">Pullquote</a> - <em>generate CSS only pull quotes — no duplicate data, no javascript</em></li>
|
||||
<li><a href="/octopress/docs/plugins/category-generator/">Category Generator</a> - <em>generates archive pages for each blog category</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-array/">Include Array</a> - <em>includes an array of partials specified in the _config.yml</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>The following filters are used by Octopress, and are documented as necessary in their source.</p>
|
||||
|
||||
<ul>
|
||||
<li>Octopress filters - <em>liquid filters built just for Octopress</em></li>
|
||||
<li>Sitemap Generator - <em>generates an SEO friendly sitemap.xml</em></li>
|
||||
<li>Compass Compiler - <em>forces Jekyll to compile Compass on each load</em></li>
|
||||
<li>Haml Converter - <em>allows .haml pages to be processed by Jekyll</em></li>
|
||||
<li>Pygments Code - <em>converts code snippets to highlighted code and caches to speed up Jekyll processing</em></li>
|
||||
<li>Titlecase - <em>required by several plugins to automatically generate proper title captalization</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p><a href="https://github.com/imathis/octopress/tree/master/plugins">Octopress plugins source</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
185
docs/plugins/blockquote/index.html
Normal file
@ -0,0 +1,185 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Blockquote</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/blockquote/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Blockquote</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:15:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>The blockquote plugin takes and author, source, title and quote, and outputs semantic HTML.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% blockquote [author[, source]] [link] [source_link_title] %}
|
||||
Quote string
|
||||
{% endblockquote %}
|
||||
</code></pre>
|
||||
|
||||
<p>You’ll notice there are two entries for <code>source</code>; one after <code>author</code>, and one after <code>link</code>. If you are citing from a printed work or a speech or something you cannot link to,
|
||||
use the first method <code>Author's Name, Cited Work</code>. If you’re going to link to the work, omit the first source method, and add a source title after the link <code>Author's Name http://source.com Article title</code>.</p>
|
||||
|
||||
<h4>Examples</h4>
|
||||
|
||||
<p>Blockquote arguments are optional, you can output a plain blockquote like this.</p>
|
||||
|
||||
<pre><code>{% blockquote %}
|
||||
Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.
|
||||
{% endblockquote %}
|
||||
</code></pre>
|
||||
|
||||
<blockquote><p>Last night I lay in bed looking up at the stars in the sky and I thought to myself, where the heck is the ceiling.</p></blockquote>
|
||||
|
||||
|
||||
<p><strong>Quote from a printed work.</strong></p>
|
||||
|
||||
<pre><code>{% blockquote Douglas Adams, The Hichhikers Guide to the Galaxy %}
|
||||
Flying is learning how to throw yourself at the ground and miss.
|
||||
{% endblockquote %}
|
||||
</code></pre>
|
||||
|
||||
<blockquote><p>Flying is learning how to throw yourself at the ground and miss.</p><footer><strong>Douglas Adams</strong><cite>The Hitchhikers Guide to the Galaxy</cite></footer></blockquote>
|
||||
|
||||
|
||||
<p><strong>Quote from Twitter</strong></p>
|
||||
|
||||
<pre><code>{% 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 %}
|
||||
</code></pre>
|
||||
|
||||
<blockquote><p>Over the past 24 hours I’ve been reflecting on my life & I’ve realized only one thing. I need a medieval battle axe.</p><footer><strong>@allanbranch</strong><cite><a href='https://twitter.com/allanbranch/status/90766146063712256'>twitter.com/allanbranch/status/…</a></cite></footer></blockquote>
|
||||
|
||||
|
||||
<p><strong>Quote from an article on the web</strong></p>
|
||||
|
||||
<pre><code>{% 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 %}
|
||||
</code></pre>
|
||||
|
||||
<blockquote><p>Every interaction is both precious and an opportunity to delight.</p><footer><strong>Seth Godin</strong><cite><a href='http://sethgodin.typepad.com/seths_blog/2009/07/welcome-to-island-marketing.html'>Welcome to Island Marketing</a></cite></footer></blockquote>
|
||||
|
||||
|
||||
<p>For those who appreciate the little things, you’ll notice in the Twitter example above, the url is truncated and drops the protocol segment.
|
||||
Sometimes (like with Twitter) ading a link title doesn’t really make sense, but showing the full url is noisy and distracting.
|
||||
For this reason, the blockquote plugin automatically strips out the protocol, and if the url is longer than 32 characters it truncates the url on a forward slash for beauty’s sake.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
139
docs/plugins/category-generator/index.html
Normal file
@ -0,0 +1,139 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Category Generator</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/category-generator/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Category Generator</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:17:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>The category generator builds category specific archive pages for each category in your blog posts.
|
||||
The archive pages use the category layout (included with Octopress). In the <code>_config.yml</code> you may change
|
||||
the directory for the category archives if you like and the title for the category pages.</p>
|
||||
|
||||
<pre><code>category_dir: blog/categories
|
||||
category_title_prefix: "Category: "
|
||||
</code></pre>
|
||||
|
||||
<p>If you visit a category archive for ‘open source’ the url would be <code>/blog/categories/open-source/</code> and the title would be <code>Category: Open Source</code>.</p>
|
||||
|
||||
<p>This plugin was originally developed by <a href="http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html">Dave Perrett</a> but it has been updated and improved for Octopress.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
175
docs/plugins/codeblock/index.html
Normal file
@ -0,0 +1,175 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Codeblock</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/codeblock/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Codeblock</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:13:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>With this plugin you can write blocks of code directly in your posts and optionally add titles and links.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% codeblock [title] [url] [link text] %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 1</h4>
|
||||
|
||||
<pre><code>{% codeblock %}
|
||||
Awesome code snippet
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><pre><code>Awesome code snippet</code></pre></figure></div>
|
||||
|
||||
|
||||
<h4>Example 2</h4>
|
||||
|
||||
<pre><code># Including a file extension in the title enables highlighting
|
||||
{% codeblock Time to be Awesome - awesome.rb %}
|
||||
puts "Awesome!" unless lame
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><figcaption><span>Time to be Awesome - awesome.rb </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='rb'><div class='line'><span class="nb">puts</span> <span class="s2">"Awesome!"</span> <span class="k">unless</span> <span class="n">lame</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<h4>Example 3</h4>
|
||||
|
||||
<pre><code># Add an optional URL to enable downloading or linking to source
|
||||
{% codeblock Got pain? painreleif.sh http://example.com/painreleief.sh Download it! %}
|
||||
$ rm -rf ~/PAIN
|
||||
{% endcodeblock %}
|
||||
</code></pre>
|
||||
|
||||
<div><figure role=code><figcaption><span>Javascript Array Syntax (array.js)</span><a href='https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array'>MDN Documentation </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="kd">var</span> <span class="nx">arr1</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">arrayLength</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="nx">arr2</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Array</span><span class="p">(</span><span class="nx">element0</span><span class="p">,</span> <span class="nx">element1</span><span class="p">,</span> <span class="p">...,</span> <span class="nx">elementN</span><span class="p">);</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>The last argument <code>link_text</code> is optional. You may want to link to a source for download file, or documentation on some other site.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
159
docs/plugins/gist-tag/index.html
Normal file
@ -0,0 +1,159 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Gist Tag</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/gist-tag/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Gist Tag</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:13:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>All you need is the gist’s id and you can easily embed it in your page. This actually downloads a cache of the gist and embeds it in a <code><noscript></code> tag for RSS
|
||||
readers and search engines, while still using Github’s javascript gist embed code for browsers.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% gist gist_id [filename] %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<pre><code>{% gist 996818 %}
|
||||
</code></pre>
|
||||
|
||||
<div><script src='https://gist.github.com/996818.js?file='></script>
|
||||
<noscript><pre><code>@@ -590,7 +590,7 @@ class SpritesTest < Test::Unit::TestCase
|
||||
it "should generate a sprite from nested folders" do
|
||||
css = render <<-SCSS
|
||||
- @import "nested/*.png";
|
||||
+ @import "nested/**/*.png";
|
||||
@include all-nested-sprites;
|
||||
SCSS
|
||||
assert_correct css, <<-CSS</code></pre></noscript></div>
|
||||
|
||||
|
||||
<p>If you have a gist with multiple files, you can include files one at a time by adding the name after the gist id.</p>
|
||||
|
||||
<pre><code>{% gist 1059334 svg_bullets.rb %}
|
||||
{% gist 1059334 usage.scss %}
|
||||
</code></pre>
|
||||
|
||||
<p>This plugin was developed by <a href="http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html">Brandon Tilly</a> but I have fixed some bugs and made some improvements to it for Octopress.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
166
docs/plugins/github-style-codeblock/index.html
Normal file
@ -0,0 +1,166 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Github Style Codeblock</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/github-style-codeblock/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Github Style Codeblock</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-26 23:42:00 -0400" pubdate updated >Jul 26<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>With the <code>backtick_codeblock</code> filter you can use Github’s lovely back tick syntax highlighting blocks.
|
||||
Simply start a line with three back ticks followed by a space and the language you’re using. Tab in four spaces
|
||||
for your code snippets, and then finish your code block with three more back ticks.</p>
|
||||
|
||||
<p><strong>Note: Back tick code blocks are only supported in HTML and Markdown. With the Textile markup language, use the <a href="/octopress/docs/plugins/codeblock/">codeblocks</a> instead.</strong></p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<div><figure role=code><pre><code>``` language
|
||||
code snippet
|
||||
```</code></pre></figure></div>
|
||||
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<div><figure role=code><pre><code>``` ruby
|
||||
class Fixnum
|
||||
def prime?
|
||||
('1' * self) !~ /^1?$|^(11+?)\1+$/
|
||||
end
|
||||
end
|
||||
```</code></pre></figure></div>
|
||||
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='ruby'><div class='line'><span class="k">class</span> <span class="nc">Fixnum</span>
|
||||
</div><div class='line'> <span class="k">def</span> <span class="nf">prime?</span>
|
||||
</div><div class='line'> <span class="p">(</span><span class="s1">'1'</span> <span class="o">*</span> <span class="nb">self</span><span class="p">)</span> <span class="o">!~</span> <span class="sr">/^1?$|^(11+?)\1+$/</span>
|
||||
</div><div class='line'> <span class="k">end</span>
|
||||
</div><div class='line'><span class="k">end</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>This is a nice, lightweight way to add a highlighted code snippet. For features like titles and links you’ll want to look
|
||||
at the <a href="/octopress/docs/plugins/code-block/">codeblock</a> or <a href="/octopress/docs/plugins/include-code/">include_code</a> liquid tags.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
154
docs/plugins/image-tag/index.html
Normal file
@ -0,0 +1,154 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Image Tag</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/image-tag/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Image Tag</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:15:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>If you like Markdown’s syntax for images, you’ll love the simplicity of the Octopress image tag.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% img [class names] /path/to/image [width height] [title text] %}
|
||||
</code></pre>
|
||||
|
||||
<h2>Examples</h2>
|
||||
|
||||
<pre><code>{% 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 %}
|
||||
</code></pre>
|
||||
|
||||
<p><img class='' src='http://placekitten.com/890/280' width='' height='' alt='' title=''>
|
||||
Bacon ipsum dolor sit amet exercitation ball tip consectetur tempor. Biltong exercitation aliqua, ribeye consequat veniam consectetur.</p>
|
||||
|
||||
<p><img class='left ' src='http://placekitten.com/320/250' width='' height='' alt='Place Kitten #2' title='Place Kitten #2'>
|
||||
<img class='right ' src='http://placekitten.com/300/500' width='150' height='250' alt='Place Kitten #3' title='Place Kitten #3'>
|
||||
Aliquip nulla do tempor, ball tip dolore anim esse strip steak nisi nostrud. Tri-tip mollit deserunt ut duis, commodo brisket short loin est hamburger sunt consequat rump meatloaf. Exercitation enim aliqua tempor dolore. Non eu venison, officia boudin tri-tip enim beef ribs flank cupidatat in aute. Tail voluptate fugiat aute flank, venison sint.</p>
|
||||
|
||||
<p>Brisket quis velit bresaola. Pork loin pork chop beef duis. Short loin fugiat officia short ribs magna. Ullamco eu proident jerky, fugiat chuck nostrud ham rump meatloaf eiusmod adipisicing. Qui et reprehenderit, magna biltong consequat short ribs pancetta. Tail tenderloin sausage, hamburger corned beef drumstick ad. Eu labore enim velit.</p>
|
||||
|
||||
<p>Filler text courtesy of <a href="http://baconipsum.com">Bacon Ipsum</a>, Images courtesy of <a href="http://placekitten.com">Place Kitten</a>.</p>
|
||||
|
||||
<p><a href="/octopress/docs/plugins">« Plugins page</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
156
docs/plugins/include-array/index.html
Normal file
@ -0,0 +1,156 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Include Array Plugin</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/include-array/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Include Array Plugin</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-02 00:10:00 -0400" pubdate updated >Aug 2<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>This plugin was created for Octopress by <a href="http://www.woodwardjd.com">Jason Woodward</a> to make it possible to manage order of the sidebar partials from the <code>_confgi.yml</code>.
|
||||
This is mostly useful for those working on an Octopress theme.</p>
|
||||
|
||||
<h3>First, How Partials Work</h3>
|
||||
|
||||
<p>Jekyll allows you to include partials from the <code>/source/_includes</code> directory as follows:</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'>{% include partial.html %}
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>This will embed the contents of <code>/source/_includes/partial.html</code> in place of the snippet above.</p>
|
||||
|
||||
<h3>Now, How Include Array Works</h3>
|
||||
|
||||
<p>First add an array pointing to a list of partials underneath <code>/source/_includes</code></p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="l-Scalar-Plain">asides</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">asides/about.html</span><span class="p-Indicator">,</span> <span class="nv">asides/social.html</span><span class="p-Indicator">]</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Now from within a template you can render the partials from the yaml array like this.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'>{% include_array asides %}
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Octopress uses <code>include_array</code> to allow configuration of different sidebars for each layout.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
194
docs/plugins/include-code/index.html
Normal file
@ -0,0 +1,194 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Include Code</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/include-code/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Include Code</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:13:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Import files on your filesystem into any blog post as embedded code snippets with syntax highlighting and a download link.
|
||||
In the <code>_config.yml</code> you can set your <code>code_dir</code> but the default is <code>source/downloads/code</code>. Simply put a file anywhere under that directory and
|
||||
use the following tag to embed it in a post.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% include_code [title] url %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 1</h4>
|
||||
|
||||
<pre><code>{% include_code javascripts/test.js %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example 2 (with optional title)</h4>
|
||||
|
||||
<pre><code>{% include_code Testing include_code javascripts/test.js %}
|
||||
</code></pre>
|
||||
|
||||
<p>This includes a file from <code>source/downloads/code/javascripts/test.js</code>. By default the <code><figcaption></code> will be the filename, but you can add a title before the filepath if you like.</p>
|
||||
|
||||
<h4>Demo of Example 2</h4>
|
||||
|
||||
<div><figure role=code><figcaption><span>Testing include_code (test.js)</span> <a href='http://octopress.org/downloads/code/javascripts/test.js'>download</a></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
<span class='line'>16</span>
|
||||
<span class='line'>17</span>
|
||||
<span class='line'>18</span>
|
||||
<span class='line'>19</span>
|
||||
<span class='line'>20</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='js'><div class='line'><span class="cm">/**</span>
|
||||
</div><div class='line'><span class="cm">sample javascript from xui</span>
|
||||
</div><div class='line'><span class="cm">*/</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="kd">var</span> <span class="kc">undefined</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">xui</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nb">window</span> <span class="o">=</span> <span class="k">this</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">string</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">String</span><span class="p">(</span><span class="s1">'string'</span><span class="p">),</span>
|
||||
</div><div class='line'> <span class="nb">document</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nb">document</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">simpleExpr</span> <span class="o">=</span> <span class="sr">/^#?([\w-]+)$/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">idExpr</span> <span class="o">=</span> <span class="sr">/^#/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">tagExpr</span> <span class="o">=</span> <span class="sr">/<([\w:]+)/</span><span class="p">,</span>
|
||||
</div><div class='line'> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="k">return</span> <span class="p">[].</span><span class="nx">slice</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="nx">e</span><span class="p">,</span> <span class="mi">0</span><span class="p">);</span> <span class="p">};</span>
|
||||
</div><div class='line'> <span class="k">try</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">a</span> <span class="o">=</span> <span class="nx">slice</span><span class="p">(</span><span class="nb">document</span><span class="p">.</span><span class="nx">documentElement</span><span class="p">.</span><span class="nx">childNodes</span><span class="p">)[</span><span class="mi">0</span><span class="p">].</span><span class="nx">nodeType</span><span class="p">;</span> <span class="p">}</span>
|
||||
</div><div class='line'> <span class="k">catch</span><span class="p">(</span><span class="nx">e</span><span class="p">){</span> <span class="nx">slice</span> <span class="o">=</span> <span class="kd">function</span> <span class="p">(</span><span class="nx">e</span><span class="p">)</span> <span class="p">{</span> <span class="kd">var</span> <span class="nx">ret</span><span class="o">=</span><span class="p">[];</span> <span class="k">for</span> <span class="p">(</span><span class="kd">var</span> <span class="nx">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">];</span> <span class="nx">i</span><span class="o">++</span><span class="p">)</span>
|
||||
</div><div class='line'> <span class="nx">ret</span><span class="p">.</span><span class="nx">push</span><span class="p">(</span><span class="nx">e</span><span class="p">[</span><span class="nx">i</span><span class="p">]);</span> <span class="k">return</span> <span class="nx">ret</span><span class="p">;</span> <span class="p">};</span> <span class="p">}</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nb">window</span><span class="p">.</span><span class="nx">x$</span> <span class="o">=</span> <span class="nb">window</span><span class="p">.</span><span class="nx">xui</span> <span class="o">=</span> <span class="nx">xui</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">)</span> <span class="p">{</span>
|
||||
</div><div class='line'> <span class="k">return</span> <span class="k">new</span> <span class="nx">xui</span><span class="p">.</span><span class="nx">fn</span><span class="p">.</span><span class="nx">find</span><span class="p">(</span><span class="nx">q</span><span class="p">,</span> <span class="nx">context</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="p">};</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
158
docs/plugins/index.html
Normal file
@ -0,0 +1,158 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Octopress Plugins - Usage & Examples</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Octopress Plugins - Usage & Examples</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-18 00:00:00 -0400" pubdate updated >Jul 18<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Octopress ships with the following plugins. Many have been written specially for Octopress, but some have been selected from the Jekyll community with various changes and improvements.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/plugins/video-tag/">HTML5 Video Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/github-style-codeblock/">Github Style codeblock</a> - <em>for simple lightweight code sharing</em></li>
|
||||
<li><a href="/octopress/docs/plugins/codeblock/">Code Block</a> - <em>for sharing code with titles and links</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-code/">Include Code</a> - <em>embed code from your filesystem with a download link</em></li>
|
||||
<li><a href="/octopress/docs/plugins/gist-tag/">Gist Tag</a> - <em>automatically downloads and embeds Github gists</em></li>
|
||||
<li><a href="/octopress/docs/plugins/image-tag/">Image Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/render-partial/">Render Partial</a> - <em>insert any file into another post or page</em></li>
|
||||
<li><a href="/octopress/docs/plugins/blockquote/">Blockquote</a> - <em>generate beautiful, semantic block quotes</em></li>
|
||||
<li><a href="/octopress/docs/plugins/pullquote/">Pullquote</a> - <em>generate CSS only pull quotes — no duplicate data, no javascript</em></li>
|
||||
<li><a href="/octopress/docs/plugins/category-generator/">Category Generator</a> - <em>generates archive pages for each blog category</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-array/">Include Array</a> - <em>includes an array of partials specified in the _config.yml</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>The following filters are used by Octopress, and are documented as necessary in their source.</p>
|
||||
|
||||
<ul>
|
||||
<li>Octopress filters - <em>liquid filters built just for Octopress</em></li>
|
||||
<li>Sitemap Generator - <em>generates an SEO friendly sitemap.xml</em></li>
|
||||
<li>Compass Compiler - <em>forces Jekyll to compile Compass on each load</em></li>
|
||||
<li>Haml Converter - <em>allows .haml pages to be processed by Jekyll</em></li>
|
||||
<li>Pygments Code - <em>converts code snippets to highlighted code and caches to speed up Jekyll processing</em></li>
|
||||
<li>Titlecase - <em>required by several plugins to automatically generate proper title captalization</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p><a href="https://github.com/imathis/octopress/tree/master/plugins">Octopress plugins source</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
148
docs/plugins/pullquote/index.html
Normal file
@ -0,0 +1,148 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Pullquote</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/pullquote/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Pullquote</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:15:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Octopress offers a CSS only technique for pull quotes, based on the technique by <a href="http://miekd.com/articles/pull-quotes-with-html5-and-css/">Maykel Loomans</a>.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% 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 %}
|
||||
</code></pre>
|
||||
|
||||
<p>Here’s a more realistic example of how you might use a pull quote.
|
||||
<span class='has-pullquote' data-pullquote='pull quotes are merely visual in presentation and should not appear twice in the text. '>
|
||||
When writing longform posts, I find it helpful to include pull quotes to help readers easily identify the topics covered in each section. Some prefer to break things up with lots of headings, and while this seems to be a trend it doesn’t work so well for long form prose.
|
||||
It is important to note that pull quotes are merely visual in presentation and should not appear twice in the text. That is why it a CSS only technique for styling pull quotes is preferable. Octopress includes a handy pull quote plugin to make this easy for you.
|
||||
</span></p>
|
||||
|
||||
<p><strong>Inspect the source</strong> and you’ll see the pulled content appears in the data-pullquote attribute of the paragraph. The pull quote effect is created
|
||||
entirely with CSS, and is supported by all modern browsers as well as IE8 and up.</p>
|
||||
|
||||
<p><a href="/octopress/docs/plugins">« Plugins page</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
155
docs/plugins/render-partial/index.html
Normal file
@ -0,0 +1,155 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Render Partial</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/render-partial/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Render Partial</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 09:14:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Import files on your file system into any blog post or page. As a best practice, be sure these files are included in your site’s repository.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% render_partial path/to/file %}
|
||||
</code></pre>
|
||||
|
||||
<p>The <code>render_partial</code> tag resolves paths to the <code>source</code> directory, so write your paths accordingly.</p>
|
||||
|
||||
<h4>Example Usage 1</h4>
|
||||
|
||||
<p>Perhaps you want to create a readme page for your blog. You have a file at <code>source/readme/index.markdown</code> and the <code>README.markdown</code> for your project is
|
||||
a sibling to your source directory. To import your project’s readme into your readme page, you’d do this:</p>
|
||||
|
||||
<pre><code>{% render_partial ../README.markdown %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example Usage 2</h4>
|
||||
|
||||
<p>You may have two pages which need to share some of the same content. To prevent your partial from being rendered by Jekyll as a page, add an underscore to the
|
||||
beginning of the file name, or put it in a directory that begins with an underscore. For example, if you wanted multiple pages to share a table of contents, you might create <code>source/documentation/_partials/TOC.markdown</code>.
|
||||
Any post or page could import this file like this:</p>
|
||||
|
||||
<pre><code>{% render_partial documentation/TOC.markdown %}
|
||||
</code></pre>
|
||||
|
||||
<p><a href="/octopress/docs/plugins">« Plugins page</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
148
docs/plugins/video-tag/index.html
Normal file
@ -0,0 +1,148 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Video Tag</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/plugins/video-tag/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Video Tag</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-23 17:34:00 -0400" pubdate updated >Jul 23<span>rd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>This plugin makes it easy to insert mp4 encoded HTML5 videos in a post. Octopress ships with javascripts which
|
||||
detect mp4 video support (<a href="http://modernizr.com">using Modernizr</a>) and automatically offer a flash player fallback.</p>
|
||||
|
||||
<h4>Syntax</h4>
|
||||
|
||||
<pre><code>{% video url/to/video [width height] [url/to/poster] %}
|
||||
</code></pre>
|
||||
|
||||
<h4>Example</h4>
|
||||
|
||||
<pre><code>{% video http://s3.imathis.com/video/zero-to-fancy-buttons.mp4 640 320 http://s3.imathis.com/video/zero-to-fancy-buttons.png %}
|
||||
</code></pre>
|
||||
|
||||
<p><video width='640' height='320' preload='none' controls poster=' http://s3.imathis.com/video/zero-to-fancy-buttons.png'><source src='http://s3.imathis.com/video/zero-to-fancy-buttons.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'/></video></p>
|
||||
|
||||
<p>You’re probably using a browser which supports HTML5 video and you’re looking at this page wondering if it really works.
|
||||
Reloading the page with the url hash <a href="#flash-test">#flash-test</a> and you’ll get to see the flash player fallback.</p>
|
||||
|
||||
|
||||
<p><a href="/octopress/docs/plugins">« Plugins page</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
187
docs/setup/index.html
Normal file
@ -0,0 +1,187 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Octopress Setup</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/setup/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Octopress Setup</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-18 00:00:00 -0400" pubdate updated >Jul 18<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p><a href="https://github.com/repositories/new">Create a new repository</a> for your website then
|
||||
open up a terminal and follow along. If you plan to host your site on <a href="http://pages.github.com">Github Pages</a> for a user or organization, make sure the
|
||||
repository is named <code>your_username.github.com</code> or <code>your_organization.github.com</code>.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>mkdir my_octopress_site
|
||||
</div><div class='line'><span class="nb">cd </span>my_octopress_site
|
||||
</div><div class='line'>git init
|
||||
</div><div class='line'>git remote add octopress git://github.com/imathis/octopress.git
|
||||
</div><div class='line'>git pull octopress master
|
||||
</div><div class='line'>git remote add origin your/repository/url
|
||||
</div><div class='line'>git push origin master
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Next, if you’re using Github pages for users or organizations, create a source branch and push to origin source.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>git checkout -b <span class="nb">source</span>
|
||||
</div><div class='line'>git push origin <span class="nb">source</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Next, setup an <a href="http://beginrescueend.com/">RVM</a> and install dependencies.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rvm rvmrc trust
|
||||
</div><div class='line'>rvm reload
|
||||
</div><div class='line'>bundle install
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Install the default Octopress theme,</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>rake install
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<h3>What to Commit?</h3>
|
||||
|
||||
<p>Now that you’ve installed the <code>source</code> and <code>sass</code> directories add them to your git repository, commit and push.</p>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='sh'><div class='line'>git add .
|
||||
</div><div class='line'>git commit -m <span class="s1">'Installed Octopress theme'</span>
|
||||
</div><div class='line'>git push
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<p>Whenever you write a new post, or make changes to your blog, be sure to commit and push those changes.</p>
|
||||
|
||||
<p>See also <a href="/octopress/docs/configuring">Configuring Octopress</a>, <a href="/octopress/docs/blogging/">Blogging with Octopress</a> and <a href="/octopress/docs/deploying/">Deploying Octopress</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
140
docs/theme/index.html
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Theming & Customization</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/theme/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Theming & Customization</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 21:16:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>For now Octopress ships with a single theme in the <code>.themes</code> directory. When you install the Octopress theme, HTML and Javascripts are copied into <code>/source</code> and Sass stylesheets are copied into <code>/sass</code>.
|
||||
You are free to make any changes you like, but I’ve set up a few patterns to make it easy to customize and keep your site up to date with the latest Octopress releases.</p>
|
||||
|
||||
<p>I’ve broken this up into two sections.</p>
|
||||
|
||||
<ol>
|
||||
<li><a href="/octopress/docs/theme/template/">Customizing the Template</a> - <em>Learn how to change the HEAD, sidebar, header, navigation & footer</em></li>
|
||||
<li><a href="/octopress/docs/theme/styles">Changing Styles</a> - <em>Learn how to change the color scheme, layout, and override styles</em></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>Also see <a href="/octopress/docs/updating">Updating Your Blog »</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
237
docs/theme/styles/index.html
vendored
Normal file
@ -0,0 +1,237 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Styles</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/theme/styles/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Styles</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 19:11:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<h2 id="overriding_styles">Overriding Styles</h2>
|
||||
|
||||
|
||||
<p>If you want to add or override styles, edit <code>sass/custom/_styles.css</code>. This stylesheet is imported last, so you can override styles with the cascade.</p>
|
||||
|
||||
<h2 id="customizing_styles">Changing the Color Scheme</h2>
|
||||
|
||||
|
||||
<p>For help choosing colors check out <a href="http://hslpicker.com">HSL Color Picker</a>, an easy to use web based color picker.</p>
|
||||
|
||||
<pre><code># In /sass/base/
|
||||
_theme.scss # All colors are defined here
|
||||
|
||||
# In /sass/custom/ - Change these files for easy customization
|
||||
_colors.scss # Override colors in base/_theme.scss to change color schemes
|
||||
_styles.scss # Easly Override any style (last in the cascade)
|
||||
</code></pre>
|
||||
|
||||
<p>All of the colors for Octopress are defined as Sass variables in <code>/sass/base/_theme.scss</code>.
|
||||
To customize your color scheme edit <code>sass/custom/_colors.scss</code> and override the colors in <code>sass/base/_theme.scss</code>.</p>
|
||||
|
||||
<p>The official Octopress site is using the default ‘classic’ theme with a few minor color changes to the custom colors file. Take a look at this file and you’ll see some lines of sass code that have been commented out.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Custom Colors (sass/custom/_colors.scss)</span><a href='https://github.com/imathis/octopress/tree/master/.themes/classic/sass/custom/_colors.scss'>View on Github </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='scss'><div class='line'><span class="na">$header-bg</span><span class="o">:</span> <span class="mh">#263347</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$subtitle-color</span><span class="o">:</span> <span class="nf">lighten</span><span class="p">(</span><span class="nv">$header-bg</span><span class="o">,</span> <span class="mi">58</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="na">$nav-bg</span><span class="o">:</span> <span class="nf">desaturate</span><span class="p">(</span><span class="nf">lighten</span><span class="p">(</span><span class="mh">#8fc17a</span><span class="o">,</span> <span class="mi">18</span><span class="p">)</span><span class="o">,</span> <span class="mi">5</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="na">$sidebar-bg</span><span class="o">:</span> <span class="nf">desaturate</span><span class="p">(</span><span class="mh">#eceff5</span><span class="o">,</span> <span class="mi">8</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="na">$sidebar-link-color</span><span class="o">:</span> <span class="nf">saturate</span><span class="p">(</span><span class="mh">#526f9a</span><span class="o">,</span> <span class="mi">10</span><span class="p">);</span>
|
||||
</div><div class='line'><span class="na">$sidebar-link-color-hover</span><span class="o">:</span> <span class="nf">darken</span><span class="p">(</span><span class="mh">#7ab662</span><span class="o">,</span> <span class="mi">9</span><span class="p">);</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>The custom colors file has some commented out colors you can The theme file is broken up into sections to make it easier to read through. Here’s a look at the navigation section of <code>sass/base/_theme.scss</code>.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Navigation (sass/base/_theme.scss)</span><a href='https://github.com/imathis/octopress/tree/master/.themes/classic/sass/base/_theme.scss'>View on Github </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='scss'><div class='line'><span class="cm">/* Navigation */</span>
|
||||
</div><div class='line'><span class="na">$nav-bg</span><span class="o">:</span> <span class="mh">#ccc</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$nav-color</span><span class="o">:</span> <span class="nf">darken</span><span class="p">(</span><span class="nv">$nav-bg</span><span class="o">,</span> <span class="mi">38</span><span class="p">)</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$nav-color-hover</span><span class="o">:</span> <span class="nf">darken</span><span class="p">(</span><span class="nv">$nav-color</span><span class="o">,</span> <span class="mi">25</span><span class="p">)</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="nc">...</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>The <code>!default</code> rule lets the variable be overridden if it is defined beforehand.
|
||||
is imported before the <code>_theme.scss</code> it can predefine these colors easily. There are comments to help out with this in the
|
||||
<a href="https://github.com/imathis/octopress/tree/master/.themes/classic/sass/custom/_colors.scss">source</a>.</p>
|
||||
|
||||
<p>Many of the colors in the theme are picked using <a href="http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html">Sass’s color functions</a>.
|
||||
As a result you can pick a new background color for the navigation by setting the <code>$nav-bg</code> variable
|
||||
and the other colors will derived for you. This isn’t perfect, but it should do a decent job with most colors.</p>
|
||||
|
||||
<h2 id="changing_layout">Changing the Layout</h2>
|
||||
|
||||
|
||||
<pre><code># In /sass/base
|
||||
_layout.scss # Responsive layouts are defined here
|
||||
|
||||
# In /sass/custom - Change these files for easy customization
|
||||
_layout.scss # Override settings for base/_layout.scss to change the layout
|
||||
</code></pre>
|
||||
|
||||
<p>Just like with colors, widths in <code>/sass/base/_layout.scss</code> are defined like <code>$max-width: 1200px !default;</code> and can be easily customized
|
||||
by defining them in <code>sass/custom/_layout.scss</code>. Here’s a look at the layout defaults.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Layout Defaults (_layout.scss)</span><a href='https://github.com/imathis/octopress/tree/master/.themes/classic/sass/base/_layout.scss'>view on Github </a></figcaption> <div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
<span class='line'>7</span>
|
||||
<span class='line'>8</span>
|
||||
<span class='line'>9</span>
|
||||
<span class='line'>10</span>
|
||||
<span class='line'>11</span>
|
||||
<span class='line'>12</span>
|
||||
<span class='line'>13</span>
|
||||
<span class='line'>14</span>
|
||||
<span class='line'>15</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='scss'><div class='line'><span class="na">$max-width</span><span class="o">:</span> <span class="mi">1200</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1">// Padding used for layout margins</span>
|
||||
</div><div class='line'><span class="na">$pad-min</span><span class="o">:</span> <span class="mi">18</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$pad-narrow</span><span class="o">:</span> <span class="mi">25</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$pad-medium</span><span class="o">:</span> <span class="mi">35</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$pad-wide</span><span class="o">:</span> <span class="mi">55</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="c1">// Sidebar widths used in media queries</span>
|
||||
</div><div class='line'><span class="na">$sidebar-width-medium</span><span class="o">:</span> <span class="mi">240</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$sidebar-pad-medium</span><span class="o">:</span> <span class="mi">15</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$sidebar-pad-wide</span><span class="o">:</span> <span class="mi">20</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'><span class="na">$sidebar-width-wide</span><span class="o">:</span> <span class="mi">300</span><span class="kt">px</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="na">$indented-lists</span><span class="o">:</span> <span class="n-Pseudo">false</span> <span class="nv">!default</span><span class="p">;</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>These variables are used to calculate the width and padding for the responsive layouts. The <code>$indented-lists</code> variable allows you to
|
||||
choose if you prefer indented or normal lists.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
262
docs/theme/template/index.html
vendored
Normal file
@ -0,0 +1,262 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Theming & Customization</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/theme/template/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Theming & Customization</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 21:16:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Shortly after the 2.0 release Octopress added the <code>source/_includes/custom</code> directory. If you don’t have this, you’ll want to <a href="/octopress/docs/updating">update</a> because it’s really nice.</p>
|
||||
|
||||
<pre><code>source/
|
||||
_includes/ # Main layout partials
|
||||
custom/ # <- Customize head, header, navigation, footer, and sidebar here
|
||||
asides/ # Theme sidebar partials
|
||||
post/ # post metadata, sharing & comment partials
|
||||
_layouts/ # layouts for pages, posts & category archives
|
||||
</code></pre>
|
||||
|
||||
<h2>Changing the <HEAD></h2>
|
||||
|
||||
<p>If you want to add to the <code><HEAD></code>take a look at <code>/source/_includes/custom/head.html</code>.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span><HEAD> (source/_includes/custom/head.html) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="c"><!--Fonts from Google's Web font directory at http://google.com/webfonts --></span>
|
||||
</div><div class='line'><span class="nt"><link</span> <span class="na">href=</span><span class="s">'http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic'</span> <span class="na">rel=</span><span class="s">'stylesheet'</span> <span class="na">type=</span><span class="s">'text/css'</span><span class="nt">></span>
|
||||
</div><div class='line'><span class="nt"><link</span> <span class="na">href=</span><span class="s">'http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic'</span> <span class="na">rel=</span><span class="s">'stylesheet'</span> <span class="na">type=</span><span class="s">'text/css'</span><span class="nt">></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>Here you can easily change or remove the <a href="http://google.com/webfonts">Google Webfonts</a>, insert javascripts, etc.</p>
|
||||
|
||||
<h3>Changing the sidebar</h3>
|
||||
|
||||
<p>Octopress integrates with some <a href="/octopress/docs/configuring/#third_party">3rd party services</a> like Twitter, Pinboard and Delicious which appear in the sidebar.
|
||||
In the <code>_config.yml</code> you can rearrange these, create custom sidebars for each layout, and add your own sidebar sections.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Sidebar configuration (_config.yml) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="l-Scalar-Plain">default_asides</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">asides/recent_posts.html</span><span class="p-Indicator">,</span> <span class="nv">asides/twitter.html</span><span class="p-Indicator">,</span> <span class="nv">asides/delicious.html</span><span class="p-Indicator">,</span> <span class="nv">asides/pinboard.html</span><span class="p-Indicator">]</span>
|
||||
</div><div class='line'><span class="c1"># blog_index_asides:</span>
|
||||
</div><div class='line'><span class="c1"># post_asides:</span>
|
||||
</div><div class='line'><span class="c1"># page_asides:</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>If you want to add a section to your sidebar, create a new file in <code>source/_includes/custom/asides/</code>.
|
||||
Since many people probably want to add an About Me section, there’s already an <code>about.html</code> file in there waiting to be added. Here’s a look.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>About Me (source/_includes/custom/asides/about.html) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="nt"><section></span>
|
||||
</div><div class='line'> <span class="nt"><h1></span>About Me<span class="nt"></h1></span>
|
||||
</div><div class='line'> <span class="nt"><p></span>A little something about me.<span class="nt"></p></span>
|
||||
</div><div class='line'><span class="nt"></section></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>Whenever you add a section to the sidebar, follow this pattern, with a <code><section></code> block and an <code><h1></code> for a title. To add it to the sidebar, edit the <code>_config.yml</code> and add it to the list of asides.</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Sidebar configuration (_config.yml) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='yaml'><div class='line'><span class="l-Scalar-Plain">default_asides</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">asides/recent_posts.html</span><span class="p-Indicator">,</span> <span class="nv">asides/twitter.html</span><span class="p-Indicator">,</span> <span class="nv">asides/delicious.html</span><span class="p-Indicator">,</span> <span class="nv">asides/pinboard.html</span><span class="p-Indicator">]</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">blog_index_asides</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">custom/asides/about.html</span><span class="p-Indicator">,</span> <span class="nv">asides/recent_posts.html</span><span class="p-Indicator">,</span> <span class="nv">asides/twitter.html</span><span class="p-Indicator">,</span> <span class="nv">asides/delicious.html</span><span class="p-Indicator">,</span> <span class="nv">asides/pinboard.html</span><span class="p-Indicator">]</span>
|
||||
</div><div class='line'><span class="l-Scalar-Plain">post_asides</span><span class="p-Indicator">:</span> <span class="p-Indicator">[</span><span class="nv">custom/asides/about.html</span><span class="p-Indicator">,</span> <span class="nv">asides/recent_posts.html</span><span class="p-Indicator">,</span> <span class="nv">asides/twitter.html</span><span class="p-Indicator">,</span> <span class="nv">asides/delicious.html</span><span class="p-Indicator">,</span> <span class="nv">asides/pinboard.html</span><span class="p-Indicator">]</span>
|
||||
</div><div class='line'><span class="c1"># page_asides:</span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>In the configuration above I’ve added the about page to the blog index and post pages. Since <code>page_asides</code> isn’t being set, it will inherit from the default list.</p>
|
||||
|
||||
<h2>Changing the Header, Navigation & Footer</h2>
|
||||
|
||||
<p>These are sections of the site that are most likely to be customized. You can edit each in <code>/source/_includes/custom/</code> and your changes will be preserved across updates.</p>
|
||||
|
||||
<h3>Changing the Header</h3>
|
||||
|
||||
<p>The header title and subtitle should be configured in the <code>_config.yml</code> If you want to make other changes to the header, edit <code>/source/_includes/custom/header.html</code> which looks like this:</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Header (source/_includes/custom/header.html) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
<span class='line'>5</span>
|
||||
<span class='line'>6</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="nt"><hgroup></span>
|
||||
</div><div class='line'> <span class="nt"><h1><a</span> <span class="na">href=</span><span class="s">"{{ root_url }}/"</span><span class="nt">></span>{{ site.title }}<span class="nt"></a></h1></span>
|
||||
</div><div class='line'> {% if site.subtitle %}
|
||||
</div><div class='line'> <span class="nt"><h2></span>{{ site.subtitle }}<span class="nt"></h2></span>
|
||||
</div><div class='line'> {% endif %}
|
||||
</div><div class='line'><span class="nt"></hgroup></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<h3>Changing the Navigation</h3>
|
||||
|
||||
<p>To change or add links to the main navigation, edit <code>/source/_includes/custom/navigation.html</code> which looks like this:</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Navigation (source/_includes/custom/navigation.html) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="nt"><ul</span> <span class="na">role=</span><span class="s">main-navigation</span><span class="nt">></span>
|
||||
</div><div class='line'> <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"{{ root_url }}/"</span><span class="nt">></span>Blog<span class="nt"></a></li></span>
|
||||
</div><div class='line'> <span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"{{ root_url }}/blog/archives"</span><span class="nt">></span>Archives<span class="nt"></a></li></span>
|
||||
</div><div class='line'><span class="nt"></ul></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>The <code>href</code> for each link begins with <code>{{ root_url }}</code> (this helps Octopress write urls differently if a site is deployed to a subdirectory).
|
||||
If you’re deploying your site to a subdirectory like <code>yoursite.com/octopress</code> you’ll want to add this to any links you add.</p>
|
||||
|
||||
<h3>Changing the Footer</h3>
|
||||
|
||||
<p>You can customize the footer in <code>source/_includes/custom/footer.html</code> which looks like this:</p>
|
||||
|
||||
<div><figure role=code><figcaption><span>Footer (source/_includes/custom/footer.html) </span></figcaption>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
<span class='line'>4</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='html'><div class='line'><span class="nt"><p></span>
|
||||
</div><div class='line'> Copyright <span class="ni">&copy;</span> {{ site.time | date: "%Y" }} - {{ site.author }} -
|
||||
</div><div class='line'> <span class="nt"><span</span> <span class="na">class=</span><span class="s">"credit"</span><span class="nt">></span>Powered by <span class="nt"><a</span> <span class="na">href=</span><span class="s">"http://octopress.org"</span><span class="nt">></span>Octopress<span class="nt"></a></span></span>
|
||||
</div><div class='line'><span class="nt"></p></span>
|
||||
</div></code></pre></td></tr></table></div></figure></div>
|
||||
|
||||
|
||||
<p>Change this however you like, but be cool and keep the Octopress link in there.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
189
docs/updating/index.html
Normal file
@ -0,0 +1,189 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Updating Octopress</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/docs/updating/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Updating Octopress</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-22 19:46:00 -0400" pubdate updated >Jul 22<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p><a href="/octopress/docs/theme/">« Previous, Theming & Customization</a></p>
|
||||
|
||||
<p>In the open source world, version control generally takes care of staying current with the latest releases, but once you’ve begun to customize your code,
|
||||
merging in updates isn’t always what you want. As a result I’ve come up with the following pattern for Octopress:</p>
|
||||
|
||||
<ol>
|
||||
<li><p>Plugins, configs, gemfiles, <code>.themes</code>, <code>.gitignore</code> and the <code>Rakefile</code> are all tracked for easy to updating and collaborating.</p></li>
|
||||
<li><p>The install process copies layouts, pages, javascripts, and styles out of the <code>.themes</code> directory. Once you’ve installed a theme, none of the
|
||||
files under <code>source</code> or <code>sass</code> are in any repository except your own. This way you can change them to your liking without worrying about merging in
|
||||
updates and screwing up your changes.</p></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>When you pull down changes from the Octopress repository, the latest layouts, pages, javascripts and styles are merged into your <code>.themes</code> directory.
|
||||
To update your site, you must manually merge in the new files. Before you do a spit-take, I came up with something to help out with this.</p>
|
||||
|
||||
<h2>Updating Sass</h2>
|
||||
|
||||
<p>If you’ve pulled in changes and you want to update your <code>/sass</code> directory, run this.</p>
|
||||
|
||||
<pre><code>rake update_style
|
||||
</code></pre>
|
||||
|
||||
<p>This task will:</p>
|
||||
|
||||
<ol>
|
||||
<li>Move <code>/sass</code> to <code>/sass.old</code></li>
|
||||
<li>Copy <code>.themes/classic/sass</code> to <code>/sass</code></li>
|
||||
<li>Replace <code>/sass/custom/</code> with <code>/sass.old/custom/</code></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>This way if you keep your theme changes in <code>/sass/custom</code> you’ll be able to upgrade your stylesheets without losing any of your work. If you made changes elsewhere, you can copy them back them from <code>/sass.old</code>.
|
||||
After you have the update in place, you can remove the <code>/sass.old</code> directory.</p>
|
||||
|
||||
<h2>Updating Source</h2>
|
||||
|
||||
<p>If you’ve pulled in changes and you want to update your <code>/source</code> directory, run this.</p>
|
||||
|
||||
<pre><code>rake update_source
|
||||
</code></pre>
|
||||
|
||||
<p>This task will:</p>
|
||||
|
||||
<ol>
|
||||
<li>Move <code>/source</code> to <code>/source.old</code></li>
|
||||
<li>Copy <code>.themes/classic/source</code> to <code>/source</code></li>
|
||||
<li>Copy back everything in <code>/source.old</code> (<code>cp -rn</code> - without replacing )</li>
|
||||
<li>Replace <code>/source/_includes/navigation.html</code> with <code>/source.old/_includes/navigation.html</code> (because it commonly has changes).</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<p>This way all of the files you’ve added, eg. <code>_posts</code>, <code>about.html</code> etc. will be preserved while all files tracked by Octopress (except for the navigation partial) will be updated.
|
||||
If you made changes elsewhere, you can copy them back them from <code>/source.old</code>. After you have the update in place, you can remove the <code>/source.old</code> directory.</p>
|
||||
|
||||
<h2>That’s It?</h2>
|
||||
|
||||
<p>Yep. I figured this is the simplest thing that could possibly work. I don’t like the idea of having blog files change if someone wants to update their plugins,
|
||||
and I haven’t yet figured out a better way. If you have a better idea, I’d love some <a href="http://convore.com/octopress/ideas">help</a> improving this.</p>
|
||||
|
||||
<p><a href="/octopress/docs/blogging">Next, Blogging With Octopress »</a></p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
20
downloads/code/javascripts/test.js
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
sample javascript from xui
|
||||
*/
|
||||
|
||||
var undefined,
|
||||
xui,
|
||||
window = this,
|
||||
string = new String('string'),
|
||||
document = window.document,
|
||||
simpleExpr = /^#?([\w-]+)$/,
|
||||
idExpr = /^#/,
|
||||
tagExpr = /<([\w:]+)/,
|
||||
slice = function (e) { return [].slice.call(e, 0); };
|
||||
try { var a = slice(document.documentElement.childNodes)[0].nodeType; }
|
||||
catch(e){ slice = function (e) { var ret=[]; for (var i=0; e[i]; i++)
|
||||
ret.push(e[i]); return ret; }; }
|
||||
|
||||
window.x$ = window.xui = xui = function(q, context) {
|
||||
return new xui.fn.find(q, context);
|
||||
};
|
BIN
favicon.png
Normal file
After Width: | Height: | Size: 400 B |
BIN
fonts/bebasneue-web.eot
Normal file
23
fonts/bebasneue-web.svg
Normal file
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>
|
||||
This is a custom SVG webfont generated by Font Squirrel.
|
||||
Copyright : Copyright c 2010 by Ryoichi Tsunekawa All rights reserved
|
||||
Designer : Ryoichi Tsunekawa
|
||||
Foundry : Ryoichi Tsunekawa
|
||||
</metadata>
|
||||
<defs>
|
||||
<font id="BebasNeueRegular" horiz-adv-x="1501" >
|
||||
<font-face units-per-em="2048" ascent="1638" descent="-410" />
|
||||
<missing-glyph horiz-adv-x="500" />
|
||||
<glyph unicode="C" horiz-adv-x="790" d="M63 344v746q0 174 86.5 267t250 93t249.5 -93t86 -267v-140h-213v154q0 141 -116.5 141t-116.5 -141v-774q0 -139 116.5 -139.5t116.5 139.5v205h213v-191q0 -174 -86 -267t-249.5 -93t-250 93t-86.5 267z" />
|
||||
<glyph unicode="E" horiz-adv-x="753" d="M82 0v1434h614v-205h-389v-400h309v-204h-309v-420h389v-205h-614z" />
|
||||
<glyph unicode="O" horiz-adv-x="811" d="M63 344v746q0 172 88.5 266t254 94t254 -94t88.5 -266v-746q0 -172 -88.5 -266t-254 -94t-254 94t-88.5 266zM289 330q0 -141 116.5 -141.5t116.5 141.5v774q0 141 -116.5 141t-116.5 -141v-774z" />
|
||||
<glyph unicode="P" horiz-adv-x="772" d="M82 0v1434h332q336 0 336 -355v-186q0 -354 -336 -354h-107v-539h-225zM307 743h107q55 0 82.5 31t27.5 105v215q0 74 -27.5 104.5t-82.5 30.5h-107v-486z" />
|
||||
<glyph unicode="R" horiz-adv-x="823" d="M82 0v1434h340q174 0 254 -81t80 -249v-113q0 -221 -148 -291q150 -63 150 -305v-221q0 -117 24 -174h-229q-20 61 -21 176v225q0 98 -34.5 140.5t-112.5 42.5h-78v-584h-225zM307 788h88q68 0 101.5 35t33.5 117v141q0 147 -114 148h-109v-441z" />
|
||||
<glyph unicode="S" horiz-adv-x="765" d="M47 344v88h213v-102q0 -139 117 -139.5t117 139.5q0 80 -45.5 150.5t-109.5 127.5l-130 120q-66 62 -111 155.5t-45 206.5q0 174 84 267t248 93t248 -93t84 -267v-46h-213v60q0 141 -112.5 141t-112.5 -141q0 -59 24.5 -112.5t63.5 -96.5t86 -85t93 -88t85 -98.5 t63.5 -124t24.5 -155.5q0 -174 -86 -267t-250 -93t-250 93t-86 267z" />
|
||||
<glyph unicode="T" horiz-adv-x="729" d="M16 1229v205h697v-205h-236v-1229h-225v1229h-236z" />
|
||||
<glyph unicode="" horiz-adv-x="500" d="M0 0v0v0v0v0z" />
|
||||
</font>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 2.1 KiB |
BIN
fonts/bebasneue-web.ttf
Normal file
BIN
fonts/bebasneue-web.woff
Normal file
189
help/index.html
Normal file
@ -0,0 +1,189 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Octopress Help</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/help/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Octopress Help</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-02 14:03:00 -0400" pubdate updated >Aug 2<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>Don’t feel like reading the documentation? You’ve come to the right place! Actually no, please don’t do that. If you have questions or problems I’m happy to help, but be sure you’ve read through some of these pages first.</p>
|
||||
|
||||
<ol>
|
||||
<li><a href="/octopress/docs/setup/">Getting Started</a> - <em>A Guide for installing Octopress and its dependencies.</em></li>
|
||||
<li><a href="/octopress/docs/configuring/">Configuring Octopress</a> - <em>This is important and easy. Be sure to give it a look.</em></li>
|
||||
<li><a href="/octopress/docs/blogging/">Blogging with Octopress</a> - <em>Learn how to create pages and posts.</em></li>
|
||||
<li><a href="/octopress/docs/deploying/">Deploying</a> - <em>A walkthrough for different deployment strategies.</em></li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2>Getting/Giving Help</h2>
|
||||
|
||||
<p>If you have a question, or if you love helping others, Join me on:</p>
|
||||
|
||||
<ol>
|
||||
<li><strong>IRC</strong> in the #octopress channel on irc.freenode.net</li>
|
||||
<li><strong><a href="http://convore.com/octopress/">Convore</a></strong> a web chat system. If I’m not there, leave a message.</li>
|
||||
<li><strong><a href="http://github.com/imathis/octopress/issues">Post an issue</a></strong> on Github’s issue tracker.</li>
|
||||
</ol>
|
||||
|
||||
|
||||
<h2>Contributing</h2>
|
||||
|
||||
<p>If you want to help out, <a href="http://github.com/imathis/octopress">fork Octopress on Github</a> and send me a pull request.
|
||||
This site is also part of the Octopress project and if you find errors you can <a href="http://github.com/imathis/octopress/issues/">post issues</a>
|
||||
or send me a pull request for the <a href="http://github.com/imathis/octopress/tree/site">site branch</a>.</p>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
BIN
images/bird_32_gray.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/bird_32_gray_fail.png
Normal file
After Width: | Height: | Size: 615 B |
BIN
images/code_bg.png
Normal file
After Width: | Height: | Size: 239 B |
BIN
images/dotted-border.png
Normal file
After Width: | Height: | Size: 99 B |
BIN
images/email.png
Normal file
After Width: | Height: | Size: 301 B |
BIN
images/line-tile.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
images/logo.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
images/noise.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
images/rss.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
images/search.png
Normal file
After Width: | Height: | Size: 333 B |
236
index.html
@ -1 +1,235 @@
|
||||
My Octopress Page is coming soon …
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div class="blog-index">
|
||||
|
||||
|
||||
|
||||
<article>
|
||||
|
||||
<header>
|
||||
|
||||
<h1 class="entry-title"><a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a></h1>
|
||||
|
||||
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-23 18:05:00 -0400" pubdate updated >Jul 23<span>rd</span>, 2011</time>
|
||||
|
||||
|
||||
<time class="updated" datetime="2011-07-24 10:15:00 -0400"></time>
|
||||
|
||||
</p>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
<div class="entry-content"><p>Octopress is a framework designed by <a href="http://brandonmathis.com">Brandon Mathis</a> for <a href="http://github.com/mojombo/jekyll">Jekyll</a>, the blog aware static site generator powering Github Pages.
|
||||
To start blogging with with Jekyll, you have to write your own HTML templates, CSS, Javascripts and set up your configuration. But with Octopress
|
||||
All of that is already taken care of. Simply <a href="https://github.com/imathis/octopress">clone or fork Octopress</a>, install dependencies and the theme, and you’re set.</p>
|
||||
|
||||
<h2>What’s new in 2.0?</h2>
|
||||
|
||||
<p>Short answer: Everything. Octopress is now based on <a href="http://github.com/mojombo/jekyll">mojombo/jekyll</a> has been completely rewritten from the ground up with a mountain of goodies.</p>
|
||||
|
||||
<p>Octopress comes with:</p>
|
||||
|
||||
<ul>
|
||||
<li>A semantic HTML5 template</li>
|
||||
<li>A Mobile friendly responsive (<a href="http://stuffandnonsense.co.uk/projects/320andup/">320 and up</a>) layout (rotate, or resize your browser and see)</li>
|
||||
<li>Built in 3rd party support for Twitter, Google Plus One, Disqus Comments, Pinboard, Delicious, and Google Analytics</li>
|
||||
<li>An easy deployment strategy using Github pages or Rsync</li>
|
||||
<li>Built in support for POW and Rack servers</li>
|
||||
<li>Easy theming with Compass and Sass</li>
|
||||
<li>A Beautiful <a href="http://ethanschoonover.com/solarized">Solarized</a> syntax highlighting</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>Be sure to check out the <a href="/octopress/docs">documentation</a> to get the full scoop.</p>
|
||||
|
||||
<h3>Plugins FTW</h3>
|
||||
|
||||
<p>Most of these plugins have been created just for Octopress, but a few come from the Jekyll community along with improvements and updates.</p>
|
||||
|
||||
<ul>
|
||||
<li><a href="/octopress/docs/plugins/video-tag">HTML5 Video Tag</a> - <em>easily post mp4 HTML5 video with flash player fallback</em></li>
|
||||
<li><a href="/octopress/docs/plugins/codeblock">Code Block</a> - <em>for easy inline code sharing</em></li>
|
||||
<li><a href="/octopress/docs/plugins/include-code">Include Code</a> - <em>embed code from your filesystem</em></li>
|
||||
<li><a href="/octopress/docs/plugins/gist-tag">Gist Tag</a> - <em>automatically downloads and embeds Github gists</em></li>
|
||||
<li><a href="/octopress/docs/plugins/image-tag">Image Tag</a> - <em>easily post images with class names and titles</em></li>
|
||||
<li><a href="/octopress/docs/plugins/render-partial">Render Partial</a> - <em>insert any file into another post or page</em></li>
|
||||
<li><a href="/octopress/docs/plugins/blockquote">Blockquote</a> - <em>generate beautiful, semantic block quotes</em></li>
|
||||
<li><a href="/octopress/docs/plugins/pullquote">Pullquote</a> - <em>generate CSS only pull quotes — no duplicate data, no javascript</em></li>
|
||||
<li><a href="/octopress/docs/plugins/category-generator">Category Generator</a> - <em>generates archive pages for each blog category</em></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<p>For more plugins check out the <a href="/octopress/docs/plugins">plugin list</a></p>
|
||||
|
||||
<h2>Ready to Get Started?</h2>
|
||||
|
||||
<p>Octopress is really easy to set up and deploy, <a href="/octopress/docs/setup">start here</a>.</p>
|
||||
|
||||
<p>For now that’s it. Check out the <a href="/octopress/docs">docs</a>, <a href="http://github.com/imathis/octopress">kick the tires</a>, post <a href="http://github.com/imathis/octopress/issues">issues</a> send me <a href="http://convore.com/octopress/support">support requests</a> and tell all your friends.</p>
|
||||
|
||||
<p>Oh, and if you like, follow <a href="http://twitter.com/octopress">@octopress</a> and <a href="http://twitter.com/imathis">@imathis</a> on Twitter.</p>
|
||||
</div>
|
||||
<footer>
|
||||
<a rel="full-article" href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Read on →</a>
|
||||
</footer>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
<nav role="pagination">
|
||||
<div>
|
||||
|
||||
<a href="/octopress/blog/archives">Blog Archives</a>
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = 'octopress';
|
||||
(function () {
|
||||
var s = document.createElement('script'); s.async = true;
|
||||
s.type = 'text/javascript';
|
||||
s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
|
||||
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
||||
}());
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<aside role=sidebar>
|
||||
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
2
javascripts/ender.js
Normal file
1497
javascripts/libs/ender.js
Normal file
85
javascripts/libs/jXHR.js
Normal file
@ -0,0 +1,85 @@
|
||||
// jXHR.js (JSON-P XHR)
|
||||
// v0.1 (c) Kyle Simpson
|
||||
// MIT License
|
||||
|
||||
(function(global){
|
||||
var SETTIMEOUT = global.setTimeout, // for better compression
|
||||
doc = global.document,
|
||||
callback_counter = 0;
|
||||
|
||||
global.jXHR = function() {
|
||||
var script_url,
|
||||
script_loaded,
|
||||
jsonp_callback,
|
||||
scriptElem,
|
||||
publicAPI = null;
|
||||
|
||||
function removeScript() { try { scriptElem.parentNode.removeChild(scriptElem); } catch (err) { } }
|
||||
|
||||
function reset() {
|
||||
script_loaded = false;
|
||||
script_url = "";
|
||||
removeScript();
|
||||
scriptElem = null;
|
||||
fireReadyStateChange(0);
|
||||
}
|
||||
|
||||
function ThrowError(msg) {
|
||||
try { publicAPI.onerror.call(publicAPI,msg,script_url); } catch (err) { throw new Error(msg); }
|
||||
}
|
||||
|
||||
function handleScriptLoad() {
|
||||
if ((this.readyState && this.readyState!=="complete" && this.readyState!=="loaded") || script_loaded) { return; }
|
||||
this.onload = this.onreadystatechange = null; // prevent memory leak
|
||||
script_loaded = true;
|
||||
if (publicAPI.readyState !== 4) ThrowError("Script failed to load ["+script_url+"].");
|
||||
removeScript();
|
||||
}
|
||||
|
||||
function fireReadyStateChange(rs,args) {
|
||||
args = args || [];
|
||||
publicAPI.readyState = rs;
|
||||
if (typeof publicAPI.onreadystatechange === "function") publicAPI.onreadystatechange.apply(publicAPI,args);
|
||||
}
|
||||
|
||||
publicAPI = {
|
||||
onerror:null,
|
||||
onreadystatechange:null,
|
||||
readyState:0,
|
||||
open:function(method,url){
|
||||
reset();
|
||||
internal_callback = "cb"+(callback_counter++);
|
||||
(function(icb){
|
||||
global.jXHR[icb] = function() {
|
||||
try { fireReadyStateChange.call(publicAPI,4,arguments); }
|
||||
catch(err) {
|
||||
publicAPI.readyState = -1;
|
||||
ThrowError("Script failed to run ["+script_url+"].");
|
||||
}
|
||||
global.jXHR[icb] = null;
|
||||
};
|
||||
})(internal_callback);
|
||||
script_url = url.replace(/=\?/,"=jXHR."+internal_callback);
|
||||
fireReadyStateChange(1);
|
||||
},
|
||||
send:function(){
|
||||
SETTIMEOUT(function(){
|
||||
scriptElem = doc.createElement("script");
|
||||
scriptElem.setAttribute("type","text/javascript");
|
||||
scriptElem.onload = scriptElem.onreadystatechange = function(){handleScriptLoad.call(scriptElem);};
|
||||
scriptElem.setAttribute("src",script_url);
|
||||
doc.getElementsByTagName("head")[0].appendChild(scriptElem);
|
||||
},0);
|
||||
fireReadyStateChange(2);
|
||||
},
|
||||
setRequestHeader:function(){}, // noop
|
||||
getResponseHeader:function(){return "";}, // basically noop
|
||||
getAllResponseHeaders:function(){return [];} // ditto
|
||||
};
|
||||
|
||||
reset();
|
||||
|
||||
return publicAPI;
|
||||
};
|
||||
})(window);
|
||||
|
298
javascripts/libs/swfobject-dynamic.js
Normal file
@ -0,0 +1,298 @@
|
||||
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
|
||||
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
||||
*/
|
||||
|
||||
var swfobject = function() {
|
||||
|
||||
var UNDEF = "undefined",
|
||||
OBJECT = "object",
|
||||
SHOCKWAVE_FLASH = "Shockwave Flash",
|
||||
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
|
||||
FLASH_MIME_TYPE = "application/x-shockwave-flash",
|
||||
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
|
||||
|
||||
win = window,
|
||||
doc = document,
|
||||
nav = navigator,
|
||||
|
||||
plugin = false,
|
||||
regObjArr = [],
|
||||
objIdArr = [],
|
||||
storedAltContent,
|
||||
storedAltContentId,
|
||||
storedCallbackFn,
|
||||
storedCallbackObj,
|
||||
autoHideShow = true,
|
||||
|
||||
/* Centralized function for browser feature detection
|
||||
- User agent string detection is only used when no good alternative is possible
|
||||
- Is executed directly for optimal performance
|
||||
*/
|
||||
ua = function() {
|
||||
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
|
||||
u = nav.userAgent.toLowerCase(),
|
||||
p = nav.platform.toLowerCase(),
|
||||
windows = p ? /win/.test(p) : /win/.test(u),
|
||||
mac = p ? /mac/.test(p) : /mac/.test(u),
|
||||
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
|
||||
ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
|
||||
playerVersion = [0,0,0],
|
||||
d = null;
|
||||
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
|
||||
d = nav.plugins[SHOCKWAVE_FLASH].description;
|
||||
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
|
||||
plugin = true;
|
||||
ie = false; // cascaded feature detection for Internet Explorer
|
||||
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
|
||||
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
|
||||
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
|
||||
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
|
||||
}
|
||||
}
|
||||
else if (typeof win.ActiveXObject != UNDEF) {
|
||||
try {
|
||||
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
|
||||
if (a) { // a will return null when ActiveX is disabled
|
||||
d = a.GetVariable("$version");
|
||||
if (d) {
|
||||
ie = true; // cascaded feature detection for Internet Explorer
|
||||
d = d.split(" ")[1].split(",");
|
||||
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
|
||||
}()
|
||||
|
||||
|
||||
/* Main function
|
||||
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
|
||||
*/
|
||||
function main() {
|
||||
if (plugin) { testPlayerVersion(); }
|
||||
else { matchVersions(); }
|
||||
}
|
||||
|
||||
/* Detect the Flash Player version for non-Internet Explorer browsers
|
||||
- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
|
||||
a. Both release and build numbers can be detected
|
||||
b. Avoid wrong descriptions by corrupt installers provided by Adobe
|
||||
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
|
||||
- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
|
||||
*/
|
||||
function testPlayerVersion() {
|
||||
var b = doc.getElementsByTagName("body")[0];
|
||||
var o = createElement(OBJECT);
|
||||
o.setAttribute("type", FLASH_MIME_TYPE);
|
||||
var t = b.appendChild(o);
|
||||
if (t) {
|
||||
var counter = 0;
|
||||
(function(){
|
||||
if (typeof t.GetVariable != UNDEF) {
|
||||
var d = t.GetVariable("$version");
|
||||
if (d) {
|
||||
d = d.split(" ")[1].split(",");
|
||||
ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
|
||||
}
|
||||
}
|
||||
else if (counter < 10) {
|
||||
counter++;
|
||||
setTimeout(arguments.callee, 10);
|
||||
return;
|
||||
}
|
||||
b.removeChild(o);
|
||||
t = null;
|
||||
matchVersions();
|
||||
})();
|
||||
}
|
||||
else {
|
||||
matchVersions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Cross-browser dynamic SWF creation
|
||||
*/
|
||||
function createSWF(attObj, parObj, id) {
|
||||
var r, el = getElementById(id);
|
||||
if (ua.wk && ua.wk < 312) { return r; }
|
||||
if (el) {
|
||||
if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
|
||||
attObj.id = id;
|
||||
}
|
||||
if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
|
||||
var att = "";
|
||||
for (var i in attObj) {
|
||||
if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
|
||||
if (i.toLowerCase() == "data") {
|
||||
parObj.movie = attObj[i];
|
||||
}
|
||||
else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
|
||||
att += ' class="' + attObj[i] + '"';
|
||||
}
|
||||
else if (i.toLowerCase() != "classid") {
|
||||
att += ' ' + i + '="' + attObj[i] + '"';
|
||||
}
|
||||
}
|
||||
}
|
||||
var par = "";
|
||||
for (var j in parObj) {
|
||||
if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
|
||||
par += '<param name="' + j + '" value="' + parObj[j] + '" />';
|
||||
}
|
||||
}
|
||||
el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
|
||||
objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
|
||||
r = getElementById(attObj.id);
|
||||
}
|
||||
else { // well-behaving browsers
|
||||
var o = createElement(OBJECT);
|
||||
o.setAttribute("type", FLASH_MIME_TYPE);
|
||||
for (var m in attObj) {
|
||||
if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
|
||||
if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
|
||||
o.setAttribute("class", attObj[m]);
|
||||
}
|
||||
else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
|
||||
o.setAttribute(m, attObj[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var n in parObj) {
|
||||
if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
|
||||
createObjParam(o, n, parObj[n]);
|
||||
}
|
||||
}
|
||||
el.parentNode.replaceChild(o, el);
|
||||
r = o;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
function createObjParam(el, pName, pValue) {
|
||||
var p = createElement("param");
|
||||
p.setAttribute("name", pName);
|
||||
p.setAttribute("value", pValue);
|
||||
el.appendChild(p);
|
||||
}
|
||||
|
||||
/* Cross-browser SWF removal
|
||||
- Especially needed to safely and completely remove a SWF in Internet Explorer
|
||||
*/
|
||||
/* Functions to optimize JavaScript compression
|
||||
*/
|
||||
function getElementById(id) {
|
||||
var el = null;
|
||||
try {
|
||||
el = doc.getElementById(id);
|
||||
}
|
||||
catch (e) {}
|
||||
return el;
|
||||
}
|
||||
|
||||
function createElement(el) {
|
||||
return doc.createElement(el);
|
||||
}
|
||||
|
||||
/* Flash Player and SWF content version matching
|
||||
*/
|
||||
function hasPlayerVersion(rv) {
|
||||
var pv = ua.pv, v = rv.split(".");
|
||||
v[0] = parseInt(v[0], 10);
|
||||
v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
|
||||
v[2] = parseInt(v[2], 10) || 0;
|
||||
return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
|
||||
}
|
||||
|
||||
|
||||
/* Filter to avoid XSS attacks
|
||||
*/
|
||||
function urlEncodeIfNecessary(s) {
|
||||
var regex = /[\\\"<>\.;]/;
|
||||
var hasBadChars = regex.exec(s) != null;
|
||||
return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
|
||||
}
|
||||
|
||||
return {
|
||||
/* Public API
|
||||
- Reference: http://code.google.com/p/swfobject/wiki/documentation
|
||||
*/
|
||||
|
||||
embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, flashvarsObj, parObj, attObj, callbackFn) {
|
||||
var callbackObj = {success:false, id:replaceElemIdStr};
|
||||
if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
|
||||
widthStr += ""; // auto-convert to string
|
||||
heightStr += "";
|
||||
var att = {};
|
||||
if (attObj && typeof attObj === OBJECT) {
|
||||
for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
|
||||
att[i] = attObj[i];
|
||||
}
|
||||
}
|
||||
att.data = swfUrlStr;
|
||||
att.width = widthStr;
|
||||
att.height = heightStr;
|
||||
var par = {};
|
||||
if (parObj && typeof parObj === OBJECT) {
|
||||
for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
|
||||
par[j] = parObj[j];
|
||||
}
|
||||
}
|
||||
if (flashvarsObj && typeof flashvarsObj === OBJECT) {
|
||||
for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
|
||||
if (typeof par.flashvars != UNDEF) {
|
||||
par.flashvars += "&" + k + "=" + flashvarsObj[k];
|
||||
}
|
||||
else {
|
||||
par.flashvars = k + "=" + flashvarsObj[k];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hasPlayerVersion(swfVersionStr)) { // create SWF
|
||||
var obj = createSWF(att, par, replaceElemIdStr);
|
||||
callbackObj.success = true;
|
||||
callbackObj.ref = obj;
|
||||
}
|
||||
if (callbackFn) { callbackFn(callbackObj); }
|
||||
}
|
||||
else if (callbackFn) { callbackFn(callbackObj); }
|
||||
},
|
||||
|
||||
ua: ua,
|
||||
|
||||
getFlashPlayerVersion: function() {
|
||||
return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
|
||||
},
|
||||
|
||||
hasFlashPlayerVersion: hasPlayerVersion,
|
||||
|
||||
createSWF: function(attObj, parObj, replaceElemIdStr) {
|
||||
if (ua.w3) {
|
||||
return createSWF(attObj, parObj, replaceElemIdStr);
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
|
||||
getQueryParamValue: function(param) {
|
||||
var q = doc.location.search || doc.location.hash;
|
||||
if (q) {
|
||||
if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
|
||||
if (param == null) {
|
||||
return urlEncodeIfNecessary(q);
|
||||
}
|
||||
var pairs = q.split("&");
|
||||
for (var i = 0; i < pairs.length; i++) {
|
||||
if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
|
||||
return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
};
|
||||
}();
|
5
javascripts/modernizr-2.0.js
vendored
Normal file
142
javascripts/octopress.js
Normal file
@ -0,0 +1,142 @@
|
||||
function getNav(){
|
||||
var mobileNav = $('nav[role=navigation] fieldset[role=site-search]').after('<fieldset role="mobile-nav"></fieldset>').next().append('<select></select>');
|
||||
mobileNav.children('select').append('<option value="">Navigate…</option>');
|
||||
$($('ul[role=main-navigation] a')).each(function(link) {
|
||||
mobileNav.children('select').append('<option value="'+link.href+'">• '+link.text+'</option>')
|
||||
});
|
||||
mobileNav.children('select').bind('change', function(event){
|
||||
if (event.target.value) window.location.href = event.target.value;
|
||||
});
|
||||
}
|
||||
function addSidebarToggler() {
|
||||
$('#content').append('<span class="toggle-sidebar"></span>');
|
||||
$('.toggle-sidebar').bind('click', function(e){
|
||||
e.preventDefault();
|
||||
if($('body').hasClass('collapse-sidebar')){
|
||||
$('body').removeClass('collapse-sidebar');
|
||||
} else {
|
||||
$('body').addClass('collapse-sidebar');
|
||||
}
|
||||
});
|
||||
sections = $('aside[role=sidebar] > section')
|
||||
if(sections.length > 1){
|
||||
sections.each(function(section, index){
|
||||
if ((sections.length >= 3) && index % 3 == 0) {
|
||||
$(section).addClass("first");
|
||||
}
|
||||
count = ((index +1) % 2) ? "odd" : "even";
|
||||
$(section).addClass(count);
|
||||
});
|
||||
}
|
||||
if(sections.length >= 3){ $('aside[role=sidebar]').addClass('thirds') }
|
||||
}
|
||||
function testFeatures() {
|
||||
var features = ['maskImage'];
|
||||
$(features).map(function(feature){
|
||||
if (Modernizr.testAllProps(feature)) {
|
||||
$('html').addClass(feature);
|
||||
} else {
|
||||
$('html').addClass('no-'+feature);
|
||||
}
|
||||
});
|
||||
if ("placeholder" in document.createElement("input")) {
|
||||
$('html').addClass('placeholder');
|
||||
} else {
|
||||
$('html').addClass('no-placeholder');
|
||||
}
|
||||
}
|
||||
|
||||
function addCodeLineNumbers(){
|
||||
if (navigator.appName == 'Microsoft Internet Explorer') { return }
|
||||
$('div.gist-highlight').each(function(code){
|
||||
var tableStart = '<table cellpadding="0" cellspacing="0"><tbody><tr><td class="gutter">';
|
||||
var lineNumbers = '<pre class="line-numbers">';
|
||||
var tableMiddle = '</pre></td><td class="code" width="100%">';
|
||||
var tableEnd = '</td></tr></tbody></table>';
|
||||
var count = $('div.line', code).length;
|
||||
for (i=1;i<=count; i++){
|
||||
lineNumbers += '<span class="line">'+i+'</span>\n';
|
||||
}
|
||||
table = tableStart + lineNumbers + tableMiddle + '<pre>'+$('pre', code).html()+'</pre>' + tableEnd;
|
||||
$(code).html(table);
|
||||
});
|
||||
}
|
||||
|
||||
function flashVideoFallback(){
|
||||
var flashplayerlocation = "/assets/jwplayer/player.swf",
|
||||
flashplayerskin = "/assets/jwplayer/glow/glow.xml";
|
||||
$('video').each(function(video){
|
||||
video = $(video);
|
||||
if(!Modernizr.video.h264 && swfobject.getFlashPlayerVersion() || window.location.hash.indexOf("flash-test") != -1){
|
||||
video.children('source[src$=mp4]').first().map(function(source){;
|
||||
var src = $(source).attr('src'),
|
||||
id = 'video_'+Math.round(1 + Math.random()*(100000)),
|
||||
width = video.attr('width'),
|
||||
height = parseInt(video.attr('height')) + 30;
|
||||
video.after('<div class="flash-video"><div><div id='+id+'>');
|
||||
swfobject.embedSWF(flashplayerlocation, id, width, height + 30, "9.0.0",
|
||||
{ file : src, image : video.attr('poster'), skin : flashplayerskin } ,
|
||||
{ movie : src, wmode : "opaque", allowfullscreen : "true" });
|
||||
});
|
||||
video.remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function wrapFlashVideos(){
|
||||
$('object').each(function(object){
|
||||
object = $(object);
|
||||
if(object.children('param[name=movie]')){
|
||||
var wrapper = object.before('<div class="flash-video"><div>').previous();
|
||||
$(wrapper).children().append(object);
|
||||
}
|
||||
});
|
||||
$('iframe[src*=vimeo],iframe[src*=youtube]').each(function(iframe){
|
||||
iframe = $(iframe);
|
||||
var wrapper = iframe.before('<div class="flash-video"><div>').previous();
|
||||
$(wrapper).children().append(iframe);
|
||||
});
|
||||
}
|
||||
|
||||
$.domReady(function(){
|
||||
testFeatures();
|
||||
wrapFlashVideos();
|
||||
flashVideoFallback();
|
||||
addCodeLineNumbers();
|
||||
getNav();
|
||||
addSidebarToggler();
|
||||
});
|
||||
|
||||
// iOS scaling bug fix
|
||||
// Rewritten version
|
||||
// By @mathias, @cheeaun and @jdalton
|
||||
// Source url: https://gist.github.com/901295
|
||||
(function(doc) {
|
||||
var addEvent = 'addEventListener',
|
||||
type = 'gesturestart',
|
||||
qsa = 'querySelectorAll',
|
||||
scales = [1, 1],
|
||||
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
|
||||
function fix() {
|
||||
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
|
||||
doc.removeEventListener(type, fix, true);
|
||||
}
|
||||
if ((meta = meta[meta.length - 1]) && addEvent in doc) {
|
||||
fix();
|
||||
scales = [.25, 1.6];
|
||||
doc[addEvent](type, fix, true);
|
||||
}
|
||||
}(document));
|
||||
|
||||
/*! SWFObject v2.2 modified by Brandon Mathis to contain only what is necessary to dynamically embed flash objects
|
||||
* Uncompressed source in javascripts/libs/swfobject-dynamic.js
|
||||
* <http://code.google.com/p/swfobject/>
|
||||
released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
|
||||
*/
|
||||
var swfobject=function(){function s(a,b,d){var q,k=n(d);if(g.wk&&g.wk<312)return q;if(k){if(typeof a.id==l)a.id=d;if(g.ie&&g.win){var e="",c;for(c in a)if(a[c]!=Object.prototype[c])c.toLowerCase()=="data"?b.movie=a[c]:c.toLowerCase()=="styleclass"?e+=' class="'+a[c]+'"':c.toLowerCase()!="classid"&&(e+=" "+c+'="'+a[c]+'"');c="";for(var f in b)b[f]!=Object.prototype[f]&&(c+='<param name="'+f+'" value="'+b[f]+'" />');k.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+e+">"+c+
|
||||
"</object>";q=n(a.id)}else{f=i.createElement(o);f.setAttribute("type",m);for(var h in a)a[h]!=Object.prototype[h]&&(h.toLowerCase()=="styleclass"?f.setAttribute("class",a[h]):h.toLowerCase()!="classid"&&f.setAttribute(h,a[h]));for(e in b)b[e]!=Object.prototype[e]&&e.toLowerCase()!="movie"&&(a=f,c=e,h=b[e],d=i.createElement("param"),d.setAttribute("name",c),d.setAttribute("value",h),a.appendChild(d));k.parentNode.replaceChild(f,k);q=f}}return q}function n(a){var b=null;try{b=i.getElementById(a)}catch(d){}return b}
|
||||
function t(a){var b=g.pv,a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:!1}function u(a){return/[\\\"<>\.;]/.exec(a)!=null&&typeof encodeURIComponent!=l?encodeURIComponent(a):a}var l="undefined",o="object",m="application/x-shockwave-flash",v=window,i=document,j=navigator,g=function(){var a=typeof i.getElementById!=l&&typeof i.getElementsByTagName!=l&&typeof i.createElement!=l,
|
||||
b=j.userAgent.toLowerCase(),d=j.platform.toLowerCase(),g=d?/win/.test(d):/win/.test(b),d=d?/mac/.test(d):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,k=!+"\u000b1",e=[0,0,0],c=null;if(typeof j.plugins!=l&&typeof j.plugins["Shockwave Flash"]==o){if((c=j.plugins["Shockwave Flash"].description)&&!(typeof j.mimeTypes!=l&&j.mimeTypes[m]&&!j.mimeTypes[m].enabledPlugin))k=!1,c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),e[0]=parseInt(c.replace(/^(.*)\..*$/,"$1"),
|
||||
10),e[1]=parseInt(c.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(c)?parseInt(c.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}else if(typeof v.ActiveXObject!=l)try{var f=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(f&&(c=f.GetVariable("$version")))k=!0,c=c.split(" ")[1].split(","),e=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)]}catch(h){}return{w3:a,pv:e,wk:b,ie:k,win:g,mac:d}}();return{embedSWF:function(a,b,d,i,k,e,c,f,h){var j={success:!1,id:b};if(g.w3&&!(g.wk&&g.wk<312)&&
|
||||
a&&b&&d&&i&&k){d+="";i+="";var p={};if(f&&typeof f===o)for(var m in f)p[m]=f[m];p.data=a;p.width=d;p.height=i;a={};if(c&&typeof c===o)for(var n in c)a[n]=c[n];if(e&&typeof e===o)for(var r in e)typeof a.flashvars!=l?a.flashvars+="&"+r+"="+e[r]:a.flashvars=r+"="+e[r];if(t(k))b=s(p,a,b),j.success=!0,j.ref=b}h&&h(j)},ua:g,getFlashPlayerVersion:function(){return{major:g.pv[0],minor:g.pv[1],release:g.pv[2]}},hasFlashPlayerVersion:t,createSWF:function(a,b,d){if(g.w3)return s(a,b,d)},getQueryParamValue:function(a){var b=
|
||||
i.location.search||i.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return u(b);for(var b=b.split("&"),d=0;d<b.length;d++)if(b[d].substring(0,b[d].indexOf("="))==a)return u(b[d].substring(b[d].indexOf("=")+1))}return""}}}();
|
56
javascripts/pinboard.js
Normal file
@ -0,0 +1,56 @@
|
||||
function pinboardNS_fetch_script(url) {
|
||||
//document.writeln('<s'+'cript type="text/javascript" src="' + url + '"></s'+'cript>');
|
||||
(function(){
|
||||
var pinboardLinkroll = document.createElement('script');
|
||||
pinboardLinkroll.type = 'text/javascript';
|
||||
pinboardLinkroll.async = true;
|
||||
pinboardLinkroll.src = url;
|
||||
document.getElementsByTagName('head')[0].appendChild(pinboardLinkroll);
|
||||
})();
|
||||
}
|
||||
|
||||
function pinboardNS_show_bmarks(r) {
|
||||
var lr = new Pinboard_Linkroll();
|
||||
lr.set_items(r);
|
||||
lr.show_bmarks();
|
||||
}
|
||||
|
||||
function Pinboard_Linkroll() {
|
||||
var items;
|
||||
|
||||
this.set_items = function(i) {
|
||||
this.items = i;
|
||||
}
|
||||
this.show_bmarks = function() {
|
||||
var lines = [];
|
||||
for (var i = 0; i < this.items.length; i++) {
|
||||
var item = this.items[i];
|
||||
var str = this.format_item(item);
|
||||
lines.push(str);
|
||||
}
|
||||
document.getElementById(linkroll).innerHTML = lines.join("\n");
|
||||
}
|
||||
this.cook = function(v) {
|
||||
return v.replace('<', '<').replace('>', '>>');
|
||||
}
|
||||
|
||||
this.format_item = function(it) {
|
||||
var str = "<li class=\"pin-item\">";
|
||||
if (!it.d) { return; }
|
||||
str += "<p><a class=\"pin-title\" href=\"" + this.cook(it.u) + "\">" + this.cook(it.d) + "</a>";
|
||||
if (it.n) {
|
||||
str += "<span class=\"pin-description\">" + this.cook(it.n) + "</span>\n";
|
||||
}
|
||||
if (it.t.length > 0) {
|
||||
for (var i = 0; i < it.t.length; i++) {
|
||||
var tag = it.t[i];
|
||||
str += " <a class=\"pin-tag\" href=\"http://pinboard.in/u:"+ this.cook(it.a) + "/t:" + this.cook(tag) + "\">" + this.cook(tag).replace(/^\s+|\s+$/g, '') + "</a> ";
|
||||
}
|
||||
}
|
||||
str += "</p></li>\n";
|
||||
return str;
|
||||
}
|
||||
}
|
||||
Pinboard_Linkroll.prototype = new Pinboard_Linkroll();
|
||||
pinboardNS_fetch_script("http://feeds.pinboard.in/json/v1/u:"+pinboard_user+"/?cb=pinboardNS_show_bmarks\&count="+pinboard_count);
|
||||
|
82
javascripts/twitter.js
Normal file
@ -0,0 +1,82 @@
|
||||
// JSON-P Twitter fetcher for Octopress
|
||||
// (c) Brandon Mathis // MIT Lisence
|
||||
function getTwitterFeed(user, count, replies) {
|
||||
var feed = new jXHR();
|
||||
|
||||
feed.onerror = function (msg,url) {
|
||||
$('#tweets li.loading').addClass('error').text("Twitter's busted");
|
||||
}
|
||||
feed.onreadystatechange = function(data){
|
||||
if (feed.readyState === 4) {
|
||||
var tweets = new Array();
|
||||
var i = 0;
|
||||
for (i in data){
|
||||
if(tweets.length < count){
|
||||
if(replies || data[i].in_reply_to_user_id == null){
|
||||
tweets.push(data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
showTwitterFeed(tweets, user);
|
||||
}
|
||||
};
|
||||
feed.open("GET","http://twitter.com/statuses/user_timeline/"+user+".json?trim_user=true&count="+(parseInt(count)+60)+"&callback=?");
|
||||
feed.send();
|
||||
}
|
||||
|
||||
function showTwitterFeed(tweets, twitter_user){
|
||||
var timeline = document.getElementById('tweets');
|
||||
timeline.innerHTML='';
|
||||
for (t in tweets){
|
||||
timeline.innerHTML+='<li>'+'<p>'+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a>'+linkifyTweet(tweets[t].text.replace(/\n/g, '<br>'))+'</p>'+'</li>';
|
||||
}
|
||||
}
|
||||
function linkifyTweet(text){
|
||||
return text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '<a href="$1$2">$2</a>')
|
||||
.replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>')
|
||||
.replace(/(^|\W)#(\w+)/g, '$1<a href="http://search.twitter.com/search?q=%23$2">#$2</a>');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// jXHR.js (JSON-P XHR) | v0.1 (c) Kyle Simpson | MIT License | http://mulletxhr.com/
|
||||
// uncompressed version available in source/javascripts/libs/jXHR.js
|
||||
(function(c){var b=c.setTimeout,d=c.document,a=0;c.jXHR=function(){var e,g,n,h,m=null;function l(){try{h.parentNode.removeChild(h)}catch(o){}}function k(){g=false;e="";l();h=null;i(0)}function f(p){try{m.onerror.call(m,p,e)}catch(o){throw new Error(p)}}function j(){if((this.readyState&&this.readyState!=="complete"&&this.readyState!=="loaded")||g){return}this.onload=this.onreadystatechange=null;g=true;if(m.readyState!==4){f("Script failed to load ["+e+"].")}l()}function i(o,p){p=p||[];m.readyState=o;if(typeof m.onreadystatechange==="function"){m.onreadystatechange.apply(m,p)}}m={onerror:null,onreadystatechange:null,readyState:0,open:function(p,o){k();internal_callback="cb"+(a++);(function(q){c.jXHR[q]=function(){try{i.call(m,4,arguments)}catch(r){m.readyState=-1;f("Script failed to run ["+e+"].")}c.jXHR[q]=null}})(internal_callback);e=o.replace(/=\?/,"=jXHR."+internal_callback);i(1)},send:function(){b(function(){h=d.createElement("script");h.setAttribute("type","text/javascript");h.onload=h.onreadystatechange=function(){j.call(h)};h.setAttribute("src",e);d.getElementsByTagName("head")[0].appendChild(h)},0);i(2)},setRequestHeader:function(){},getResponseHeader:function(){return""},getAllResponseHeaders:function(){return[]}};k();return m}})(window);
|
||||
|
||||
|
||||
/* Sky Slavin, Ludopoli. MIT license. * based on JavaScript Pretty Date * Copyright (c) 2008 John Resig (jquery.com) * Licensed under the MIT license. */
|
||||
|
||||
function prettyDate(time) {
|
||||
if (navigator.appName == 'Microsoft Internet Explorer') {
|
||||
return "<span>∞</span>"; // because IE date parsing isn't fun.
|
||||
};
|
||||
|
||||
var say = {};
|
||||
say.just_now = " now",
|
||||
say.minute_ago = "1m",
|
||||
say.minutes_ago = "m",
|
||||
say.hour_ago = "1h",
|
||||
say.hours_ago = "h",
|
||||
say.yesterday = "1d",
|
||||
say.days_ago = "d",
|
||||
say.weeks_ago = "w"
|
||||
|
||||
var current_date = new Date();
|
||||
current_date_time = current_date.getTime();
|
||||
current_date_full = current_date_time + (1 * 60000);
|
||||
var date = new Date(time);
|
||||
var diff = ((current_date_full - date.getTime()) / 1000);
|
||||
var day_diff = Math.floor(diff / 86400);
|
||||
|
||||
if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31) return;
|
||||
|
||||
return day_diff == 0 && (
|
||||
diff < 60 && say.just_now ||
|
||||
diff < 120 && say.minute_ago ||
|
||||
diff < 3600 && Math.floor(diff / 60) + say.minutes_ago ||
|
||||
diff < 7200 && say.hour_ago ||
|
||||
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
|
||||
day_diff == 1 && say.yesterday ||
|
||||
day_diff < 7 && day_diff + say.days_ago ||
|
||||
day_diff < 31 && Math.ceil(day_diff / 7) + say.weeks_ago;
|
||||
}
|
135
sitemap.xml
Normal file
@ -0,0 +1,135 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>
|
||||
<url>
|
||||
<loc>http://octopress.org/blog/2011/07/23/octopress-20-surfaces/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/blog/archives/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/blog/</loc>
|
||||
<lastmod>2011-08-11T17:05:50-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/blogging/code/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/blogging/code/test/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/blogging/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/blogging/plugins/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/configuring/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/deploying/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/blockquote/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/category-generator/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/codeblock/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/gist-tag/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/github-style-codeblock/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/image-tag/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/include-array/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/include-code/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/pullquote/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/render-partial/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/plugins/video-tag/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/setup/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/theme/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/theme/styles/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/theme/template/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/docs/updating/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/help/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/</loc>
|
||||
<lastmod>2011-08-11T17:05:50-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/test/code/markdown/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/test/code/textile/</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/test/haml/</loc>
|
||||
<lastmod>2011-08-11T17:05:50-04:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>http://octopress.org/test/video.html</loc>
|
||||
<lastmod>2011-08-10T18:20:38-04:00</lastmod>
|
||||
</url>
|
||||
</urlset>
|
1
stylesheets/screen.css
Normal file
143
test/code/markdown/index.html
Normal file
@ -0,0 +1,143 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Code</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/test/code/markdown/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="no-sidebar" >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Code</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-07-30 08:45:00 -0400" pubdate updated >Jul 30<span>th</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='coffeescript'><div class='line'><span class="nv">Tweets = </span><span class="mi">1</span>
|
||||
</div><div class='line'>
|
||||
</div><div class='line'><span class="nv">module.exports = </span><span class="nx">Tweets</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
<div class="highlight"><table cellpadding="0" cellspacing="0"><tr><td class="gutter"><pre class="line-numbers"><span class='line'>1</span>
|
||||
<span class='line'>2</span>
|
||||
<span class='line'>3</span>
|
||||
</pre></td><td class='code' width='100%'><pre><code class='coffeescript'><div class='line'><span class="nv">Tweets = </span><span class="mi">1</span>
|
||||
</div><div class='line'><span class="nx">foo</span> <span class="o">&&</span> <span class="nx">bar</span>
|
||||
</div><div class='line'><span class="nv">module.exports = </span><span class="nx">Tweets</span>
|
||||
</div></code></pre></td></tr></table></div>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
219
test/code/textile/index.html
Normal file
@ -0,0 +1,219 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Textile</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/test/code/textile/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Textile</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 08:13:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<pre><code>Back tick code blocks are not supported for Textile.
|
||||
Try HTML or Markdown instead or use the codeblock tag.
|
||||
|
||||
{% codeblock coffeescript %}
|
||||
Your code snippet
|
||||
{% endcodeblock %}</code></pre>
|
||||
<pre><code>Back tick code blocks are not supported for Textile.
|
||||
Try HTML or Markdown instead or use the codeblock tag.
|
||||
|
||||
{% codeblock coffeescript %}
|
||||
Your code snippet
|
||||
{% endcodeblock %}</code></pre>
|
||||
|
||||
<footer>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-01 08:13:00 -0400" pubdate updated >Aug 1<span>st</span>, 2011</time>
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<div class="sharing">
|
||||
|
||||
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://octopress.org/test/code/textile/index.html" data-via="octopress" data-counturl="http://octopress.org/test/code/textile/index.html" >Tweet</a>
|
||||
|
||||
|
||||
<g:plusone size="medium"></g:plusone>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</footer>
|
||||
|
||||
</article>
|
||||
|
||||
<section>
|
||||
<h1>Comments</h1>
|
||||
<div id="disqus_thread"><div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = 'octopress';
|
||||
var disqus_identifier = 'http://octopress.org/test/code/textile/index.html';
|
||||
var disqus_url = 'http://octopress.org/test/code/textile/index.html';
|
||||
//var disqus_developer = 1;
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
209
test/haml/index.html
Normal file
@ -0,0 +1,209 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: Haml</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/test/haml/index.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">Haml</h1>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-02 11:48:00 -0400" pubdate updated >Aug 2<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
</p>
|
||||
</header>
|
||||
<p>will it work? <img class='' src='/octopress/images/logo.png' width='' height='' alt='' title=''></p>
|
||||
|
||||
|
||||
<footer>
|
||||
<p class="meta">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<time datetime="2011-08-02 11:48:00 -0400" pubdate updated >Aug 2<span>nd</span>, 2011</time>
|
||||
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<div class="sharing">
|
||||
|
||||
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://octopress.org/test/haml/index.html" data-via="octopress" data-counturl="http://octopress.org/test/haml/index.html" >Tweet</a>
|
||||
|
||||
|
||||
<g:plusone size="medium"></g:plusone>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</footer>
|
||||
|
||||
</article>
|
||||
|
||||
<section>
|
||||
<h1>Comments</h1>
|
||||
<div id="disqus_thread"><div id="disqus_thread"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = 'octopress';
|
||||
var disqus_identifier = 'http://octopress.org/test/haml/index.html';
|
||||
var disqus_url = 'http://octopress.org/test/haml/index.html';
|
||||
//var disqus_developer = 1;
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
168
test/video.html
Normal file
@ -0,0 +1,168 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
|
||||
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
|
||||
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Octopress: HTML5 Video + Flash Replcement test</title>
|
||||
<meta name="author" content="Brandon Mathis">
|
||||
|
||||
|
||||
<!-- http://t.co/dKP3o1e -->
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
|
||||
|
||||
<link rel="canonical" href="http://octopress.org/test/video.html"/>
|
||||
<link href="/octopress/favicon.png" rel="shortcut icon" />
|
||||
<link href="/octopress/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
|
||||
<script src="/octopress/javascripts/modernizr-2.0.js"></script>
|
||||
<script src="http://s3.amazonaws.com/ender-js/jeesh.min.js"></script>
|
||||
<script src="/octopress/javascripts/octopress.js" type="text/javascript"></script>
|
||||
|
||||
<link href="/octopress/octopress/atom.xml" rel="alternate" title="Octopress" type="application/atom+xml"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-10876422-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
|
||||
script.src = 'https://apis.google.com/js/plusone.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
(function(){
|
||||
var twitterWidgets = document.createElement('script');
|
||||
twitterWidgets.type = 'text/javascript';
|
||||
twitterWidgets.async = true;
|
||||
twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
|
||||
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
|
||||
})();
|
||||
</script>
|
||||
|
||||
|
||||
<!--Fonts from Google's Web font directory at http://google.com/webfonts -->
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
|
||||
<body >
|
||||
<header><hgroup>
|
||||
<h1><a href="/octopress/">Octopress</a></h1>
|
||||
|
||||
<h2>A blogging framework for hackers.</h2>
|
||||
|
||||
</hgroup>
|
||||
|
||||
</header>
|
||||
<nav role=navigation><ul role=subscription data-subscription="rss">
|
||||
<li><a href="/octopress/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
|
||||
|
||||
</ul>
|
||||
<form action="http://google.com/search" method="get">
|
||||
<fieldset role="site-search">
|
||||
<input type="hidden" name="q" value="site:octopress.org" />
|
||||
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
|
||||
</fieldset>
|
||||
</form>
|
||||
<ul role=main-navigation>
|
||||
<li><a href="/octopress/">Blog</a></li>
|
||||
<li><a href="/octopress/docs">Documentation</a></li>
|
||||
<li><a href="/octopress/help">Help</a></li>
|
||||
<li><a href="http://github.com/imathis/octopress">Source</a></li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
<div id="main">
|
||||
<div id="content">
|
||||
<div>
|
||||
<article>
|
||||
<header>
|
||||
<h1 class="entry-title">HTML5 Video + Flash Replcement Test</h1>
|
||||
|
||||
</header>
|
||||
<video width='640' height='320' preload='none' controls poster=' http://s3.imathis.com/video/zero-to-fancy-buttons.png'><source src='http://s3.imathis.com/video/zero-to-fancy-buttons.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'/></video>
|
||||
|
||||
<p>You’re probably using a browser which supports HTML5 video and you’re looking at this page wondering if it really works.
|
||||
Reloading the page with the url hash <a href="#flash-test">#flash-test</a> and you’ll get to see the flash player fallback.</p>
|
||||
|
||||
<h3>Here’s a flash video embed</h3>
|
||||
<iframe src="http://player.vimeo.com/video/18481132?title=0&byline=0&portrait=0" width="400" height="225" frameborder="0"></iframe><p><a href="http://vimeo.com/18481132">Freelance Whales - Enzymes</a> from <a href="http://vimeo.com/neuefilms">NEUE</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
|
||||
|
||||
<h3>A Vimeo embed</h3>
|
||||
<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=18481132&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=18481132&server=vimeo.com&show_title=0&show_byline=0&show_portrait=0&color=00adef&fullscreen=1&autoplay=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><p><a href="http://vimeo.com/18481132">Freelance Whales - Enzymes</a> from <a href="http://vimeo.com/neuefilms">NEUE</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
|
||||
|
||||
<h3>A YouTube embed</h3>
|
||||
<iframe width="560" height="349" src="http://www.youtube.com/embed/mpaPBCBjSVc" frameborder="0" allowfullscreen></iframe>
|
||||
|
||||
|
||||
</article>
|
||||
|
||||
</div>
|
||||
|
||||
<aside role=sidebar>
|
||||
|
||||
<section>
|
||||
<h1>Recent Posts</h1>
|
||||
<ul id="recent_posts">
|
||||
|
||||
<li class="post">
|
||||
<a href="/octopress/blog/2011/07/23/octopress-20-surfaces/">Octopress 2.0 Surfaces</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Latest Tweets</h1>
|
||||
<ul id="tweets">
|
||||
<li class="loading">Status updating…</li>
|
||||
</ul>
|
||||
<script type="text/javascript">
|
||||
$.domReady(function(){
|
||||
getTwitterFeed("octopress", 4, false);
|
||||
});
|
||||
</script>
|
||||
<script src="/octopress/javascripts/twitter.js" type="text/javascript"> </script>
|
||||
|
||||
<a href="http://twitter.com/octopress" class="twitter-follow-button" data-width="208px" data-show-count="false">Follow @octopress</a>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</aside>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><p>
|
||||
Copyright © 2011 - Brandon Mathis -
|
||||
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
|
||||
</p>
|
||||
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|