Browse Source

rss feed dir select bug

master
alistair 3 years ago
parent
commit
cca978ab8c
  1. 6
      CMakeLists.txt
  2. 11
      main.cpp

6
CMakeLists.txt

@ -5,11 +5,11 @@ set(CMAKE_CXX_STANDARD 20) @@ -5,11 +5,11 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)
#set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
set(BUILD_SHARED_LIBS OFF)
set(CMAKE_EXE_LINKER_FLAGS "-static")
#set(CMAKE_EXE_LINKER_FLAGS "-static")
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -fno-omit-frame-pointer -fsanitize=address")
set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address")

11
main.cpp

@ -895,14 +895,14 @@ class rss_feed_plugin : public s2_substitution_plugin { @@ -895,14 +895,14 @@ class rss_feed_plugin : public s2_substitution_plugin {
std::string::size_type first = 0;
std::string::size_type next = relpath.find(",");
if (next == std::string::npos)
next = relpath.length();
while (first != std::string::npos && next != std::string::npos) {
fs::path path;
do {
if (next == std::string::npos)
next = relpath.length();
std::string spath = relpath.substr(first, next - first);
fs::path path;
if (spath.at(0) == '/') {
// path relative to site root
path = fs::path(properties.at("source_root")).append(spath.substr(1));
@ -915,11 +915,12 @@ class rss_feed_plugin : public s2_substitution_plugin { @@ -915,11 +915,12 @@ class rss_feed_plugin : public s2_substitution_plugin {
first = next + 1;
next = relpath.find(",", first);
}
} while (first < relpath.length());
std::multimap<time_t, blog_item> feed_items;
for (std::string dir: paths) {
spdlog::info("path: {}", dir);
for (auto &page: pages) {
if (!(page.second.type & (job_type::TEMPLATE | job_type::MARKDOWN))) {
continue;

Loading…
Cancel
Save