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)
|
||||
continue;
|
||||
buffer
|
||||
<< "<li><a href=" << page->getOutFileUrl() << ">"
|
||||
<< "<li><a href=" << page->getRelativeUrl() << ">"
|
||||
<< page->getPageTitle()
|
||||
<< "</a></li>\n";
|
||||
}
|
||||
|
|
|
@ -30,8 +30,7 @@ Page::Page(std::string sourceFileUrl, std::string outFolderUrl)
|
|||
calculatePageFlags();
|
||||
calculatePageTitle();
|
||||
|
||||
std::string formattedTitle = findAndReplace(title, " ", "_");
|
||||
this->outFileUrl = outFolderUrl + "/" + formattedTitle + ".html";
|
||||
this->outFileUrl = outFolderUrl + getRelativeUrl();
|
||||
}
|
||||
|
||||
std::string Page::getSourceFileContents()
|
||||
|
@ -44,6 +43,12 @@ std::string Page::getOutFileUrl()
|
|||
return outFileUrl;
|
||||
}
|
||||
|
||||
std::string Page::getRelativeUrl()
|
||||
{
|
||||
std::string formattedTitle = findAndReplace(title, " ", "_");
|
||||
return "/" + formattedTitle + ".html";
|
||||
}
|
||||
|
||||
FileFlags Page::getPageFlags()
|
||||
{
|
||||
return flags;
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
|
||||
std::string getSourceFileContents();
|
||||
std::string getOutFileUrl();
|
||||
std::string getRelativeUrl();
|
||||
std::string getPageTitle();
|
||||
FileFlags getPageFlags();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue