harentius / blog-bundle
Symfony Bundle for adding simple blog functionality to existing or new Symfony project.
Installs: 380
Dependents: 1
Suggesters: 0
Security: 0
Stars: 19
Watchers: 5
Forks: 7
Open Issues: 4
Type:symfony-bundle
Requires
- php: >=8.2
- ext-json: *
- beberlei/doctrineextensions: ^1.5
- doctrine/doctrine-bundle: ^2.7
- knplabs/knp-paginator-bundle: ^4.1 || ^5.0 || ^6.0
- stof/doctrine-extensions-bundle: ^1.3
- symfony/asset: ^6.4 || ^7.0
- symfony/console: ^6.4 || ^7.0
- symfony/framework-bundle: ^6.4 || ^7.0
- symfony/monolog-bundle: ^3.10
- symfony/translation: ^6.4 || ^7.0
- symfony/twig-bundle: ^6.4 || ^7.0
- symfony/validator: ^6.4 || ^7.0
- symfony/yaml: ^6.4 || ^7.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.64
- phpstan/phpstan: ^1.12
- phpstan/phpstan-phpunit: ^1.4
- phpunit/phpunit: ^11.3
This package is auto-updated.
Last update: 2025-03-01 00:10:18 UTC
README
A Symfony Bundle for adding simple blog functionality to existing or new Symfony project.
Subsplit from harentius/blog minimalistic blogging engine, which is designed to use Markdown files for content and transform them into blogs, and harentius/blog only stores and shows blogs.
Installation
- Install the bundle
$ composer.phar require harentius/blog-bundle
- Add bundles (in config/bundles.php or Kernel):
<?php // config/bundles.php return [ //... Harentius\BlogBundle\HarentiusBlogBundle::class => ['all' => true], //... Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle::class => ['all' => true], Knp\Bundle\PaginatorBundle\KnpPaginatorBundle::class => ['all' => true], ];
- Include routes:
# config/routes.yaml blog: resource: "@HarentiusBlogBundle/Resources/config/routing.yaml" prefix: /
- Include default configs: Note: this step can be skipped if you decide to configure bundles (i.e. DoctrineBundle, SecurityBundle, etc) yourself
# config/packages/harentius_blog.yaml imports: - { resource: '@HarentiusBlogBundle/Resources/config/config.yaml' }
Configuration
Config reference:
harentius_blog: title: Blog Title theme: default|dark # default dark highlight_code: true|false # load highlight js library or not, default false
- Create/Update your DB according to chosen installation type
bin/console doctrine:database:create bin/console doctrine:schema:create
- Install assets
bin/console assets:install