// rss feed
std::unique_ptr<RSSFeed> feed (new RSSFeed ());
feed.get()->set_pub_date (index.get()->get_creation_date());
+ feed.get()->set_title (this->get_title());
// iterate through the documents and generate the document
for (Document doc : this->docs) {
// class to implement an RSS feed
class RSSFeed {
protected:
+ std::string title;
std::time_t pub_date;
std::list<RSSFeedItem> items;
public:
// number of items
std::size_t get_num_items () {
return this->items.size ();
+ }
+
+ std::string get_title () {
+ return this->title;
+ }
+ void set_title (std::string title) {
+ this->title = escape_html (title);
}
std::time_t get_pub_date() {
std::string output = fmt::format (templ_str,
fmt::arg ("pubdate", ct),
- fmt::arg ("items", items_str) );
+ fmt::arg ("items", items_str),
+ fmt::arg ("title", this->title));
std::ofstream f (path + "/feed.xml");
f << output;
f.close ();
<head>
<!-- change as appropriate - just don't touch anything within the curly braces!! -->
<title>My Site - {title}</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="keywords" content="site key words {keywords}">
<meta name="description" content="Site Description - {description}">
<!-- change base href to your site URL -->
<rss version="2.0">
<channel>
<!-- change title description and link as needed-->
- <title>My Site</title>
+ <!-- don't touch anything within the curly braces -->
+ <title>My Site - {title}</title>
<description>Site Description</description>
<link>http://my.site</link>
<pubDate>{pubdate:%a, %d %b %Y %H:%M:%S %z}</pubDate>
List of Articles
Index Page
Navigation
-Sub categories:
+Sub categories of
Go up
-Subscribe
+Subscribe to page
RSS Feed
\ No newline at end of file
line-height: 150%;
text-align: justify;
}
+/* for small screens */
+@media only screen and (max-width: 600px) {
+ section#content {
+ width: 99%;
+ float: none;
+ margin-left: 0.5%;
+ margin-right: 0.5%;
+ text-align: left;
+ padding: 0;
+ }
+ img {
+ max-width: 100%;
+ height: auto;
+ }
+ header {
+ float: none;
+ }
+ footer {
+ float: none;
+ }
+ nav#sidebar {
+ float: none;
+ width: 99%;
+ margin-left: 0.5%;
+ margin-right: 0.5%;
+ }
+}
\ No newline at end of file