aboutsummaryrefslogtreecommitdiff
path: root/src/content/blog/Blog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/blog/Blog.cpp')
-rw-r--r--src/content/blog/Blog.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/content/blog/Blog.cpp b/src/content/blog/Blog.cpp
new file mode 100644
index 0000000..56a23c1
--- /dev/null
+++ b/src/content/blog/Blog.cpp
@@ -0,0 +1,41 @@
+#include "Blog.hpp"
+
+Blog::Blog(std::string uriBasePath, std::string mainTemplatePath)
+ : Content(), m_UriBasePath(uriBasePath), m_MainTemplatePath(mainTemplatePath)
+{
+ m_Redirections.push_back(uriBasePath + "/");
+ m_Redirections.push_back(uriBasePath + "/index.html");
+}
+
+bool Blog::Init()
+{
+ return true;
+}
+
+void Blog::Shutdown()
+{
+}
+
+bool Blog::Render(RequestResponse & rr, RenderData & rd)
+{
+ rd["blah"] = "Yoh!";
+ rr.UseOutputHeader();
+ rr.AddOutputHeader("bla", "blubb");
+
+ return true;
+}
+
+std::string const & Blog::GetUriBasePath() const
+{
+ return m_UriBasePath;
+}
+
+std::string const & Blog::GetMainTemplate() const
+{
+ return m_MainTemplatePath;
+}
+
+Redirections const & Blog::GetRedirections() const
+{
+ return m_Redirections;
+}