You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow users to pack config, functions, and data to extend Beacon.
Enable plugins in your site config:
plugins: [MyBlogPlugin]
And the plugin implements Beacon.Plugin:
defmoduleMyBlogPlugindo@behaviourBeacon.Plugin@impltruedefconfigdo%Beacon.Config{extra_page_fields: [MyBlogPlugin.PageFields.Type]# ... and more if needed}end@impltruedefinstall(opts)do# install script to seed data / bootstrap content like components# eg: insert componentsend# provide extra functions to be used on sitesdeflatest_blog_posts(limit)doBeacon.Content.list_published_pages(...)endenddefmoduleMyBlogPlugin.PageFields.Typedo@behaviourBeacon.Content.PageField# ... omitted end
With this approach we can extend Beacon as necessary by adding new callbacks to inject code into different levels of its lifecycle.
Config can only be merged, ie: can't remove values.
The text was updated successfully, but these errors were encountered:
Allow users to pack config, functions, and data to extend Beacon.
Enable plugins in your site config:
And the plugin implements
Beacon.Plugin
:The text was updated successfully, but these errors were encountered: