class Marten::Conf::GlobalSettings::Assets

Overview

Allows to configure assets-related settings.

Defined in:

marten/conf/global_settings/assets.cr

Instance Method Summary

Instance Method Detail

def app_dirs : Bool #

Returns a boolean indicating whether assets should be looked for inside installed applications.


[View source]
def app_dirs=(app_dirs : Bool) #

Allows to set whether assets should be looked for inside installed applications.


[View source]
def dirs : Array(String) #

Returns an array of directories where assets should be looked for.

The order of these directories is important as it defines the order in which assets are searched for.


[View source]
def dirs=(dirs : Array(Path | String | Symbol)) #

Allows to set the directories where assets should be looked for.


[View source]
def manifests : Array(String) #

Returns the configured paths to manifest JSON files to use to resolve assets URLs.


[View source]
def manifests=(manifests : Array(Path | String | Symbol)) #

Allows to set paths to manifest JSON files to use in order to resolve asset URLs.


[View source]
def max_age : Int64 #

Returns the Cache-Control header max-age directive value (defaults to 3600 seconds).


[View source]
def max_age=(max_age : Int64) #

Allows to set the Cache-Control header max-age directive value.


[View source]
def root : String #

Returns the absolute path where collected assets will be persisted.


[View source]
def root=(dir : Path | String | Symbol | Nil) #

Allows to set the absolute path where collected assets will be persisted.


[View source]

Returns the storage used to collect and persist assets.


[View source]
def storage=(storage : Core::Storage::Base | Nil) #

Allows to set the the storage used to collect and persist assets.


[View source]
def url : String #

Returns the base URL to use when exposing asset URLs.


[View source]
def url=(url : String) #

Allows to set the base URL to use when exposing asset URLs.


[View source]