PHPackages                             chrisvasey/statamic-backlinks - 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. chrisvasey/statamic-backlinks

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

chrisvasey/statamic-backlinks
=============================

Obsidian-style backlinks for Statamic's Bard and Markdown fields

v1.0.0(5mo ago)210MITPHPCI passing

Since Jan 18Pushed 5mo agoCompare

[ Source](https://github.com/chrisvasey/statamic-backlinks)[ Packagist](https://packagist.org/packages/chrisvasey/statamic-backlinks)[ RSS](/packages/chrisvasey-statamic-backlinks/feed)WikiDiscussions main Synced today

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

Statamic Backlinks
==================

[](#statamic-backlinks)

Obsidian-style backlinks for Statamic's Bard and Markdown fields. Create wiki-links between entries, track which pages link to each other, and create new pages from missing links.

Learn more about [Obsidian backlinks](https://help.obsidian.md/plugins/backlinks).

Features
--------

[](#features)

- **Wiki-link syntax**: Use `[[Page Title]]` or `[[Page Title|Display Text]]` in your content
- **Backlink tracking**: Automatically tracks which entries link to each other
- **Missing link detection**: Visually distinguish links to non-existent pages
- **Page creation**: Create new entries directly from missing wiki-links
- **Dashboard widget**: See backlink activity at a glance
- **Entry sidebar**: View backlinks when editing an entry
- **Antlers tag**: Display backlinks in your templates

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

[](#installation)

```
composer require chrisvasey/statamic-backlinks
```

Usage
-----

[](#usage)

### Wiki-Link Syntax

[](#wiki-link-syntax)

Use double-bracket syntax in your content fields:

```
Check out [[Getting Started]] for the basics.

You might also like [[Advanced Topics|our advanced guide]].

```

### Rendering Wiki-Links

[](#rendering-wiki-links)

Use the `wiki_links` modifier to render wiki-links as HTML:

```
{{ content | wiki_links }}
```

This transforms:

- `[[Existing Page]]` → `Existing Page`
- `[[Missing Page]]` → `Missing Page`

### Displaying Backlinks

[](#displaying-backlinks)

Use the `backlinks` tag to show pages that link to the current entry:

```
{{ backlinks }}
    {{ title }}
{{ /backlinks }}

{{# Or just get the count #}}
{{ backlinks:count }}

{{# For a specific entry #}}
{{ backlinks from="entry-id-here" }}
    {{ title }}
{{ /backlinks }}
```

### Dashboard Widget

[](#dashboard-widget)

Add the backlinks widget to your dashboard in `config/statamic/cp.php`:

```
'widgets' => [
    [
        'type' => 'backlinks',
        'title' => 'Recent Backlinks',
        'limit' => 10,
    ],
],
```

### Rebuilding the Index

[](#rebuilding-the-index)

If you need to rebuild the backlink index (e.g., after importing content):

```
php please backlinks:rebuild
```

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=statamic-backlinks-config
```

### Options

[](#options)

```
return [
    // Collections to scan for wiki-links
    'scan_collections' => ['*'], // or ['pages', 'blog']

    // Collections that can be linked to
    'linkable_collections' => ['*'],

    // Fields to scan for wiki-links
    'scan_fields' => ['content', 'body', 'text', '*'],

    // Page creation settings
    'creation' => [
        'collection_strategy' => 'same', // 'same' or 'default'
        'default_collection' => 'pages',
        'default_blueprint' => null,
        'default_published' => false,
    ],

    // Index storage
    'storage' => 'file', // 'file' or 'cache'
    'storage_path' => storage_path('statamic/backlinks.json'),

    // CSS classes for rendered links
    'css' => [
        'link' => 'wiki-link',
        'missing' => 'wiki-link-missing',
    ],
];
```

Styling
-------

[](#styling)

The addon includes basic CSS for wiki-links. You can customize the appearance:

```
.wiki-link {
    color: blue;
    text-decoration: underline dotted;
}

.wiki-link-missing {
    color: red;
    text-decoration: underline dashed;
    cursor: pointer;
}
```

Development
-----------

[](#development)

### Building Assets

[](#building-assets)

```
cd addons/chrisvasey/statamic-backlinks
npm install
npm run build
```

For development with hot reloading:

```
npm run dev
```

### Running Tests

[](#running-tests)

```
cd addons/chrisvasey/statamic-backlinks
./vendor/bin/phpunit
```

License
-------

[](#license)

MIT License

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance71

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Unknown

Total

1

Last Release

165d ago

### Community

Maintainers

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

---

Top Contributors

[![chrisvasey](https://avatars.githubusercontent.com/u/7483460?v=4)](https://github.com/chrisvasey "chrisvasey (7 commits)")

---

Tags

markdownstatamicbardBacklinksobsidianwiki-links

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/chrisvasey-statamic-backlinks/health.svg)

```
[![Health](https://phpackages.com/badges/chrisvasey-statamic-backlinks/health.svg)](https://phpackages.com/packages/chrisvasey-statamic-backlinks)
```

###  Alternatives

[erusev/parsedown

Parser for Markdown.

15.1k156.8M870](/packages/erusev-parsedown)[league/commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)

3.0k437.5M1.0k](/packages/league-commonmark)[michelf/php-markdown

PHP Markdown

3.5k54.5M379](/packages/michelf-php-markdown)[league/html-to-markdown

An HTML-to-markdown conversion helper for PHP

1.9k32.2M298](/packages/league-html-to-markdown)[cebe/markdown

A super fast, highly extensible markdown parser for PHP

1.0k34.1M148](/packages/cebe-markdown)[statamic/statamic

Statamic

829179.5k](/packages/statamic-statamic)

PHPackages © 2026

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