summaryrefslogtreecommitdiff
path: root/file.rb
blob: 06c53f9976d798cf40d1df8d0494254f027cf102 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env ruby
require_relative 'lib'

path = ARGV[0]
basename = File.basename(path, File.extname(path))
html = File.read(File.join(SNIPPETS, 'head.html'))
html += nav basename
html += '<section>'
html += File.read(path)
html += '</section>'
html += File.read(File.join(SNIPPETS, 'tail.html'))
print_html basename, html