From 862d7ad06682d9e2e7c5f1bae0bbdab830796a60 Mon Sep 17 00:00:00 2001 From: Brit Butler Date: Tue, 15 Apr 2014 20:39:13 -0400 Subject: [PATCH] Update templates to match posts->content. --- TODO | 2 -- src/indexes.lisp | 10 +++++----- themes/atom.tmpl | 2 +- themes/hyde/index.tmpl | 10 +++++----- themes/readable/index.tmpl | 10 +++++----- themes/rss.tmpl | 2 +- 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/TODO b/TODO index 0445f3b..95ca4af 100644 --- a/TODO +++ b/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 diff --git a/src/indexes.lisp b/src/indexes.lisp index f0821f6..45b77ce 100644 --- a/src/indexes.lisp +++ b/src/indexes.lisp @@ -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))))))) diff --git a/themes/atom.tmpl b/themes/atom.tmpl index f8d54a0..761f684 100644 --- a/themes/atom.tmpl +++ b/themes/atom.tmpl @@ -12,7 +12,7 @@ {$config.author} - {foreach $post in $content.posts} + {foreach $post in $content.content} {$post.title} diff --git a/themes/hyde/index.tmpl b/themes/hyde/index.tmpl index e3ec8b6..9100fdf 100644 --- a/themes/hyde/index.tmpl +++ b/themes/hyde/index.tmpl @@ -2,11 +2,11 @@ {template index}

{$index.title}

-{foreach $post in $index.posts} +{foreach $obj in $index.content} {/foreach}
@@ -24,7 +24,7 @@ {/if} {if $months}
-

View posts from +

View content from {foreach $month in $months} {$month}{nil} {if not isLast($month)},{sp}{/if} diff --git a/themes/readable/index.tmpl b/themes/readable/index.tmpl index 32ff1bf..8abe85f 100644 --- a/themes/readable/index.tmpl +++ b/themes/readable/index.tmpl @@ -2,11 +2,11 @@ {template index}

{$index.title}

-{foreach $post in $index.posts} +{foreach $obj in $index.content}
-

{$post.title}

-

posted on {$post.date}

- {$post.text |noAutoescape} +

{$obj.title}

+

posted on {$obj.date}

+ {$obj.text |noAutoescape}
{/foreach} {if $tags} @@ -21,7 +21,7 @@ {/if} {if $months}
-

View posts from +

View content from {foreach $month in $months} {$month}{nil} {if not isLast($month)},{sp}{/if} diff --git a/themes/rss.tmpl b/themes/rss.tmpl index 72489bb..2559dc5 100644 --- a/themes/rss.tmpl +++ b/themes/rss.tmpl @@ -10,7 +10,7 @@ en-us {$pubdate} - {foreach $post in $content.posts} + {foreach $post in $content.content} {$post.title} {$config.domain}/posts/{$post.slug}.{$config.pageExt}