stamd

Static Markdown Page Generator
git clone git://git.dimitrijedobrota.com/stamd.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING |

commitf665400eb79cc3a3d141b757226852153d07b9b7
parenta7be31f8837bfec10c50673049a8f477dfd14542
authorDimitrije Dobrota <mail@dimitrijedobrota.com>
dateWed, 1 Jan 2025 20:00:24 +0100

Fix creation of category index

Diffstat:
MCMakeLists.txt|+-
Msource/indexer.cpp|+--
Msource/main.cpp|+-

3 files changed, 3 insertions(+), 4 deletions(-)


diff --git a/CMakeLists.txt b/CMakeLists.txt

@@ -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

diff --git a/source/indexer.cpp b/source/indexer.cpp

@@ -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

diff --git a/source/main.cpp b/source/main.cpp

@@ -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)
{