From f8d857d13b8ee76d7b4a03a9572257d8060ba19e Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sat, 23 Oct 2021 03:58:35 +0200 Subject: Removed EvHTTP chunked response support (for now). * single blog post rendering Signed-off-by: Toni Uhlig --- src/content/blog/Blog.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/content/blog/Blog.hpp') 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; -using BlogEntries = std::vector; +using BlogEntriesVector = std::vector; +using BlogEntriesMap = std::unordered_map; 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 -- cgit v1.2.3