PHPackages                             dsnr/obsidian-commonmark-extension - 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. dsnr/obsidian-commonmark-extension

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

dsnr/obsidian-commonmark-extension
==================================

A league/commonmark extension to parse obsidian markdown to html

v0.0.3(3y ago)062MITPHPPHP ^8.0

Since Apr 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/DSNR/obsidian-commonmark-laravel-extension)[ Packagist](https://packagist.org/packages/dsnr/obsidian-commonmark-extension)[ RSS](/packages/dsnr-obsidian-commonmark-extension/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

obsidian-commonmark-extension
=============================

[](#obsidian-commonmark-extension)

obsidian-commonmark-extension is a custom extension for the CommonMark markdown parser that adds a new inline element and renderer for displaying images with a configurable base URL. A new inline element and parser for obsidian style links and anchors

---

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

[](#installation)

You can install the extension using Composer:

```
composer require dsnr/obsidian-commonmark-extension
```

Usage
-----

[](#usage)

To use the extension, create a new `League\CommonMark\Environment\Environment` instance, register the extension with the `addExtension()` method, and pass the environment to a new `League\CommonMark\CommonMarkConverter` instance:

The extension expects the image file names to be kebab cased eg. `example-image.ong`

```
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment\Environment;
use Dsnr\ObsidianCommonmarkExtension\ObsidianConverterExtension;

$environment = new Environment();
  $environment->addExtension(new ObsidianConverterExtension());

$converter = new CommonMarkConverter([], $environment);

echo $converter->convertToHtml('![[Example Image.png]]);
```

---

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

[](#configuration)

obsidian-commonmark-extension includes a configuration schema that defines the `obsidian.image_base_url` option as a string type with an empty default value. You can modify this option by passing an array of configuration options.

By default, the extension's image base URL is an empty string, so the image URL will be displayed exactly as written. To set a custom image base URL, set the `obsidian.image_base_url ` :

```
use League\CommonMark\CommonMarkConverter;
use League\CommonMark\Environment\Environment;
use Dsnr\ObsidianCommonmarkExtension\ObsidianConverterExtension;

$config = [
  'obsidian' => [
    'base_image_path' => asset('/images/')
  ]
];

$environment = new Environment($config);
$environment->addExtension(new ObsidianConverterExtension());

$converter = new CommonMarkConverter([], $environment);

echo $converter->convertToHtml('![[Example Image.png]]);
```

---

License
-------

[](#license)

obsidian-commonmark-extension is licensed under the MIT license.

Please let me know if you need any further modifications or clarifications in the readme file.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Total

3

Last Release

1180d ago

### Community

Maintainers

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

---

Top Contributors

[![scotthellings](https://avatars.githubusercontent.com/u/12866345?v=4)](https://github.com/scotthellings "scotthellings (3 commits)")

---

Tags

commonmark-extensionmarkdownphpobsidiancommonmark-mark-extension

### Embed Badge

![Health badge](/badges/dsnr-obsidian-commonmark-extension/health.svg)

```
[![Health](https://phpackages.com/badges/dsnr-obsidian-commonmark-extension/health.svg)](https://phpackages.com/packages/dsnr-obsidian-commonmark-extension)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M984](/packages/statamic-cms)[tempest/framework

The PHP framework that gets out of your way.

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

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mnapoli/front-yaml

YAML Front matter parser

2895.7M50](/packages/mnapoli-front-yaml)[illuminate/mail

The Illuminate Mail package.

5910.6M498](/packages/illuminate-mail)

PHPackages © 2026

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