Download the PHP package sylvainjule/footnotes without Composer

On this page you can find all versions of the php package sylvainjule/footnotes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package footnotes

Kirby Footnotes

This plugin extends Kirby 3 and 4 with some basic, extremely easy and unopinionated footnote functionalities.

footnotes-screenshot

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, please consider making a donation of your choice.


1. Installation

Download and copy this repository to

Alternatively, you can install it with composer:


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:

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:

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: https://getkirby.com 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


3. Advanced usage

3.1. 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:

3.2. 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).


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:

In your stylesheet:


5. Options

There are a few options:

5.1. Wrapper

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

5.2. Back

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

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

5.3. 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.

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 :


6. Methods


7. License

MIT


8. Credits

This plugin has been built on top of the K2 version by @distantnative. 🙏


All versions of footnotes with dependencies

PHP Build Version
Package Version
Requires getkirby/composer-installer Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sylvainjule/footnotes contains the following files

Loading the files please wait ....