Alto RST parses reStructuredText into a source-positioned object model and renders safe HTML without running Python or Sphinx. The same model supports linting, formatting, editing, references, and conversion.
<?php
use Alto\Rst\Rst;
$html = Rst::sphinx()->toHtml("Guide\n=====\n\nWelcome.\n");Start
- Installation: install the package and verify the runtime.
- Getting started: render and inspect one document.
Parsing
- Parsing: parse once and inspect problems.
- Profiles: choose docutils, Sphinx, or Symfony syntax.
- Documents: traverse the object model.
- Positions: relate nodes and problems to source bytes.
Rendering
- Rendering: turn a parsed document into output.
- HTML: render safe semantic HTML.
- Policy: control URL schemes and raw content.
Linting
- Linting: report document problems.
- Configuration: select and configure rules.
- Fixes: apply conservative safe corrections.
- Rules: browse the built-in rule catalog.
- Custom rules: add an application rule.
Editing
- Editing: plan typed source changes.
- Formatting: normalize conservative layout.
- Patches: inspect exact byte changes and diffs.
- Files: save with conflict detection.
Conversion
- Conversion: choose a conversion direction.
- To Markdown: convert RST safely.
- To RST: convert supported Markdown.
- Projects: convert complete documentation trees.
- Reports: review lossy or approximate mappings.
Reference
- Reference: build and query a graph.
- Links: resolve targets and hyperlinks.
- Footnotes: resolve notes and citations.
- Substitutions: expand bounded replacements.
- Projects: resolve Sphinx links across files.
Extensions
- All extensions: inspect bundled profile behavior.
- Extension points: choose a public contract.
- Custom extension: register trusted behavior.
Security
- Security: control files, URLs, raw HTML, and expansion limits.
API
- Overview: map the public surface by task.
- Parsing: entry points, profiles, and parse results.
- Rendering: HTML renderer and policies.
- Quality: linter, fixer, and formatter.
- Editing: editor, patches, diffs, and files.
- Conversion: document and project converters.
- References: local and project graphs.
- Extensions: extension contribution contracts.
- Exceptions: recoverable public failures.
HTML output escapes text, filters unsafe URLs, and keeps file-reading constructs disabled by default. Read Security before granting additional authority.