Skip to content

Commit

Permalink
Merge pull request #387 from openzim/zimwriterfs_redirect_as_front
Browse files Browse the repository at this point in the history
  • Loading branch information
mgautierfr authored Dec 4, 2023
2 parents 8d143f4 + 8c3bff7 commit 6875d84
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/zimwriterfs/zimcreatorfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ void ZimCreatorFS::add_redirectArticles_from_file(const std::string& path)

in_stream.open(path.c_str());
try {
parse_redirectArticles(in_stream, [this](Redirect redirect) {this->addRedirection(redirect.path, redirect.title, redirect.target);});
parse_redirectArticles(in_stream,
[this](Redirect redirect) {
this->addRedirection(
redirect.path,
redirect.title,
redirect.target,
{{zim::writer::HintKeys::FRONT_ARTICLE, 1}}
);
}
);
} catch(const std::runtime_error& e) {
std::cerr << e.what() << "\nin redirect file " << path << std::endl;
in_stream.close();
Expand Down

0 comments on commit 6875d84

Please sign in to comment.