FearlessStudios

AddPage

Server export to add a handbook page

AddPage

Adds a page to data/handbook.json. Pages can be added at the root level or inside an existing category.

Usage

server.lua
local result = exports["FS-Handbook"]:AddPage({
  name = "Rules",
  md = "# Server Rules\n\nBe respectful.",
}, { categoryName = "Getting Started" })

if not result.ok then
  print(result.error)
  return
end

print(("Added page %s"):format(result.page.id))

Parameters

Prop

Type

Returns

Prop

Type