Alto Markdown converts Markdown to safe HTML and keeps a source-backed document model when an application needs to inspect, lint, or edit content. Use direct conversion for one result; open a document when later work depends on its structure.
<?php
use Alto\Markdown\Markdown;
$html = Markdown::github()->toHtml("# Hello\n\nWelcome.\n");Start
- Installation: install the package and verify the runtime.
- Getting started: render and inspect one document.
Conversion
Documents
- Profiles: choose CommonMark, GFM, or GitHub syntax.
- Queries: find headings, sections, links, and code.
- Statistics: compute one immutable document summary.
- Editing: make source-preserving changes and save files.
Quality
- Linting: report content and policy problems.
- Fixing: apply enabled safe corrections.
- Formatting: normalize selected Markdown style.
Extensions
- All extensions: choose bundled capabilities.
- Compatibility: understand extension versioning.
- Extension points: select the correct contract.
- Custom extension: register trusted application behavior.
Engine
- Security: keep untrusted input within safe policies.
- Performance: measure the correct processing lane.
- Compliance: review supported Markdown specifications.
API
- Overview: map the public surface by task.
- Documents: factories, documents, and files.
- Nodes: inspect and mutate typed handles.
- Queries: collections, selectors, and statistics.
- Editing: builders, patches, diffs, and saves.
- Extensions: profile and extension contracts.
- Exceptions: catch recoverable failures at boundaries.
HTML escapes authored raw HTML and rejects unsafe URL schemes by default. Read Security before changing those policies.