PHPackages                             sylvainjule/footnotes - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. sylvainjule/footnotes

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

sylvainjule/footnotes
=====================

Footnotes plugin for Kirby 3, 4 and 5

2.1.1(9mo ago)582.7k4MITPHP

Since Mar 24Pushed 9mo ago3 watchersCompare

[ Source](https://github.com/sylvainjule/kirby-footnotes)[ Packagist](https://packagist.org/packages/sylvainjule/footnotes)[ RSS](/packages/sylvainjule-footnotes/feed)WikiDiscussions master Synced 1mo ago

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

Kirby Footnotes
===============

[](#kirby-footnotes)

This plugin extends [Kirby 3, 4 and 5](http://getkirby.com) with some basic, extremely easy and unopinionated footnote functionalities.

[![footnotes-screenshot](https://user-images.githubusercontent.com/14079751/76997929-79cf0080-6954-11ea-87ce-bcb86b9d959f.jpg)](https://user-images.githubusercontent.com/14079751/76997929-79cf0080-6954-11ea-87ce-bcb86b9d959f.jpg)

Overview
--------

[](#overview)

> This plugin is completely free and published under the MIT license. However, if you are using it in a commercial project and want to help me keep up with maintenance, you can consider [making a donation of your choice](https://www.paypal.me/sylvainjl).

- [1. Installation](#1-installation)
- [2. Basic usage](#2-basic-usage)
- [3. Advanced usage](#3-advanced-usage)
    - [3.1. Collect notes from multiple fields](#31-collect-notes-from-multiple-fields)
    - [3.2. Usage with blocks](#32-usage-with-blocks)
- [4. Frontend customization](#4-frontend-customization)
- [5. Options](#5-options)
- [6. Methods](#6-methods)
- [7. License](#7-license)
- [8. Credits](#8-credits)

1. Installation
---------------

[](#1-installation)

Download and copy this repository to `/site/plugins/footnotes`

Alternatively, you can install it with composer: `composer require sylvainjule/footnotes`

2. Basic usage
--------------

[](#2-basic-usage)

Use the footnotes method on your field: `$page->text()->footnotes()` or `$page->text()->ft()` (no need to call `->kirbytext()` before or after, this method will take care of it).

Adding footnotes to your Kirbytext field is simple. Just type them inline in your post in square brackets like this:

```
[^This is a footnote.]
[^ This is another.]

```

Each footnote must start with a caret (`^`) and will be numbered automatically. Footnotes can contain anything you want including links or images, but please note that **you should not include unescaped square brackets \[\] inside a footnote.**

If you add square brackets in a note (`This is a truncated […] quote` for example), you must escape the closing bracket belonging to the note:

```
[^ This is a truncated […\] quote]

```

For example, with the default setup this text:

> This is a footnote.\[^Right here!\] Here is a test with a footnote that contains a link.\[^ Yes, there is indeed (link:  text: a link.)\] And, well, just to be sure things are working I'm throwing a third footnote in here.\[^ All good!\]

Will output:

[![Footnotes example](https://user-images.githubusercontent.com/14079751/76996677-32e00b80-6952-11ea-8ed5-870981fd0305.jpg)](https://user-images.githubusercontent.com/14079751/76996677-32e00b80-6952-11ea-8ed5-870981fd0305.jpg)

3. Advanced usage
-----------------

[](#3-advanced-usage)

### 3.1. Collect notes from multiple fields

[](#31-collect-notes-from-multiple-fields)

If you have multiple fields on your page you'd like to collect footnotes from, an output a signle container at the end of your page, instead of using the `footnotes()` method, you can use the `collectFootnotes()` one.

This method will return the text with footnotes references, no footnotes container, and store the footnotes container for later use.

For example:

```
// somewhere in your template
echo $page->text1()->collectFootnotes();

// somewhere else in your template
echo $page->text2()->collectFootnotes();

// at the end of your template,
// echo the footnotes container with all collected footnotes
echo Footnotes::footnotes();
```

### 3.2. Usage with blocks

[](#32-usage-with-blocks)

The plugins provides a `collectFootnotes()` blocks method, intended to collect all footnotes found in the converted blocks (you need to chain it after the `toBlocks()` method).

```
// collect the footnotes and return the html with footnotes references
echo $page->blocks->toBlocks()->collectFootnotes();

// at the end of your template,
// echo the footnotes container with all collected footnotes
echo Footnotes::footnotes();
```

4. Frontend customization
-------------------------

[](#4-frontend-customization)

As you can see with the raw output above, the plugin is completely unopinionated. It doesn't ship with any CSS or JS code but provides the markup to adjust its styling to suit your website.

Here is a reference of the outputted markup and classes to grab for styling:

```

    This is a footnote.1 Here is a test with a footnote that contains a link.2 And, well, just to be sure things are working I'm throwing a third footnote in here.3

            Right here! ↩

            Yes, there is indeed a link.↩

            All good! ↩

```

In your stylesheet:

```
sup.footnote {}         /* Footnote reference within text */
.footnotes-container {} /* Footnotes container */
.footnotes-list {}      /* Footnotes ordered list */
.footnotes-list li {}   /* Footnote entry */
.footnotereverse {}     /* Footnote back link ↩ */
```

5. Options
----------

[](#5-options)

There are a few options:

### 5.1. Wrapper

[](#51-wrapper)

For semantic purposes, you can manually set which HTML tag to use as footnotes container, `aside`, `footer`, etc. (default is a simple `div`)

```
'sylvainjule.footnotes.wrapper'  => 'div'
```

### 5.2. Back

[](#52-back)

The string displayed at the end of a footnote, linking to its reference within the text. Default is `&#8617;` / ↩.

```
'sylvainjule.footnotes.back'  => '&#8617;'
```

If you don't want any return link to appear, set this value to `false`.

### 5.3. Back title

[](#53-back-title)

The title attribute set on the return link for accessibility purposes. Default is `Back to content {{index}}` (in english, see [this folder](https://github.com/sylvainjule/kirby-footnotes/tree/master/lib/languages) for all available translations — don’t hesitate to PR one if missing). Your custom title will be suffixed with the `{{index}}` of the footnote.

```
'sylvainjule.footnotes.back.title'  => 'Back to content', // -> 'Back to content 1', 'Back to content 2', etc.
'sylvainjule.footnotes.back.title'  => 'Custom title',    // -> 'Custom title 1', 'Custom title 2', etc.
```

If you don't want any return link to appear, set this value to `false`.

### 5.4. Links

[](#54-links)

If you don't want the footnote references and footnotes to be links, for example if you are displaying them as sidenotes instead of footnotes, set this to `false`. Default is `true`.

```
'sylvainjule.footnotes.links'  => false
```

If set to `false`, the footnote's *back* link won't be appended to the footnote, and the syntax of the footnote reference within the text changes :

```

    1

1
```

### 5.5. Snippets

[](#55-snippets)

If you want to overwrite one of [the default snippets](https://github.com/sylvainjule/kirby-footnotes/tree/master/snippets), you can place a file sharing the same name in your `site/snippets` folder. If you want to register a custom name / path for one of these 3 snippets, you can do so from your config file:

```
'sylvainjule.footnotes.snippet.container' => 'footnotes_container',
'sylvainjule.footnotes.snippet.entry'     => 'footnotes_entry',
'sylvainjule.footnotes.snippet.reference' => 'footnotes_reference'

↓

'sylvainjule.footnotes.snippet.container' => 'custom/path/to/footnotes_container',
'sylvainjule.footnotes.snippet.entry'     => 'custom/path/to/footnotes_entry',
'sylvainjule.footnotes.snippet.reference' => 'custom/path/to/footnotes_reference'
```

6. Methods
----------

[](#6-methods)

```
// returns the text with footnotes references and a bottom footnote container
echo $page->text()->footnotes();

// returns the text without footnotes references nor bottom footnotes container
echo $page->text()->removeFootnotes();

// returns the text with footnotes references but no bottom footnotes container
echo $page->text()->withoutFootnotes();

// returns only the footnotes container
echo $page->text()->onlyFootnotes();

// returns the text with footnotes references, no footnotes container, but stores the footnotes container for later use
echo $page->text1()->collectFootnotes();
echo $page->text2()->collectFootnotes();

// returns the footnotes container with all collected footnotes and clears the memory
echo Footnotes::footnotes();
```

7. License
----------

[](#7-license)

MIT

8. Credits
----------

[](#8-credits)

This plugin has been built on top of the K2 version by [@distantnative](https://github.com/distantnative/footnotes). 🙏

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 85% 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 ~326 days

Recently: every ~406 days

Total

7

Last Release

285d ago

Major Versions

1.0.4 → 2.0.02024-05-19

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14079751?v=4)[Sylvain Julé](/maintainers/sylvainjule)[@sylvainjule](https://github.com/sylvainjule)

---

Top Contributors

[![sylvainjule](https://avatars.githubusercontent.com/u/14079751?v=4)](https://github.com/sylvainjule "sylvainjule (34 commits)")[![ffoodd](https://avatars.githubusercontent.com/u/2890570?v=4)](https://github.com/ffoodd "ffoodd (2 commits)")[![rasteiner](https://avatars.githubusercontent.com/u/6684137?v=4)](https://github.com/rasteiner "rasteiner (2 commits)")[![distantnative](https://avatars.githubusercontent.com/u/3788865?v=4)](https://github.com/distantnative "distantnative (1 commits)")[![thsr](https://avatars.githubusercontent.com/u/14094094?v=4)](https://github.com/thsr "thsr (1 commits)")

---

Tags

footnotefootnoteskirbykirby-pluginwriter

### Embed Badge

![Health badge](/badges/sylvainjule-footnotes/health.svg)

```
[![Health](https://phpackages.com/badges/sylvainjule-footnotes/health.svg)](https://phpackages.com/packages/sylvainjule-footnotes)
```

###  Alternatives

[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[mzur/kirby-uniform

A versatile Kirby plugin to handle web form actions.

26068.3k13](/packages/mzur-kirby-uniform)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[thathoff/kirby-git-content

Plugin to track changes to content in a git repository.

15343.7k](/packages/thathoff-kirby-git-content)[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[tobimori/kirby-seo

The default choice for SEO on Kirby: Implement technical SEO &amp; Meta best practices with ease and provide an easy-to-use editor experience

10039.7k1](/packages/tobimori-kirby-seo)

PHPackages © 2026

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