Fix creation of category index
Diffstat:
3 files changed, 3 insertions(+), 4 deletions(-)
@@ -4,7 +4,7 @@
include(cmake/prelude.cmake)
project(
stamd
VERSION 0.2.8
VERSION 0.2.9
DESCRIPTION "Static Markdown Page Generator"
HOMEPAGE_URL "https://git.dimitrijedobrota.com/stamd.git"
LANGUAGES CXX
@@ -89,6 +89,7 @@
void indexer::create_index(std::ostream& ost,
for (const auto& article : m_articles)
{
if (article->is_hidden()) continue;
if (name != "blog" && !article->get_categories().count(name)) continue;
const auto& filename = article->get_filename();
const auto& title = article->get_title();
@@ -100,8 +101,6 @@
void indexer::create_index(std::ostream& ost,
};
ost << html::ul();
index->write_footer(ost);
add(index);
}
void indexer::create_atom(std::ostream& ost, const std::string& name) const
@@ -178,7 +178,7 @@
int main(int argc, char* argv[])
indexer.create_atom(atom, "index");
std::ofstream index(args.output_dir / "index.html");
indexer.create_index(index, "blog index", categories);
indexer.create_index(index, "blog", categories);
for (const auto& [category, articles] : category_map)
{