Class | Webby::Builder |
In: |
lib/webby/builder.rb
|
Parent: | Object |
The Builder class performs the work of scanning the content folder, creating Resource objects, and converting / copying the contents to the output folder as needed.
Runs the Webby builder by loading in the layout files from the layouts/ folder and the content from the contents/ folder. Content is analyzed, and those that need to be copied or compiled (filtered using ERB, Texttile, Markdown, etc.) are handled. The results are placed in the output/ folder.
If the :rebuild flag is set to true, then all content is copied and/or compiled to the output folder.
A content file can mark itself as dirty by setting the dirty flag to true in the meta-data of the file. This will cause the contenet to always be compiled when the builder is run. Conversely, setting the dirty flag to false will cause the content to never be compiled or copied to the output folder.
A content file needs to be built if the age of the file is less then the age of the output product — i.e. the content file has been modified more recently than the output file.