added build folder and page acess
This commit is contained in:
parent
017f656391
commit
c987948d01
1 changed files with 10 additions and 2 deletions
|
@ -26,9 +26,13 @@ class Builder
|
|||
}
|
||||
|
||||
///Copies over a folder into the output directory
|
||||
public void AddFolder(StringView folder)
|
||||
public void AddFolder(StringView folder) => _InputDirectories.Add(new .(folder));
|
||||
public void AddPage(StringView name, Page page)
|
||||
{
|
||||
|
||||
if(!_Pages.ContainsKeyAlt<StringView>(name))
|
||||
{
|
||||
_Pages.Add(new .(name), page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,6 +59,10 @@ class Builder
|
|||
else
|
||||
Log.Error("Unable to build page");
|
||||
}
|
||||
|
||||
Log.Debug("Copying over directories");
|
||||
for(var i in _InputDirectories)
|
||||
Directory.Copy(i, _OutputDirectory).IgnoreError();
|
||||
}
|
||||
private Result<void> WriteFile(StringView target, StringView toWrite)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue