Symfony Blog Bundle
Symfony Blog Bundle
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