Download the PHP package spatie/commonmark-wire-navigate without Composer
On this page you can find all versions of the php package spatie/commonmark-wire-navigate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download spatie/commonmark-wire-navigate
More information about spatie/commonmark-wire-navigate
Files in spatie/commonmark-wire-navigate
Package commonmark-wire-navigate
Short Description Add a wire:navigate attribute to links rendered in Markdown
License MIT
Homepage https://github.com/spatie/commonmark-wire-navigate
Informations about the package commonmark-wire-navigate
Add a wire:navigate attribute to links rendered in Markdown
An extension for league/commonmark to add a wire:navigate
attribute to links rendered in Markdown and enable SPA mode in Livewire.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
You can install the package via composer:
Usage
Register CommonMarkWireNavigate
as a CommonMark extension.
For more information on CommonMark extensions and environments, refer to the CommonMark documentation.
Laravel-markdown
When using the Laravel-markdown package, you may register the extension in config/markdown.php
:
Choosing which links to enhance
By default, the extension will add wire:navigate
to all internal links except fragments of the current page. To know which link is internal, you must specify your application's base URL.
Additionally, you can configure whether the attribute will be added using an array of patterns or a callback.
Using an array to specify a root path in your application:
Using a callback:
Enable on fragments of the current page:
Prefetching pages on hover
If you want to have Livewire prefetch pages when a link is hovered, enable the hover
option.
Now the extension will add wire:navigate.hover
to links instead.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Sebastian De Deyne
- All Contributors
License
The MIT License (MIT). Please see License File for more information.