Skip to main content

register_static

Register a static file to be served by the Pages system. Copies the file to a public directory with a content-hashed name for cache busting and returns the URL path. Raises FileNotFoundError if the file does not exist.

Parameters

NameDescriptionTypeDefault
file_path (required)Path to the static file to register.stros.PathLike

Return Value

"str"