Fix misc. errors
This commit is contained in:
parent
5779c37f5b
commit
f824eae230
2 changed files with 6 additions and 2 deletions
|
@ -10,10 +10,13 @@ class Phlexite::Router
|
|||
end
|
||||
|
||||
def page(out_path, component)
|
||||
File::write(full_out_path(out_path), component.call)
|
||||
out = full_out_path(out_path)
|
||||
system("mkdir -p #{File::dirname(out)}")
|
||||
File::write(out, component.call)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def full_out_path(out_path)
|
||||
File::join(@site.build_dir, @site.base_url, @base, out_path)
|
||||
end
|
||||
|
|
|
@ -7,7 +7,8 @@ class Phlexite::Site < Phlexite::Router
|
|||
|
||||
def initialize
|
||||
super("/", self)
|
||||
base_url = "/"
|
||||
@build_dir = "_build"
|
||||
@base_url = "/"
|
||||
yield self
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue