std::list<DocumentTree> children;
// title of this tree
std::string title;
+ // summary for this tree - this is displayed in the index.html file of
+ // this tree before the list of articles in the tree
+ std::string summary;
// file stub of this tree
std::string stub;
// list of documents in this tree
this->parent = nullptr;
}
+ // set the summary for this tree
+ void set_summary (std::string summary) {
+ this->summary = summary;
+ }
+
+ // set the summary for this tree as markdown text
+ void set_markdown_summary (std::string summary) {
+ this->summary = convert_to_markdown (summary);
+ }
+
+ std::string get_summary () {
+ return this->summary;
+ }
+
// create the document index for this tree
void create_tree_html (std::string destdir);
doc.add_side_bar (*bar2.get());
doc.output_to_html (filepath);
}
- index.get()->set_content (article_list.to_html());
+ index.get()->set_content (this->summary + article_list.to_html());
index.get()->output_to_html (filepath);