Commits

Carbo Kuo committed 702e94b

Fix bugs

Comments (0)

Files changed (3)

models/post.coffee

       if content
         translate.zhtToZhs content.title, obtain(post.title)
         translate.zhtToZhs content.contents, obtain(post.contents)
-        post.contents = marked content.contents
+        post.contents = marked post.contents
         post.converted = 'opencc'
         rendered = true
     else if language is 'zht'
       if content
         translate.zhsToZht content.title, obtain(post.title)
         translate.zhsToZht content.contents, obtain(post.contents)
-        post.contents = marked content.contents
+        post.contents = marked post.contents
         post.converted = 'opencc'
         rendered = true
   

routes/post.coffee

     postTime:
       $gte: start
       $lt: end
-  console.log cond
   Post.getPosts cond, page, config.options.postsPerPage, obtain posts
   Post.render posts, language, obtain(posts)
   Post.getPopularPosts config.options.popularPosts, obtain popularPosts

views/layout.jade

               ul
                 each post in popularPosts
                   li
-                    a(href='/' + langLink(post.id))= postTitle(post)
+                    a(href=langLink('/' + post.id))= postTitle(post)
                     = ' - '
                     = post.clicks
             .sidebarBox