Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 860 Bytes

DOCUMENTATION.md

File metadata and controls

34 lines (23 loc) · 860 Bytes

Installing

composer require statamic/wikilinks

Usage

Wikilinks provides a simple modifier that seeks out any content wrapped in [braces] and automatically links it to other entries or pages with the same title (or other field of your choosing).

Example

Let's assume we have a collection full of entries about people, one of whom is named Jerry.

content_field: It's been a long time since I've seen [Jerry].
{{ content_field | markdown | wikilinks }}
<p>It's been a long time since I've seen <a href="/people/jerry">Jerry</a>.</p>

Parameters

By default Wikilinks will match by the title field, but you can pass another field as a parameter. Be sure to choose a field that exists in your search index.

Example:

{{ content_field | markdown | wikilinks:author }}