Still.Utils (Still v0.2.1) View Source

Collection of utility functions.

Link to this section Summary

Functions

Recursively removes all files from the site's output directory.

Recursively removes all files from the given path, relative to the output directory.

Returns the value configured for :still by the given key. Returns the provided default if it doesn't exist.

Returns the value configured for :still by the given key. Errors if it doesn't exist.

Returns the site's base URL.

Delegates the call to the current Still.Preprocessor.Image.Adapter.

Returns the absolute path configured as the site's entrypoint.

Returns the current input path for a given file, prepending it with the site's input directory. See get_input_path/0.

Returns the modified time of a given file as a DateTime struct or the :error atom if the file doesn't exist.

Returns the modified time of a given file. Errors if the file does not exist.

Returns the absolute path configured as the site's output destination.

Returns the current output path for a given file, prepending it with the site's output directory. See get_output_path/0.

Receives an absolute path and converts it to relative by trimming the site's entrypoint directory.

Creates the output directory.

Creates the directory by the given path, relative to the output directory.

Recursively cleans the site's output directory.

Link to this section Functions

Recursively removes all files from the site's output directory.

Recursively removes all files from the given path, relative to the output directory.

Returns the value configured for :still by the given key. Returns the provided default if it doesn't exist.

Returns the value configured for :still by the given key. Errors if it doesn't exist.

Returns the site's base URL.

Delegates the call to the current Still.Preprocessor.Image.Adapter.

Returns the absolute path configured as the site's entrypoint.

This is the value set by

config :still, input: "path/to/site"

Returns the current input path for a given file, prepending it with the site's input directory. See get_input_path/0.

Returns the modified time of a given file as a DateTime struct or the :error atom if the file doesn't exist.

Link to this function

get_modified_time!(path)

View Source

Returns the modified time of a given file. Errors if the file does not exist.

Returns the absolute path configured as the site's output destination.

This is the value set by

config :still, output: "path/to/site"

Returns the current output path for a given file, prepending it with the site's output directory. See get_output_path/0.

Link to this function

get_relative_input_path(full_path)

View Source

Receives an absolute path and converts it to relative by trimming the site's entrypoint directory.

Creates the output directory.

Creates the directory by the given path, relative to the output directory.

Recursively cleans the site's output directory.