[][src]Struct takeoff::launchpad::Launchpad

#[non_exhaustive]pub struct Launchpad {
    pub compile_sass: bool,
    pub mode: Mode,
    pub output: PathBuf,
    pub source: PathBuf,
    pub statics: Vec<(String, String)>,
    pub templates: Templates,
    pub tera: Tera,
}

The entry point for Takeoff.

Fields (Non-exhaustive)

Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
compile_sass: bool

If set to true, any .scss files found in Launchpad::statics will be compiled and output as CSS with grass. Sass partials (.scss files starting with an underscore) will also be skipped.

Defaults to false.

mode: Mode

The Launchpad mode.

Defaults to Mode::Development

output: PathBuf

The root directory to output the site files to.

Defaults to "public".

source: PathBuf

The root directory to look for Markdown and static files.

Defaults to "source".

statics: Vec<(String, String)>

Static files to copy or process*.

The first string in the tuple should be a valid glob string that targets files to copy. Relative to Launchpad::source.

And the second string should be a directory to copy the files matched by the glob to. Relative to Launchpad::output.

* Optionally, some files can be automatically processed as well, see Launchpad::compile_sass.

templates: Templates

Templating settings.

tera: Tera

The tera instance to re-use for templating.

Implementations

impl Launchpad[src]

pub fn prepare() -> LaunchpadBuilder[src]

Creates a new LaunchpadBuilder.

pub fn parse_documents(&self) -> Result<Vec<Document>>[src]

Parses and returns all Documents defined by this Launchpad.

pub fn take_off(&self) -> Result<()>[src]

Generates the site defined by this Launchpad.

Trait Implementations

impl Debug for Launchpad[src]

impl<'de> Deserialize<'de> for Launchpad[src]

impl Serialize for Launchpad[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,