From 634c9fecb17d1272cc3d49e8a9fc9dbad67f25bf Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas <jashkenas@gmail.com> Date: Fri, 1 Feb 2013 20:08:40 +1100 Subject: [PATCH] fixing postUrl --- journo.js | 6 +++--- journo.litcoffee | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/journo.js b/journo.js index 0f88eeb..3d74e5b 100644 --- a/journo.js +++ b/journo.js @@ -214,9 +214,9 @@ content = fs.readFileSync(postPath(post)).toString(); lexed = marked.lexer(content); title = postTitle(content); - description = (_ref1 = _.find(lexed, function(token) { + description = ((_ref1 = _.find(lexed, function(token) { return token.type === 'paragraph'; - })) != null ? _ref1.text : void 0; + })) != null ? _ref1.text : void 0) + ' ...'; description = marked.parser(marked.lexer(_.template(description)(renderVariables(post)))); feed.item({ title: title, @@ -321,7 +321,7 @@ }; postUrl = function(post) { - return "" + shared.siteUrl + "/" + (postName(post)); + return "" + shared.siteUrl + "/" + (postName(post)) + "/"; }; postTitle = function(content) { diff --git a/journo.litcoffee b/journo.litcoffee index b582a9d..51b261f 100644 --- a/journo.litcoffee +++ b/journo.litcoffee @@ -241,7 +241,7 @@ Publish a Feed content = fs.readFileSync(postPath post).toString() lexed = marked.lexer content title = postTitle content - description = _.find(lexed, (token) -> token.type is 'paragraph')?.text + description = _.find(lexed, (token) -> token.type is 'paragraph')?.text + ' ...' description = marked.parser marked.lexer _.template(description)(renderVariables(post)) feed.item @@ -345,7 +345,7 @@ and the URL for a post on the server. postName = (post) -> path.basename post, '.md' - postUrl = (post) -> "#{shared.siteUrl}/#{postName(post)}" + postUrl = (post) -> "#{shared.siteUrl}/#{postName(post)}/" postTitle = (content) -> _.find(marked.lexer(content), (token) -> token.type is 'heading')?.text