PHPackages                             nsrosenqvist/cmb2-wiki - 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. nsrosenqvist/cmb2-wiki

AbandonedArchivedWordpress-plugin[Utility &amp; Helpers](/categories/utility)

nsrosenqvist/cmb2-wiki
======================

1.1.1(8y ago)125MITPHPPHP &gt;=7.0.0

Since Jun 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/nsrosenqvist/cmb2-wiki)[ Packagist](https://packagist.org/packages/nsrosenqvist/cmb2-wiki)[ Docs](https://github.com/nsrosenqvist/cmb2-wiki)[ RSS](/packages/nsrosenqvist-cmb2-wiki/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

CMB2 Wiki Field
===============

[](#cmb2-wiki-field)

Integrates a simple but powerful CMB2 field that is not meant to save user input but to display a wiki. Great to use for the landing page that explains the theme when using CMB2 to create a page for theme options.

```
$docs = new_cmb2_box(array(
    'id'            => 'docs',
    'title'         => __('Documentation', 'theme'),
));

$wiki = $docs->add_field(array(
    'name' => __('Wiki', 'theme'),
    'id'   => 'wiki',
    'type' => 'wiki',
    'meta' => true, // Display file path and modification date
    'wiki_root' => __DIR__.'/wiki',
    'theme_root' => __DIR__,
    'pre_process' => true, // Enables running PHP code in the file before displaying it
    'files' => [
        __DIR__.'/wiki/Introduction.md',
    ],
));
```

Add a markdown renderer:

```
use League\CommonMark\Converter;
use League\CommonMark\DocParser;
use League\CommonMark\Environment;
use League\CommonMark\HtmlRenderer;

use Webuni\CommonMark\TableExtension\TableExtension;
use League\CommonMark\Inline\Element\Link;
use League\CommonMark\Inline\Element\Image;

// Prebuilt classes that fixes relative links within the files
// to be properly linked when displayed in the admin UI
use NSRosenqvist\CMB2\WikiField\Markdown\LinkRenderer;
use NSRosenqvist\CMB2\WikiField\Markdown\ImageRenderer;

// Configure Markdown renderer
add_filter('cmb2_wiki_file_content', function($content, $file, $root) { // cmb2_{field_id}_file_content
    $environment = Environment::createCommonMarkEnvironment();
    $environment->addExtension(new TableExtension());
    $environment->addInlineRenderer(Link::class, new LinkRenderer($file, $root));
    $environment->addInlineRenderer(Image::class, new ImageRenderer($file, $root));

    $converter = new Converter(new DocParser($environment), new HtmlRenderer($environment));
    return $converter->convertToHtml($content);
}, 10, 3);

// Configure markdown file title
add_filter('cmb2_wiki_file_title', function($name, $file) { // cmb2_{field_id}_file_title
    return basename($file, '.md');
}, 10, 2);
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~3 days

Total

4

Last Release

2922d ago

### Community

Maintainers

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

---

Top Contributors

[![nsrosenqvist](https://avatars.githubusercontent.com/u/1303475?v=4)](https://github.com/nsrosenqvist "nsrosenqvist (5 commits)")

### Embed Badge

![Health badge](/badges/nsrosenqvist-cmb2-wiki/health.svg)

```
[![Health](https://phpackages.com/badges/nsrosenqvist-cmb2-wiki/health.svg)](https://phpackages.com/packages/nsrosenqvist-cmb2-wiki)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.8k69.4k](/packages/grumpydictator-firefly-iii)[roundcube/roundcubemail

The Roundcube Webmail suite

7.0k1.4k3](/packages/roundcube-roundcubemail)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3683.5M48](/packages/phiki-phiki)[phlak/directory-lister

PHP directory lister

2.5k1.4k](/packages/phlak-directory-lister)

PHPackages © 2026

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