diff --git a/src/GergelyPolonkai/FrontBundle/Controller/BlogController.php b/src/GergelyPolonkai/FrontBundle/Controller/BlogController.php
index be4d3ff..6f773a5 100644
--- a/src/GergelyPolonkai/FrontBundle/Controller/BlogController.php
+++ b/src/GergelyPolonkai/FrontBundle/Controller/BlogController.php
@@ -71,4 +71,20 @@ class BlogController extends Controller
'post' => $post,
);
}
+
+ /**
+ * @Route("/feed", name="GergelyPolonkaiFrontBundle_blogFeed", defaults={"_format": "xml"})
+ * @Template
+ */
+ public function feedAction()
+ {
+ $query = $this->getDoctrine()->getEntityManager()->createQuery("SELECT p FROM GergelyPolonkaiFrontBundle:Post p WHERE p.draft = FALSE ORDER BY p.createdAt DESC");
+ $query->setMaxResults(10);
+ $posts = $query->getResult();
+
+ return array(
+ 'now' => new \DateTime('now'),
+ 'posts' => $posts,
+ );
+ }
}
diff --git a/src/GergelyPolonkai/FrontBundle/Resources/public/images/rss_16.png b/src/GergelyPolonkai/FrontBundle/Resources/public/images/rss_16.png
new file mode 100755
index 0000000..f921046
Binary files /dev/null and b/src/GergelyPolonkai/FrontBundle/Resources/public/images/rss_16.png differ
diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Blog/feed.xml.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Blog/feed.xml.twig
new file mode 100644
index 0000000..40c788b
--- /dev/null
+++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Blog/feed.xml.twig
@@ -0,0 +1,31 @@
+
+
+
+ Gergely Polonkai
+ Gergely Polonkai's Blog
+ {{ app.request.scheme }}://{{ app.request.host }}{{ app.request.basepath }}
+ {{ now|date('r') }}
+ {{ now|date('r') }}
+ 7200
+ en
+
+ Gergely Polonkai
+ {{ app.request.scheme }}://{{ app.request.host }}{{ asset('bundles/gergelypolonkaifront/images/profile.png') }}
+ {{ app.request.scheme }}://{{ app.request.host }}{{ app.request.basepath }}
+
+{% for post in posts %}
+ -
+
+ {{ app.request.scheme }}://{{app.request.host }}{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug }) }}
+ {{ app.request.scheme }}://{{app.request.host }}{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug }) }}#comments
+ {{ post.createdAt|date('r') }}
+ Content lead
+ {{ app.request.scheme }}://{{app.request.host }}{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug }) }}
+{#
+
+#}
+
+{% endfor %}
+
+
+
diff --git a/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig b/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig
index 09d05b7..059820e 100644
--- a/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig
+++ b/src/GergelyPolonkai/FrontBundle/Resources/views/Default/front_base.html.twig
@@ -7,6 +7,7 @@
{% stylesheets 'bundles/gergelypolonkaifront/css/*' filter='cssrewrite' output='css/gergelypolonkaiweb.css' %}
{% endstylesheets %}
+
@@ -28,6 +29,7 @@
+