-
Add this bundle to your src/Balibali dir:
$ mkdir src/Balibali $ git submodule add git://github.com/balibali/BalibaliBlogBundle.git src/Balibali/BlogBundle
-
Add Balibali namespace to your autoloader:
// app/autoload.php $loader->registerNamespaces(array( ... 'Balibali' => __DIR__.'/../src', ));
-
Add this bundle to your application kernel:
// app/AppKernel.php public function registerBundles() { $bundles = array( ... new Balibali\BlogBundle\BalibaliBlogBundle(), ); }
-
Enable DoctrineMongoDBBundle:
// app/AppKernel.php public function registerBundles() { $bundles = array( ... new Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle(), ... ); } // app/config/config.yml doctrine_odm.mongodb: server: "mongodb://localhost:27017" default_database: symfony_%kernel.environment% auto_generate_hydrator_classes: true mappings: BalibaliBlogBundle: ~
-
Add routing rules to your application:
// app/config/routing.yml blog: resource: @BalibaliBlogBundle/Resources/config/routing.yml prefix: /blog
-
Install assets by assets:install command:
$ app/console assets:install web ... Installing assets for Balibali\BlogBundle
Set your blog title and description:
// app/config/config.yml
parameters:
balibali.blog.title: "Balibali Blog"
balibali.blog.description: "Blog written by Rimpei Ogawa."
Here is an example of using global layout:
// app/config/config.yml
parameters:
balibali.blog.layout: "::layout.html.twig"
Use knplabs' MarkdownBundle http://github.com/knplabs/MarkdownBundle.
-
Add this bundle to your src/Bundle dir:
$ git submodule add git://github.com/knplabs/MarkdownBundle.git src/Bundle/MarkdownBundle
-
Add this bundle and bundle dir to your application kernel:
// app/AppKernel.php public function registerBundles() { $bundles = array( ... new Bundle\MarkdownBundle\MarkdownBundle(), ... ); }
-
Enable the markdown parser service:
// app/config/config.yml markdown.parser: ~