소스 검색

Update templates to match posts->content.

Brit Butler 11 년 전
부모
커밋
862d7ad066
6개의 변경된 파일17개의 추가작업 그리고 19개의 파일을 삭제
  1. 0 2
      TODO
  2. 5 5
      src/indexes.lisp
  3. 1 1
      themes/atom.tmpl
  4. 5 5
      themes/hyde/index.tmpl
  5. 5 5
      themes/readable/index.tmpl
  6. 1 1
      themes/rss.tmpl

+ 0 - 2
TODO

@@ -1,7 +1,5 @@
1 1
 TODO:
2 2
 Coleslaw.next
3 3
 ; See if there are any good ideas we can steal from [Frog](https://github.com/greghendershott/frog)
4
-; Add HACKING.md docs, i.e. formalize workflow+releases. No more landing broken stuff on master!
5 4
 ;; needs: shout template/render function. Twitter\Disqus integration with shouts?
6
-;; Rename index.posts to something else?
7 5
 ; Incremental compilation: only "touched" posts+tags+months and by-n. -> 1.0

+ 5 - 5
src/indexes.lisp

@@ -30,7 +30,7 @@
30 30
   "Return an index of all CONTENT matching the given TAG."
31 31
   (make-instance 'tag-index :slug (tag-slug tag)
32 32
                  :content (remove-if-not (lambda (x) (tag-p tag x)) content)
33
-                 :title (format nil "Posts tagged ~a" (tag-name tag))))
33
+                 :title (format nil "Content tagged ~a" (tag-name tag))))
34 34
 
35 35
 (defmethod publish ((doc-type (eql (find-class 'tag-index))))
36 36
   (dolist (index (find-all 'tag-index))
@@ -53,7 +53,7 @@
53 53
   "Return an index of all CONTENT matching the given MONTH."
54 54
   (make-instance 'month-index :slug month
55 55
                  :content (remove-if-not (lambda (x) (month-p month x)) content)
56
-                 :title (format nil "Posts from ~a" month)))
56
+                 :title (format nil "Content from ~a" month)))
57 57
 
58 58
 (defmethod publish ((doc-type (eql (find-class 'month-index))))
59 59
   (dolist (index (find-all 'month-index))
@@ -77,7 +77,7 @@
77 77
   (let ((content (subseq content (* 10 i))))
78 78
     (make-instance 'numeric-index :slug (1+ i)
79 79
                    :content (take-up-to 10 content)
80
-                   :title "Recent Posts")))
80
+                   :title "Recent Content")))
81 81
 
82 82
 (defmethod publish ((doc-type (eql (find-class 'numeric-index))))
83 83
   (let ((indexes (sort (find-all 'numeric-index) #'< :key #'index-slug)))
@@ -113,9 +113,9 @@
113 113
 (defmethod discover ((doc-type (eql (find-class 'tag-feed))))
114 114
   (let ((content (by-date (find-all 'post))))
115 115
     (dolist (tag (feeds *config*))
116
-      (let ((posts (remove-if-not (lambda (x) (tag-p tag x)) content)))
116
+      (let ((tagged (remove-if-not (lambda (x) (tag-p tag x)) content)))
117 117
         (dolist (format '(rss atom))
118
-          (let ((feed (make-instance 'tag-feed :content (take-up-to 10 posts)
118
+          (let ((feed (make-instance 'tag-feed :content (take-up-to 10 tagged)
119 119
                                      :format format
120 120
                                      :slug tag)))
121 121
             (add-document feed)))))))

+ 1 - 1
themes/atom.tmpl

@@ -12,7 +12,7 @@
12 12
     <name>{$config.author}</name>
13 13
   </author>
14 14
 
15
-  {foreach $post in $content.posts}
15
+  {foreach $post in $content.content}
16 16
   <entry>
17 17
     <link type="text/html" rel="alternate" href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}"/>
18 18
     <title>{$post.title}</title>

+ 5 - 5
themes/hyde/index.tmpl

@@ -2,11 +2,11 @@
2 2
 
3 3
 {template index}
4 4
 <h1 class="title">{$index.title}</h1>
5
-{foreach $post in $index.posts}
5
+{foreach $obj in $index.content}
6 6
   <div class="article-meta">
7
-    <a class="article-title" href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}">{$post.title}</a>
8
-    <div class="date"> posted on {$post.date}</div>
9
-    <div class="article">{$post.text |noAutoescape}</div>
7
+    <a class="article-title" href="{$config.domain}/posts/{$obj.slug}.{$config.pageExt}">{$obj.title}</a>
8
+    <div class="date"> posted on {$obj.date}</div>
9
+    <div class="article">{$obj.text |noAutoescape}</div>
10 10
   </div>
11 11
 {/foreach}
12 12
 <div id="relative-nav">
@@ -24,7 +24,7 @@
24 24
 {/if}
25 25
 {if $months}
26 26
 <div id="monthsoup">
27
-  <p>View posts from
27
+  <p>View content from
28 28
     {foreach $month in $months}
29 29
       <a href="{$config.domain}/date/{$month}.{$config.pageExt}">{$month}</a>{nil}
30 30
       {if not isLast($month)},{sp}{/if}

+ 5 - 5
themes/readable/index.tmpl

@@ -2,11 +2,11 @@
2 2
 
3 3
 {template index}
4 4
 <h1 class="page-header">{$index.title}</h1>
5
-{foreach $post in $index.posts}
5
+{foreach $obj in $index.content}
6 6
   <div class="row-fluid">
7
-    <h1><a href="{$config.domain}/posts/{$post.slug}.{$config.pageExt}">{$post.title}</a></h1>
8
-    <p class="date-posted">posted on {$post.date}</p>
9
-    {$post.text |noAutoescape}
7
+    <h1><a href="{$config.domain}/posts/{$obj.slug}.{$config.pageExt}">{$obj.title}</a></h1>
8
+    <p class="date-posted">posted on {$obj.date}</p>
9
+    {$obj.text |noAutoescape}
10 10
   </div>
11 11
 {/foreach}
12 12
 {if $tags}
@@ -21,7 +21,7 @@
21 21
 {/if}
22 22
 {if $months}
23 23
 <div class="row-fluid">
24
-  <p>View posts from
24
+  <p>View content from
25 25
     {foreach $month in $months}
26 26
       <a href="{$config.domain}/date/{$month}.{$config.pageExt}">{$month}</a>{nil}
27 27
       {if not isLast($month)},{sp}{/if}

+ 1 - 1
themes/rss.tmpl

@@ -10,7 +10,7 @@
10 10
     <language>en-us</language>
11 11
     <pubDate>{$pubdate}</pubDate>
12 12
 
13
-    {foreach $post in $content.posts}
13
+    {foreach $post in $content.content}
14 14
     <item>
15 15
       <title>{$post.title}</title>
16 16
       <link>{$config.domain}/posts/{$post.slug}.{$config.pageExt}</link>