Module lua

Module lua 

Source
Expand description

Lua API for rs-web Usage in Lua:

local rs = require("rs-web")
local content = rs.read_file("path/to/file.md")
local html = rs.markdown.render(content)

Structs§

LuaClass
A Lua class/table type definition
LuaField
A field in a Lua class
LuaFunction
A Lua function definition
LuaParam
A Lua function parameter

Functions§

create_manifest
Create a new asset manifest
generate_emmylua
Generate EmmyLua annotations
generate_markdown
Generate markdown documentation
highlight_code_sync
Highlight code and return HTML with CSS classes (sync version) This is also used by the Tera filter
is_path_within_root
Check if a path is within the project root (for sandbox enforcement)
parse_frontmatter_content
Parse frontmatter from content string Supports YAML (—) and TOML (+++) delimiters Returns (frontmatter_value, content_without_frontmatter)
register
Register all Lua functions as a require-able module
resolve_path
Resolve a path relative to project root

Type Aliases§

AssetManifest
Shared asset manifest mapping original paths to hashed paths