bbit / blog-bundle
symfony BBITBlogBundle
dev-master
2015-10-07 07:44 UTC
Requires
- php: >=5.3.2
- eko/feedbundle: dev-master
Requires (Dev)
- knplabs/knp-markdown-bundle: ~1.3
- satooshi/php-coveralls: v0.6.1
- symfony/symfony: >=2.4.0
This package is not auto-updated.
Last update: 2024-09-14 18:36:44 UTC
README
一个 非常简单的 symfony2 博客组件。 仍在开发中
可以在 http://branchbit.be/blog & http://statushka.com/blog 上查看。
步骤 1:使用 composer 下载 BBITBlogBundle
在 composer.json 中添加 BBITBlogBundle
{ "require": { "knplabs/knp-markdown-bundle": "~1.3", "eko/feedbundle": "dev-master", "bbit/blog-bundle": "dev-master" } }
现在运行以下命令让 composer 下载组件
$ php composer.phar install
Composer 将 bbit/blog-bundle 组件安装到项目的 vendor/BBIT
目录。
步骤 2:启用组件
在 kernel 中启用组件
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Knp\Bundle\MarkdownBundle\KnpMarkdownBundle(), new Eko\FeedBundle\EkoFeedBundle(), new BBIT\BlogBundle\BBITBlogBundle(), ); }
步骤 3:配置
bbit_blog:
extend_template: 'AcmeWebsiteBundle:Default:layout.html.twig' #should contain a block called 'blogContent'
disqus_shortname: 'AcmeBlog'
addthis_pubid: 'ra-55cxxxxxxxxx648'
btn_class: 'btn-buy hover-effect'
eko_feed:
feeds:
post:
title: 'Acme Blog Feed'
description: 'Acme blog Feed Description'
link:
route_name: bbit_blog_rss_view
encoding: 'utf-8'
步骤 4
更新您的数据库。
将 BBITBlogBundle 添加到 assetic.bundle 配置
添加路由文件
bbit_blog:
resource: "@BBITBlogBundle/Resources/config/routing.yml"
prefix: /blog/
步骤 5:添加内容
一个非常简单的有限制的 admin-CRUD 功能位于 /blog/admin/post
。
帖子以 markdown 格式呈现。
步骤 6:查看内容
博客位于 /blog
。
Rss 馈送位于 /blog/rss
。
支持 "Engage by Disqus" 评论功能。
支持 "AddThis" 分享功能。