Browse Source

Fix rss link and description

index-subcmd
Vincent Prouillet 7 years ago
parent
commit
afc4a81ebf
3 changed files with 7 additions and 4 deletions
  1. +4
    -1
      CHANGELOG.md
  2. +2
    -2
      src/site.rs
  3. +1
    -1
      src/templates/rss.xml

+ 4
- 1
CHANGELOG.md View File

@@ -1,6 +1,9 @@
# Changelog # Changelog


## 0.0.3 (unreleased)
## 0.0.4 (unreleased)
- Fix RSS feed link and description

## 0.0.3 (2017-04-05)
- Add some colours in console - Add some colours in console
- Allow using a file other than config.toml for config - Allow using a file other than config.toml for config
- Add sections to the index page context - Add sections to the index page context


+ 2
- 2
src/site.rs View File

@@ -488,9 +488,9 @@ impl Site {
context.add("config", &self.config); context.add("config", &self.config);


let rss_feed_url = if self.config.base_url.ends_with('/') { let rss_feed_url = if self.config.base_url.ends_with('/') {
format!("{}{}", self.config.base_url, "feed.xml")
format!("{}{}", self.config.base_url, "rss.xml")
} else { } else {
format!("{}/{}", self.config.base_url, "feed.xml")
format!("{}/{}", self.config.base_url, "rss.xml")
}; };
context.add("feed_url", &rss_feed_url); context.add("feed_url", &rss_feed_url);




+ 1
- 1
src/templates/rss.xml View File

@@ -13,7 +13,7 @@
<pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate> <pubDate>{{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }}</pubDate>
<link>{{ page.permalink }}</link> <link>{{ page.permalink }}</link>
<guid>{{ page.permalink }}</guid> <guid>{{ page.permalink }}</guid>
<description>"{{ page.content | escape }}"</description>
<description>{{ page.content }}</description>
</item> </item>
{% endfor %} {% endfor %}
</channel> </channel>


Loading…
Cancel
Save