Simple blogging system written in Go https://goblog.app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
GoBlog/docs/plugins.md

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

Webrings (plugins/webrings)

Adds webring links to the bottom of the blog footer to easily participate in webrings.

Config

You can add webring links like this:

config:
  default: # Name of the blog
    - title: Webring # Title to show for the webring
      prev: https://example.com/ # Link to previous webring site
      next: https://example.net/ # Link to next webring site