- DocListItem (std::string title, std::string url,
- std::time_t ctime, std::time_t mtime ) {
- this->title = escape_html (title);
- this->url = url;
- this->ctime = ctime;
- this->mtime = mtime;
+ DocListItem (Document *doc, std::string urlpath) {
+ this->title = doc->get_title ();
+ this->url = urlpath + doc->get_filename() + ".html";
+ this->ctime = doc->get_creation_date ();
+ this->mtime = doc->get_modified_date ();
+ this->desc = doc->get_meta_desc ();
+ }
+
+ std::string get_desc () {
+ return this->desc;