Plugin Development
Extend your FeedGen CMS with custom plugins.
Overview
Plugins allow you to add custom functionality to your CMS without modifying core files:
- Hooks & Filters - Modify content and behavior
- Shortcodes - Custom content blocks
- Widgets - Sidebar and footer components
- Admin Extensions - Custom admin pages and settings
- REST API - Custom API endpoints
Quick Links
Quick Example
plugins/my-plugin/index.js
module.exports = async function(sdk) {
// Register a shortcode
sdk.shortcodes.register('greeting', (attrs) => {
return `<div class="greeting">Hello, ${attrs.name || 'World'}!</div>`;
});
// Add a hook
sdk.hooks.addFilter('post.title', (title) => {
return title.toUpperCase();
});
// Register a widget
sdk.widgets.registerWidget('my-widget', {
name: 'My Widget',
render: async (settings) => {
return `<div class="widget">${settings.title}</div>`;
}
});
return {
activate: async () => console.log('Plugin activated!'),
deactivate: async () => console.log('Plugin deactivated!')
};
};Ready to start? Head to Getting Started.