StaticAssets
class StaticAssetsA loaded asset description with URL helpers, HTML tag helpers, and HTTP routes.
Defined by scalive.StaticAssets. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:202-294)
Methods7
entry
def entry(asset: String): StaticAssetEntryReturns the load-time metadata for an asset.
Defined by scalive.StaticAssets.entry. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:217-218)
path
def path(asset: String): StringReturns the mounted, root-relative URL for an asset's versioned or final path.
Defined by scalive.StaticAssets.path. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:209-210)
pathOption
def pathOption(asset: String): Option[String]Returns the mounted, root-relative URL when the asset is present.
Defined by scalive.StaticAssets.pathOption. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:213-214)
script
def script[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]Renders a <script> using the asset's canonical URL.
Defined by scalive.StaticAssets.script. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:229-230)
stylesheet
def stylesheet[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]Renders a stylesheet <link> using the asset's canonical URL.
Defined by scalive.StaticAssets.stylesheet. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:221-222)
trackedScript
def trackedScript[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]Renders a tracked <script> using the asset's versioned or final URL.
Defined by scalive.StaticAssets.trackedScript. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:233-234)
trackedStylesheet
def trackedStylesheet[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]Renders a tracked stylesheet <link> using the asset's versioned or final URL.
Defined by scalive.StaticAssets.trackedStylesheet. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:225-226)
Values1
routes
val routes: zio.http.Routes[Any, Nothing]GET and HEAD routes serving loaded assets below the configured mount path.
Defined by scalive.StaticAssets.routes. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:237-248)