/ Book Mode / Page Customization

This section explains how to customize HTML templates, stylesheets, scripts, and inject custom behaviors in Book mode.

Set extensions.template in sena.toml to specify your custom HTML template (default: templates/default.html).

VariableTypeDescription
bodyStringRendered HTML content of the markdown page
site_titleStringSite title from book.title
site_descriptionStringSite description from book.description
site_languageStringPrimary language from book.language
site_languagesArray[String]Supported languages from book.languages
is_enBoolWhether current page is in the English documentation hierarchy
tocJsonExtracted table of contents outline
dataObjectStructured data loaded from data/ directory
prevJson?Previous page navigation object (title, location)
nextJson?Next page navigation object (title, location)
currentStringCurrent page relative path
build_timeStringTimestamp of build generation
versionStringMoPress version

$if(prev)$
  <a href="$prev.location$">← $prev.title$</a>
$endif$
$if(next)$
  <a href="$next.location$">$next.title$ →</a>
$endif$