Sha256: ec3e3e368f1aa501eb3e5a5eace6a6220a8f8cfb6b1087aec0552030e522dff5
Contents?: true
Size: 653 Bytes
Versions: 9
Compression:
Stored size: 653 Bytes
Contents
package s3.website.model import java.io.File import s3.website.model.Files.recursiveListFiles // ssg = static site generator trait Ssg { def outputDirectory: String } object Ssg { val automaticallySupportedSiteGenerators = Jekyll :: Nanoc :: Nil def autodetectSiteDir(workingDirectory: File): Option[File] = recursiveListFiles(workingDirectory).find { file => file.isDirectory && automaticallySupportedSiteGenerators.exists(ssg => file.getAbsolutePath.endsWith(ssg.outputDirectory)) } } case object Jekyll extends Ssg { def outputDirectory = "_site" } case object Nanoc extends Ssg { def outputDirectory = "public/output" }
Version data entries
9 entries across 9 versions & 1 rubygems