dkd / plantuml

PlantUML Plugin for Redmine
MIT License
50 stars 40 forks source link

case using context path, image path is invalid #17

Closed hodorii closed 6 years ago

hodorii commented 6 years ago

I am using context : http://localhost/redmine

1. configuration sub context

insert to first line in "config/environment.rb" `RedmineApp::Application.routes.default_scope = "/redmine"'

2. result

/plantuml/png/...

http://0.0.0.0:3000/plantuml/png/plantuml_ad9c6acbbe4968b81647d194931ab53e6a7598870096bc62e3decbcf34ddd2a8.png

3. expected result

/redmine/plantuml/png/...

http://0.0.0.0:3000/redmine/plantuml/png/plantuml_ad9c6acbbe4968b81647d194931ab53e6a7598870096bc62e3decbcf34ddd2a8.png

ncreuschling commented 6 years ago

You can change the image path in init.rb:


macro :plantuml do |obj, args, text|
  # …
  image_tag "/plantuml/#{frmt[:type]}/#{image}#{frmt[:ext]}" # <–
end