diff --git a/Resources/Output/Aardvark.html b/Resources/Output/Aardvark.html index b3d5839..2f544ad 100644 --- a/Resources/Output/Aardvark.html +++ b/Resources/Output/Aardvark.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/CatTowerDefence.html b/Resources/Output/CatTowerDefence.html index 7a530de..9b53931 100644 --- a/Resources/Output/CatTowerDefence.html +++ b/Resources/Output/CatTowerDefence.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/EPQProject.html b/Resources/Output/EPQProject.html index ce6c6aa..9eef342 100644 --- a/Resources/Output/EPQProject.html +++ b/Resources/Output/EPQProject.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/MindMap.html b/Resources/Output/MindMap.html index 51aafb5..3b4453b 100644 --- a/Resources/Output/MindMap.html +++ b/Resources/Output/MindMap.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/SBSWork.html b/Resources/Output/SBSWork.html index c3c501a..b87d830 100644 --- a/Resources/Output/SBSWork.html +++ b/Resources/Output/SBSWork.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/TestFullArticle.html b/Resources/Output/TestFullArticle.html index cb6c3b7..91f4159 100644 --- a/Resources/Output/TestFullArticle.html +++ b/Resources/Output/TestFullArticle.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Resources/Output/index.html b/Resources/Output/index.html index f0a89f1..3fba0ed 100644 --- a/Resources/Output/index.html +++ b/Resources/Output/index.html @@ -13,7 +13,6 @@ Navigation -Example Post Welcome! Newer Work @@ -29,6 +28,7 @@ Thoughts And Essays +Permacomputing University diff --git a/Src/BlogPageBuilder.cpp b/Src/BlogPageBuilder.cpp index f272746..1e71709 100644 --- a/Src/BlogPageBuilder.cpp +++ b/Src/BlogPageBuilder.cpp @@ -96,9 +96,7 @@ std::string NavBarGenerator::findDeepestCategory(std::string url) { int categoryEnd = url.rfind("/"); int categoryStart = url.rfind("/", categoryEnd-1); - if (categoryStart == -1) - categoryStart = 0; - return url.substr(categoryStart, categoryEnd); + return url.substr(categoryStart+1, categoryEnd-categoryStart-1); } std::string NavBarGenerator::insertPagesIntoCategories(std::string categories, std::vector pages) @@ -117,7 +115,7 @@ std::string NavBarGenerator::insertPagesIntoCategories(std::string categories, s + "\n"); std::string categoryOpening = "\n"; - int categoryStart = categories.find(findDeepestCategory(page->getRelativeInUrl())); + int categoryStart = categories.find(findDeepestCategory(page->getInUrl())); int insertLocation = 0; if (categoryStart != -1) insertLocation = categories.find(categoryOpening, categoryStart) + categoryOpening.length(); diff --git a/Src/Page.cpp b/Src/Page.cpp index f12606e..2d640f5 100644 --- a/Src/Page.cpp +++ b/Src/Page.cpp @@ -59,15 +59,6 @@ std::string Page::getInUrl() return sourceFileUrl; } -// includes first / -std::string Page::getRelativeInUrl() -{ - int start = strlen(SOURCE_FILE_FOLDER)+1; - std::string relativeUrl = std::string(sourceFileUrl).substr(start, sourceFileUrl.length()-start); - relativeUrl.replace(relativeUrl.length()-3, 3, ".html"); - return relativeUrl; -} - FileFlags Page::getPageFlags() { return flags; diff --git a/Src/Page.h b/Src/Page.h index 41024e9..0cf62d9 100644 --- a/Src/Page.h +++ b/Src/Page.h @@ -50,7 +50,6 @@ public: std::string getSourceFileContents(); std::string getInUrl(); - std::string getRelativeInUrl(); std::string getOutUrl(); std::string getRelativeOutUrl();