forked from OpenHack/openhack.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
54 lines (40 loc) · 918 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
desc "compile and run the site"
task :default do
pids = [
spawn("jekyll"),
spawn("scss --watch assets:stylesheets"),
]
trap "INT" do
Process.kill "INT", *pids
exit 1
end
loop do
sleep 1
end
end
desc "Generate a page for your city!"
task :city do
unless name = ENV["NAME"]
abort "Usage: rake city NAME=YOUR_CITY_NAME"
end
require 'fileutils'
directory = name.downcase
FileUtils.mkdir_p(directory)
File.open(File.join(directory, "index.markdown"), "w") do |file|
file.write <<-EOF
---
layout: default
title: OpenHack - #{name}
---
## #{name}
![Photo of your meetup or city!](/#{directory}/FILL_ME_IN.png)
### Info
Put some info about when and where your meetup is here.
### Next meetups
* [First meetup](http://)
* [Second Meetup](http://)
### Past meetups
Put down how many people came, maybe some photos or other fun stuff down here!
EOF
end
end