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.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/content/blog/Blog.cpp b/src/content/blog/Blog.cpp
index ba8638e..47a3292 100644
--- a/src/content/blog/Blog.cpp
+++ b/src/content/blog/Blog.cpp
@@ -17,7 +17,8 @@ bool Blog::Init()
{
bool retval = true;
- std::cout << "Blog entries path: " << m_BlogPath << std::endl;
+ std::cout << "Blog entries filesystem path: " << m_BlogPath << std::endl;
+ std::cout << "Blog entries URI base path: " << m_UriBasePath << std::endl;
std::vector<std::string> extensions = {"json"};
Filesystem fs;
@@ -39,7 +40,7 @@ bool Blog::Init()
}
m_BlogEntriesSortedByDate.push_back(be);
- m_Redirections.push_back(std::filesystem::path(jfile.first).stem());
+ m_Redirections.push_back(m_UriBasePath + "/" + std::string(std::filesystem::path(jfile.first).stem()));
}
std::sort(m_BlogEntriesSortedByDate.begin(),
m_BlogEntriesSortedByDate.end(),
@@ -81,7 +82,7 @@ bool Blog::Render(RequestResponse & rr, RenderData & rd, std::string & out)
return true;
}
-std::string const & Blog::GetUriBasePath() const
+std::string & Blog::GetUriBasePath()
{
return m_UriBasePath;
}
@@ -91,7 +92,7 @@ std::string const & Blog::GetMainTemplate() const
return m_MainTemplatePath;
}
-Redirections const & Blog::GetRedirections() const
+Redirections & Blog::GetRedirections()
{
return m_Redirections;
}