X-Git-Url: https://harishankar.org/repos/?p=biaweb2.git;a=blobdiff_plain;f=biawebdocumenttree.hpp;h=a9f1ccd90dd40cc6e6b7919f30c024783c06cecc;hp=5df2e9b955fa2b130cacd8a507c9a53f73295752;hb=HEAD;hpb=293e3ffadbd0c297b5e2291c1f4c7d98625cd991 diff --git a/biawebdocumenttree.hpp b/biawebdocumenttree.hpp index 5df2e9b..a9f1ccd 100644 --- a/biawebdocumenttree.hpp +++ b/biawebdocumenttree.hpp @@ -227,7 +227,7 @@ namespace biaweb { // an inline list while (par1 != nullptr) { if (par1->parent != nullptr) - navbit.get()->add_link_item (GenericLinkItem(par1->stub, + navbit.get()->add_link_item (GenericLinkItem(par1->title, par1->stub_hierarchy() + par1->stub + "/index.html")); else navbit.get()->add_link_item (GenericLinkItem(tpl->get_stringbit(HOME), "index.html")); @@ -246,13 +246,10 @@ namespace biaweb { urlpath + doc.get_filename() + ".html", doc.get_creation_date()); // If the items don't exceed max size of RSS feed - if (feed.get()->get_num_items() <= MAX_RSS_FEED) + if (feed.get()->get_num_items() < MAX_RSS_FEED) feed.get()->add_rss_item (fitem); - // Add the document to the document list - DocListItem item (doc.get_title(), - urlpath + doc.get_filename() + ".html", - doc.get_creation_date(), doc.get_modified_date (), - doc.get_meta_desc()); + // Add the document details to the document list + DocListItem item (&doc, urlpath); article_list.get()->add_document_item (item); // output the document also, add the navigation bit and side bars @@ -275,14 +272,17 @@ namespace biaweb { std::unique_ptr bar3 (new SideBar ()); bar3.get()->set_title (tpl->get_stringbit (SUBSCRIBE)); bar3.get()->add_sidebar_item ( - GenericLinkItem (tpl->get_stringbit(RSS_FEED), urlpath + "/feed.xml")); + GenericLinkItem (tpl->get_stringbit(RSS_FEED), urlpath + "feed.xml")); index.get()->add_side_bar (*bar3.get()); } // add the navigation bit index.get()->set_navigation_bit (*navbit.get()); - // index should contain the summary followed by the article list - index.get()->set_content (this->summary + article_list.get()->to_html(tpl)); + // index should contain the summary followed by the the article list + // and the sub categories + index.get()->set_content (this->summary + + article_list.get()->to_html(tpl) + + bar2.get()->to_html (tpl)); // output the index file index.get()->output_to_html (tpl, filepath); @@ -309,8 +309,8 @@ namespace biaweb { this->add_child (doctree.get()); } - // add the regular files as documents in the tree - else if (fsitem.is_regular_file ()) { + // add the regular files as documents in the tree and not symlink + else if (fsitem.is_regular_file () && !fsitem.is_symlink()) { // if it is an index file (specially named as index // or index.md or whatever) directly add // the contents to the summary of the Doctree