A plugin for Kirby CMS to add a news module
- Kirby >= 4
- PHP >= 8
This plugin is free
Download the files and place them inside site/plugins/kirby-news
.
composer require pixelopen/kirby-news
You can add the plugin as a Git submodule.
$ cd your/project/root
$ git submodule add https://github.com/Pixel-Open/kirby-news.git site/plugins/kirby-news
$ git submodule update --init --recursive
$ git commit -am "Add Kirby News plugin"
Run these commands to update the plugin:
$ cd your/project/root
$ git submodule foreach git checkout master
$ git submodule foreach git pull
$ git commit -am "Update submodules"
$ git submodule update --init --recursive
Run your website. You should the a new page named News. From this page you can create individual news and publish them.
If you want to use the block, you'll need to add the fieldsets news
with the following lines in your /site/config/config.php
:
return [
'blocks' => [
'fieldsets' => [
'custom' => [
'label' => 'Custom blocks',
'type' => 'group',
'fieldsets' => [
'news',
// Other global custom blocks
]
],
'kirby' => [
'label' => 'Kirby blocks',
'type' => 'group',
'fieldsets' => [
'heading',
'text',
'list',
'quote',
'image',
'video',
'code',
'markdown'
]
]
]
]
];
You can also add your own fieldsets when you extend the fields, to add the news
block and all the other block you want to use.