mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-01 10:05:55 +00:00
add rss feed for blog, overhaul blog generator
This commit is contained in:
parent
ce588e1dec
commit
a64c7e2641
13 changed files with 179 additions and 104 deletions
7
Makefile
7
Makefile
|
|
@ -6,14 +6,14 @@ MIN_JAVASCRIPTS=assets/blog.min.js assets/gitter.min.js assets/jquery-serializeO
|
|||
assets/request.min.js assets/showdown.min.js assets/storage-polyfill.min.js assets/store.min.js \
|
||||
assets/strftime.min.js assets/tmpl.min.js
|
||||
|
||||
POSTS=$(shell echo _blog/*.html)
|
||||
POSTS=$(shell echo _blog/published/*.html)
|
||||
|
||||
all: proj blog combine
|
||||
|
||||
proj: projects.json templates/proj/index.html templates/proj/proj/index.html
|
||||
./build.js
|
||||
|
||||
blog: _blog/posts.json templates/blog/index.html templates/blog/post.html $(POSTS)
|
||||
blog: _blog/blog.json templates/blog/index.html templates/blog/post.html $(POSTS)
|
||||
@echo
|
||||
./blog.rb _blog blog
|
||||
|
||||
|
|
@ -36,10 +36,11 @@ publish: publish_blog publish_proj index.html
|
|||
publish assets
|
||||
publish blog
|
||||
publish proj
|
||||
scp blog/posts.json bohodev.net:discussd/posts.json
|
||||
|
||||
clean:
|
||||
rm -rf proj/*
|
||||
rm -rf blog/*
|
||||
rm assets/*.min.js
|
||||
|
||||
.PHONY: blog
|
||||
.PHONY: proj
|
||||
|
|
|
|||
187
blog.rb
187
blog.rb
|
|
@ -1,69 +1,144 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'time'
|
||||
require 'rubygems'
|
||||
require 'builder'
|
||||
require 'json'
|
||||
require 'rdiscount'
|
||||
require 'mustache'
|
||||
require 'rdiscount'
|
||||
|
||||
srcdir = ARGV.shift.to_s
|
||||
destdir = ARGV.shift.to_s
|
||||
|
||||
unless File.directory?(srcdir) && File.directory?(destdir)
|
||||
puts 'usage: blog.rb <source dir> <dest dir>'
|
||||
exit 1
|
||||
def main
|
||||
srcdir = ARGV.shift.to_s
|
||||
destdir = ARGV.shift.to_s
|
||||
unless File.directory?(srcdir) && File.directory?(destdir)
|
||||
puts 'usage: blog.rb <source dir> <dest dir>'
|
||||
exit 1
|
||||
end
|
||||
Blag.go! srcdir, destdir
|
||||
end
|
||||
|
||||
template = File.read(File.join('templates', 'blog', 'post.html'))
|
||||
class Blag
|
||||
def self.go! src, dest
|
||||
self.new(src, dest).generate!
|
||||
end
|
||||
|
||||
# read posts
|
||||
posts_file = File.join(srcdir, 'posts.json')
|
||||
Posts = JSON.parse(File.read(posts_file))
|
||||
posts = Posts['published'].map do |filename|
|
||||
lines = File.readlines(File.join(srcdir, filename))
|
||||
post = { :filename => filename }
|
||||
loop do
|
||||
line = lines.shift.strip
|
||||
m = line.match(/(\w+):/)
|
||||
if m && param = m[1].downcase
|
||||
post[param.to_sym] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip
|
||||
elsif line.match(/^----\s*$/)
|
||||
lines.shift while lines.first.strip.empty?
|
||||
break
|
||||
else
|
||||
puts "ignoring unknown header: #{line}"
|
||||
def initialize src, dest
|
||||
@src = src
|
||||
@dest = dest
|
||||
read_blog
|
||||
end
|
||||
|
||||
def generate!
|
||||
generate_posts
|
||||
generate_index
|
||||
generate_rss
|
||||
generate_posts_json
|
||||
end
|
||||
|
||||
def generate_index
|
||||
template = File.read(File.join('templates', 'blog', 'index.html'))
|
||||
# generate landing page
|
||||
index_template = File.read(File.join('templates', 'blog', 'index.html'))
|
||||
index_html = Mustache.render(index_template, { :posts => posts,
|
||||
:post => posts.first,
|
||||
:previous => posts[1],
|
||||
:filename => posts.first[:filename],
|
||||
:comments => posts.first[:comments]
|
||||
})
|
||||
File.open(File.join(@dest, 'index.html'), 'w') {|f| f.puts(index_html) }
|
||||
end
|
||||
|
||||
def generate_posts
|
||||
template = File.read(File.join('templates', 'blog', 'post.html'))
|
||||
posts.each_with_index do |post, i|
|
||||
post[:html] = Mustache.render(template, { :title => post[:title],
|
||||
:post => post,
|
||||
:previous => i < posts.length - 1 && posts[i + 1],
|
||||
:next => i > 0 && posts[i - 1],
|
||||
:filename => post[:filename],
|
||||
:comments => post[:comments]
|
||||
})
|
||||
File.open(File.join(@dest, post[:filename]), 'w') {|f| f.puts(post[:html]) }
|
||||
end
|
||||
end
|
||||
post[:content] = lines.join
|
||||
post[:body] = RDiscount.new(post[:content]).to_html
|
||||
# comments on by default
|
||||
post[:comments] = true if post[:comments].nil?
|
||||
post
|
||||
|
||||
def generate_posts_json
|
||||
json = JSON.generate({ :published => posts.map {|p| p[:filename]} })
|
||||
File.open(File.join(@dest, 'posts.json'), 'w') { |f| f.puts(json) }
|
||||
end
|
||||
|
||||
def generate_rss
|
||||
File.open(File.join(@dest, 'rss'), 'w') { |f| f.puts(rss.to_s) }
|
||||
end
|
||||
|
||||
def posts
|
||||
prefix = File.join(@src, 'published') + '/'
|
||||
@posts ||= Dir[File.join(prefix, '*')].sort.reverse.map do |filename|
|
||||
lines = File.readlines(filename)
|
||||
post = { :filename => filename.sub(prefix, '') }
|
||||
loop do
|
||||
line = lines.shift.strip
|
||||
m = line.match(/(\w+):/)
|
||||
if m && param = m[1].downcase
|
||||
post[param.to_sym] = line.sub(Regexp.new('^' + param + ':\s*', 'i'), '').strip
|
||||
elsif line.match(/^----\s*$/)
|
||||
lines.shift while lines.first.strip.empty?
|
||||
break
|
||||
else
|
||||
puts "ignoring unknown header: #{line}"
|
||||
end
|
||||
end
|
||||
post[:content] = lines.join
|
||||
post[:body] = RDiscount.new(post[:content]).to_html
|
||||
post[:rfc822] = Time.parse(post[:date]).rfc822
|
||||
post[:url] = @url + '/' + post[:filename]
|
||||
# comments on by default
|
||||
post[:comments] = true if post[:comments].nil?
|
||||
post
|
||||
end
|
||||
end
|
||||
|
||||
def rss
|
||||
xml = Builder::XmlMarkup.new
|
||||
xml.instruct! :xml, :version => '1.0'
|
||||
xml.rss :version => '2.0' do
|
||||
xml.channel do
|
||||
xml.title @title
|
||||
xml.description @subtitle
|
||||
xml.link @url
|
||||
xml.pubDate @posts.first[:rfc822]
|
||||
|
||||
posts.each do |post|
|
||||
xml.item do
|
||||
xml.title post[:title]
|
||||
xml.description post[:subtitle]
|
||||
xml.pubDate post[:rfc822]
|
||||
xml.link post[:url]
|
||||
xml.guid post[:url]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
xml
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def blog_file
|
||||
File.join(@src, 'blog.json')
|
||||
end
|
||||
|
||||
def read_blog
|
||||
blog = JSON.parse(File.read(blog_file))
|
||||
@title = blog['title']
|
||||
@subtitle = blog['subtitle']
|
||||
@url = blog['url']
|
||||
end
|
||||
|
||||
def rss_file
|
||||
File.join(@dest, 'rss')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# generate posts
|
||||
posts.each_with_index do |post, i|
|
||||
post[:html] = Mustache.render(template, { :title => post[:title],
|
||||
:post => post,
|
||||
:previous => i < posts.length - 1 && posts[i + 1],
|
||||
:next => i > 0 && posts[i - 1],
|
||||
:filename => post[:filename],
|
||||
:comments => post[:comments]
|
||||
})
|
||||
end
|
||||
|
||||
# generate landing page
|
||||
index_template = File.read(File.join('templates', 'blog', 'index.html'))
|
||||
index_html = Mustache.render(index_template, { :posts => posts,
|
||||
:post => posts.first,
|
||||
:previous => posts[1],
|
||||
:filename => posts.first[:filename],
|
||||
:comments => posts.first[:comments]
|
||||
})
|
||||
|
||||
# write landing page
|
||||
File.open(File.join(destdir, 'index.html'), 'w') {|f| f.puts(index_html) }
|
||||
|
||||
# write posts
|
||||
posts.each do |post|
|
||||
File.open(File.join(destdir, post[:filename]), 'w') {|f| f.puts(post[:html]) }
|
||||
end
|
||||
main if $0 == __FILE__
|
||||
|
|
|
|||
11
blog.sh
11
blog.sh
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [[ ! -d _blog ]]; then
|
||||
git clone git://github.com/samsonjs/blog.git _blog
|
||||
else
|
||||
cd _blog
|
||||
git pull
|
||||
cd ..
|
||||
fi
|
||||
|
||||
./blog.rb _blog
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>Using Emacs to Develop Mojo Apps for WebOS :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
@ -18,7 +19,7 @@ _gaq.push( ['_setAccount', 'UA-214054-5']
|
|||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "using-emacs-to-develop-mojo-apps-for-webos.html"
|
||||
SJS.filename = "2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -29,7 +30,7 @@ SJS.filename = "using-emacs-to-develop-mojo-apps-for-webos.html"
|
|||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=using-emacs-to-develop-mojo-apps-for-webos.html>Using Emacs to Develop Mojo Apps for WebOS</a></h1>
|
||||
<h1><a href=2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html>Using Emacs to Develop Mojo Apps for WebOS</a></h1>
|
||||
<time>November 21, 2009</time>
|
||||
</header>
|
||||
<p>
|
||||
|
|
@ -152,7 +153,7 @@ SJS.filename = "using-emacs-to-develop-mojo-apps-for-webos.html"
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=next href=working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby →</a>
|
||||
<a id=next href=2010-01-17_working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby →</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -162,7 +163,7 @@ SJS.filename = "using-emacs-to-develop-mojo-apps-for-webos.html"
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=using-emacs-to-develop-mojo-apps-for-webos.html>
|
||||
<input name=post type=hidden value=2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>Working with C-style structs in Ruby :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
@ -18,7 +19,7 @@ _gaq.push( ['_setAccount', 'UA-214054-5']
|
|||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "working-with-c-style-structs-in-ruby.html"
|
||||
SJS.filename = "2010-01-17_working-with-c-style-structs-in-ruby.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -29,7 +30,7 @@ SJS.filename = "working-with-c-style-structs-in-ruby.html"
|
|||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby</a></h1>
|
||||
<h1><a href=2010-01-17_working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby</a></h1>
|
||||
<time>January 17, 2010</time>
|
||||
</header>
|
||||
<p>This is the beginning of a series on generating Mach-O object files in
|
||||
|
|
@ -144,8 +145,8 @@ of the Mach-O file format</a></i><p>
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=prev href=using-emacs-to-develop-mojo-apps-for-webos.html>← Using Emacs to Develop Mojo Apps for WebOS</a>
|
||||
<a id=next href=basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format →</a>
|
||||
<a id=prev href=2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html>← Using Emacs to Develop Mojo Apps for WebOS</a>
|
||||
<a id=next href=2010-01-18_basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format →</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -155,7 +156,7 @@ of the Mach-O file format</a></i><p>
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=working-with-c-style-structs-in-ruby.html>
|
||||
<input name=post type=hidden value=2010-01-17_working-with-c-style-structs-in-ruby.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>Basics of the Mach-O file format :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
@ -18,7 +19,7 @@ _gaq.push( ['_setAccount', 'UA-214054-5']
|
|||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "basics-of-the-mach-o-file-format.html"
|
||||
SJS.filename = "2010-01-18_basics-of-the-mach-o-file-format.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -29,7 +30,7 @@ SJS.filename = "basics-of-the-mach-o-file-format.html"
|
|||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format</a></h1>
|
||||
<h1><a href=2010-01-18_basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format</a></h1>
|
||||
<time>January 18, 2010</time>
|
||||
</header>
|
||||
<p><i>This post is part of a series on generating basic x86 Mach-O files
|
||||
|
|
@ -295,8 +296,8 @@ would almost have a useful Mach object file.)</i></p>
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=prev href=working-with-c-style-structs-in-ruby.html>← Working with C-style structs in Ruby</a>
|
||||
<a id=next href=a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation →</a>
|
||||
<a id=prev href=2010-01-17_working-with-c-style-structs-in-ruby.html>← Working with C-style structs in Ruby</a>
|
||||
<a id=next href=2010-01-20_a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation →</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -306,7 +307,7 @@ would almost have a useful Mach object file.)</i></p>
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=basics-of-the-mach-o-file-format.html>
|
||||
<input name=post type=hidden value=2010-01-18_basics-of-the-mach-o-file-format.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>A preview of Mach-O file generation :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
@ -18,7 +19,7 @@ _gaq.push( ['_setAccount', 'UA-214054-5']
|
|||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "a-preview-of-mach-o-file-generation.html"
|
||||
SJS.filename = "2010-01-20_a-preview-of-mach-o-file-generation.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -29,7 +30,7 @@ SJS.filename = "a-preview-of-mach-o-file-generation.html"
|
|||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation</a></h1>
|
||||
<h1><a href=2010-01-20_a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation</a></h1>
|
||||
<time>January 20, 2010</time>
|
||||
</header>
|
||||
<p>This month I got back into an x86 compiler I started last May. It lives <a
|
||||
|
|
@ -72,8 +73,8 @@ straightforward, an example is in asm/binary.rb, in the #output method.</p>
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=prev href=basics-of-the-mach-o-file-format.html>← Basics of the Mach-O file format</a>
|
||||
<a id=next href=37signals-chalk-dissected.html>37signals' Chalk Dissected →</a>
|
||||
<a id=prev href=2010-01-18_basics-of-the-mach-o-file-format.html>← Basics of the Mach-O file format</a>
|
||||
<a id=next href=2010-11-04_37signals-chalk-dissected.html>37signals' Chalk Dissected →</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -83,7 +84,7 @@ straightforward, an example is in asm/binary.rb, in the #output method.</p>
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=a-preview-of-mach-o-file-generation.html>
|
||||
<input name=post type=hidden value=2010-01-20_a-preview-of-mach-o-file-generation.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>37signals' Chalk Dissected :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
@ -18,7 +19,7 @@ _gaq.push( ['_setAccount', 'UA-214054-5']
|
|||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "37signals-chalk-dissected.html"
|
||||
SJS.filename = "2010-11-04_37signals-chalk-dissected.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -29,7 +30,7 @@ SJS.filename = "37signals-chalk-dissected.html"
|
|||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=37signals-chalk-dissected.html>37signals' Chalk Dissected</a></h1>
|
||||
<h1><a href=2010-11-04_37signals-chalk-dissected.html>37signals' Chalk Dissected</a></h1>
|
||||
<time>November 4, 2010</time>
|
||||
</header>
|
||||
<p><i>Update 2010-11-05: I dove into the JavaScript a little and explained most of it. Sam Stephenson <a href="https://twitter.com/sstephenson/status/553490682216449">tweeted</a> that Chalk is written in <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a> and compiled on the fly when served using <a href="https://github.com/sstephenson/brochure">Brochure</a>. That's hot! (for those unaware Sam Stephenson works at 37signals, and is also the man behind <a href="http://www.prototypejs.org/">Prototype</a>.)</i></p>
|
||||
|
|
@ -278,7 +279,7 @@ addLineNumbersToAllGists();
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=prev href=a-preview-of-mach-o-file-generation.html>← A preview of Mach-O file generation</a>
|
||||
<a id=prev href=2010-01-20_a-preview-of-mach-o-file-generation.html>← A preview of Mach-O file generation</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -288,7 +289,7 @@ addLineNumbersToAllGists();
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=37signals-chalk-dissected.html>
|
||||
<input name=post type=hidden value=2010-11-04_37signals-chalk-dissected.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<meta name=viewport content=width=device-width>
|
||||
<title>blog :: samhuri.net</title>
|
||||
<title>sjs' blog</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
|
|
@ -28,7 +29,7 @@ jQuery(function($) {
|
|||
</script>
|
||||
<script>
|
||||
window.SJS = window.SJS || {}
|
||||
SJS.filename = "37signals-chalk-dissected.html"
|
||||
SJS.filename = "2010-11-04_37signals-chalk-dissected.html"
|
||||
</script>
|
||||
<script src=../assets/blog-all.min.js></script>
|
||||
<header>
|
||||
|
|
@ -38,18 +39,18 @@ SJS.filename = "37signals-chalk-dissected.html"
|
|||
<div class=center><a id=index-toggle href=#>↓ show posts ↓</a></div>
|
||||
<nav id=index>
|
||||
<ul>
|
||||
<li><a href=37signals-chalk-dissected.html>37signals' Chalk Dissected</a> <span class=date>November 4, 2010</span></li>
|
||||
<li><a href=a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation</a> <span class=date>January 20, 2010</span></li>
|
||||
<li><a href=basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format</a> <span class=date>January 18, 2010</span></li>
|
||||
<li><a href=working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby</a> <span class=date>January 17, 2010</span></li>
|
||||
<li><a href=using-emacs-to-develop-mojo-apps-for-webos.html>Using Emacs to Develop Mojo Apps for WebOS</a> <span class=date>November 21, 2009</span></li>
|
||||
<li><a href=2010-11-04_37signals-chalk-dissected.html>37signals' Chalk Dissected</a> <span class=date>November 4, 2010</span></li>
|
||||
<li><a href=2010-01-20_a-preview-of-mach-o-file-generation.html>A preview of Mach-O file generation</a> <span class=date>January 20, 2010</span></li>
|
||||
<li><a href=2010-01-18_basics-of-the-mach-o-file-format.html>Basics of the Mach-O file format</a> <span class=date>January 18, 2010</span></li>
|
||||
<li><a href=2010-01-17_working-with-c-style-structs-in-ruby.html>Working with C-style structs in Ruby</a> <span class=date>January 17, 2010</span></li>
|
||||
<li><a href=2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html>Using Emacs to Develop Mojo Apps for WebOS</a> <span class=date>November 21, 2009</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id=posts>
|
||||
|
||||
<article>
|
||||
<header>
|
||||
<h1><a href=37signals-chalk-dissected.html>37signals' Chalk Dissected</a></h1>
|
||||
<h1><a href=2010-11-04_37signals-chalk-dissected.html>37signals' Chalk Dissected</a></h1>
|
||||
<time>November 4, 2010</time>
|
||||
</header>
|
||||
<p><i>Update 2010-11-05: I dove into the JavaScript a little and explained most of it. Sam Stephenson <a href="https://twitter.com/sstephenson/status/553490682216449">tweeted</a> that Chalk is written in <a href="http://jashkenas.github.com/coffee-script/">CoffeeScript</a> and compiled on the fly when served using <a href="https://github.com/sstephenson/brochure">Brochure</a>. That's hot! (for those unaware Sam Stephenson works at 37signals, and is also the man behind <a href="http://www.prototypejs.org/">Prototype</a>.)</i></p>
|
||||
|
|
@ -298,7 +299,7 @@ addLineNumbersToAllGists();
|
|||
</div>
|
||||
<p class=sep>༄</p>
|
||||
<div id=around>
|
||||
<a id=prev href=a-preview-of-mach-o-file-generation.html>← A preview of Mach-O file generation</a>
|
||||
<a id=prev href=2010-01-20_a-preview-of-mach-o-file-generation.html>← A preview of Mach-O file generation</a>
|
||||
<br style=clear:both>
|
||||
</div>
|
||||
<p id=need-js align=center><strong>(discussion requires JavaScript)</strong></p>
|
||||
|
|
@ -308,7 +309,7 @@ addLineNumbersToAllGists();
|
|||
<div id=comments-spinner><img src=../assets/spinner.gif></div>
|
||||
</div>
|
||||
<form id=comment-form>
|
||||
<input name=post type=hidden value=37signals-chalk-dissected.html>
|
||||
<input name=post type=hidden value=2010-11-04_37signals-chalk-dissected.html>
|
||||
<p><input name=name type=text placeholder=name></p>
|
||||
<p><input name=email type=text placeholder=email></p>
|
||||
<p><input name=url type=text placeholder=url></p>
|
||||
|
|
|
|||
1
blog/posts.json
Normal file
1
blog/posts.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"published":["2010-11-04_37signals-chalk-dissected.html","2010-01-20_a-preview-of-mach-o-file-generation.html","2010-01-18_basics-of-the-mach-o-file-format.html","2010-01-17_working-with-c-style-structs-in-ruby.html","2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html"]}
|
||||
1
blog/rss
Normal file
1
blog/rss
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>sjs' blog</title><description>ramblings and musings</description><link>http://samhuri.net/blog</link><pubDate>Thu, 04 Nov 2010 00:00:00 -0700</pubDate><item><title>37signals' Chalk Dissected</title><description></description><pubDate>Thu, 04 Nov 2010 00:00:00 -0700</pubDate><link>http://samhuri.net/blog/2010-11-04_37signals-chalk-dissected.html</link><guid>http://samhuri.net/blog/2010-11-04_37signals-chalk-dissected.html</guid></item><item><title>A preview of Mach-O file generation</title><description></description><pubDate>Wed, 20 Jan 2010 00:00:00 -0800</pubDate><link>http://samhuri.net/blog/2010-01-20_a-preview-of-mach-o-file-generation.html</link><guid>http://samhuri.net/blog/2010-01-20_a-preview-of-mach-o-file-generation.html</guid></item><item><title>Basics of the Mach-O file format</title><description></description><pubDate>Mon, 18 Jan 2010 00:00:00 -0800</pubDate><link>http://samhuri.net/blog/2010-01-18_basics-of-the-mach-o-file-format.html</link><guid>http://samhuri.net/blog/2010-01-18_basics-of-the-mach-o-file-format.html</guid></item><item><title>Working with C-style structs in Ruby</title><description></description><pubDate>Sun, 17 Jan 2010 00:00:00 -0800</pubDate><link>http://samhuri.net/blog/2010-01-17_working-with-c-style-structs-in-ruby.html</link><guid>http://samhuri.net/blog/2010-01-17_working-with-c-style-structs-in-ruby.html</guid></item><item><title>Using Emacs to Develop Mojo Apps for WebOS</title><description></description><pubDate>Sat, 21 Nov 2009 00:00:00 -0800</pubDate><link>http://samhuri.net/blog/2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html</link><guid>http://samhuri.net/blog/2009-11-21_using-emacs-to-develop-mojo-apps-for-webos.html</guid></item></channel></rss><to_s/>
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<meta name=viewport content=width=device-width>
|
||||
<title>blog :: samhuri.net</title>
|
||||
<title>sjs' blog</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js></script>
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<meta name=viewport content=width=device-width>
|
||||
<title>{{title}} :: samhuri.net</title>
|
||||
<link rel=stylesheet href=../assets/blog.css>
|
||||
<link rel=alternate type=application/rss+xml href=http://samhuri.net/blog/rss title="sjs' blog">
|
||||
<script>
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push( ['_setAccount', 'UA-214054-5']
|
||||
|
|
|
|||
Loading…
Reference in a new issue