PHPackages                             packaged/remarkd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. packaged/remarkd

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

packaged/remarkd
================

Markdown Parser

1.1.0(1y ago)32.1kPHPCI passing

Since Sep 20Pushed 3w ago2 watchersCompare

[ Source](https://github.com/packaged/remarkd)[ Packagist](https://packagist.org/packages/packaged/remarkd)[ RSS](/packages/packaged-remarkd/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (7)Versions (4)Used By (0)

remarkd
=======

[](#remarkd)

remarkd is a PHP-first Markdown parser with selected AsciiDoc-style blocks, document attributes, conditionals, and object macros.

Full usage documentation is available as a static, multi-page site in [docs/](docs/). The site covers getting started in all three languages, the concepts behind the format, a complete feature reference with live previews, an interactive playground, and the cross-language conformance suite.

The pages use ES modules, which browsers block over `file://`. Serve the directory over HTTP to preview locally (GitHub Pages already serves over HTTP, so the published site works as-is):

```
npm run serve:docs   # then open http://localhost:8000
```

Installing the parser (developers)
----------------------------------

[](#installing-the-parser-developers)

Writers don't need any of this — the [documentation site](docs/) covers how to *write* Remarkd. The instructions below are for developers embedding a parser.

### PHP (Composer)

[](#php-composer)

```
composer require packaged/remarkd
```

```
use Packaged\Remarkd\Remarkd;

$html = (new Remarkd())->parse("# Heading\n\nA **bold** paragraph.");
```

### Go

[](#go)

```
go get github.com/packaged/remarkd
```

```
import "github.com/packaged/remarkd"

html := remarkd.Parse("# Heading\n\nA **bold** paragraph.")
```

### TypeScript / JavaScript

[](#typescript--javascript)

```
npm install
npm run build
```

```
import { Remarkd } from "remarkd-js";

const html = Remarkd.parse("# Heading\n\nA **bold** paragraph.");
```

### Document-header mode

[](#document-header-mode)

Pass a truthy second argument to enable AsciiDoc-style document detection: a leading `= Title`, optional author and revision lines, and document attributes are read as a header before the body is parsed.

```
$html = $remarkd->parse($text, true);   // PHP
```

```
html := remarkd.Parse(text, true)       // Go
```

```
const html = Remarkd.parse(text, true); // TS
```

### Includes And Partials

[](#includes-and-partials)

Use `include::path/to/file.remarkd[]` to render another Remarkd document in place. The included file is parsed as its own document, so its section wrapper is preserved.

```
include::shared/intro.remarkd[]

```

Remarkd includes local partials with `t::partial::path/to/file.remarkd`. Paths resolve from the parser's project root, or from the current process path when no project root is set.

```
$remarkd = new Remarkd();
$remarkd->ctx()->setProjectRoot(__DIR__ . '/docs');

$html = $remarkd->parse("t::partial::shared/intro.remarkd");
```

```
html := remarkd.ParseWithOptions(
  "t::partial::shared/intro.remarkd",
  remarkd.Options{ProjectRoot: "docs"},
)
```

```
const html = Remarkd.parse("t::partial::shared/intro.remarkd", false, {
  projectRoot: "docs",
});
```

For document-shaped partials, use explicit options to remove a leading document title and trailing lines:

```
t::partial::shared/page.remarkd[strip-title,drop-last=3]

```

This repository includes PHP, Go, and TypeScript parsers. All three implementations are kept aligned with the shared fixtures in `requirements/features`.

Shared Requirements
-------------------

[](#shared-requirements)

Each requirement fixture contains `input.remarkd` and `expected.html`. The current suite covers 57 user-facing syntax features. Run the language-specific conformance checks with:

```
vendor/bin/phpunit tests/RequirementsTest.php
go test ./go
npm run test:ts
```

Documentation Site
------------------

[](#documentation-site)

The help site is designed for GitHub Pages from the `docs/` directory. Pages are hand-authored HTML that share a stylesheet and a few small ES modules; the shared navigation is injected by `docs/assets/site.js`, and the feature reference and conformance pages render from one data module, `docs/assets/features.js`. The playground and previews are powered by the TypeScript parser bundle.

Refresh the generated assets after parser changes:

```
npm run build:docs
```

This rebuilds the playground bundle and regenerates `docs/assets/conformance-status.json`, which records whether each parser (PHP, Go, TypeScript) reproduces every fixture. The conformance page reads it for the PHP and Go columns and computes the TypeScript column live in the browser. Regenerating the JSON requires the `php` and `go` toolchains locally; if either is missing, that column is recorded as unbuilt and the build still succeeds.

The documented examples (sources and expected HTML) are checked against the fixtures so they cannot silently drift:

```
npm run check:examples
```

Then configure GitHub Pages to publish from `docs/` on the desired branch.

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance69

Regular maintenance activity

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~790 days

Total

2

Last Release

581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2dc779402c4fa879b9f63159900da2a4c766661286182c4cecd66a7d4fc71ed?d=identicon)[bajbnet](/maintainers/bajbnet)

---

Top Contributors

[![bajb](https://avatars.githubusercontent.com/u/2241334?v=4)](https://github.com/bajb "bajb (63 commits)")[![MrEssex](https://avatars.githubusercontent.com/u/5024348?v=4)](https://github.com/MrEssex "MrEssex (14 commits)")[![TomK](https://avatars.githubusercontent.com/u/299656?v=4)](https://github.com/TomK "TomK (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/packaged-remarkd/health.svg)

```
[![Health](https://phpackages.com/badges/packaged-remarkd/health.svg)](https://phpackages.com/packages/packaged-remarkd)
```

###  Alternatives

[urb/xenforobridge

Xenforo Bridge - Easy to use extendable bridge to use outside of your XenForo application all contained within a simple to use composer package

255.7k](/packages/urb-xenforobridge)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
