Download the PHP package alto/markdown without Composer

On this page you can find all versions of the php package alto/markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package markdown

Alto Markdown

Alto Markdown parses Markdown into a document model you can lint, format, edit, and convert to HTML, preserving everything you don't touch.

CI

The core has no runtime Composer dependencies. It supports CommonMark, GitHub Flavored Markdown, and GitHub-oriented documents. Trusted extensions can add custom blocks, leaf inlines, native HTML decorators, render-only document projections, lint rules, formatter passes, and document metrics. Alto includes configurable leaf delimiter pairs, smart punctuation, highlights, description lists, footnotes, configurable mentions, nested Markdown tabs, constrained source attributes, escaped code imports, recursive Markdown includes, semantic heading sections, source excerpt displays, and a bounded resource resolver for trusted custom extensions and rich embeds. Front matter stays opaque until the application explicitly passes a decoder.

The full guide set lives under docs/.

Need Start with
Convert a string to HTML Markdown::github()->toHtml($source)
Convert inline Markdown without a wrapper Markdown::github()->toInlineHtml($source)
Inspect or reuse a document Markdown::github()->fromString($source)
Edit and save a file Markdown::github()->open($path)
Generate Markdown Markdown::github()->builder()
Add trusted syntax or analysis Markdown::github()->with($extension)

Installation

Requires PHP 8.4 or newer. ext-dom is optional, used only by the curated HTML sanitizer.

Convert to HTML

The result is:

Direct conversion is the shortest and fastest path when HTML is the only result you need. Output is safe by default: raw HTML is escaped and unsafe URL schemes are filtered.

Use toInlineHtml() for a title, label, comment, or other fragment where block syntax and a paragraph wrapper are unwanted:

See Conversion, Security to choose the right language and HTML policy.

Open a document when you need more

A document keeps the parsed structure and the original source bytes. Query and edit it without rewriting unrelated content:

Use open() for a file. It adds atomic saving, unified diffs, formatting, and safe lint fixes:

Source ranges use original byte offsets. toMarkdown() preserves unchanged bytes, line endings, and a UTF-8 BOM. Alto rejects an edit when it cannot apply it safely under the documented V1 contract.

The documentation covers this in more depth: Queries and stats to inspect headings, sections, links, code, and document metrics; Manipulation to edit sections and rearrange top-level blocks with minimal diffs; and Lint, fix, and format to enforce content and style policies.

Extend

Trusted extensions add custom blocks, leaf inlines, native and link-aware HTML decoration, document render projections, lint, formatting, metrics, heading-level projection, permalinks, and generated tables of contents through compiled contracts. Read Extensions and Extension compatibility for the extension contracts and migration notes from historical Alto CommonMark extensions.

Documentation

Development

License

Alto Markdown is available under the MIT License.


All versions of markdown with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alto/markdown contains the following files

Loading the files please wait ...