Update templates to match posts->content.
This commit is contained in:
parent
fb224744e7
commit
862d7ad066
6 changed files with 17 additions and 19 deletions
2
TODO
2
TODO
|
@ -1,7 +1,5 @@
|
|||
TODO:
|
||||
Coleslaw.next
|
||||
; See if there are any good ideas we can steal from [Frog](https://github.com/greghendershott/frog)
|
||||
; Add HACKING.md docs, i.e. formalize workflow+releases. No more landing broken stuff on master!
|
||||
;; needs: shout template/render function. Twitter\Disqus integration with shouts?
|
||||
;; Rename index.posts to something else?
|
||||
; Incremental compilation: only "touched" posts+tags+months and by-n. -> 1.0
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"Return an index of all CONTENT matching the given TAG."
|
||||
(make-instance 'tag-index :slug (tag-slug tag)
|
||||
:content (remove-if-not (lambda (x) (tag-p tag x)) content)
|
||||
:title (format nil "Posts tagged ~a" (tag-name tag))))
|
||||
:title (format nil "Content tagged ~a" (tag-name tag))))
|
||||
|
||||
(defmethod publish ((doc-type (eql (find-class 'tag-index))))
|
||||
(dolist (index (find-all 'tag-index))
|
||||
|
@ -53,7 +53,7 @@
|
|||
"Return an index of all CONTENT matching the given MONTH."
|
||||
(make-instance 'month-index :slug month
|
||||
:content (remove-if-not (lambda (x) (month-p month x)) content)
|
||||
:title (format nil "Posts from ~a" month)))
|
||||
:title (format nil "Content from ~a" month)))
|
||||
|
||||
(defmethod publish ((doc-type (eql (find-class 'month-index))))
|
||||
(dolist (index (find-all 'month-index))
|
||||
|
@ -77,7 +77,7 @@
|
|||
(let ((content (subseq content (* 10 i))))
|
||||
(make-instance 'numeric-index :slug (1+ i)
|
||||
:content (take-up-to 10 content)
|
||||
:title "Recent Posts")))
|
||||
:title "Recent Content")))
|
||||
|
||||
(defmethod publish ((doc-type (eql (find-class 'numeric-index))))
|
||||
(let ((indexes (sort (find-all 'numeric-index) #'< :key #'index-slug)))
|
||||
|
@ -113,9 +113,9 @@
|
|||
(defmethod discover ((doc-type (eql (find-class 'tag-feed))))
|
||||
(let ((content (by-date (find-all 'post))))
|
||||
(dolist (tag (feeds *config*))
|
||||
(let ((posts (remove-if-not (lambda (x) (tag-p tag x)) content)))
|
||||
(let ((tagged (remove-if-not (lambda (x) (tag-p tag x)) content)))
|
||||
(dolist (format '(rss atom))
|
||||
(let ((feed (make-instance 'tag-feed :content (take-up-to 10 posts)
|
||||
(let ((feed (make-instance 'tag-feed :content (take-up-to 10 tagged)
|
||||
:format format
|
||||
:slug tag)))
|
||||
(add-document feed)))))))
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<name>{$config.author}</name>
|
||||
</author>
|
||||
|
||||
{foreach $post in $content.posts}
|
||||
{foreach $post in $content.content}
|
||||
<entry>
|
||||
<link type="text/html" rel="alternate" href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}"/>
|
||||
<title>{$post.title}</title>
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
{template index}
|
||||
<h1 class="title">{$index.title}</h1>
|
||||
{foreach $post in $index.posts}
|
||||
{foreach $obj in $index.content}
|
||||
<div class="article-meta">
|
||||
<a class="article-title" href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}">{$post.title}</a>
|
||||
<div class="date"> posted on {$post.date}</div>
|
||||
<div class="article">{$post.text |noAutoescape}</div>
|
||||
<a class="article-title" href="{$config.domain}/posts/{$obj.slug}.{$config.pageExt}">{$obj.title}</a>
|
||||
<div class="date"> posted on {$obj.date}</div>
|
||||
<div class="article">{$obj.text |noAutoescape}</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<div id="relative-nav">
|
||||
|
@ -24,7 +24,7 @@
|
|||
{/if}
|
||||
{if $months}
|
||||
<div id="monthsoup">
|
||||
<p>View posts from
|
||||
<p>View content from
|
||||
{foreach $month in $months}
|
||||
<a href="{$config.domain}/date/{$month}.{$config.pageExt}">{$month}</a>{nil}
|
||||
{if not isLast($month)},{sp}{/if}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
{template index}
|
||||
<h1 class="page-header">{$index.title}</h1>
|
||||
{foreach $post in $index.posts}
|
||||
{foreach $obj in $index.content}
|
||||
<div class="row-fluid">
|
||||
<h1><a href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}">{$post.title}</a></h1>
|
||||
<p class="date-posted">posted on {$post.date}</p>
|
||||
{$post.text |noAutoescape}
|
||||
<h1><a href="{$config.domain}/posts/{$obj.slug}.{$config.pageExt}">{$obj.title}</a></h1>
|
||||
<p class="date-posted">posted on {$obj.date}</p>
|
||||
{$obj.text |noAutoescape}
|
||||
</div>
|
||||
{/foreach}
|
||||
{if $tags}
|
||||
|
@ -21,7 +21,7 @@
|
|||
{/if}
|
||||
{if $months}
|
||||
<div class="row-fluid">
|
||||
<p>View posts from
|
||||
<p>View content from
|
||||
{foreach $month in $months}
|
||||
<a href="{$config.domain}/date/{$month}.{$config.pageExt}">{$month}</a>{nil}
|
||||
{if not isLast($month)},{sp}{/if}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<language>en-us</language>
|
||||
<pubDate>{$pubdate}</pubDate>
|
||||
|
||||
{foreach $post in $content.posts}
|
||||
{foreach $post in $content.content}
|
||||
<item>
|
||||
<title>{$post.title}</title>
|
||||
<link>{$config.domain}/posts/{$post.slug}.{$config.pageExt}</link>
|
||||
|
|
Loading…
Add table
Reference in a new issue