Changes to file naming system, names are no longer generated, they are instead take from source files name
Option to hide private posts is no an argument in program
This commit is contained in:
parent
63c9374ea9
commit
63fc2fa47f
18 changed files with 48 additions and 407 deletions
|
@ -2,8 +2,9 @@
|
|||
|
||||
|
||||
BlogPageBuilder::BlogPageBuilder(std::string templateFileUrl, std::string inFolder,
|
||||
std::string outFolder, std::string articleIdentifier)
|
||||
std::string outFolder, int flags, std::string articleIdentifier)
|
||||
{
|
||||
options = flags;
|
||||
this->outFolder = outFolder;
|
||||
this->inFolder = inFolder;
|
||||
pageTemplate = readFile(templateFileUrl);
|
||||
|
@ -68,7 +69,8 @@ std::string BlogPageBuilder::generateNavSection()
|
|||
buffer << "\n<h1>Navigation</h1>\n\n";
|
||||
for (Page* page : pages)
|
||||
{
|
||||
if (page->getPageFlags().hidden)
|
||||
if (page->getPageFlags().hidden &&
|
||||
isOptionEnabled(OptionFlags::HIDE_PRIVATE))
|
||||
continue;
|
||||
buffer
|
||||
<< "<li><a href=" << page->getRelativeUrl() << ">"
|
||||
|
@ -86,3 +88,8 @@ std::string BlogPageBuilder::readFile(std::string fileUrl)
|
|||
|
||||
return fileCache.str();
|
||||
}
|
||||
|
||||
bool BlogPageBuilder::isOptionEnabled(int flag)
|
||||
{
|
||||
return (options & flag) == flag;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue