~sivers/sive.rs

sive.rs/script/home.rb -rwxr-xr-x 496 bytes
5fcf6634 — Derek Sivers cover and hardcover 18 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby
require_relative 'init.rb'

# run this last after loading vars from other scripts

template = File.read(ROOT + 'templates/home.mustache')

vars = {}
vars[:bodyid] = 'home'
vars[:pagedescription] = 'Writer, entrepreneur, avid student of life. I make useful things, and share what I learn.'
vars[:new_articles] = ARTICLES[0..5]
vars[:top10_articles] = ARTICLES.select {|x| x[:tags] && x[:tags].include?('top10')}
vars[:tweets] = TWEETS[0..5]

wput('home', page(template, vars))