DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:iconify

iconify Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" yes
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin Add Iconify icons in your Dokuwiki pages with customizable color and size.

Last updated on
2024-12-13
Provides
Syntax, Action
Repository
Source

Similar to fontawesome, icon, icons

Tagged with customization, iconify, icons

Installation

:!: External requirements: This plugin requires the iconify.min.js file if your Dokuwiki does not have internet access.

Search and install the plugin using the Extension Manager. Alternatively, you can download the plugin's ZIP file and copy its contents into the /lib/plugins/iconify/ directory.

Features

  • Supports embedding any icon from the Iconify library with a simple syntax.
  • Choose between loading the library online or using a local file.
  • Automatically fetch the latest Iconify version from the CDNJS API.
  • Customize default icon size globally or per icon.
  • Multilingual interface for configuration (supports English, French, Spanish, Portuguese, Chinese, German, Russian, and Polish).

Examples

Angrybirds icon with default size and color:

<iconify whh:angrybirds>

Green home icon with default size:

<iconify mdi:home color=#00ff00>

Red phone icon with custom size:

<iconify whh-phonealt size=48px color=red>

Syntax

Use the following syntax to include an icon in your Dokuwiki pages:

<iconify icon-name size=48px color=#ff0000>
  • icon-name — The name of the icon you want to use (e.g., mdi:home, bi:alarm).
  • size — (Optional) Define the size of the icon (e.g., 24px, 1.5em).
  • color — (Optional) Set the icon's color (e.g., #f40606, red).

Possible separator for icon name are :

  • a colon :
  • a dash-

For a full list of icons, visit Iconify's icon set explorer.

Configuration

You can configure the following options from the Configuration Settings page:

  • Default Icon Size: Set the default size for icons.
  • Iconify Version: Choose a specific Iconify version (e.g., 3.1.1) or latest to fetch the newest version dynamically.
  • Use Local File: Enable this option to use a local copy of iconify.min.js instead of loading it from the internet. The file should be placed in lib/plugins/iconify/local/.

Requirements

  • Dokuwiki version: Release 2020-07-29 “Hogfather” or later.
  • PHP version: 7.3 or higher.

Development

The plugin uses the CDNJS API to fetch the latest version dynamically.

If you have suggestions or find any issues, feel free to contribute on GitHub.

Changelog

FAQ

Default Icon Size

You can configure a default size for icons (e.g., 32px) in the plugin settings. Default size is 24px.

Local or Online Mode

You can choose between loading the Iconify library from the internet or using a local file:

  • Local Mode: Place the iconify.min.js file in the lib/plugins/iconify/local/ folder. Enable the “Use local file” option in the plugin settings.
  • Online Mode: The plugin will load the library from the internet using the version specified in the settings or fetch the latest version dynamically.

If the local mode is enabled but the file is not found, the plugin will log an error.

Iconify Version for Online Mode

You can configure the version of the Iconify library via the plugin settings. Specify the desired version (e.g., 3.1.1) or use latest to dynamically fetch the most recent version from the CDNJS API.

If the latest option is selected, the plugin will fetch the latest version available on CDNJS at runtime.

In case of an error with the API, the plugin will fall back to version 3.1.1.

Go to the plugin settings page in the Dokuwiki admin panel to configure these options.

plugin/iconify.txt · Last modified: by 87.240.83.199

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki