瀏覽代碼

Tweak link handling.

Brit Butler 13 年之前
父節點
當前提交
ada2e397ae
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      src/indices.lisp
  2. 1 1
      src/posts.lisp
  3. 1 1
      themes/hyde/base.tmpl

+ 2 - 2
src/indices.lisp

@@ -33,8 +33,8 @@
33 33
 (defun write-index (posts filename title &optional prev next)
34 34
   "Write out the HTML for POSTS to FILENAME.html."
35 35
   (let ((content (loop for post in posts
36
-                    collect (list :url (format nil "~a/posts/~a.html"
37
-                                               (domain *config*) (post-slug post))
36
+                    collect (list :url (format nil "~a/posts/~a"
37
+                                               (domain *config*) (post-url post))
38 38
                                   :title (post-title post)
39 39
                                   :date (post-date post)
40 40
                                   :content (render-content (post-content post)

+ 1 - 1
src/posts.lisp

@@ -24,7 +24,7 @@
24 24
 
25 25
 (defun post-url (post)
26 26
   "Return the relative URL for a given post."
27
-  (format nil "posts/~a.html" (post-slug post)))
27
+  (format nil "~a.html" (post-slug post)))
28 28
 
29 29
 (defun render-posts ()
30 30
   "Iterate through the files in the repo to render+write the posts out to disk."

+ 1 - 1
themes/hyde/base.tmpl

@@ -15,7 +15,7 @@
15 15
   <body>
16 16
     <div class="navigation">
17 17
       {$navigation |noAutoescape}
18
-      {$title}
18
+      <a href="{$siteroot}">{$title}</a>
19 19
     </div>
20 20
     <div id="content">
21 21
       {$content |noAutoescape}