PHPackages                             djadomi/f3-gfm - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. djadomi/f3-gfm

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

djadomi/f3-gfm
==============

GitHub-Flavoured Markdown plugin for Fat-Free Framework

0.0.10(3mo ago)018↓90.9%MITPHP

Since Apr 1Pushed 2mo agoCompare

[ Source](https://github.com/djadomi/f3-gfm)[ Packagist](https://packagist.org/packages/djadomi/f3-gfm)[ Docs](https://github.com/djadomi/f3-gfm)[ RSS](/packages/djadomi-f3-gfm/feed)WikiDiscussions main Synced 4w ago

READMEChangelogDependencies (6)Versions (11)Used By (0)

F3-GFM - GitHub-Flavoured Markdown Plugin for Fat-Free Framework
================================================================

[](#f3-gfm---github-flavoured-markdown-plugin-for-fat-free-framework)

A modern markdown plugin for F3 that supports GitHub-Flavoured Markdown features using the league/commonmark library.

Features
--------

[](#features)

- **Tables** - Full table support with alignment
- **Task Lists** - Interactive checkboxes
- **Autolinks** - Automatic URL linking
- **Strikethrough** - `~~text~~` syntax
- **Alerts** - GitHub-style admonitions (`[!NOTE]`, `[!TIP]`, `[!IMPORTANT]`, `[!WARNING]`, `[!CAUTION]`) — work in progress

Installation
------------

[](#installation)

```
composer require djadomi/f3-gfm
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
$gfm = new \Djadomi\F3Gfm;
$html = $gfm->convert('# Hello World');
echo $html;
```

### In Templates

[](#in-templates)

```
$f3->set('content', $gfm->convert($markdown));
```

### Template Filter

[](#template-filter)

```
\Template::instance()->filter('gfm', function($text) {
	return \Djadomi\F3Gfm::instance()->convert($text);
});
```

Then in templates:

```
{{ @markdown_text | gfm }}
```

Configuration
-------------

[](#configuration)

Set these in your F3 hive before using:

```
$f3->set('GFM_HTML_INPUT', 'escape'); // 'strip' or 'allow' (default: 'escape')
$f3->set('GFM_UNSAFE_LINKS', false); // Allow javascript: links (default: false)
$f3->set('GFM_MAX_NESTING', 100); // Max nesting level (default: 100)
$f3->set('GFM_TABLE_WRAP', false); // Wrap tables in div.gfm-table (default: false)
```

Styling
-------

[](#styling)

You may want to include something like  to get GitHub-like styling for your rendered markdown. Adding the `markdown-body` class to your container to apply these might require you to undo some of this CSS if you want to keep your site's own styling, especially variables like `--bgColor-default` and `--fgColor-default`.

Examples
--------

[](#examples)

### Tables

[](#tables)

```
| Name  | Age | City    |
|-------|-----|---------|
| Alice | 30  | NYC     |
| Bob   | 25  | London  |
```

### Task Lists

[](#task-lists)

```
- [x] Complete task
- [ ] Pending task
```

### Strikethrough

[](#strikethrough)

```
~~This is deleted~~
```

### Autolinks

[](#autolinks)

```
Visit https://example.com
```

### Alerts

[](#alerts)

Warning

Work in progress

```
> [!NOTE]
> This is a note.

> [!WARNING]
> This is a warning.
```

Output:

```

This is a note.

```

License
-------

[](#license)

MIT

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance82

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

9

Last Release

90d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/821b3835e942ebfc28e343eeff020c6cf63667555ec1585192336fbda8dd284d?d=identicon)[djadomi](/maintainers/djadomi)

---

Top Contributors

[![djadomi](https://avatars.githubusercontent.com/u/512513?v=4)](https://github.com/djadomi "djadomi (21 commits)")

---

Tags

markdownfat-freegithub-flavoured

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/djadomi-f3-gfm/health.svg)

```
[![Health](https://phpackages.com/badges/djadomi-f3-gfm/health.svg)](https://phpackages.com/packages/djadomi-f3-gfm)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k13](/packages/tempest-framework)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[daux/daux.io

Documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly

827199.0k1](/packages/daux-dauxio)[torchlight/torchlight-commonmark

A Commonmark extension for Torchlight, the syntax highlighting API.

29272.1k6](/packages/torchlight-torchlight-commonmark)[maglnet/magl-markdown

Provides a ZF2 View Helper to render markdown syntax. It uses third-party libraries for the rendering and you can switch between different renderers.

23198.8k4](/packages/maglnet-magl-markdown)[zoon/commonmark-ext-youtube-iframe

Extension for league/commonmark to replace youtube link with iframe

12283.6k1](/packages/zoon-commonmark-ext-youtube-iframe)

PHPackages © 2026

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