Minor fixes to RENDER-FEEDS, example config, base template.
This commit is contained in:
parent
27e8ed0590
commit
f7a48d4a6e
4 changed files with 19 additions and 16 deletions
|
@ -4,10 +4,10 @@
|
|||
:feeds ("lisp")
|
||||
:plugins (mathjax)
|
||||
:repo "/home/git/tmp/improvedmeans/"
|
||||
:sitenav (:url "http://redlinernotes.com/" :name "Home"
|
||||
:url "http://twitter.com/redline6561" :name "Twitter"
|
||||
:url "http://github.com/redline6561" :name "Code"
|
||||
:url "http://soundcloud.com/redlinernotes" :name "Music"
|
||||
:url "http://redlinernotes.com/docs/talks/" :name "Talks")
|
||||
:sitenav ((:url "http://redlinernotes.com/" :name "Home")
|
||||
(:url "http://twitter.com/redline6561" :name "Twitter")
|
||||
(:url "http://github.com/redline6561" :name "Code")
|
||||
(:url "http://soundcloud.com/redlinernotes" :name "Music")
|
||||
(:url "http://redlinernotes.com/docs/talks/" :name "Talks"))
|
||||
:title "Improved Means for Achieving Deteriorated Ends"
|
||||
:theme "hyde")
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(deploy :initarg :deploy :initform nil :accessor deploy)
|
||||
(domain :initarg :domain :initform "" :accessor domain)
|
||||
(feeds :initarg :feeds :initform nil :accessor feeds)
|
||||
(license :initarg :license :initform "CC-BY-SA" :accessor license)
|
||||
(license :initarg :license :initform nil :accessor license)
|
||||
(plugins :initarg :plugins :initform '() :accessor plugins)
|
||||
(repo :initarg :repo :initform #p"/" :accessor repo)
|
||||
(sitenav :initarg :sitenav :initform "" :accessor sitenav)
|
||||
|
|
|
@ -17,11 +17,14 @@
|
|||
|
||||
(defun render-feeds (feeds)
|
||||
"Render and write the given FEEDS for the site."
|
||||
(flet ((first-10 (list)
|
||||
(subseq list 0 (min (length list) 10))))
|
||||
(let* ((by-date (by-date (hash-table-values *posts*)))
|
||||
(posts (subseq by-date 0 (min (length by-date) 10))))
|
||||
(posts (first-10 by-date)))
|
||||
(render-page (make-instance 'index :path "rss.xml" :posts posts) :rss)
|
||||
(render-page (make-instance 'index :path "feed.atom" :posts posts) :atom)
|
||||
(dolist (feed feeds)
|
||||
(let ((index (index-by-tag feed by-tag)))
|
||||
(setf (index-path index) (format nil "tag/~a-rss.xml" feed))
|
||||
(render-page index :rss)))))
|
||||
(let ((index (index-by-tag feed by-date)))
|
||||
(setf (index-path index) (format nil "tag/~a-rss.xml" feed)
|
||||
(index-posts index) (first-10 (index-posts index)))
|
||||
(render-page index :rss))))))
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="navigation">
|
||||
<a href="{$config.domain}">{$config.title}</a> |
|
||||
{foreach $link in $config.sitenav}
|
||||
<a href="{$link.url}">{$link.name}</a>
|
||||
{sp} | {sp}
|
||||
{if not isLast($link)} | {/if}
|
||||
{/foreach}
|
||||
<a href="{$config.domain}">{$config.title}</a>
|
||||
</div>
|
||||
<div id="content">
|
||||
{$raw |noAutoescape}
|
||||
|
|
Loading…
Add table
Reference in a new issue