Skip to content

Commit

Permalink
Added the ability to use feedburner
Browse files Browse the repository at this point in the history
  • Loading branch information
dpp committed Aug 27, 2012
1 parent d53e36a commit f5e7ccc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/scala/org/hoisted/lib/EnvironmentManager.scala
Expand Up @@ -617,7 +617,8 @@ class EnvironmentManager(val pluginPhase: PartialFunction[HoistedPhase, Unit] =
}.collect{case hh: HasHtml => hh}.take(10) match {
case Nil => Nil
case bp =>
postMergeTransforms = ("head *+" #> <link rel="alternate" type="application/rss+xml" href="/rss.xml"/>) :: postMergeTransforms
val rssUrl = findMetadata(RSSUrlKey).flatMap(_.asString) openOr "/rss.xml"
postMergeTransforms = ("head *+" #> <link rel="alternate" type="application/rss+xml" href={rssUrl}/>) :: postMergeTransforms

val toShow = bp

Expand Down
9 changes: 9 additions & 0 deletions src/main/scala/org/hoisted/lib/MetadataKey.scala
Expand Up @@ -253,6 +253,14 @@ case object AliasKey extends MetadataKey {
case object NoSyntheticRssFile extends MetadataKey {
def global = true
def key = "no_synthetic_rss_file"

override def alt: List[String] = List("no-synthetic-rss-file")
}

case object RSSUrlKey extends MetadataKey {
def global = true
def key = "rss-url"
override def alt = List("rss_url")
}

case object HTagsKey extends MetadataKey {
Expand Down Expand Up @@ -514,6 +522,7 @@ object MetadataKey extends LazyLoggableWithImplicitLogger {
BlogRootKey, TypeKey, SiteAuthorKey, AuthorKey,
DateKey, SiteLinkKey, HTagsKey, HTagIdKey, HTagLevelKey,
CategoryKey, NoSyntheticRssFile,
RSSUrlKey,
HasBlogKey, TagsKey, AliasKey, HTagBodyKey,
ValidFromKey, ValidToKey, EventKey, PostKey, LayoutKey, RedirectKey,
MenuLocGroupKey, MenuIconKey, MenuIconPlacementKey, ArticleKey,
Expand Down

0 comments on commit f5e7ccc

Please sign in to comment.