39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
# File 'lib/octopress-linkblog.rb', line 39
def add_post_vars(post)
linkpost = post.data['external_url'] || post.data['external-url']
post.data['title'].titlecase! if Linkblog.config['titlecase']
if linkpost
config = Linkblog.config['linkpost']
else
config = Linkblog.config['post']
end
post_url = File.join('/',post.site.config['baseurl'], post.url)
post.data['title_text'] = Linkblog.post_title_text(post.data['title'], config)
post.data['title_html'] = Linkblog.post_title_html(post.data['title'], config)
post.data['title_url'] = linkpost || post_url
post.data['linkpost'] = !linkpost.nil?
post.data['title_link'] = Linkblog.post_title_link(post.data)
post.data['permalink'] = Linkblog.post_link(Linkblog.config['permalink_label'], post_url, 'article-permalink')
post
end
|