GoBlog/docs/plugins.md

1.7 KiB

GoBlog Plugins

GoBlog has a (still experimental) plugin system, that allows adding new functionality to GoBlog without adding anything to the GoBlog source and recompiling GoBlog. Plugins work using the Yaegi package by Traefik and are interpreted at run time.

Configuration

Plugins can be added to GoBlog by adding a "plugins" section to the configuration.

plugins:
  - path: ./plugins/syndication
    type: ui
    import: syndication
    config:
      parameter: syndication
  - path: ./plugins/demo
    type: ui
    import: demoui
  - path: ./plugins/demo
    type: middleware
    import: demomiddleware
    config:
      prio: 99

You need to specify the path to the plugin (remember to mount the path to your GoBlog container when using Docker), the type of the plugin, the import (the Go packakge) and you can additionally provide configuration for the plugin.

Types of plugins

Plugins

Some simple plugins are included in the main GoBlog repository. Some can be found elsewhere.

Adds hidden u-syndication data elements to post page when the configured post parameter (default: "syndication") is available.

Config

parameter (string): Name for the post parameter containing the syndication links.