Download the PHP package birdcar/markdown-php without Composer

On this page you can find all versions of the php package birdcar/markdown-php. 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-php

birdcar/markdown-php

A league/commonmark extension suite for Birdcar Flavored Markdown (BFM) — a superset of CommonMark and GFM that adds YAML front-matter, directive blocks, extended task lists, task modifiers, mentions, hashtags, metadata extraction, and document merging.

See the BFM spec for the full syntax definition.

Packages

This is a monorepo containing the core library and framework integration packages:

Package Description Install
birdcar/markdown-php Core library (this repo root) composer require birdcar/markdown-php
birdcar/markdown-laravel Laravel service provider, Str::bfm() macro, @bfmStyles directive composer require birdcar/markdown-laravel
birdcar/markdown-filament Filament v4 BfmEditor, BfmTextColumn, BfmTextEntry composer require birdcar/markdown-filament

Requirements

Quick Start

Core library (any PHP project)

Laravel

Zero config — the service provider auto-discovers and registers everything:

In Blade templates:

Publish the config to customize the render profile or bind resolver classes:

Filament v4

Drop-in replacement for Filament's MarkdownEditor with server-side BFM preview:

The BfmEditor provides a preview toggle button that renders BFM syntax server-side via Filament v4's callSchemaComponentMethod — no traits or page-level configuration needed.

The Factory

BfmEnvironmentFactory::create() returns a fully configured Environment with CommonMark, GFM (minus task lists, which BFM replaces), and all BFM extensions:

Individual extensions

Each feature is a self-contained extension:

Class Description
FrontmatterExtension YAML front-matter (--- blocks)
TaskExtension [x], [>], [!], etc. in list items
TaskModifierExtension //due:2025-03-01, //hard metadata
MentionExtension @username inline references
HashtagExtension #project inline tags
CalloutExtension @callout/@endcallout container blocks
EmbedExtension @embed/@endembed leaf blocks
DetailsExtension @details/@enddetails collapsible sections
TabsExtension @tabs/@tab tabbed content groups
FigureExtension @figure/@endfigure images with captions
AsideExtension @aside/@endaside sidebar content
MathExtension @math/@endmath LaTeX display blocks
TocExtension @toc/@endtoc auto table of contents
IncludeExtension @include/@endinclude file transclusion
QueryExtension @query/@endquery dynamic content
EndnotesExtension @endnotes/@endendnotes footnote rendering
FootnoteExtension [^label] references and [^label]: definitions

Resolvers

Mentions and embeds can be resolved at render time by implementing the contract interfaces.

MentionResolverInterface:

Without a resolver, mentions render as <span class="mention">@identifier</span>. With a resolver that returns a URL, they render as <a href="..." class="mention">@label</a>.

EmbedResolverInterface:

Without a resolver, embeds render as a <figure> with a plain link. With a resolver that returns html, the resolved HTML is embedded directly.

IncludeResolverInterface:

Resolve file transclusion for @include directives:

Without a resolver, @include renders as a placeholder <div> with data attributes.

QueryResolverInterface:

Resolve dynamic content for @query directives:

Without a resolver, @query renders as a placeholder <div> with data attributes.

ComputedFieldResolverInterface:

Extend metadata extraction with custom computed fields:

Metadata Extraction

Extract structured metadata from parsed documents:

Custom computed fields via resolvers:

Document Merging

Deep-merge front-matter and concatenate body content across multiple documents:

Styling

The @bfmStyles Blade directive (from birdcar/markdown-laravel) outputs a default stylesheet covering all BFM output elements. The stylesheet uses CSS custom properties for theming and supports both prefers-color-scheme: dark and class-based dark mode (.dark).

To publish the stylesheet for customization:

Override any variable in your own CSS:

The Filament package automatically loads BFM styles into the admin panel.

Syntax Reference

YAML Front-matter

Front-matter must appear at the very start of the document. The YAML content is parsed and available via FrontmatterBlock::getParsedData().

Extended Task Lists

Seven states, inspired by Bullet Journal:

Task Modifiers

Inline metadata on task items using //key:value syntax:

Mentions

Hashtags

Identifiers follow the pattern [a-zA-Z][a-zA-Z0-9_-]*. The # must not be preceded by an alphanumeric character. Hashtags inside code spans are not parsed.

Directive Blocks

Callouts (container — body is parsed as markdown):

Embeds (leaf — body is treated as caption text):

Details (container — collapsible section):

Tabs (container — tabbed content groups):

Figure (container — image with caption):

Aside (container — sidebar content):

TOC (leaf — auto-generated table of contents):

Math (leaf — LaTeX display block):

Include, Query, Endnotes (leaf — resolver-dependent or structural):

Footnotes

Pandoc-style footnote references and definitions:

Footnotes are auto-numbered in order of first reference. If no @endnotes directive is present, the endnotes section is appended at the end of the document.

HTML Output

The extensions produce semantic, BEM-style HTML:

License

MIT


All versions of markdown-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
league/commonmark Version ^2.7
symfony/yaml Version ^7.2 || ^8.0
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 birdcar/markdown-php contains the following files

Loading the files please wait ...