View Source Hologram.Router.Helpers (hologram v0.3.0)

Summary

Functions

Retrieves the asset path, including the digest, for the specified static file within the static directory. If there's no corresponding entry for the provided static file, the static file path itself will be returned.

Returns the relative URL of a page's JavaScript bundle using the page's digest.

Builds relative URL for the given page module or a tuple of a page module and params.

Builds relative URL for the given page module and params.

Functions

asset_path(static_path)

@spec asset_path(String.t()) :: String.t()

Retrieves the asset path, including the digest, for the specified static file within the static directory. If there's no corresponding entry for the provided static file, the static file path itself will be returned.

page_bundle_path(page_digest)

@spec page_bundle_path(String.t()) :: String.t()

Returns the relative URL of a page's JavaScript bundle using the page's digest.

page_path(module)

@spec page_path(module() | tuple()) :: String.t()

Builds relative URL for the given page module or a tuple of a page module and params.

page_path(page_module, params)

@spec page_path(module(), keyword() | map()) :: String.t()

Builds relative URL for the given page module and params.