Skip to content
scalive
Menu
ConnectingLiveReconnectingOffline
c

StaticAssets

class StaticAssets

A loaded static asset manifest, URL/tag helper, and HTTP route set.

Defined by scalive.StaticAssets. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:102-172)

Methods7

entry

def entry(asset: String): StaticAssetEntry

Returns the load-time metadata for an asset.

Defined by scalive.StaticAssets.entry. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:117-118)

path

def path(asset: String): String

Returns the mounted, root-relative URL for an asset's digested path.

Defined by scalive.StaticAssets.path. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:109-110)

pathOption

def pathOption(asset: String): Option[String]

Returns the mounted, root-relative digested URL when the asset is present.

Defined by scalive.StaticAssets.pathOption. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:113-114)

script

def script[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]

Defined by scalive.StaticAssets.script. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:127-128)

stylesheet

def stylesheet[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]

Defined by scalive.StaticAssets.stylesheet. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:120-121)

trackedScript

def trackedScript[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]

Renders a tracked <script> using the asset's digested URL.

Defined by scalive.StaticAssets.trackedScript. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:131-132)

trackedStylesheet

def trackedStylesheet[Msg](asset: String, mods: Mod[Msg]*): HtmlElement[Msg]

Renders a tracked stylesheet <link> using the asset's digested URL.

Defined by scalive.StaticAssets.trackedStylesheet. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:124-125)

Values1

routes

val routes: zio.http.Routes[Any, Nothing]

GET and HEAD routes serving manifest entries below the configured mount path.

Defined by scalive.StaticAssets.routes. View source (scalive/transport/zio-http/src/scalive/StaticAssets.scala:135-146)