just-better / bard-link-suggestions
Add's functionality to the bard so that it suggests links.
Package info
github.com/justbetter/statamic-bard-link-suggestions
pkg:composer/just-better/bard-link-suggestions
Requires
- laravel/framework: ^13
- statamic/cms: ^6.3
- statamic/eloquent-driver: ^5.4
Requires (Dev)
- larastan/larastan: ^3.9
- laravel/pint: ^1.29
- orchestra/testbench: ^10.11|^11.0
- phpstan/phpstan-mockery: ^2.0
- phpunit/phpunit: ^12.5|^13.0
This package is not auto-updated.
Last update: 2026-04-11 05:57:29 UTC
README
A Statamic addon that adds **link suggestions** to the Bard editor.
While you type in Bard, this addon searches for possible links and shows a dropdown of suggestions. Suggestions are sourced from:
- Statamic entries (based on configurable fields per collection)
- Sitemaps (URLs indexed from one or more sitemap XML files)
Requirements
- Statamic v6
- Laravel 12+
- PHP 8.3+
- Statamic Eloquent Driver (this package queries entries via Eloquent/Stache)
Installation
Install the package via Composer:
composer require just-better/bard-link-suggestions
Run the migrations:
php artisan migrate
Usage
Once installed, Bard will start requesting suggestions while you type.
- Suggestions appear after typing 3+ characters of the current word (debounced).
- Clicking a suggestion turns the current word into a link.
- Only super users and users with the marketeer flag will see suggestions.
Configuration (Control Panel)
Go to the Control Panel settings page:
- JustBetter → Suggestions settings
On this page you can configure:
- Queryable fields per collection: choose which entry fields should be searched.
- Sitemap URLs: add one or more sitemap XML URLs (per Statamic site).
Sitemap indexing
Sitemap suggestions are backed by a database table that stores URLs extracted from your sitemap(s).
Index all configured sitemaps using:
php artisan statamic-bard-suggestions:index-sitemaps
Notes:
- Indexing runs via the queue. Make sure a queue worker is running.
- When you update sitemap settings, indexing/pruning jobs are dispatched automatically.
Quality
To ensure the quality of this package, run:
composer quality
This will execute:
- Tests
- Static analysis
- Code style checks
Testing
composer test
Credits
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.