monsieurbiz / sylius-blog-plugin
Add blog features on Sylius application.
Installs: 1 967
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 5
Open Issues: 2
Language:Twig
Type:sylius-plugin
Requires
- php: ^8.2
- monsieurbiz/sylius-media-manager-plugin: ^2.0
- monsieurbiz/sylius-rich-editor-plugin: ^3.0
- sylius/sylius: ~2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.16
- phpmd/phpmd: ^2.15
- phpspec/phpspec: ^7.0
- phpstan/phpstan: ^1.8.4
- phpstan/phpstan-doctrine: ^1.3.2
- phpstan/phpstan-webmozart-assert: ^1.1
- phpunit/phpunit: ^10.5
README
This plugin adds a blog to your Sylius project. It allows you to create blog articles, tags and authors.
Compatibility
Sylius Version | PHP Version |
---|---|
2.0, 2.1 | 8.2 - 8.3 |
ℹ️ For Sylius 1.x, see our 1.x branch and all 1.x releases.
Installation
If you want to use our recipes, you can add recipes endpoints to your composer.json by running this command:
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
Install the plugin via composer:
composer require monsieurbiz/sylius-blog-plugin
Change your config/bundles.php
file to add this line for the plugin declaration:
<?php return [ //.. MonsieurBiz\SyliusBlogPlugin\MonsieurBizSyliusBlogPlugin::class => ['all' => true], ];
Add the plugin's routing by creating a new file in config/packages/monsieurbiz_sylius_blog_plugin.yaml
with the following content:
imports: resource: '@MonsieurBizSyliusBlogPlugin/Resources/config/config.yaml'
Add the plugin's routing by creating a new file in config/routes/monsieurbiz_sylius_blog_plugin.yaml
with the following content:
monsieurbiz_blog_plugin: resource: '@MonsieurBizSyliusBlogPlugin/Resources/config/routes.yaml'
And finally, update your database:
bin/console doctrine:migrations:migrate
Type of posts
This plugin allows you to create 2 types of posts:
- Blog articles: These are the main content of your blog, where you can write detailed posts.
- Case studies: These are more focused posts that showcase specific projects or achievements.
Case studies are disabled by default. You can enable them by setting the env var MONSIEURBIZ_SYLIUS_BLOG_ENABLE_CASE_STUDIES
to true
in your .env
file:
MONSIEURBIZ_SYLIUS_BLOG_ENABLE_CASE_STUDIES=true
The structure of the code allows you to easily add new types of posts in the future if needed.
License
This plugin is under the MIT license. Please see the LICENSE file for more information._