Dotty Documentation

0.6.0-bin-SNAPSHOT

case class Site
extends Object with ResourceFinder with Product

[-] Constructors

Site ( root: File , projectTitle: String , projectVersion: String , projectUrl: String , documentation: Map [ String, Package ] )

[-] Members

[+] private var _blogInfo : Array [ BlogPost ]
[+] private var _blogposts : Array [ File ]
[+] private var _compilableFiles : Array [ File ]
[+] private var _staticAssets : Array [ File ]
[+] private val docs : List [ Nothing <: Any ]

Documentation serialized to java maps

[+] private val docsFlattened : List [ Nothing <: Any ]
[+] val documentation : Map [ String, Package ]
[+] private val fs : FileSystem
[+] val includes : Map [ String, Include ]

Include files are allowed under the directory _includes. These files have to be compilable files and can be used with liquid includes:

{% include "some-file" %}

You can also use the with statement:

{% include "some-file" with { key: value } %}
[+] val layouts : Map [ String, Layout ]

Files that define a layout then referred to by layout: filename-no-ext in yaml front-matter.

The compiler will look in two locations, <root>/_layouts/ and in the bundled jar file's resources /_layouts.

If the user supplies a layout that has the same name as one of the defaults, the user-defined one will take precedence.

[+] val projectTitle : String
[+] val projectUrl : String
[+] val projectVersion : String
[+] val root : File
[+] protected def blogInfo ( implicit ctx: Context ) : Array [ BlogPost ]
[+] def blogposts ( implicit ctx: Context ) : Array [ File ]

All files that are considered blogposts, currently this means that files have been placed in:

./blog/_posts/year-month-day-title.ext

where ext is either markdown or html.

[+] private def collectFiles ( dir: File , includes: String => Boolean ) : Array [ File ]
[+] def compilableFiles ( implicit ctx: Context ) : Array [ File ]

All files that are considered compilable assets in this context. This is mainly markdown and html files, but could include other files in the future.

[+] def copyStaticFiles ( outDir: File ) ( implicit ctx: Context ) : Site

Copy static files to outDir

[+] private def createOutput ( outDir: File ) ( op: => Unit ) ( implicit ctx: Context ) : Site
[+] private def defaultParams ( pageLocation: File , additionalDepth: Int ) : DefaultParams

Generate default params included in each page

[+] def generateApiDocs ( outDir: File ) ( implicit ctx: Context ) : Site

Generate HTML for the API documentation

[+] def generateBlog ( outDir: File ) ( implicit ctx: Context ) : Site

Generate blog from files in blog/_posts and output in outDir

[+] def generateHtmlFiles ( outDir: File ) ( implicit ctx: Context ) : Site

Generate HTML files from markdown and .html sources

[+] private def initFiles ( implicit ctx: Context ) : Unit
[+] private def mkdirs ( path: Path ) ( implicit ctx: Context ) : path.type

Create directories and issue an error if could not

[+] def render ( page: Page , params: Map [ String, AnyRef ] ) ( implicit ctx: Context ) : Option [ String ]

Render a page to html, the resulting string is the result of the complete expansion of the template with all its layouts and includes.

[+] def staticAssets ( implicit ctx: Context ) : Array [ File ]

All files that are considered static in this context, this can be anything from CSS, JS to images and other files.

[+] private def stringToSourceFile ( name: String , path: String , sourceCode: String ) : SourceFile

Create virtual file from string sourceCode

[+] def stripRoot ( f: File , root: File ) : String

This function allows the stripping of the path that leads up to root.

stripRoot(new JFile("/some/root/dir/css/index.css"))
// returns: dir/css/index.css
// given that root is: /some/root
[+] private def toSourceFile ( f: File ) : SourceFile