Skip to content

Commit

Permalink
Merge pull request #609 from tdiary/fix-amp-error-in-gem
Browse files Browse the repository at this point in the history
amp.rb: fix bug, plugin does not work in gem mode
  • Loading branch information
tdtds authored Jan 2, 2017
2 parents 705d17b + e4bb655 commit 88b8a22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion misc/plugin/amp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

add_content_proc('amp') do |date|
diary = @diaries[date]
ERB.new(File.read("views/amp.rhtml")).result(binding)
template = File.read(File.join(TDiary::root, "views/amp.rhtml"))
ERB.new(template).result(binding)
end

def amp_body(diary)
Expand Down

0 comments on commit 88b8a22

Please sign in to comment.