check if extension is md

This commit is contained in:
rami 2024-06-16 03:27:03 -04:00
parent bf0ceb5c1f
commit a1eaece148

View File

@ -40,7 +40,8 @@ namespace route {
std::filesystem::path postsDir("posts");
std::vector<std::future<std::string>> futures;
for (auto const& entry : std::filesystem::directory_iterator{postsDir}) {
futures.emplace_back(std::async(std::launch::async, process_file, entry.path()));
if (entry.path().extension() == ".md")
futures.emplace_back(std::async(std::launch::async, process_file, entry.path()));
}