summaryrefslogtreecommitdiff
path: root/build-files/build_about.rb
blob: 5e56ab7076bb0c4e6157570be727f202bf0902d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'erb'
require 'kramdown'

def render(partial_path)
  ERB.new(File.read(partial_path)).result(binding)
end

def content
  output = ""
  Dir.foreach("./content/main-pages") do |post_filename|
    if post_filename.include?("about.md")
      output.concat(Kramdown::Document.new(File.read("./content/main-pages/#{post_filename}")).to_html)
    end
  end
  return output
end

template = ERB.new(File.read('template.html.erb'))
puts template.result(binding)