jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
604 stars 63 forks source link

How can we get hyperlinks to work? #80

Open costateixeira opened 2 years ago

costateixeira commented 2 years ago

This is a really nice plugin but I can't get the plantuml hyperlinks to work, which is blocking for my template. Is there a setting or something that can be done?

For example: https://costateixeira.github.io/documentation/diagrams.html source: https://github.com/costateixeira/documentation/blob/main/diagrams.md

zeerd commented 1 year ago

The problem is spaceship using <img> to show the diagrams both for mermeid and plantuml, like

<img class="plantuml" src="http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c696365202d3e20426f623a2048690a426f62202d2d3e20416c6963653a2048692074686572652c205b5b68747470733a2f2f636f73746174656978656972612e6769746875622e696f2f646f63756d656e746174696f6e20636f6c6c65616775655d5d2e0a40656e64756d6c">

Maybe, they can change it to <object>, like:

<object type="image/svg+xml" style="width:100%;height:100%" data="http://www.plantuml.com/plantuml/svg/~h407374617274756d6c0a416c696365202d3e20426f623a2048690a426f62202d2d3e20416c6963653a2048692074686572652c205b5b68747470733a2f2f636f73746174656978656972612e6769746875622e696f2f646f63756d656e746174696f6e20636f6c6c65616775655d5d2e0a40656e64756d6c"></object>

I know nothing about ruby, anyone want to make a PR for this?

gusevalexey0 commented 2 days ago

For me the following configuration worked:

jekyll-spaceship:
  plantuml-processor:
    mode: 'pre-fetch'

That way svgs are rendered as within <svg> tag which preserves interactive links