Minor fixes to navigator <a> tags
This commit is contained in:
parent
202801841d
commit
33cc777a65
3 changed files with 9 additions and 3 deletions
|
@ -71,7 +71,7 @@ std::string BlogPageBuilder::generateNavSection()
|
||||||
if (page->getPageFlags().hidden)
|
if (page->getPageFlags().hidden)
|
||||||
continue;
|
continue;
|
||||||
buffer
|
buffer
|
||||||
<< "<li><a href=" << page->getOutFileUrl() << ">"
|
<< "<li><a href=" << page->getRelativeUrl() << ">"
|
||||||
<< page->getPageTitle()
|
<< page->getPageTitle()
|
||||||
<< "</a></li>\n";
|
<< "</a></li>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,8 +30,7 @@ Page::Page(std::string sourceFileUrl, std::string outFolderUrl)
|
||||||
calculatePageFlags();
|
calculatePageFlags();
|
||||||
calculatePageTitle();
|
calculatePageTitle();
|
||||||
|
|
||||||
std::string formattedTitle = findAndReplace(title, " ", "_");
|
this->outFileUrl = outFolderUrl + getRelativeUrl();
|
||||||
this->outFileUrl = outFolderUrl + "/" + formattedTitle + ".html";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Page::getSourceFileContents()
|
std::string Page::getSourceFileContents()
|
||||||
|
@ -44,6 +43,12 @@ std::string Page::getOutFileUrl()
|
||||||
return outFileUrl;
|
return outFileUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string Page::getRelativeUrl()
|
||||||
|
{
|
||||||
|
std::string formattedTitle = findAndReplace(title, " ", "_");
|
||||||
|
return "/" + formattedTitle + ".html";
|
||||||
|
}
|
||||||
|
|
||||||
FileFlags Page::getPageFlags()
|
FileFlags Page::getPageFlags()
|
||||||
{
|
{
|
||||||
return flags;
|
return flags;
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
|
|
||||||
std::string getSourceFileContents();
|
std::string getSourceFileContents();
|
||||||
std::string getOutFileUrl();
|
std::string getOutFileUrl();
|
||||||
|
std::string getRelativeUrl();
|
||||||
std::string getPageTitle();
|
std::string getPageTitle();
|
||||||
FileFlags getPageFlags();
|
FileFlags getPageFlags();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue