aboutsummaryrefslogtreecommitdiff
path: root/src/content/blog/Blog.hpp
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2021-10-23 03:58:35 +0200
committerToni Uhlig <matzeton@googlemail.com>2021-10-23 03:58:35 +0200
commitf8d857d13b8ee76d7b4a03a9572257d8060ba19e (patch)
tree067c1fea1f43cabee289454c79b1f316d04eaa74 /src/content/blog/Blog.hpp
parent47f09ad8fb52de7ee9ed6c63574ea2f77e314fa2 (diff)
Removed EvHTTP chunked response support (for now).
* single blog post rendering Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/content/blog/Blog.hpp')
-rw-r--r--src/content/blog/Blog.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/content/blog/Blog.hpp b/src/content/blog/Blog.hpp
index 79c06a2..abdb522 100644
--- a/src/content/blog/Blog.hpp
+++ b/src/content/blog/Blog.hpp
@@ -25,7 +25,8 @@ struct blog_entry
using BlogMetadata = inja::json;
using BlogEntry = std::shared_ptr<struct blog_entry>;
-using BlogEntries = std::vector<BlogEntry>;
+using BlogEntriesVector = std::vector<BlogEntry>;
+using BlogEntriesMap = std::unordered_map<std::string, BlogEntry>;
class Blog : public Content
{
@@ -41,8 +42,10 @@ public:
Redirections & GetRedirections();
static bool ValidateAndSetMetdadata(BlogMetadata const & blogMetadata, BlogEntry & blogEntry);
- bool ValidateEntries() const;
+ bool ValidateEntries();
+ void FillRenderData(RenderData & re, BlogEntry const & be);
void GenerateBlogListing(RenderData & rd);
+ void GetBlogPost(RenderData & rd, char const * blogPostUri);
private:
std::string m_UriBasePath;
@@ -50,7 +53,8 @@ private:
std::string m_BlogPath;
Redirections m_Redirections;
Markdown m_BlogContents;
- BlogEntries m_BlogEntriesSortedByDate;
+ BlogEntriesVector m_BlogEntriesSortedByDate;
+ BlogEntriesMap m_BlogEntries;
};
#endif