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§
- Asset
Manifest - Shared asset manifest mapping original paths to hashed paths